Approve a dApp request on one screen, not two - #279
Merged
Conversation
Signing a dApp request meant reviewing it, pressing Sign, and then confirming again in a password dialog stacked on top of the review -- two screens for one decision, and the dialog covered the transaction the user was agreeing to. Collect the password in the approval footer instead. Pressing Sign is now the whole confirmation, with the transaction still on screen behind it. A wrong password is reported under the field and the request stays open for another try, rather than the popup deciding the attempt is over. Hardware accounts keep the dialog: those flows have device prompts and a QR exchange to run, and no password to collect. The button says "Sign with device" so it is clear which is coming. The new footer lives in one component shared by both approval screens, so the transaction and message flows cannot drift apart again. signTx and signData now route both the inline path and the device dialog through the same pair of return-to-dApp helpers.
Fuma419
enabled auto-merge (squash)
September 4, 2026 14:43
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #278. That PR made the dApp approval screens look right; this one removes a step from them.
The extra step
Approving a dApp transaction was two screens for one decision:
The dialog also covered the transaction being agreed to, so the details were hidden at the moment of confirming.
Now
The password sits in the approval footer. Pressing Sign is the confirmation, with the transaction still visible above it. A wrong password is reported under the field and the request stays open for another try — previously the failure path was the dialog's to interpret.
Hardware accounts keep the dialog, because those flows have device prompts and a QR exchange to run and no password to collect. The button reads Sign with device so it is clear a dialog is coming.
Shape of the change
New
inlineSignAction.jsxowns the footer (password field, primary action, cancel) and is shared by both approval screens, so the transaction and message flows cannot drift apart again — that drift is what left the sign-message screen two design generations behind in #278.Both screens now route the inline path and the device dialog through one pair of return-to-dApp helpers (
returnSignedTx/returnSignError), instead of each caller inliningcontroller.returnData+window.close().The signing calls themselves are untouched: the same
signTx(...)/signDataCIP30(...)with the same arguments. Only where the password comes from has changed.Verification
sign-data-page-render.test.jsgrows to 9 tests covering the new footer:Confirmdialog button anywhere{ data }and closesreturnDatais not called, popup stays open, and a retry then succeeds{ error }sign-tx-refresh.test.jskeeps guarding the footer contract, now including that only hardware routes toopenModal.Full unit suite: 902 passed.
Left alone deliberately
The
enable→signTxdouble popup. Those are two separate CIP-30 requests from the dApp, usually seconds apart, and collapsing them would mean granting a connection and a signature on one screen. Not worth the ambiguity.