mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +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
|
@ -626,13 +626,13 @@ abstract class EVMChainWalletBase
|
|||
Future<void> addErc20Token(Erc20Token token) async {
|
||||
String? iconPath;
|
||||
|
||||
if (token.iconPath == null || token.iconPath!.isEmpty) {
|
||||
if ((token.iconPath == null || token.iconPath!.isEmpty) && !token.isPotentialScam) {
|
||||
try {
|
||||
iconPath = CryptoCurrency.all
|
||||
.firstWhere((element) => element.title.toUpperCase() == token.symbol.toUpperCase())
|
||||
.iconPath;
|
||||
} catch (_) {}
|
||||
} else {
|
||||
} else if (!token.isPotentialScam) {
|
||||
iconPath = token.iconPath;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue