Generic Token Fixes (#2874)

* feat: Automatically detect wallet tokens for EVM chains

* feat: Disable potential tg scam tokens by default

* feat: Add homoglyph normalization to detect spoofing attacks in token symbols

* refactor: Improve scam token detection and apply to automatically fetched EVM tokens

* refactor: Enhance scam detection for automatically detected tokens in evm wallets

* feat: Add fiat check to scam checks on automatically imported token and disable tokens that fail the check

* feat: Add fiat check to scam checks on automatically imported token and disable tokens that fail the check

* feat: Add fiat check to scam checks on automatically imported token and disable tokens that fail the check

* feat: Enable whitelisted tokens with balance when importing wallet tokens

* feat: Disable imported tokens with balance less than 0.1 usd

* feat: Disable imported tokens with balance less than 0.1 usd
- Update configure file

* fixes:
- default tokens marked as potential scam
- ui overflow for token name on balance page
- add more filters for spam tokens

* - detect and flag default token impersonators
- add homoglyph normalization to prevent spoofing attacks on new token symbols
- fix bnb not coming up in receive currency list for swap page

* - detect and flag default token impersonators
- add homoglyph normalization to prevent spoofing attacks on new token symbols
- fix bnb not coming up in receive currency list for swap page

* Revert Exclude BNB from receive currencies list [skip ci]

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
David Adegoke
2026-02-08 09:48:27 +01:00
committed by GitHub
co-authored by Omar Hatem
parent 174216df17
commit 326ef316c3
8 changed files with 90 additions and 11 deletions
+3
View File
@@ -969,6 +969,7 @@ abstract class Solana {
List<int>? getValidationLength(CryptoCurrency type);
double? getEstimateFees(WalletBase wallet);
List<String> getDefaultTokenContractAddresses();
List<String> getDefaultTokenSymbols();
bool isTokenAlreadyAdded(WalletBase wallet, String contractAddress);
// Jupiter swap transaction handling
@@ -1094,6 +1095,7 @@ abstract class Tron {
void updateTronGridUsageState(WalletBase wallet, bool isEnabled);
List<String> getDefaultTokenContractAddresses();
List<String> getDefaultTokenSymbols();
bool isTokenAlreadyAdded(WalletBase wallet, String contractAddress);
}
""";
@@ -1489,6 +1491,7 @@ abstract class EVM {
// Utility methods
List<String> getDefaultTokenContractAddresses(WalletBase wallet);
List<String> getDefaultTokenSymbols(WalletBase wallet);
bool isTokenAlreadyAdded(WalletBase wallet, String contractAddress);
String? getEVMNativeEstimatedFee(WalletBase wallet);
String? getEVMERC20EstimatedFee(WalletBase wallet);