-
Notifications
You must be signed in to change notification settings - Fork 428
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
Refactor: unify confirmations in the transaction flow #4177
Conversation
Branch preview✅ Deploy successful! Storybook: |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
1011.89 KB (🟡 +158 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Four Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load |
---|---|---|
/apps |
48.42 KB (-1 B) |
1.04 MB |
/apps/custom |
40.06 KB (-1 B) |
1.03 MB |
/balances/nfts |
19.2 KB (-1 B) |
1.01 MB |
/stake |
596 B (🟢 -1 B) |
1012.47 KB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link
is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success1582 tests passing in 213 suites. Report generated by 🧪jest coverage report action from 0c1b25e |
src/components/tx-flow/flows/RecoverAccount/RecoverAccountFlowReview.tsx
Outdated
Show resolved
Hide resolved
src/components/tx-flow/flows/SignMessageOnChain/ReviewSignMessageOnChain.test.tsx
Outdated
Show resolved
Hide resolved
ESLint Summary View Full Report
[warning] react-hooks/exhaustive-deps
Report generated by eslint-plus-action |
1615043
to
e8f3d2e
Compare
c26dac4
to
80f3df1
Compare
ESLint Summary View Full Report
Report generated by eslint-plus-action |
7250d54
to
4148903
Compare
const proposeTx: TxActions['proposeTx'] = async (safeTx, txId, origin) => { | ||
assertTx(safeTx) | ||
return _propose(wallet?.address || safe.owners[0].value, safeTx, txId, origin) | ||
} |
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.
Does this need to be a separate function just for the assertTx?
ESLint Summary View Full Report
Report generated by eslint-plus-action |
5d7b041
to
20c52f2
Compare
ESLint Summary View Full Report
Report generated by eslint-plus-action |
1840103
to
49e771f
Compare
ESLint Summary View Full Report
Report generated by eslint-plus-action |
any reason we moved approve at the top again ? |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
f3d527b
to
360f9d4
Compare
What it solves
Unify all the Review screens from the tx-flow floder.
How this PR fixes it
It introduces a refactor in the way how we handle the confirmation views on the SignOrExecuteForm component. This PR introduces the first part of the refactor, by creating a central component to handle the presentation of the Review screens. It also makes all modals from the approval owner flow to use the same SettingsChange component (which was part of the ReviewOwner component.
How to test it
1- Go to the add signer flow (in a modal)
2- Go to the confirmation screen.
You will see the new screen shows a loading screen before the confirmation screen, it happens because we had to move some data outside the SignOrExecuteForm component, and these data was asynchronous, so in order to prevent some glitch in the screen, we show the loading component before we have load the necessary data to show in the component.
Screenshots
Checklist