Show tx status screens after dApp transaction approval
All checks were successful
check / check (push) Successful in 17s
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user