mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
CW-1228: Automatically Fetch All Tokens (#2869)
* 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
This commit is contained in:
+3
-2
@@ -1322,6 +1322,7 @@ abstract class DogeCoin {
|
||||
Future<void> generateEVM(bool hasImplementation) async {
|
||||
final outputFile = File(evmOutputPath);
|
||||
const evmCommonHeaders = """
|
||||
import 'dart:math' as math;
|
||||
import 'package:cake_wallet/core/utilities.dart';
|
||||
import 'package:cake_wallet/view_model/send/output.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
@@ -1348,6 +1349,7 @@ import 'package:web3dart/web3dart.dart';
|
||||
import 'package:cake_wallet/core/fiat_conversion_service.dart';
|
||||
import 'package:cake_wallet/di.dart';
|
||||
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||
import 'package:cake_wallet/entities/fiat_currency.dart';
|
||||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:cw_evm/utils/evm_chain_formatter.dart';
|
||||
import 'package:cw_evm/evm_chain_mnemonics.dart';
|
||||
@@ -1523,7 +1525,6 @@ abstract class EVM {
|
||||
|
||||
bool hasPriorityFee(int chainId);
|
||||
|
||||
Future<bool> checkTokenFiatPrice(WalletBase wallet, Erc20Token token);
|
||||
Future<void> discoverAndAddWalletTokens(WalletBase wallet);
|
||||
}
|
||||
|
||||
@@ -1792,7 +1793,7 @@ Future<void> generatePubspec({
|
||||
output += '\n$flutterSecureStorage\n';
|
||||
}
|
||||
|
||||
if (hasEthereum || hasPolygon || hasBase || hasArbitrum) {
|
||||
if (hasEthereum || hasPolygon || hasBase || hasArbitrum || hasBsc) {
|
||||
output += '\n$cwEVM';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user