Skip to content

Conversation

@ElRodrigote
Copy link
Collaborator

Fixes: STK-118

Description

  • Batch fetch ERC-20 token balances from the user's connected wallet using the Multicall smart contract
  • Descending sort those balances

Preview

image

How to test the changes

  1. Pull this branch
  2. Run the project locally
  3. Go to the Stackly homepage, connect your wallet, and then click any of the two "Select token" buttons

@vercel
Copy link

vercel bot commented Aug 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stackly-ui-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 1, 2023 2:19pm

Copy link
Collaborator

@berteotti berteotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ElRodrigote answering your comment on the following review :)

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 30, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 06efa2b
Status: ✅  Deploy successful!
Preview URL: https://f8460bf7.stackly-ui.pages.dev
Branch Preview URL: https://feat-stk-118-enhance-user-ba.stackly-ui.pages.dev

View logs

@Diogomartf
Copy link
Collaborator

Not a big deal but when we disconnect wallet we are keeping the balances.

image

Diogomartf
Diogomartf previously approved these changes Aug 31, 2023
Copy link
Collaborator

@Diogomartf Diogomartf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The balances look snappy and code is looking good. Good job 👍

@ElRodrigote ElRodrigote changed the title [STK-118][FEAT] - Display user's token balances [STK-118][FEAT] - Enhance user balances using Multicall contract Aug 31, 2023
@ElRodrigote
Copy link
Collaborator Author

Not a big deal but when we disconnect wallet we are keeping the balances.

image

Actually we shouldn't show the Stackbox if we have the wallet disconnected (because you wouldn't be able to interact with it, makes no sense).

Here we need an empty state when the wallet is not connected. I'll contact Akash about this and see if he has something around that idea or if he can build it.

balance?: string;
}

const GNOSIS_CHAIN_ID = 100;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this anymore. We can use ChainId.GNOSIS

Diogomartf
Diogomartf previously approved these changes Sep 1, 2023
Copy link
Collaborator

@Diogomartf Diogomartf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job!

@Diogomartf
Copy link
Collaborator

just look at the CI build, it's failing

@ElRodrigote ElRodrigote force-pushed the feat/stk-118-enhance-user-balance-fetch-performance branch from bdc12f4 to 06efa2b Compare September 1, 2023 14:17
@ElRodrigote
Copy link
Collaborator Author

Collaborator

Yes! Dunno was failing before, afterwards I got the pipelines failing due to merge conflicts.
Everything seems to be solved now :D

Copy link
Collaborator

@berteotti berteotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job Rorry!

@ElRodrigote ElRodrigote merged commit b4f2338 into develop Sep 1, 2023
@ElRodrigote ElRodrigote deleted the feat/stk-118-enhance-user-balance-fetch-performance branch September 1, 2023 19:04
berteotti pushed a commit that referenced this pull request Oct 19, 2023
* feat(STK-118): batch fetch ERC-20 balances from the connected wallet, then sort the list
* feat(STK-118): default token list into Gnosis when no wallet connected, remove balances when no wallet connected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants