Skip to content
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: fetch balance for custom tokens #997

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

Ikari-Shinji-re
Copy link
Member

@Ikari-Shinji-re Ikari-Shinji-re commented Jan 21, 2025

Summary

We want to fetch the balances of custom tokens for wallets that support the corresponding blockchains whenever new custom tokens are added or a new wallet is connected.
Also implementing the retrieval of the token price from the balances response and updating the usdValue in the balance cache.

Fixes # (issue)

How did you test this change?

You can add a custom token or connect a wallet that supports the blockchain of the custom tokens. A request will be sent to the server to fetch the balances of those tokens.

Sample test case:
3yoMkf3X6bDxjks6YaWwNk4SAbuaysLg1a4BjQKToQAA

  • Test A
  • Test B

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Implemented a user interface (UI) change, referencing our Figma design to ensure pixel-perfect precision.

@nikaaru

This comment was marked as resolved.

@nikaaru

This comment was marked as resolved.

@nikaaru
Copy link
Member

nikaaru commented Feb 11, 2025

you can use these custom tokens for the BSC blockchain:


token 1 ==============> 
{
  blockchain: 'BSC',
  symbol: 'USDFI',
  address: '0x11a38e06699b238d6d9a0c7a01f3ac63a07ad318'
}

token 2 ==============> 
{
  blockchain: 'BSC',
  symbol: 'AICR',
  address: '0x499fc0ec9aade85de50af0c17513c7b850eb275f'
}

token 3 ==============> 
{
  blockchain: 'BSC',
  symbol: 'ASIX',
  address: '0xc98a8ec7a07f1b743e86896a52434c4c6a0dbc42'
}

token 4 ==============> 
{
  blockchain: 'BSC',
  symbol: 'AU',
  address: '0x8ea2f890cb86dfb0e376137451c6fd982afefc15'
}

token 5 ==============> 
{ blockchain: 'BSC', symbol: 'BABYDOGE2', address: '0' }

token 6 ==============> 
{ blockchain: 'BSC', symbol: 'BIBI2', address: '0' }

token 7 ==============> 
{
  blockchain: 'BSC',
  symbol: '$BRES',
  address: '0xa9231f3b68e8059722c86014df8ce8607bb8defe'
}

token 8 ==============> 
{
  blockchain: 'BSC',
  symbol: 'TUSD',
  address: '0x14016e85a25aeb13065688cafb43044c2ef86784'
}

token 9 ==============> 
{
  blockchain: 'BSC',
  symbol: 'BVT',
  address: '0x1dacbcd9b3fc2d6a341dca3634439d12bc71ca4d'
}

token 10 ==============> 
{
  blockchain: 'BSC',
  symbol: 'CTY',
  address: '0xba08da6b46e3dd153dd8b66a6e4cfd37a6359559'
}




@nikaaru
Copy link
Member

nikaaru commented Feb 11, 2025

And you can use these custom tokens for the POLYGON blockchain:


token 1 ==============> 
{ blockchain: 'POLYGON', symbol: 'USDC', address: 'e' }

token 2 ==============> 
{
  blockchain: 'POLYGON',
  symbol: 'DPLY',
  address: '0x3d0643f53f9ff86f11f8bc6fee6e88ab7647f7cc'
}

token 3 ==============> 
{
  blockchain: 'POLYGON',
  symbol: 'REVV',
  address: '0x70c006878a5a50ed185ac4c87d837633923de296'
}

token 4 ==============> 
{
  blockchain: 'POLYGON',
  symbol: 'TOWER',
  address: '0x2bc07124d8dac638e290f401046ad584546bc47b'
}

token 5 ==============> 
{
  blockchain: 'POLYGON',
  symbol: 'BEAT',
  address: '0xb78cf9ac0f47f1d69cba861deda29814d285c834'
}

Copy link
Member

@nikaaru nikaaru left a comment

Choose a reason for hiding this comment

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

LGTM!
Thanks 👍

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.

None yet

3 participants