-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added navigation between multiple sign prompts and reject all sign prompts #17093
Added navigation between multiple sign prompts and reject all sign prompts #17093
Conversation
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. |
094315d
to
8220055
Compare
c403d4e
to
cb3cf68
Compare
Builds ready [cb3cf68]
Page Load Metrics (1540 ± 131 ms)
Bundle size diffs
highlights:storybook
|
Verified by QA |
Builds ready [80c11c3]
Page Load Metrics (1260 ± 76 ms)
Bundle size diffs
highlights:storybook
|
80c11c3
to
53df20e
Compare
Builds ready [53df20e]
Page Load Metrics (1521 ± 113 ms)
Bundle size diffs
highlights:storybook
|
53df20e
to
2c924a0
Compare
Builds ready [fa3cda9]
Page Load Metrics (1214 ± 90 ms)
Bundle size diffs
highlights:storybook
|
fa3cda9
to
81fe32b
Compare
Builds ready [81fe32b]
Page Load Metrics (1179 ± 52 ms)
Bundle size diffs
highlights:storybook
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in confirm-page-container-navigation.component.js can cause unapproved signature request to be opened from transaction page and visa versa.
An option could be creating separate component for signatures. This new component and confirm-page-container-navigation.component.js
can be refactored to use same dumb component for UI rendering.
Some behaviour to double-check related to mixing Signatures with Sends/Deploys tx's following up @jpuri comment: after prompting for a couple of signatures without accepting them, if the Dapp now sends Send/Deploy tx's requests, MM starts to behave strangely. Issues:
sign-reqs-tx-reqs.mp4I am not sure what should be the expect behaviour though:
|
81fe32b
to
d929dde
Compare
You are right @jpuri! I created separate component for signatures and this new component for signatures and |
b84b9ae
to
1f59ce3
Compare
@jpuri @bschorchit @seaona I added a single component for navigation which will show both messages and transactions requests. Here are those changes. You can also check in the PR description, I attached screencast with latest changes. I will appreciate your re-review on this. Thanks! |
Hey @VSaric : code changes look great. Will be n ice to have some more test coverage also. |
Verified by QA |
…endering part into a single component
…ransactions requests
6fa54d2
to
8bc9ed8
Compare
Builds ready [621269d]
Page Load Metrics (1193 ± 94 ms)
Bundle size diffs
|
history.push( | ||
uncofirmedTransactions[txId]?.msgParams | ||
? `${CONFIRM_TRANSACTION_ROUTE}/${txId}${SIGNATURE_REQUEST_PATH}` | ||
: `${CONFIRM_TRANSACTION_ROUTE}/${txId}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you route all request to ${CONFIRM_TRANSACTION_ROUTE}/${txId}
it takes care to re-route to specific page depending on request type and should work for any confirmation request in fact, but above also looks good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work 👍
Builds ready [ba47ee3]
Page Load Metrics (1564 ± 158 ms)
Bundle size diffs
|
Explanation
With this fix, the users should be able to navigate between multiple sign prompts back and forth and should be able to reject all sign prompts at once for
Eth Sign
,Personal Sign
,SignTypedData
,SignTypedData_v3
andSignTypedData_v4
. Also we are using a single component for navigation which will show both messages and transactions requests.V3
andV4
#16848Screenshots/Screencaps
Before
206234177-845cbb7e-8454-47c6-bcbd-4daedb292ebd.mp4
After
popup view
Screen.Recording.2023-01-06.at.13.58.27.mov
expanded view
Screen.Recording.2023-01-06.at.13.30.06.mov
Using a single component for navigation which will show both messages and transactions requests and visa versa
Screen.Recording.2023-01-25.at.12.29.57.mov
Manual Testing Steps
Eth Sign
orPersonal Sign
orSignTypedData
orSignTypedData_v3
orSignTypedData_v4
.Using a single component for navigation which will show both messages and transactions requests and visa versa
Piggy bank contract
section (Deploy Contract
) orSend Tokens
section (Create Token
) orSend Eth
section (Send Legacy Transaction
orSend EIP 1559 Transaction
) and than click multiple times onEth Sign
orPersonal Sign
orSignTypedData
orSignTypedData_v3
orSignTypedData_v4
.