persist confirm-tx view across popup close/reopen (closes #77)
All checks were successful
check / check (push) Successful in 23s

Add confirm-tx to RESTORABLE_VIEWS and save pendingTx in
state.viewData so the confirmation screen survives the popup
lifecycle. On restore, re-render the full confirmation view
including gas estimate.
This commit is contained in:
user
2026-02-28 12:19:39 -08:00
committed by Jeffrey Paul
parent 6a214f1c58
commit 78f961f416
2 changed files with 17 additions and 1 deletions

View File

@@ -74,6 +74,7 @@ const RESTORABLE_VIEWS = new Set([
"receive",
"settings",
"settings-addtoken",
"confirm-tx",
"transaction",
"success-tx",
"error-tx",
@@ -127,6 +128,13 @@ function restoreView() {
case "settings-addtoken":
settingsAddToken.show();
break;
case "confirm-tx":
if (state.viewData && state.viewData.pendingTx) {
confirmTx.restore();
} else {
fallbackView();
}
break;
case "transaction":
if (state.viewData && state.viewData.tx) {
transactionDetail.render();