feat: Fetch wallets from accounts#509
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (5)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| address: account.account_identifier, | ||
| connected: false | ||
| })) | ||
| return processedWallets ? processedWallets : [] |
There was a problem hiding this comment.
questions:
- Can we keep kernelClientAddress as to be non-breaking to current flow ? (Also maybe merge both localStorage accounts & fetched ones in the response)
- Does
account.account_typeis the same type as walletProviderType ? - Is
handlemissing ?
Maybe we can store this PR until we get the right data into the account type ?
There was a problem hiding this comment.
Some questions to make sure I understand:
- Can you explain a bit deeper on how
kernelClientAddressis influencing this? My understanding is that that wallets should be populated only when the user accounts are populated/ depopulated (auth/logout). Happy to hop on a call to solve this quickly. - Correct me if I'm wrong but i think the user will be fetched every time the page is reloaded and the accounts will be populated. The same way we cleared walletContext and decided to have single sources of truth, I think the best idea here would be to have a single source of truth via
user.accounts. Additionally, when a new BYOW is added we add to DB anduser.accounts. Wdyt? - That's the expectation with
account.account_type - I have not included it (don't see the need to). Wdyt?
There was a problem hiding this comment.
Apologies for late reply !
- Yes kernelClientAddress was just to update that query when someone registered a new wallet and got redirected to home screen.
- I see it's been added, perfect
- Will need it to be displayed in the profile, but we can grab this from the user probably since for now it's one to one relationship with PWs
3545819 to
f9d52fd
Compare
Adds
user.accountsrefresh)AccountTypefrom backend to frontendChainTypenewly created herechainandAccountTypeRemoves
handlefromIWallet(usinguser.user.usernamefromuseAuth()context)