fix: refusing a From address the wallet does not hold moves nothing (closes #609)
Sign & Send wrote its refusal of a From address the selected wallet does not hold onto the password error line, which reserves one line. The sentence runs to about three, so it pushed Sign & Send down. The refusal now has its own box above the password field, its sentence fixed in index.html, holding its space from the first paint and only made visible, as #583 did for the other refusals. Drawing the screen and each press hide it again. A Chrome test writes the other wallet into the stored selection, reopens the popup onto the screen, presses Sign & Send and checks that nothing was broadcast and nothing moved. Model: opus-5-5
This commit was merged in pull request #617.
This commit is contained in:
@@ -320,6 +320,7 @@ function show(txInfo) {
|
||||
$("confirm-tx-password").value = "";
|
||||
hideError("confirm-tx-password-error");
|
||||
setVisible("confirm-network-changed-error", false);
|
||||
setVisible("confirm-from-address-error", false);
|
||||
setVisible("confirm-fee-bound-error", false);
|
||||
|
||||
// Gas estimate — show placeholder then fetch async
|
||||
@@ -661,6 +662,7 @@ function init(_ctx) {
|
||||
$("btn-confirm-send").addEventListener("click", async () => {
|
||||
// A press shows only its own refusal, if any.
|
||||
setVisible("confirm-network-changed-error", false);
|
||||
setVisible("confirm-from-address-error", false);
|
||||
setVisible("confirm-fee-bound-error", false);
|
||||
|
||||
const wallet = state.wallets[state.selectedWallet];
|
||||
@@ -686,11 +688,7 @@ function init(_ctx) {
|
||||
// address selected.
|
||||
const addr = wallet.addresses.find((a) => a.address === pendingTx.from);
|
||||
if (!addr) {
|
||||
showError(
|
||||
"confirm-tx-password-error",
|
||||
"The selected wallet does not hold the From address above, " +
|
||||
"so nothing was sent. Please go back and send again.",
|
||||
);
|
||||
setVisible("confirm-from-address-error", true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user