Show tx status screens after dApp transaction approval
All checks were successful
check / check (push) Successful in 17s

Previously the approval popup closed immediately after the user
entered their password, giving zero feedback about whether the
transaction was broadcast or confirmed. Now:

1. Background sends the broadcast result back to the popup via
   sendResponse callback (txHash or error)
2. Popup shows wait-tx screen on success (with polling timer)
   or error-tx screen on failure
3. Wait-tx polls for confirmation and transitions to success-tx
4. Done button closes the approval window

txStatus.init() moved before the approval early-return so the
wait/success/error views are wired up in the approval popup.
Done buttons detect the approval context and call window.close()
instead of navigating to address detail.
This commit is contained in:
2026-02-27 12:50:24 +07:00
parent 1ebc206201
commit 54e6f6c180
4 changed files with 74 additions and 13 deletions

View File

@@ -161,7 +161,15 @@ function renderError() {
showView("error-tx");
}
function isApprovalPopup() {
return new URLSearchParams(window.location.search).has("approval");
}
function navigateBack() {
if (isApprovalPopup()) {
window.close();
return;
}
if (state.selectedToken) {
ctx.showAddressToken();
} else {