mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-24 06:48:38 +02:00
CW-608-Fetch-And-Save-Icons-Of-ERC20-And-SPL-Tokens-When-Adding-Them (#1365)
* feat: Fetch and save icons of SPL tokens when adding them * feat: Implement fetch and save icons for ERC20 tokens when adding them * fix: Add moralisApiKey to evm secrets * Add check to ensure decimals cannot be zero * - Fallback to adding erc20 token from web3dart - Wrap fetching spl token icon in a try/catch block --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
co-authored by
OmarHatem
parent
d4b317b3a0
commit
2877cc160c
@@ -54,6 +54,7 @@ abstract class HomeSettingsViewModelBase with Store {
|
||||
symbol: token.title,
|
||||
decimal: token.decimals,
|
||||
contractAddress: contractAddress,
|
||||
iconPath: token.iconPath,
|
||||
);
|
||||
|
||||
await ethereum!.addErc20Token(_balanceViewModel.wallet, erc20token);
|
||||
@@ -65,6 +66,7 @@ abstract class HomeSettingsViewModelBase with Store {
|
||||
symbol: token.title,
|
||||
decimal: token.decimals,
|
||||
contractAddress: contractAddress,
|
||||
iconPath: token.iconPath,
|
||||
);
|
||||
await polygon!.addErc20Token(_balanceViewModel.wallet, polygonToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user