diff --git a/src/popup/views/addressDetail.js b/src/popup/views/addressDetail.js index 49c627e..2deb222 100644 --- a/src/popup/views/addressDetail.js +++ b/src/popup/views/addressDetail.js @@ -325,6 +325,9 @@ function init(_ctx) { $("export-privkey-flash").classList.remove("hidden"); return; } + const btn = $("btn-export-privkey-confirm"); + btn.disabled = true; + btn.classList.add("text-muted"); const wallet = state.wallets[state.selectedWallet]; try { const secret = await decryptWithPassword( @@ -344,6 +347,9 @@ function init(_ctx) { } catch { $("export-privkey-flash").textContent = "Wrong password."; $("export-privkey-flash").classList.remove("hidden"); + } finally { + btn.disabled = false; + btn.classList.remove("text-muted"); } }); diff --git a/src/popup/views/deleteWallet.js b/src/popup/views/deleteWallet.js index 49e47bf..21cc2ea 100644 --- a/src/popup/views/deleteWallet.js +++ b/src/popup/views/deleteWallet.js @@ -40,6 +40,10 @@ function init(_ctx) { return; } + const btn = $("btn-delete-wallet-confirm"); + btn.disabled = true; + btn.classList.add("text-muted"); + const walletIdx = deleteWalletIndex; const wallet = state.wallets[walletIdx]; @@ -49,6 +53,8 @@ function init(_ctx) { } catch (_e) { $("delete-wallet-flash").textContent = "Wrong password."; $("delete-wallet-flash").classList.remove("hidden"); + btn.disabled = false; + btn.classList.remove("text-muted"); return; }