metamask-extension
metamask-extension copied to clipboard
ConfirmPage: update UI for setApproveForAll transactions to better warn users of the allowances
Explanation
In https://github.com/MetaMask/metamask-extension/pull/15496, @cygaar proposed improving the warning message on the ConfirmPage for setApprovalForAll
transaction types and gathered feedback to support this improvement.
Based on an internal dialog here, we will be updating the "Confirm" button to red, and including an error type Dialog to better warn users that they are interacting with a setApprovalForAll
transaction. This is a temporary improvement while a redesign is on the way. More details are explained in https://github.com/MetaMask/metamask-extension/pull/15496 and the internal dialog.
More Information
See: https://github.com/MetaMask/metamask-extension/pull/15496 See: Internal Dialog
Screenshots/Screencaps
Before

After


Manual Testing Steps
- send a
setApprovalForAll
transaction and observe a red, danger-primary "Confirm" button - send any other transaction and observe a blue, primary "Confirm" button
+ If there are functional changes:
- [ ] Manual testing complete & passed
- [ ] "Extension QA Board" label has been applied
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
Great to see, thanks for updating!
Builds ready [a5fe3c6]
- builds: chrome, firefox, opera
- builds (beta): chrome, firefox, opera
- builds (flask): chrome, firefox, opera
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- code coverage: Report
- storybook: Storybook
- all artifacts
Page Load Metrics (2218 ± 84 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 95 | 2163 | 238 | 442 | 212 |
domContentLoaded | 1901 | 2507 | 2186 | 181 | 87 | ||
load | 1901 | 2507 | 2218 | 175 | 84 | ||
domInteractive | 1901 | 2507 | 2186 | 181 | 87 |
highlights:
storybook
- ui/components/app/metamask-translation/metamask-translation.stories.js
- ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.stories.js
- ui/pages/confirm-approve/confirm-approve.stories.js
- ui/pages/confirm-deploy-contract/confirm-deploy-contract.stories.js
- ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.stories.js
- ui/pages/confirm-import-token/confirm-import-token.stories.js
- ui/pages/confirm-send-ether/confirm-send-ether.stories.js
- ui/pages/confirm-send-token/confirm-send-token.stories.js
- ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.stories.js
- ui/pages/confirm-transaction-base/confirm-transaction-base.stories.js
The language This should never be your default included in the warning might throw some users off, since almost no dapps will present users with a secondary option (say, to approve a single tokenId). I would find this language confusing. I think we should make the risks known and present it with the appropriate gravity of warning without suggesting that the user is missing some less risky option that very mainstream dapps likely don't offer. Open to being convinced otherwise though! cc @tayvano tagging you since I know you have strong opinions about security and the language we use to convey it.
@adonesky1 what do you think about: "You're giving access to all your current and future <NFTname> NFTs. The other party might be able to transfer them from your wallet without further notice. Proceed with caution." cc: @SayaGT @coreyjanssen
How about: "By clicking approve you are granting access to all of the NFTs you currently own on this contract and any NFTs on this contract you may acquire in the future, until you revoke this approval. The party to whom you're granting approval will be able to transfer your NFTs from your wallet without further notice. Proceed with caution" something like that... away from my computer right not so grammar could use some tweaking
How about: "By clicking approve you are granting access to all of the NFTs you currently own on this contract and any NFTs on this contract you may acquire in the future, until you revoke this approval. The party to whom you're granting approval will be able to transfer your NFTs from your wallet without further notice. Proceed with caution" something like that... away from my computer right not so grammar could use some tweaking
Sounds great to me!
Great call out and suggestion @adonesky1! Looks good to me. The first message was copied from a mock supplied in this Slack thread.
I moved one comma and kept the rest the same:
By clicking approve, you are granting access to all of the NFTs you currently own on this contract and any NFTs on this contract you may acquire in the future until you revoke this approval. The party to whom you're granting approval will be able to transfer your NFTs from your wallet without further notice. Proceed with caution.
Updated: https://github.com/MetaMask/metamask-extension/pull/15512/commits/5e0b148eee0a4d1a2a34366c7ebac34e7172fd8e
--
In regards to keeping or omitting the punctuation on the last sentence, we could do that in a follow-up PR if this PR gets approved before the final decision here. ref: https://github.com/MetaMask/metamask-extension/pull/15512#discussion_r941765206
Builds ready [ac14058]
- builds: chrome, firefox, opera
- builds (beta): chrome, firefox, opera
- builds (flask): chrome, firefox, opera
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1818 ± 116 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 86 | 240 | 110 | 35 | 17 |
domContentLoaded | 1593 | 2536 | 1808 | 234 | 113 | ||
load | 1594 | 2536 | 1818 | 242 | 116 | ||
domInteractive | 1593 | 2536 | 1808 | 234 | 113 |
highlights:
storybook
- ui/components/app/metamask-translation/metamask-translation.stories.js
- ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.stories.js
- ui/pages/confirm-approve/confirm-approve.stories.js
- ui/pages/confirm-deploy-contract/confirm-deploy-contract.stories.js
- ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.stories.js
- ui/pages/confirm-import-token/confirm-import-token.stories.js
- ui/pages/confirm-send-ether/confirm-send-ether.stories.js
- ui/pages/confirm-send-token/confirm-send-token.stories.js
- ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.stories.js
- ui/pages/confirm-transaction-base/confirm-transaction-base.stories.js
Apologies for not seeing this convo until today! (thanks @bschorchit!) Made a few edits to the proposed copy. Lmk if this works!
You're granting access to all the NFTs on this contract, including any you might own in the future. The party on the other end of this approval can transfer NFTs from your wallet at any time without asking you. Proceed with caution.
Hi @coreyjanssen,
No problem! I like this update, and I'm up for updating this. One thing that I would miss from the copy that has been merged
By clicking approve, you are granting access to all of the NFTs you currently own on this contract and any NFTs on this contract you may acquire in the future until you revoke this approval. The party to whom you're granting approval will be able to transfer your NFTs from your wallet without further notice. Proceed with caution.
is the mention that this contract is able to access the NFTs until you revoke this approval.
. Is this something we could add in somehow?
cc: @adonesky1 @bschorchit
@digiwand sure thing! how's this?
You're granting access to all the NFTs on this contract, including any you might own in the future. The party on the other end can transfer NFTs from your wallet at any time without asking you until you revoke this approval. Proceed with caution.
Awesome!!! I think this is an A1 update! Thanks @coreyjanssen! :D
Updated here: https://github.com/MetaMask/metamask-extension/pull/15744