Closed pgolovkin closed 4 months ago
I'm not sure I understand what this is. Isn't there already an overview of the asset owned?
There are no mockups and requirements. This task is not ready for development.
@sokolova-an Next step is to implement POC:
Address that may be used for test - 12YK3LD8FzVgyBuN6mQkCaZUHyExQdjyvX1Fn67DJ5A4rL2R
Result after POC: Add the script to create tokens.json file. Something like:
const tokenMap = new Map();
chains.forEach((i) => {
i.assets.forEach((asset) => {
const symbol = asset.symbol;
const chains = { chainId: i.chainId, assetId: asset.assetId };
if (tokenMap.has(symbol)) {
tokenMap.set(symbol, { ...tokenMap.get(symbol), chains: [...tokenMap.get(symbol).chains, chains] });
} else {
tokenMap.set(symbol, {
precision: asset.precision,
symbol: asset.symbol,
priceId: asset.priceId,
name: asset.name,
icon: asset.icon,
chains: [chains],
});
}
});
});
const tokensJson = Array.from(tokenMap.values());
TODO:
Create a Portfolio view for assets. It should be asset oriented but not chain oriented.
Mockups and prototypes link
DOD:
Token ticker
->Chains where token exists