-
Notifications
You must be signed in to change notification settings - Fork 473
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
feat: Add /welcome/login
route for displaying safes list
#3176
Conversation
hide show more button after it is clicked
/welcome/login
for displaying safes
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe 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 If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! New Page AddedThe following page was added to the bundle from the code in this PR:
Eighteen Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly 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 Any third party scripts you have added directly to your app using the 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. |
/welcome/login
for displaying safes/welcome/login
route for displaying safes
/welcome/login
route for displaying safes/welcome/login
route for displaying safes list
There are CI jobs failing. As we talked about a few times, this PR should not contain any changes to the Redux stores. Only the HTML/CSS for the new page. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
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.
There's a sidebar flashing when opening the login page, please add it to the NO_SIDEBAR_ROUTES list.
src/hooks/useSafes.ts
Outdated
watchedSafesOnAllChains = [...watchedSafesOnAllChains, ...watchedSafesWithChain] | ||
} | ||
const promises = watchedSafesOnAllChains.map(async ({ safeAddress, chain, threshold, owners }) => { | ||
const fiatBalance = await getBalances(chain.chainId, safeAddress, 'USD').then((result) => result.fiatTotal) |
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.
USD shouldn't be hardcoded. There's a redux selector for the user-preferred currency.
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.
Overall, I wouldn't fetch balances in this hook. They essentially make the entire list wait. I would instead fetch the balances separately and then pass them separately to the corresponding components.
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.
yeah that makes sense. I moved the balance request to SafeListItem
Redesign the welcome page according to the designs: https://www.figma.com/file/WSpulDIM1EoSCI6Ph9QdWq/Seedless-onboarding?type=design&node-id=1047-12423&mode=design&t=MSQvs5eVjdMOLVzr-0
The new design is added to a new route at /welcome/login. Currently it doesn't show acual owned safes. Implementation of getting owned safes will be done later using the new endpoint getAllOwnedSafes: safe-global/safe-gateway-typescript-sdk#144
Checklist