mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-29 12:59:52 +00:00
Fix Scam tokens handling and make it persistent (#2138)
* Fix Scam tokens handling and make it persistent * Add potential scam text next to scam tokens * change UI of potential scam text
This commit is contained in:
parent
cbca4c9c77
commit
23a47ed561
41 changed files with 121 additions and 45 deletions
|
@ -229,7 +229,7 @@ abstract class BalanceViewModelBase with Store {
|
|||
formattedAssetTitle: _formatterAsset(key)));
|
||||
}
|
||||
final fiatCurrency = settingsStore.fiatCurrency;
|
||||
final price = fiatConvertationStore.prices[key] ?? 0;
|
||||
final price = key.isPotentialScam ? 0.0 : fiatConvertationStore.prices[key] ?? 0;
|
||||
|
||||
// if (price == null) {
|
||||
// throw Exception('Price is null for: $key');
|
||||
|
|
|
@ -83,6 +83,7 @@ abstract class HomeSettingsViewModelBase with Store {
|
|||
decimal: token.decimals,
|
||||
contractAddress: contractAddress,
|
||||
iconPath: token.iconPath,
|
||||
isPotentialScam: token.isPotentialScam,
|
||||
);
|
||||
|
||||
await ethereum!.addErc20Token(_balanceViewModel.wallet, erc20token);
|
||||
|
@ -95,6 +96,7 @@ abstract class HomeSettingsViewModelBase with Store {
|
|||
decimal: token.decimals,
|
||||
contractAddress: contractAddress,
|
||||
iconPath: token.iconPath,
|
||||
isPotentialScam: token.isPotentialScam,
|
||||
);
|
||||
await polygon!.addErc20Token(_balanceViewModel.wallet, polygonToken);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue