On both SEI and Ethereum apps, when a user connects their wallet and opens a token selection modal, we want to expose the balances of the tokens users have in their wallet directly within the modal, eliminating the need for the user to open their wallet in order to check their token balances.
Implementation
On both SEI and Ethereum apps, when a user opens a token selection modal on the "create strategy" or "simulate" pages:
IF the wallet is not connected, the modal will retain its current behavior unchanged.
ELSE, IF the wallet is connected, tokens that the user holds in their wallet will be identified and their balances and values will be displayed in the token selection modal as follows:
Tokens with identified balances and values will appear at the top of the token list, sorted in descending order by value.
Other tokens that the user does not hold in their wallet will be displayed below the identified tokens, following the same sorting rules currently implemented.
IF a token held by the user has no market price available, it will be shown at the bottom of the list of identified tokens, sorted in descending order by token amount.
Example
User connects his wallet
The following tokens were identified in the users wallet
100 USDC (token value=$100)
1 ETH (token value = $3200)
10 TKN1 (token value is unknown)
1000 TKN2 (token value is unknown)
Token selection modal will display the tokens in the following order:
ETH- 1(3200$)
USDC - 100($100)
TKN2 - 1000(...)
TKN1 - 10(...)
Other tokens that are not held in the user's wallet
Overview
On both SEI and Ethereum apps, when a user connects their wallet and opens a token selection modal, we want to expose the balances of the tokens users have in their wallet directly within the modal, eliminating the need for the user to open their wallet in order to check their token balances.
Implementation
On both SEI and Ethereum apps, when a user opens a token selection modal on the "create strategy" or "simulate" pages:
IF the wallet is not connected, the modal will retain its current behavior unchanged.
ELSE, IF the wallet is connected, tokens that the user holds in their wallet will be identified and their balances and values will be displayed in the token selection modal as follows:
IF a token held by the user has no market price available, it will be shown at the bottom of the list of identified tokens, sorted in descending order by token amount.