diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 5b2bb11d3..88cdc6f6c 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -119,6 +119,7 @@ jobs: cd /opt/android/cake_wallet touch lib/.secrets.g.dart touch cw_ethereum/lib/.secrets.g.dart + touch cw_polygon/lib/.secrets.g.dart echo "const salt = '${{ secrets.SALT }}';" > lib/.secrets.g.dart echo "const keychainSalt = '${{ secrets.KEY_CHAIN_SALT }}';" >> lib/.secrets.g.dart echo "const key = '${{ secrets.KEY }}';" >> lib/.secrets.g.dart @@ -146,13 +147,13 @@ jobs: echo "const fiatApiKey = '${{ secrets.FIAT_API_KEY }}';" >> lib/.secrets.g.dart echo "const payfuraApiKey = '${{ secrets.PAYFURA_API_KEY }}';" >> lib/.secrets.g.dart echo "const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';" >> cw_ethereum/lib/.secrets.g.dart - echo "const polygonScanApiKey = '${{ secrets.POLYGON_SCAN_API_KEY }}';" >> cw_ethereum/lib/.secrets.g.dart echo "const chatwootWebsiteToken = '${{ secrets.CHATWOOT_WEBSITE_TOKEN }}';" >> lib/.secrets.g.dart echo "const exolixApiKey = '${{ secrets.EXOLIX_API_KEY }}';" >> lib/.secrets.g.dart echo "const robinhoodApplicationId = '${{ secrets.ROBINHOOD_APPLICATION_ID }}';" >> lib/.secrets.g.dart echo "const robinhoodCIdApiSecret = '${{ secrets.ROBINHOOD_CID_CLIENT_SECRET }}';" >> lib/.secrets.g.dart echo "const walletConnectProjectId = '${{ secrets.WALLET_CONNECT_PROJECT_ID }}';" >> lib/.secrets.g.dart echo "const moralisApiKey = '${{ secrets.MORALIS_API_KEY }}';" >> lib/.secrets.g.dart + echo "const polygonScanApiKey = '${{ secrets.POLYGON_SCAN_API_KEY }}';" >> cw_ethereum/lib/.secrets.g.dart - name: Rename app run: echo -e "id=com.cakewallet.test\nname=${{ env.BRANCH_NAME }}" > /opt/android/cake_wallet/android/app.properties diff --git a/assets/polygon_node_list.yml b/assets/polygon_node_list.yml index 10654356a..34504269d 100644 --- a/assets/polygon_node_list.yml +++ b/assets/polygon_node_list.yml @@ -1,6 +1,6 @@ +- + uri: polygon-rpc.com - uri: polygon-bor.publicnode.com - - uri: polygon-rpc.com -- uri: polygon.llamarpc.com \ No newline at end of file diff --git a/cw_bitcoin/lib/electrum_balance.dart b/cw_bitcoin/lib/electrum_balance.dart index 0a9a33d54..a4824db0f 100644 --- a/cw_bitcoin/lib/electrum_balance.dart +++ b/cw_bitcoin/lib/electrum_balance.dart @@ -4,7 +4,10 @@ import 'package:cw_bitcoin/bitcoin_amount_format.dart'; import 'package:cw_core/balance.dart'; class ElectrumBalance extends Balance { - const ElectrumBalance({required this.confirmed, required this.unconfirmed, required this.frozen}) + const ElectrumBalance( + {required this.confirmed, + required this.unconfirmed, + required this.frozen}) : super(confirmed, unconfirmed); static ElectrumBalance? fromJSON(String? jsonSource) { @@ -25,16 +28,19 @@ class ElectrumBalance extends Balance { final int frozen; @override - String get formattedAvailableBalance => bitcoinAmountToString(amount: confirmed - frozen); + String get formattedAvailableBalance => + bitcoinAmountToString(amount: confirmed - unconfirmed.abs() - frozen); @override - String get formattedAdditionalBalance => bitcoinAmountToString(amount: unconfirmed); + String get formattedAdditionalBalance => + bitcoinAmountToString(amount: unconfirmed); - String get formattedFrozenBalance { + @override + String get formattedUnAvailableBalance { final frozenFormatted = bitcoinAmountToString(amount: frozen); return frozenFormatted == '0.0' ? '' : frozenFormatted; } - String toJSON() => - json.encode({'confirmed': confirmed, 'unconfirmed': unconfirmed, 'frozen': frozen}); + String toJSON() => json.encode( + {'confirmed': confirmed, 'unconfirmed': unconfirmed, 'frozen': frozen}); } diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 894a969a0..4c5ecc7f2 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -82,7 +82,7 @@ abstract class ElectrumWalletBase bitcoin.HDWallet.fromSeed(seedBytes).derivePath("m/44'/145'/0'/0"); static int estimatedTransactionSize(int inputsCount, int outputsCounts) => - inputsCount * 146 + outputsCounts * 33 + 8; + inputsCount * 68 + outputsCounts * 34 + 10; final bitcoin.HDWallet hd; final String mnemonic; diff --git a/cw_bitcoin/pubspec.lock b/cw_bitcoin/pubspec.lock index 43391881f..3344cb807 100644 --- a/cw_bitcoin/pubspec.lock +++ b/cw_bitcoin/pubspec.lock @@ -79,11 +79,11 @@ packages: dependency: "direct main" description: path: "." - ref: cake-update-v3 - resolved-ref: df9204144011ed9419eff7d9ef3143102a40252d + ref: cake-update-v4 + resolved-ref: e19ffb7e7977278a75b27e0479b3c6f4034223b3 url: "https://github.com/cake-tech/bitcoin_flutter.git" source: git - version: "2.0.2" + version: "2.1.0" boolean_selector: dependency: transitive description: @@ -244,7 +244,7 @@ packages: source: hosted version: "2.2.4" encrypt: - dependency: "direct main" + dependency: transitive description: name: encrypt sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb" @@ -698,15 +698,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - tor: - dependency: transitive - description: - path: "." - ref: main - resolved-ref: "09ba92cb11d4e3cacf97256e57863b805f79f2e5" - url: "https://github.com/cake-tech/tor.git" - source: git - version: "0.0.1" typed_data: dependency: transitive description: diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index 1936a87cf..35d42f6d2 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -93,6 +93,8 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen CryptoCurrency.dydx, CryptoCurrency.steth, CryptoCurrency.banano, + CryptoCurrency.usdtPoly, + CryptoCurrency.usdcEPoly, ]; static const havenCurrencies = [ @@ -202,6 +204,8 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen static const dydx = CryptoCurrency(title: 'DYDX', tag: 'ETH', fullName: 'dYdX', raw: 84, name: 'dydx', iconPath: 'assets/images/dydx_icon.png', decimals: 18); static const steth = CryptoCurrency(title: 'STETH', tag: 'ETH', fullName: 'Lido Staked Ethereum', raw: 85, name: 'steth', iconPath: 'assets/images/steth_icon.png', decimals: 18); static const banano = CryptoCurrency(title: 'BAN', fullName: 'Banano', raw: 86, name: 'banano', iconPath: 'assets/images/nano_icon.png', decimals: 29); + static const usdtPoly = CryptoCurrency(title: 'USDT', tag: 'POLY', fullName: 'Tether USD (PoS)', raw: 87, name: 'usdtpoly', iconPath: 'assets/images/usdt_icon.png', decimals: 6); + static const usdcEPoly = CryptoCurrency(title: 'USDC.E', tag: 'POLY', fullName: 'USD Coin (PoS)', raw: 88, name: 'usdcepoly', iconPath: 'assets/images/usdc_icon.png', decimals: 6); static final Map _rawCurrencyMap = diff --git a/cw_core/lib/erc20_token.dart b/cw_core/lib/erc20_token.dart index 75bf1aad0..830ce383b 100644 --- a/cw_core/lib/erc20_token.dart +++ b/cw_core/lib/erc20_token.dart @@ -18,6 +18,8 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin { bool _enabled; @HiveField(5) final String? iconPath; + @HiveField(6) + final String? tag; bool get enabled => _enabled; @@ -30,30 +32,31 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin { required this.decimal, bool enabled = true, this.iconPath, + this.tag, }) : _enabled = enabled, super( - name: symbol.toLowerCase(), - title: symbol.toUpperCase(), - fullName: name, - tag: "ETH", - iconPath: iconPath, - decimals: decimal - ); + name: symbol.toLowerCase(), + title: symbol.toUpperCase(), + fullName: name, + tag: tag, + iconPath: iconPath, + decimals: decimal); - Erc20Token.copyWith(Erc20Token other, String? icon) + Erc20Token.copyWith(Erc20Token other, String? icon, String? tag) : this.name = other.name, this.symbol = other.symbol, this.contractAddress = other.contractAddress, this.decimal = other.decimal, this._enabled = other.enabled, + this.tag = tag, this.iconPath = icon, super( name: other.name, title: other.symbol.toUpperCase(), fullName: other.name, - tag: "ETH", + tag: tag, iconPath: icon, - decimals: other.decimal + decimals: other.decimal, ); static const typeId = ERC20_TOKEN_TYPE_ID; @@ -61,7 +64,8 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin { static const polygonBoxName = ' PolygonErc20Tokens'; @override - bool operator ==(other) => (other is Erc20Token && other.contractAddress == contractAddress) || + bool operator ==(other) => + (other is Erc20Token && other.contractAddress == contractAddress) || (other is CryptoCurrency && other.title == title); @override diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index bd96e1395..2c43dd21a 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -214,7 +214,7 @@ class Node extends HiveObject with Keyable { } Future requestNodeWithProxy() async { - if (!isValidProxyAddress/* && !Tor.instance.enabled*/) { + if (!isValidProxyAddress /* && !Tor.instance.enabled*/) { return false; } diff --git a/cw_core/pubspec.lock b/cw_core/pubspec.lock index f351759ed..aacbd9ddd 100644 --- a/cw_core/pubspec.lock +++ b/cw_core/pubspec.lock @@ -616,15 +616,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - tor: - dependency: "direct main" - description: - path: "." - ref: main - resolved-ref: "09ba92cb11d4e3cacf97256e57863b805f79f2e5" - url: "https://github.com/cake-tech/tor.git" - source: git - version: "0.0.1" typed_data: dependency: transitive description: diff --git a/cw_ethereum/lib/default_erc20_tokens.dart b/cw_ethereum/lib/default_ethereum_erc20_tokens.dart similarity index 95% rename from cw_ethereum/lib/default_erc20_tokens.dart rename to cw_ethereum/lib/default_ethereum_erc20_tokens.dart index 8c38e2e64..a8f82d181 100644 --- a/cw_ethereum/lib/default_erc20_tokens.dart +++ b/cw_ethereum/lib/default_ethereum_erc20_tokens.dart @@ -293,17 +293,13 @@ class DefaultErc20Tokens { ]; List get initialErc20Tokens => _defaultTokens.map((token) { - String? iconPath; - try { - iconPath = CryptoCurrency.all - .firstWhere((element) => element.title.toUpperCase() == token.symbol.toUpperCase()) - .iconPath; - } catch (_) {} + String? iconPath; + try { + iconPath = CryptoCurrency.all + .firstWhere((element) => element.title.toUpperCase() == token.symbol.toUpperCase()) + .iconPath; + } catch (_) {} - if (iconPath != null) { - return Erc20Token.copyWith(token, iconPath); - } - - return token; - }).toList(); + return Erc20Token.copyWith(token, iconPath, 'ETH'); + }).toList(); } diff --git a/cw_ethereum/lib/ethereum_client.dart b/cw_ethereum/lib/ethereum_client.dart index 5e408bb9e..fccbf778d 100644 --- a/cw_ethereum/lib/ethereum_client.dart +++ b/cw_ethereum/lib/ethereum_client.dart @@ -78,19 +78,18 @@ class EthereumClient { currency == CryptoCurrency.maticpoly || contractAddress != null); - bool _isEVMCompatibleChain = currency == CryptoCurrency.eth || currency == CryptoCurrency.maticpoly; + bool _isEVMCompatibleChain = + currency == CryptoCurrency.eth || currency == CryptoCurrency.maticpoly; final price = _client!.getGasPrice(); - final Transaction transaction = Transaction( + final Transaction transaction = createTransaction( from: privateKey.address, to: EthereumAddress.fromHex(toAddress), maxPriorityFeePerGas: EtherAmount.fromInt(EtherUnit.gwei, priority.tip), - value: _isEVMCompatibleChain ? EtherAmount.inWei(BigInt.parse(amount)) : EtherAmount.zero(), + amount: _isEVMCompatibleChain ? EtherAmount.inWei(BigInt.parse(amount)) : EtherAmount.zero(), ); - final chainId = _getChainIdForCurrency(currency); - final signedTransaction = await _client!.signTransaction(privateKey, transaction, chainId: chainId); @@ -124,18 +123,27 @@ class EthereumClient { ); } - int _getChainIdForCurrency(CryptoCurrency currency) { - switch (currency) { - case CryptoCurrency.maticpoly: - return 137; - case CryptoCurrency.eth: - default: - return 1; - } + int get chainId => 1; + + Transaction createTransaction({ + required EthereumAddress from, + required EthereumAddress to, + required EtherAmount amount, + EtherAmount? maxPriorityFeePerGas, + }) { + return Transaction( + from: from, + to: to, + maxPriorityFeePerGas: maxPriorityFeePerGas, + value: amount, + ); } Future sendTransaction(Uint8List signedTransaction) async => - await _client!.sendRawTransaction(prependTransactionType(0x02, signedTransaction)); + await _client!.sendRawTransaction(prepareSignedTransactionForSending(signedTransaction)); + + Uint8List prepareSignedTransactionForSending(Uint8List signedTransaction) => + prependTransactionType(0x02, signedTransaction); Future getTransactionDetails(String transactionHash) async { // Wait for the transaction receipt to become available diff --git a/cw_ethereum/lib/ethereum_wallet.dart b/cw_ethereum/lib/ethereum_wallet.dart index 21bde1233..5c6cc4448 100644 --- a/cw_ethereum/lib/ethereum_wallet.dart +++ b/cw_ethereum/lib/ethereum_wallet.dart @@ -14,7 +14,7 @@ import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/wallet_addresses.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; -import 'package:cw_ethereum/default_erc20_tokens.dart'; +import 'package:cw_ethereum/default_ethereum_erc20_tokens.dart'; import 'package:cw_ethereum/erc20_balance.dart'; import 'package:cw_ethereum/ethereum_client.dart'; import 'package:cw_ethereum/ethereum_exceptions.dart'; @@ -429,6 +429,7 @@ abstract class EthereumWalletBase contractAddress: token.contractAddress, decimal: token.decimal, enabled: token.enabled, + tag: token.tag ?? "ETH", iconPath: iconPath, ); @@ -492,7 +493,7 @@ abstract class EthereumWalletBase _transactionsUpdateTimer!.cancel(); } - _transactionsUpdateTimer = Timer.periodic(Duration(seconds: 10), (_) { + _transactionsUpdateTimer = Timer.periodic(const Duration(seconds: 10), (_) { _updateTransactions(); _updateBalance(); }); @@ -508,7 +509,7 @@ abstract class EthereumWalletBase } @override - String signMessage(String message, {String? address = null}) => + String signMessage(String message, {String? address}) => bytesToHex(_ethPrivateKey.signPersonalMessageToUint8List(ascii.encode(message))); Web3Client? getWeb3Client() => _client.getWeb3Client(); diff --git a/cw_monero/example/pubspec.lock b/cw_monero/example/pubspec.lock index 3dd2b5b61..c9ca8d92b 100644 --- a/cw_monero/example/pubspec.lock +++ b/cw_monero/example/pubspec.lock @@ -153,6 +153,22 @@ packages: description: flutter source: sdk version: "0.0.0" + hashlib: + dependency: transitive + description: + name: hashlib + sha256: "71bf102329ddb8e50c8a995ee4645ae7f1728bb65e575c17196b4d8262121a96" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + hashlib_codecs: + dependency: transitive + description: + name: hashlib_codecs + sha256: "49e2a471f74b15f1854263e58c2ac11f2b631b5b12c836f9708a35397d36d626" + url: "https://pub.dev" + source: hosted + version: "2.2.0" http: dependency: transitive description: @@ -308,12 +324,11 @@ packages: polyseed: dependency: transitive description: - path: "." - ref: HEAD - resolved-ref: "504d58a5b147fccd3bc85a25f2e72fb32771ddd7" - url: "https://github.com/cake-tech/polyseed_dart.git" - source: git - version: "0.0.1" + name: polyseed + sha256: "9b48ec535b10863f78f6354ec983b4cc0c88ca69ff48fee469d0fd1954b01d4f" + url: "https://pub.dev" + source: hosted + version: "0.0.2" process: dependency: transitive description: @@ -383,15 +398,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" - tor: - dependency: transitive - description: - path: "." - ref: main - resolved-ref: "09ba92cb11d4e3cacf97256e57863b805f79f2e5" - url: "https://github.com/cake-tech/tor.git" - source: git - version: "0.0.1" typed_data: dependency: transitive description: diff --git a/cw_polygon/lib/default_erc20_tokens.dart b/cw_polygon/lib/default_polygon_erc20_tokens.dart similarity index 90% rename from cw_polygon/lib/default_erc20_tokens.dart rename to cw_polygon/lib/default_polygon_erc20_tokens.dart index 132c52e4c..deff285c0 100644 --- a/cw_polygon/lib/default_erc20_tokens.dart +++ b/cw_polygon/lib/default_polygon_erc20_tokens.dart @@ -29,7 +29,7 @@ class DefaultPolygonErc20Tokens { symbol: "USDC.e", contractAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", decimal: 6, - enabled: false, + enabled: true, ), Erc20Token( name: "Avalanche Token", @@ -73,14 +73,10 @@ class DefaultPolygonErc20Tokens { try { iconPath = CryptoCurrency.all .firstWhere((element) => - element.title.toUpperCase() == token.symbol.toUpperCase()) + element.title.toUpperCase() == token.symbol.split(".").first.toUpperCase()) .iconPath; } catch (_) {} - if (iconPath != null) { - return Erc20Token.copyWith(token, iconPath); - } - - return token; + return Erc20Token.copyWith(token, iconPath, 'POLY'); }).toList(); } diff --git a/cw_polygon/lib/polygon_client.dart b/cw_polygon/lib/polygon_client.dart index 86c2253af..876f4c60d 100644 --- a/cw_polygon/lib/polygon_client.dart +++ b/cw_polygon/lib/polygon_client.dart @@ -3,8 +3,30 @@ import 'dart:convert'; import 'package:cw_ethereum/ethereum_client.dart'; import 'package:cw_polygon/polygon_transaction_model.dart'; import 'package:cw_ethereum/.secrets.g.dart' as secrets; +import 'package:flutter/foundation.dart'; +import 'package:web3dart/web3dart.dart'; class PolygonClient extends EthereumClient { + @override + Transaction createTransaction({ + required EthereumAddress from, + required EthereumAddress to, + required EtherAmount amount, + EtherAmount? maxPriorityFeePerGas, + }) { + return Transaction( + from: from, + to: to, + value: amount, + ); + } + + @override + Uint8List prepareSignedTransactionForSending(Uint8List signedTransaction) => signedTransaction; + + @override + int get chainId => 137; + @override Future> fetchTransactions(String address, {String? contractAddress}) async { @@ -27,7 +49,6 @@ class PolygonClient extends EthereumClient { return []; } catch (e) { - print(e); return []; } } diff --git a/cw_polygon/lib/polygon_wallet.dart b/cw_polygon/lib/polygon_wallet.dart index 66e6797c6..5749a95ac 100644 --- a/cw_polygon/lib/polygon_wallet.dart +++ b/cw_polygon/lib/polygon_wallet.dart @@ -16,10 +16,9 @@ import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_ethereum/erc20_balance.dart'; import 'package:cw_ethereum/ethereum_formatter.dart'; -import 'package:cw_ethereum/ethereum_transaction_model.dart'; import 'package:cw_ethereum/file.dart'; import 'package:cw_core/erc20_token.dart'; -import 'package:cw_polygon/default_erc20_tokens.dart'; +import 'package:cw_polygon/default_polygon_erc20_tokens.dart'; import 'package:cw_polygon/polygon_client.dart'; import 'package:cw_polygon/polygon_exceptions.dart'; import 'package:cw_polygon/polygon_formatter.dart'; @@ -42,28 +41,26 @@ part 'polygon_wallet.g.dart'; class PolygonWallet = PolygonWalletBase with _$PolygonWallet; -abstract class PolygonWalletBase extends WalletBase with Store { +abstract class PolygonWalletBase + extends WalletBase with Store { PolygonWalletBase({ required WalletInfo walletInfo, String? mnemonic, String? privateKey, required String password, ERC20Balance? initialBalance, - }) : syncStatus = NotConnectedSyncStatus(), + }) : syncStatus = const NotConnectedSyncStatus(), _password = password, _mnemonic = mnemonic, _hexPrivateKey = privateKey, _isTransactionUpdating = false, _client = PolygonClient(), walletAddresses = PolygonWalletAddresses(walletInfo), - balance = ObservableMap.of({ - CryptoCurrency.maticpoly: initialBalance ?? ERC20Balance(BigInt.zero) - }), + balance = ObservableMap.of( + {CryptoCurrency.maticpoly: initialBalance ?? ERC20Balance(BigInt.zero)}), super(walletInfo) { this.walletInfo = walletInfo; - transactionHistory = - PolygonTransactionHistory(walletInfo: walletInfo, password: password); + transactionHistory = PolygonTransactionHistory(walletInfo: walletInfo, password: password); if (!CakeHive.isAdapterRegistered(Erc20Token.typeId)) { CakeHive.registerAdapter(Erc20TokenAdapter()); @@ -80,9 +77,9 @@ abstract class PolygonWalletBase extends WalletBase _polygonPrivateKey; + late final PolygonClient _client; - late PolygonClient _client; + EthPrivateKey get polygonPrivateKey => _polygonPrivateKey; int? _gasPrice; int? _estimatedGas; @@ -102,11 +99,11 @@ abstract class PolygonWalletBase extends WalletBase balance; - Completer _sharedPrefs = Completer(); + final Completer _sharedPrefs = Completer(); Future init() async { - polygonErc20TokensBox = - await CakeHive.openBox(Erc20Token.polygonBoxName); + polygonErc20TokensBox = await CakeHive.openBox( + "${walletInfo.name.replaceAll(" ", "_")}_${Erc20Token.polygonBoxName}"); await walletAddresses.init(); await transactionHistory.init(); _polygonPrivateKey = await getPrivateKey( @@ -122,8 +119,7 @@ abstract class PolygonWalletBase extends WalletBase createTransaction(Object credentials) async { - final _credentials = credentials as PolygonTransactionCredentials; - final outputs = _credentials.outputs; + final credentials0 = credentials as PolygonTransactionCredentials; + final outputs = credentials0.outputs; final hasMultiDestination = outputs.length > 1; - final CryptoCurrency transactionCurrency = balance.keys - .firstWhere((element) => element.title == _credentials.currency.title); + final CryptoCurrency transactionCurrency = + balance.keys.firstWhere((element) => element.title == credentials0.currency.title); - final _erc20Balance = balance[transactionCurrency]!; + final erc20Balance = balance[transactionCurrency]!; BigInt totalAmount = BigInt.zero; - int exponent = - transactionCurrency is Erc20Token ? transactionCurrency.decimal : 18; + int exponent = transactionCurrency is Erc20Token ? transactionCurrency.decimal : 18; num amountToPolygonMultiplier = pow(10, exponent); // so far this can not be made with Polygon as Polygon does not support multiple recipients if (hasMultiDestination) { - if (outputs.any( - (item) => item.sendAll || (item.formattedCryptoAmount ?? 0) <= 0)) { + if (outputs.any((item) => item.sendAll || (item.formattedCryptoAmount ?? 0) <= 0)) { throw PolygonTransactionCreationException(transactionCurrency); } final totalOriginalAmount = PolygonFormatter.parsePolygonAmountToDouble( - outputs.fold( - 0, (acc, value) => acc + (value.formattedCryptoAmount ?? 0))); - totalAmount = - BigInt.from(totalOriginalAmount * amountToPolygonMultiplier); + outputs.fold(0, (acc, value) => acc + (value.formattedCryptoAmount ?? 0))); + totalAmount = BigInt.from(totalOriginalAmount * amountToPolygonMultiplier); - if (_erc20Balance.balance < totalAmount) { + if (erc20Balance.balance < totalAmount) { throw PolygonTransactionCreationException(transactionCurrency); } } else { @@ -203,35 +195,33 @@ abstract class PolygonWalletBase extends WalletBase>> polygonErc20TokensTransactions = - []; + final List>> polygonErc20TokensTransactions = []; for (var token in balance.keys) { if (token is Erc20Token) { - polygonErc20TokensTransactions.add(_client.fetchTransactions( - address, - contractAddress: token.contractAddress, - ) as Future>); + polygonErc20TokensTransactions.add( + _client.fetchTransactions( + address, + contractAddress: token.contractAddress, + ), + ); } } @@ -294,8 +285,7 @@ abstract class PolygonWalletBase extends WalletBase _gasPrice = await _client.getGasUnitPrice()); + Timer.periodic( + const Duration(minutes: 1), (timer) async => _gasPrice = await _client.getGasUnitPrice()); Timer.periodic(const Duration(seconds: 10), (timer) async => _estimatedGas = await _client.getEstimatedGas()); @@ -348,8 +338,7 @@ abstract class PolygonWalletBase extends WalletBase makePath() async => - pathForWallet(name: walletInfo.name, type: walletInfo.type); + Future makePath() async => pathForWallet(name: walletInfo.name, type: walletInfo.type); String toJSON() => json.encode({ 'mnemonic': _mnemonic, @@ -367,8 +356,7 @@ abstract class PolygonWalletBase extends WalletBase)); + return EthPrivateKey.fromHex(HEX.encode(addressAtIndex.privateKey as List)); } + @override Future? updateBalance() async => await _updateBalance(); List get erc20Currencies => polygonErc20TokensBox.values.toList(); @@ -434,29 +422,29 @@ abstract class PolygonWalletBase extends WalletBase - element.title.toUpperCase() == token.symbol.toUpperCase()) + .firstWhere((element) => element.title.toUpperCase() == token.symbol.toUpperCase()) .iconPath; } catch (_) {} - final _token = Erc20Token( + final token0 = Erc20Token( name: token.name, symbol: token.symbol, contractAddress: token.contractAddress, decimal: token.decimal, enabled: token.enabled, + tag: token.tag ?? "POLY", iconPath: iconPath, ); - await polygonErc20TokensBox.put(_token.contractAddress, _token); + await polygonErc20TokensBox.put(token0.contractAddress, token0); - if (_token.enabled) { - balance[_token] = await _client.fetchERC20Balances( + if (token0.enabled) { + balance[token0] = await _client.fetchERC20Balances( _polygonPrivateKey.address, - _token.contractAddress, + token0.contractAddress, ); } else { - balance.remove(_token); + balance.remove(token0); } } @@ -476,8 +464,7 @@ abstract class PolygonWalletBase extends WalletBase renameWalletFiles(String newWalletName) async { - final currentWalletPath = - await pathForWallet(name: walletInfo.name, type: type); + final currentWalletPath = await pathForWallet(name: walletInfo.name, type: type); final currentWalletFile = File(currentWalletPath); - final currentDirPath = - await pathForWalletDir(name: walletInfo.name, type: type); - final currentTransactionsFile = - File('$currentDirPath/$transactionsHistoryFileName'); + final currentDirPath = await pathForWalletDir(name: walletInfo.name, type: type); + final currentTransactionsFile = File('$currentDirPath/$transactionsHistoryFileName'); // Copies current wallet files into new wallet name's dir and files if (currentWalletFile.existsSync()) { - final newWalletPath = - await pathForWallet(name: newWalletName, type: type); + final newWalletPath = await pathForWallet(name: newWalletName, type: type); await currentWalletFile.copy(newWalletPath); } if (currentTransactionsFile.existsSync()) { - final newDirPath = - await pathForWalletDir(name: newWalletName, type: type); - await currentTransactionsFile - .copy('$newDirPath/$transactionsHistoryFileName'); + final newDirPath = await pathForWalletDir(name: newWalletName, type: type); + await currentTransactionsFile.copy('$newDirPath/$transactionsHistoryFileName'); } // Delete old name's dir and files @@ -517,7 +498,7 @@ abstract class PolygonWalletBase extends WalletBase bytesToHex( - _polygonPrivateKey.signPersonalMessageToUint8List(ascii.encode(message))); + String signMessage(String message, {String? address}) => + bytesToHex(_polygonPrivateKey.signPersonalMessageToUint8List(ascii.encode(message))); Web3Client? getWeb3Client() => _client.getWeb3Client(); } diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index 1bc0d1ae2..558d14f6d 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -32,6 +32,8 @@ class AddressValidator extends TextValidator { return '[0-9a-zA-Z_]'; case CryptoCurrency.usdc: case CryptoCurrency.usdcpoly: + case CryptoCurrency.usdtPoly: + case CryptoCurrency.usdcEPoly: case CryptoCurrency.ape: case CryptoCurrency.avaxc: case CryptoCurrency.eth: @@ -141,6 +143,8 @@ class AddressValidator extends TextValidator { return [42]; case CryptoCurrency.eth: case CryptoCurrency.usdcpoly: + case CryptoCurrency.usdtPoly: + case CryptoCurrency.usdcEPoly: case CryptoCurrency.mana: case CryptoCurrency.matic: case CryptoCurrency.maticpoly: diff --git a/lib/core/wallet_connect/evm_chain_service.dart b/lib/core/wallet_connect/evm_chain_service.dart index b9849fdac..836d1a7c8 100644 --- a/lib/core/wallet_connect/evm_chain_service.dart +++ b/lib/core/wallet_connect/evm_chain_service.dart @@ -285,10 +285,12 @@ class EvmChainServiceImpl implements ChainService { } String _convertToReadable(Map data) { + final tokenName = getTokenNameBasedOnWalletType(appStore.wallet!.type); String gas = int.parse((data['gas'] as String).substring(2), radix: 16).toString(); String value = data['value'] != null - ? (int.parse((data['value'] as String).substring(2), radix: 16) / 1e18).toString() + ' ETH' - : '0 ETH'; + ? (int.parse((data['value'] as String).substring(2), radix: 16) / 1e18).toString() + + ' $tokenName' + : '0 $tokenName'; String from = data['from'] as String; String to = data['to'] as String; diff --git a/lib/di.dart b/lib/di.dart index bb32f1c41..37909f793 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -19,7 +19,6 @@ import 'package:cake_wallet/ionia/ionia_anypay.dart'; import 'package:cake_wallet/ionia/ionia_gift_card.dart'; import 'package:cake_wallet/ionia/ionia_tip.dart'; import 'package:cake_wallet/polygon/polygon.dart'; -import 'package:cake_wallet/reactions/wallet_connect.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/anonpay_details/anonpay_details_page.dart'; import 'package:cake_wallet/src/screens/buy/buy_options_page.dart'; @@ -756,13 +755,7 @@ Future setup({ return PowNodeListViewModel(_powNodeSource, appStore); }); - getIt.registerFactory(() { - final wallet = getIt.get().wallet; - return ConnectionSyncPage( - getIt.get(), - isEVMCompatibleChain(wallet!.type) ? getIt.get() : null, - ); - }); + getIt.registerFactory(() => ConnectionSyncPage(getIt.get())); getIt.registerFactory( () => SecurityBackupPage(getIt.get(), getIt.get())); diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index 45803899e..22868ae28 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -1,6 +1,5 @@ import 'dart:io' show Directory, File, Platform; import 'package:cake_wallet/bitcoin/bitcoin.dart'; -import 'package:cake_wallet/entities/encrypt.dart'; import 'package:cake_wallet/entities/exchange_api_mode.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cake_wallet/entities/secret_store_key.dart'; @@ -186,7 +185,6 @@ Future defaultSettingsMigration( case 25: await rewriteSecureStoragePin(secureStorage: secureStorage); break; - default: break; } diff --git a/lib/entities/node_list.dart b/lib/entities/node_list.dart index 6d1cf299d..aaac8a5c2 100644 --- a/lib/entities/node_list.dart +++ b/lib/entities/node_list.dart @@ -85,8 +85,7 @@ Future> loadDefaultEthereumNodes() async { } Future> loadBitcoinCashElectrumServerList() async { - final serverListRaw = - await rootBundle.loadString('assets/bitcoin_cash_electrum_server_list.yml'); + final serverListRaw = await rootBundle.loadString('assets/bitcoin_cash_electrum_server_list.yml'); final loadedServerList = loadYaml(serverListRaw) as YamlList; final serverList = []; @@ -141,6 +140,7 @@ Future> loadDefaultPolygonNodes() async { for (final raw in loadedNodes) { if (raw is Map) { final node = Node.fromMap(Map.from(raw)); + node.type = WalletType.polygon; nodes.add(node); } @@ -159,7 +159,6 @@ Future resetToDefault(Box nodeSource) async { final nanoNodes = await loadDefaultNanoNodes(); final polygonNodes = await loadDefaultPolygonNodes(); - final nodes = moneroNodes + bitcoinElectrumServerList + litecoinElectrumServerList + @@ -178,4 +177,4 @@ Future resetPowToDefault(Box powNodeSource) async { final nodes = nanoPowNodes; await powNodeSource.clear(); await powNodeSource.addAll(nodes); -} \ No newline at end of file +} diff --git a/lib/exchange/provider/sideshift_exchange_provider.dart b/lib/exchange/provider/sideshift_exchange_provider.dart index 7a466e213..261aeedf3 100644 --- a/lib/exchange/provider/sideshift_exchange_provider.dart +++ b/lib/exchange/provider/sideshift_exchange_provider.dart @@ -159,8 +159,8 @@ class SideShiftExchangeProvider extends ExchangeProvider { url = apiBaseUrl + orderPath + '/fixed'; } else { url = apiBaseUrl + orderPath + '/variable'; - body["depositCoin"] = request.fromCurrency.title.toLowerCase(); - body["settleCoin"] = request.toCurrency.title.toLowerCase(); + body["depositCoin"] = _normalizeCurrency(request.fromCurrency); + body["settleCoin"] = _normalizeCurrency(request.toCurrency); body["settleNetwork"] = _networkFor(request.toCurrency); body["depositNetwork"] = _networkFor(request.fromCurrency); } @@ -248,8 +248,8 @@ class SideShiftExchangeProvider extends ExchangeProvider { final url = apiBaseUrl + quotePath; final headers = {'Content-Type': 'application/json'}; final body = { - 'depositCoin': request.fromCurrency.title.toLowerCase(), - 'settleCoin': request.toCurrency.title.toLowerCase(), + 'depositCoin': _normalizeCurrency(request.fromCurrency), + 'settleCoin': _normalizeCurrency(request.toCurrency), 'affiliateId': affiliateId, 'settleAmount': request.toAmount, 'settleNetwork': _networkFor(request.toCurrency), @@ -274,6 +274,15 @@ class SideShiftExchangeProvider extends ExchangeProvider { return responseJSON['id'] as String; } + String _normalizeCurrency(CryptoCurrency currency) { + switch (currency) { + case CryptoCurrency.usdcEPoly: + return 'usdc'; + default: + return currency.title.toLowerCase(); + } + } + String _networkFor(CryptoCurrency currency) => currency.tag != null ? _normalizeTag(currency.tag!) : 'mainnet'; diff --git a/lib/exchange/provider/simpleswap_exchange_provider.dart b/lib/exchange/provider/simpleswap_exchange_provider.dart index 091c3a913..5c162a995 100644 --- a/lib/exchange/provider/simpleswap_exchange_provider.dart +++ b/lib/exchange/provider/simpleswap_exchange_provider.dart @@ -222,6 +222,10 @@ class SimpleSwapExchangeProvider extends ExchangeProvider { return 'usdttrc20'; case CryptoCurrency.usdcpoly: return 'usdcpoly'; + case CryptoCurrency.usdtPoly: + return 'usdtpoly'; + case CryptoCurrency.usdcEPoly: + return 'usdcepoly'; case CryptoCurrency.usdcsol: return 'usdcspl'; case CryptoCurrency.matic: diff --git a/lib/exchange/provider/trocador_exchange_provider.dart b/lib/exchange/provider/trocador_exchange_provider.dart index 52e38ecc8..faa4cc060 100644 --- a/lib/exchange/provider/trocador_exchange_provider.dart +++ b/lib/exchange/provider/trocador_exchange_provider.dart @@ -271,6 +271,8 @@ class TrocadorExchangeProvider extends ExchangeProvider { case CryptoCurrency.maticpoly: return 'Mainnet'; case CryptoCurrency.usdcpoly: + case CryptoCurrency.usdtPoly: + case CryptoCurrency.usdcEPoly: return 'MATIC'; case CryptoCurrency.zec: return 'Mainnet'; @@ -283,6 +285,8 @@ class TrocadorExchangeProvider extends ExchangeProvider { switch (currency) { case CryptoCurrency.zec: return 'zec'; + case CryptoCurrency.usdcEPoly: + return 'usdce'; default: return currency.title.toLowerCase(); } diff --git a/lib/reactions/wallet_connect.dart b/lib/reactions/wallet_connect.dart index d0ff37267..4f5923e26 100644 --- a/lib/reactions/wallet_connect.dart +++ b/lib/reactions/wallet_connect.dart @@ -44,3 +44,14 @@ String getChainNameBasedOnWalletType(WalletType walletType) { return ''; } } + +String getTokenNameBasedOnWalletType(WalletType walletType) { + switch (walletType) { + case WalletType.ethereum: + return 'ETH'; + case WalletType.polygon: + return 'MATIC'; + default: + return ''; + } +} diff --git a/lib/src/screens/contact/contact_list_page.dart b/lib/src/screens/contact/contact_list_page.dart index d9e3c0c85..99f2aa251 100644 --- a/lib/src/screens/contact/contact_list_page.dart +++ b/lib/src/screens/contact/contact_list_page.dart @@ -135,6 +135,7 @@ class ContactListPage extends BasePage { await showBar(context, S.of(context).copied_to_clipboard); } }, + behavior: HitTestBehavior.opaque, child: Container( padding: const EdgeInsets.only(top: 16, bottom: 16, right: 24), child: Row( diff --git a/lib/src/screens/dashboard/home_settings_page.dart b/lib/src/screens/dashboard/home_settings_page.dart index a08b8a8a7..618ba49ff 100644 --- a/lib/src/screens/dashboard/home_settings_page.dart +++ b/lib/src/screens/dashboard/home_settings_page.dart @@ -8,6 +8,7 @@ import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart'; import 'package:cake_wallet/themes/extensions/address_theme.dart'; +import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/themes/extensions/menu_theme.dart'; import 'package:cake_wallet/themes/extensions/picker_theme.dart'; import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart'; @@ -91,7 +92,7 @@ class HomeSettingsPage extends BasePage { fillColor: Theme.of(context).cardColor, child: Icon( Icons.add, - color: Theme.of(context).dialogTheme.backgroundColor, + color: Theme.of(context).extension()!.titleColor, size: 22.0, ), padding: EdgeInsets.all(12), diff --git a/lib/src/screens/dashboard/widgets/home_screen_account_widget.dart b/lib/src/screens/dashboard/widgets/home_screen_account_widget.dart index f548a8737..fa036978f 100644 --- a/lib/src/screens/dashboard/widgets/home_screen_account_widget.dart +++ b/lib/src/screens/dashboard/widgets/home_screen_account_widget.dart @@ -18,6 +18,7 @@ class HomeScreenAccountWidget extends StatelessWidget { context: context, builder: (_) => getIt.get()); }, + behavior: HitTestBehavior.opaque, child: Container( height: 100.0, child: Row( diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index 67cd689b1..5f7fcd205 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -176,7 +176,7 @@ class RootState extends State with WidgetsBindingObserver { ); launchUri = null; } else { - _nonETHWalletErrorToast(S.current.switchToETHWallet); + _nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet); } } @@ -206,7 +206,7 @@ class RootState extends State with WidgetsBindingObserver { String? _getRouteToGo() { if (isWalletConnectLink) { if (isEVMCompatibleChain(widget.appStore.wallet!.type)) { - _nonETHWalletErrorToast(S.current.switchToETHWallet); + _nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet); return null; } return Routes.walletConnectConnectionsListing; diff --git a/lib/src/screens/settings/connection_sync_page.dart b/lib/src/screens/settings/connection_sync_page.dart index 40a04b0db..bec2e6296 100644 --- a/lib/src/screens/settings/connection_sync_page.dart +++ b/lib/src/screens/settings/connection_sync_page.dart @@ -1,4 +1,3 @@ -import 'package:cake_wallet/core/wallet_connect/web3wallet_service.dart'; import 'package:cake_wallet/reactions/wallet_connect.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart'; @@ -18,12 +17,11 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; class ConnectionSyncPage extends BasePage { - ConnectionSyncPage(this.dashboardViewModel, this.web3walletService); + ConnectionSyncPage(this.dashboardViewModel); @override String get title => S.current.connection_sync; - final Web3WalletService? web3walletService; final DashboardViewModel dashboardViewModel; @override diff --git a/lib/src/screens/settings/display_settings_page.dart b/lib/src/screens/settings/display_settings_page.dart index 505573f80..ba59df3af 100644 --- a/lib/src/screens/settings/display_settings_page.dart +++ b/lib/src/screens/settings/display_settings_page.dart @@ -76,7 +76,7 @@ class DisplaySettingsPage extends BasePage { }, ), if (responsiveLayoutUtil.shouldRenderMobileUI && DeviceInfo.instance.isMobile) - SettingsThemeChoicesCell(_displaySettingsViewModel), + Semantics(label: S.current.color_theme, child: SettingsThemeChoicesCell(_displaySettingsViewModel)), ], ), ); diff --git a/lib/src/screens/settings/widgets/settings_choices_cell.dart b/lib/src/screens/settings/widgets/settings_choices_cell.dart index aea5ecbb9..79f74699d 100644 --- a/lib/src/screens/settings/widgets/settings_choices_cell.dart +++ b/lib/src/screens/settings/widgets/settings_choices_cell.dart @@ -31,42 +31,43 @@ class SettingsChoicesCell extends StatelessWidget { ), const SizedBox(height: 24), Center( - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(30), - color: Theme.of(context).extension()!.actionButtonColor, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: choicesListItem.items.map((dynamic e) { - final isSelected = choicesListItem.selectedItem == e; - return GestureDetector( + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30), + color: Theme.of(context).extension()!.actionButtonColor, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: choicesListItem.items.map((dynamic e) { + final isSelected = choicesListItem.selectedItem == e; + return Expanded( + child: GestureDetector( onTap: () { choicesListItem.onItemSelected.call(e); }, child: Container( - padding: EdgeInsets.symmetric(horizontal: 32, vertical: 8), + padding: EdgeInsets.symmetric(vertical: 8), decoration: BoxDecoration( borderRadius: BorderRadius.circular(30), color: isSelected ? Theme.of(context).primaryColor : null, ), - child: Text( - choicesListItem.displayItem.call(e), - style: TextStyle( - color: isSelected - ? Colors.white - : Theme.of(context).extension()!.secondaryTextColor, - fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal, + child: Center( + child: Text( + choicesListItem.displayItem.call(e), + style: TextStyle( + color: isSelected + ? Colors.white + : Theme.of(context).extension()!.secondaryTextColor, + fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal, + ), ), ), ), - ); - }).toList(), - ), + ), + ); + }).toList(), ), ), ), diff --git a/lib/src/screens/settings/widgets/settings_theme_choice.dart b/lib/src/screens/settings/widgets/settings_theme_choice.dart index ffb9d7e7e..abe9a4eab 100644 --- a/lib/src/screens/settings/widgets/settings_theme_choice.dart +++ b/lib/src/screens/settings/widgets/settings_theme_choice.dart @@ -54,57 +54,61 @@ class SettingsThemeChoicesCell extends StatelessWidget { return Padding( padding: EdgeInsets.all(5), - child: GestureDetector( - onTap: () { - _displaySettingsViewModel.setTheme(e); - }, - child: Container( - padding: EdgeInsets.all(5), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(cellRadius), - border: isSelected - ? Border.all( - color: Theme.of(context).primaryColor) - : null, - color: Theme.of(context) - .extension()! - .secondaryTextColor - .withOpacity( - currentTheme.brightness == Brightness.light - ? 0.1 - : 0.3), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - padding: EdgeInsets.symmetric( - horizontal: cellWidth, vertical: cellHeight), - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(cellRadius), - bottomLeft: Radius.circular(cellRadius)), - color: e.themeData.primaryColor, + child: Semantics( + label: e.toString(), + selected: isSelected, + child: GestureDetector( + onTap: () { + _displaySettingsViewModel.setTheme(e); + }, + child: Container( + padding: EdgeInsets.all(5), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(cellRadius), + border: isSelected + ? Border.all( + color: Theme.of(context).primaryColor) + : null, + color: Theme.of(context) + .extension()! + .secondaryTextColor + .withOpacity( + currentTheme.brightness == Brightness.light + ? 0.1 + : 0.3), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + padding: EdgeInsets.symmetric( + horizontal: cellWidth, vertical: cellHeight), + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(cellRadius), + bottomLeft: Radius.circular(cellRadius)), + color: e.themeData.primaryColor, + ), ), - ), - Container( - padding: EdgeInsets.symmetric( - horizontal: cellWidth, vertical: cellHeight), - decoration: BoxDecoration( - color: e.themeData.colorScheme.background, + Container( + padding: EdgeInsets.symmetric( + horizontal: cellWidth, vertical: cellHeight), + decoration: BoxDecoration( + color: e.themeData.colorScheme.background, + ), ), - ), - Container( - padding: EdgeInsets.symmetric( - horizontal: cellWidth, vertical: cellHeight), - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - topRight: Radius.circular(cellRadius), - bottomRight: Radius.circular(cellRadius)), - color: e.themeData.cardColor, + Container( + padding: EdgeInsets.symmetric( + horizontal: cellWidth, vertical: cellHeight), + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topRight: Radius.circular(cellRadius), + bottomRight: Radius.circular(cellRadius)), + color: e.themeData.cardColor, + ), ), - ), - ], + ], + ), ), ), ), diff --git a/lib/src/widgets/standard_switch.dart b/lib/src/widgets/standard_switch.dart index 064faea48..b80d487fe 100644 --- a/lib/src/widgets/standard_switch.dart +++ b/lib/src/widgets/standard_switch.dart @@ -14,25 +14,29 @@ class StandardSwitch extends StatefulWidget { class StandardSwitchState extends State { @override Widget build(BuildContext context) { - return GestureDetector( - onTap: widget.onTaped, - child: AnimatedContainer( - padding: EdgeInsets.only(left: 2.0, right: 2.0), - alignment: widget.value ? Alignment.centerRight : Alignment.centerLeft, - duration: Duration(milliseconds: 250), - width: 50, - height: 28, - decoration: BoxDecoration( - color: widget.value - ? Theme.of(context).primaryColor - : Theme.of(context).disabledColor, - borderRadius: BorderRadius.all(Radius.circular(14.0))), - child: Container( - width: 24.0, - height: 24.0, + + return Semantics( + toggled: widget.value, + child: GestureDetector( + onTap: widget.onTaped, + child: AnimatedContainer( + padding: EdgeInsets.only(left: 2.0, right: 2.0), + alignment: widget.value ? Alignment.centerRight : Alignment.centerLeft, + duration: Duration(milliseconds: 250), + width: 50, + height: 28, decoration: BoxDecoration( - color: Colors.white, - shape: BoxShape.circle), + color: widget.value + ? Theme.of(context).primaryColor + : Theme.of(context).disabledColor, + borderRadius: BorderRadius.all(Radius.circular(14.0))), + child: Container( + width: 24.0, + height: 24.0, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.circle), + ), ), ), ); diff --git a/lib/view_model/contact_list/contact_list_view_model.dart b/lib/view_model/contact_list/contact_list_view_model.dart index 0dcd8108a..b53b67c43 100644 --- a/lib/view_model/contact_list/contact_list_view_model.dart +++ b/lib/view_model/contact_list/contact_list_view_model.dart @@ -91,6 +91,9 @@ abstract class ContactListViewModelBase with Store { walletContacts.where((element) => _isValidForCurrency(element)).toList(); bool _isValidForCurrency(ContactBase element) { - return _currency == null || element.type == _currency || element.type.title == _currency!.tag; + return _currency == null || + element.type == _currency || + element.type.title == _currency!.tag || + element.type.tag == _currency!.tag; } } diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 9be5f23f8..79b385e47 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -750,5 +750,6 @@ "seed_language_chinese_traditional": "تقاليد صينية)", "dfx_option_description": "ﺎﺑﻭﺭﻭﺃ ﻲﻓ ﺕﺎﻛﺮﺸﻟﺍﻭ ﺔﺋﺰﺠﺘﻟﺍ ءﻼﻤﻌﻟ .ﻲﻓﺎﺿﺇ KYC ﻥﻭﺪﺑ ﻭﺭﻮﻳ 990 ﻰﻟﺇ ﻞﺼﻳ ﺎﻣ .ﻱﺮﺴﻳﻮﺴﻟﺍ", "polygonscan_history": "ﻥﺎﻜﺴﻧﻮﺠﻴﻟﻮﺑ ﺦﻳﺭﺎﺗ", - "wallet_seed_legacy": "بذرة محفظة قديمة" + "wallet_seed_legacy": "بذرة محفظة قديمة", + "switchToEVMCompatibleWallet": " (Ethereum، Polygon) ﻯﺮﺧﺃ ﺓﺮﻣ ﺔﻟﻭﺎﺤﻤﻟﺍﻭ EVM ﻊﻣ ﺔﻘﻓﺍﻮﺘﻣ ﺔﻈﻔﺤﻣ ﻰﻟﺇ ﻞﻳﺪﺒﺘﻟﺍ ﻰﺟﺮﻳ" } diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index c26fcaad8..b806d0f12 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -746,5 +746,6 @@ "seed_language_chinese_traditional": "Традиционен китайски)", "dfx_option_description": "Купете крипто с EUR и CHF. До 990 € без допълнителен KYC. За клиенти на дребно и корпоративни клиенти в Европа", "polygonscan_history": "История на PolygonScan", - "wallet_seed_legacy": "Наследено портфейл семе" + "wallet_seed_legacy": "Наследено портфейл семе", + "switchToEVMCompatibleWallet": "Моля, превключете към портфейл, съвместим с EVM, и опитайте отново (Ethereum, Polygon)" } diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index 0964cbb31..27015c7fd 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -746,5 +746,6 @@ "seed_language_chinese_traditional": "Číňan (tradiční)", "dfx_option_description": "Nakupujte kryptoměny za EUR a CHF. Až 990 € bez dalších KYC. Pro maloobchodní a firemní zákazníky v Evropě", "polygonscan_history": "Historie PolygonScan", - "wallet_seed_legacy": "Starší semeno peněženky" + "wallet_seed_legacy": "Starší semeno peněženky", + "switchToEVMCompatibleWallet": "Přepněte na peněženku kompatibilní s EVM a zkuste to znovu (Ethereum, Polygon)" } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 0baf2e2a8..0281ecc77 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -754,5 +754,6 @@ "seed_language_chinese_traditional": "Chinesisch (Traditionell)", "dfx_option_description": "Krypto mit EUR und CHF kaufen. Bis zu 990€ ohne zusätzliches KYC. Für Privat- und Firmenkunden in Europa", "polygonscan_history": "PolygonScan-Verlauf", - "wallet_seed_legacy": "Legacy Wallet Seed" + "wallet_seed_legacy": "Legacy Wallet Seed", + "switchToEVMCompatibleWallet": "Bitte wechseln Sie zu einem EVM-kompatiblen Wallet und versuchen Sie es erneut (Ethereum, Polygon)" } diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index c780ee443..91789e613 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -755,5 +755,6 @@ "seed_language_chinese_traditional": "Chinese (Traditional)", "dfx_option_description": "Buy crypto with EUR & CHF. Up to 990€ without additional KYC. For retail and corporate customers in Europe", "polygonscan_history": "PolygonScan history", - "wallet_seed_legacy": "Legacy wallet seed" + "wallet_seed_legacy": "Legacy wallet seed", + "switchToEVMCompatibleWallet": "Please switch to an EVM compatible wallet and try again (Ethereum, Polygon)" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index b17c3f896..84647c28b 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -754,5 +754,6 @@ "dfx_option_description": "Compre criptomonedas con EUR y CHF. Hasta 990€ sin KYC adicional. Para clientes minoristas y corporativos en Europa", "seed_language_chinese_traditional": "Chino (tradicional)", "polygonscan_history": "Historial de PolygonScan", - "wallet_seed_legacy": "Semilla de billetera heredada" + "wallet_seed_legacy": "Semilla de billetera heredada", + "switchToEVMCompatibleWallet": "Cambie a una billetera compatible con EVM e inténtelo nuevamente (Ethereum, Polygon)" } diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 1df264092..df83bab5a 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -754,5 +754,6 @@ "seed_language_chinese_traditional": "Chinois (Traditionnel)", "dfx_option_description": "Achetez des crypto-monnaies avec EUR et CHF. Jusqu'à 990€ sans KYC supplémentaire. Pour les clients particuliers et entreprises en Europe", "polygonscan_history": "Historique de PolygonScan", - "wallet_seed_legacy": "Graine de portefeuille hérité" + "wallet_seed_legacy": "Graine de portefeuille hérité", + "switchToEVMCompatibleWallet": "Veuillez passer à un portefeuille compatible EVM et réessayer (Ethereum, Polygon)" } diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 2411233ec..7a31cd2e3 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -735,5 +735,6 @@ "seed_language_chinese_traditional": "Sinanci (na gargajiya)", "dfx_option_description": "Sayi crypto tare da EUR & CHF. Har zuwa € 990 ba tare da ƙarin KYC ba. Don 'yan kasuwa da abokan ciniki na kamfanoni a Turai", "polygonscan_history": "PolygonScan tarihin kowane zamani", - "wallet_seed_legacy": "Tallarin walat walat" + "wallet_seed_legacy": "Tallarin walat walat", + "switchToEVMCompatibleWallet": "Da fatan za a canza zuwa walat ɗin EVM mai jituwa kuma a sake gwadawa (Ethereum, Polygon)" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 0440322bc..0cd69e82b 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -754,5 +754,6 @@ "seed_language_chinese_traditional": "चीनी पारंपरिक)", "dfx_option_description": "EUR और CHF के साथ क्रिप्टो खरीदें। अतिरिक्त केवाईसी के बिना 990€ तक। यूरोप में खुदरा और कॉर्पोरेट ग्राहकों के लिए", "polygonscan_history": "पॉलीगॉनस्कैन इतिहास", - "wallet_seed_legacy": "विरासत बटुए बीज" + "wallet_seed_legacy": "विरासत बटुए बीज", + "switchToEVMCompatibleWallet": "कृपया ईवीएम संगत वॉलेट पर स्विच करें और पुनः प्रयास करें (एथेरियम, पॉलीगॉन)" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 404db1651..7dcf30e56 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -749,8 +749,9 @@ "seedtype_polyseed": "Poliseed (16 riječi)", "seed_language_czech": "češki", "seed_language_korean": "korejski", - "dfx_option_description": "Kupujte kripto s EUR i CHF. Do 990 € bez dodatnog KYC-a. Za maloprodajne i poslovne korisnike u Europi", "seed_language_chinese_traditional": "Kinesko (tradicionalno)", + "dfx_option_description": "Kupujte kripto s EUR i CHF. Do 990 € bez dodatnog KYC-a. Za maloprodajne i poslovne korisnike u Europi", "polygonscan_history": "Povijest PolygonScan", - "wallet_seed_legacy": "Sjeme naslijeđenog novčanika" + "wallet_seed_legacy": "Sjeme naslijeđenog novčanika", + "switchToEVMCompatibleWallet": "Prijeđite na novčanik kompatibilan s EVM-om i pokušajte ponovno (Ethereum, Polygon)" } diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 4e534723e..c598c7f6e 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -739,8 +739,9 @@ "seedtype_polyseed": "Polyseed (16 kata)", "seed_language_czech": "Ceko", "seed_language_korean": "Korea", - "dfx_option_description": "Beli kripto dengan EUR & CHF. Hingga 990€ tanpa KYC tambahan. Untuk pelanggan ritel dan korporat di Eropa", "seed_language_chinese_traditional": "Cina (tradisional)", + "dfx_option_description": "Beli kripto dengan EUR & CHF. Hingga 990€ tanpa KYC tambahan. Untuk pelanggan ritel dan korporat di Eropa", "polygonscan_history": "Sejarah PolygonScan", - "wallet_seed_legacy": "Biji dompet warisan" + "wallet_seed_legacy": "Biji dompet warisan", + "switchToEVMCompatibleWallet": "Silakan beralih ke dompet yang kompatibel dengan EVM dan coba lagi (Ethereum, Polygon)" } diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 3239cb1b6..5097d2e4b 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -754,5 +754,6 @@ "seed_language_chinese_traditional": "Cinese tradizionale)", "dfx_option_description": "Acquista criptovalute con EUR e CHF. Fino a 990€ senza KYC aggiuntivi. Per clienti al dettaglio e aziendali in Europa", "polygonscan_history": "Cronologia PolygonScan", - "wallet_seed_legacy": "Seme di portafoglio legacy" + "wallet_seed_legacy": "Seme di portafoglio legacy", + "switchToEVMCompatibleWallet": "Passa a un portafoglio compatibile con EVM e riprova (Ethereum, Polygon)" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index ee3fc30fe..6624a4f5c 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -754,5 +754,6 @@ "seed_language_chinese_traditional": "中国の伝統的な)", "dfx_option_description": "EUR と CHF で暗号通貨を購入します。追加のKYCなしで最大990ユーロ。ヨーロッパの小売および法人顧客向け", "polygonscan_history": "ポリゴンスキャン履歴", - "wallet_seed_legacy": "レガシーウォレットシード" + "wallet_seed_legacy": "レガシーウォレットシード", + "switchToEVMCompatibleWallet": "EVM 互換のウォレットに切り替えて再試行してください (イーサリアム、ポリゴン)" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 56fb9f66a..eb21b9142 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -752,5 +752,6 @@ "seed_language_chinese_traditional": "중국 전통)", "dfx_option_description": "EUR 및 CHF로 암호화폐를 구매하세요. 추가 KYC 없이 최대 990€. 유럽의 소매 및 기업 고객용", "polygonscan_history": "다각형 스캔 기록", - "wallet_seed_legacy": "레거시 지갑 시드" + "wallet_seed_legacy": "레거시 지갑 시드", + "switchToEVMCompatibleWallet": "EVM 호환 지갑으로 전환 후 다시 시도해 주세요. (이더리움, 폴리곤)" } diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index ce8e9becd..36754049b 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -752,5 +752,6 @@ "seed_language_chinese_traditional": "တရုတ်ရိုးရာ)", "dfx_option_description": "EUR & CHF ဖြင့် crypto ကိုဝယ်ပါ။ အပို KYC မပါဘဲ 990€ အထိ။ ဥရောပရှိ လက်လီရောင်းချသူများနှင့် ကော်ပိုရိတ်ဖောက်သည်များအတွက်", "polygonscan_history": "PolygonScan မှတ်တမ်း", - "wallet_seed_legacy": "အမွေအနှစ်ပိုက်ဆံအိတ်မျိုးစေ့" + "wallet_seed_legacy": "အမွေအနှစ်ပိုက်ဆံအိတ်မျိုးစေ့", + "switchToEVMCompatibleWallet": "ကျေးဇူးပြု၍ EVM တွဲဖက်သုံးနိုင်သော ပိုက်ဆံအိတ်သို့ ပြောင်းပြီး ထပ်စမ်းကြည့်ပါ (Ethereum၊ Polygon)" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index ee5ca97ae..c588a8528 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -751,8 +751,9 @@ "seedtype_polyseed": "Polyseed (16 woorden)", "seed_language_czech": "Tsjechisch", "seed_language_korean": "Koreaans", - "dfx_option_description": "Koop crypto met EUR & CHF. Tot 990€ zonder extra KYC. Voor particuliere en zakelijke klanten in Europa", "seed_language_chinese_traditional": "Chinese (traditionele)", + "dfx_option_description": "Koop crypto met EUR & CHF. Tot 990€ zonder extra KYC. Voor particuliere en zakelijke klanten in Europa", "polygonscan_history": "PolygonScan-geschiedenis", - "wallet_seed_legacy": "Legacy portemonnee zaad" + "wallet_seed_legacy": "Legacy portemonnee zaad", + "switchToEVMCompatibleWallet": "Schakel over naar een EVM-compatibele portemonnee en probeer het opnieuw (Ethereum, Polygon)" } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 2b625b76d..452fadf8d 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -754,5 +754,6 @@ "seed_language_chinese_traditional": "Chiński tradycyjny)", "dfx_option_description": "Kupuj kryptowaluty za EUR i CHF. Do 990 € bez dodatkowego KYC. Dla klientów detalicznych i korporacyjnych w Europie", "polygonscan_history": "Historia PolygonScan", - "wallet_seed_legacy": "Dziedziczne ziarno portfela" + "wallet_seed_legacy": "Dziedziczne ziarno portfela", + "switchToEVMCompatibleWallet": "Przejdź na portfel zgodny z EVM i spróbuj ponownie (Ethereum, Polygon)" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 87cf47d36..5007d2ad3 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -753,5 +753,6 @@ "seed_language_chinese_traditional": "Chinês tradicional)", "dfx_option_description": "Compre criptografia com EUR e CHF. Até 990€ sem KYC adicional. Para clientes de varejo e corporativos na Europa", "polygonscan_history": "História do PolygonScan", - "wallet_seed_legacy": "Semente de carteira herdada" + "wallet_seed_legacy": "Semente de carteira herdada", + "switchToEVMCompatibleWallet": "Mude para uma carteira compatível com EVM e tente novamente (Ethereum, Polygon)" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 3efee8031..c2c9c961d 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -754,5 +754,6 @@ "seed_language_chinese_traditional": "Китайский традиционный)", "dfx_option_description": "Покупайте криптовалюту за EUR и CHF. До 990€ без дополнительного KYC. Для розничных и корпоративных клиентов в Европе", "polygonscan_history": "История PolygonScan", - "wallet_seed_legacy": "Наследие семя кошелька" + "wallet_seed_legacy": "Наследие семя кошелька", + "switchToEVMCompatibleWallet": "Пожалуйста, переключитесь на кошелек, совместимый с EVM, и повторите попытку (Ethereum, Polygon)." } diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 2b17e7349..fecf0e4de 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -752,5 +752,6 @@ "seed_language_chinese_traditional": "จีน (ดั้งเดิม)", "dfx_option_description": "ซื้อ crypto ด้วย EUR และ CHF สูงถึง 990€ โดยไม่มี KYC เพิ่มเติม สำหรับลูกค้ารายย่อยและลูกค้าองค์กรในยุโรป", "polygonscan_history": "ประวัติ PolygonScan", - "wallet_seed_legacy": "เมล็ดกระเป๋าเงินมรดก" + "wallet_seed_legacy": "เมล็ดกระเป๋าเงินมรดก", + "switchToEVMCompatibleWallet": "โปรดเปลี่ยนไปใช้กระเป๋าเงินที่รองรับ EVM แล้วลองอีกครั้ง (Ethereum, Polygon)" } diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 3b0e85276..e90191abc 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -748,5 +748,6 @@ "seed_language_chinese_traditional": "Intsik (tradisyonal)", "dfx_option_description": "Bumili ng crypto gamit ang EUR at CHF. Hanggang 990€ nang walang karagdagang KYC. Para sa retail at corporate na mga customer sa Europe", "polygonscan_history": "Kasaysayan ng PolygonScan", - "wallet_seed_legacy": "Legacy wallet seed" + "wallet_seed_legacy": "Legacy wallet seed", + "switchToEVMCompatibleWallet": "Mangyaring lumipat sa isang EVM compatible na wallet at subukang muli (Ethereum, Polygon)" } diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index fe9315867..89e042cda 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -752,5 +752,6 @@ "seed_language_chinese_traditional": "Çin geleneği)", "dfx_option_description": "EUR ve CHF ile kripto satın alın. Ek KYC olmadan 990 €'ya kadar. Avrupa'daki perakende ve kurumsal müşteriler için", "polygonscan_history": "PolygonScan geçmişi", - "wallet_seed_legacy": "Eski cüzdan tohumu" + "wallet_seed_legacy": "Eski cüzdan tohumu", + "switchToEVMCompatibleWallet": "Lütfen EVM uyumlu bir cüzdana geçin ve tekrar deneyin (Ethereum, Polygon)" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 061f52e07..c250b6aeb 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -754,5 +754,6 @@ "dfx_option_description": "Купуйте криптовалюту за EUR і CHF. До 990 євро без додаткового KYC. Для роздрібних і корпоративних клієнтів у Європі", "seed_language_chinese_traditional": "Китайський (традиційний)", "polygonscan_history": "Історія PolygonScan", - "wallet_seed_legacy": "Спадець насіння гаманця" + "wallet_seed_legacy": "Спадець насіння гаманця", + "switchToEVMCompatibleWallet": "Перейдіть на гаманець, сумісний з EVM, і повторіть спробу (Ethereum, Polygon)" } diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 7713517ac..f89835b6f 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -746,5 +746,6 @@ "seed_language_chinese_traditional": "چینی (روایتی)", "dfx_option_description": "EUR ﺭﻭﺍ CHF ﯽﻓﺎﺿﺍ ۔ﮟﯾﺪﯾﺮﺧ ﻮﭩﭘﺮﮐ ﮫﺗﺎﺳ ﮯﮐ KYC ﮯﯿﻟ ﮯﮐ ﻦﯿﻓﺭﺎﺻ ﭧﯾﺭﻮﭘﺭﺎﮐ ﺭﻭﺍ ﮦﺩﺭﻮﺧ ﮟ", "polygonscan_history": "ﺦﯾﺭﺎﺗ ﯽﮐ ﻦﯿﮑﺳﺍ ﻥﻮﮔ ﯽﻟﻮﭘ", - "wallet_seed_legacy": "میراثی پرس کا بیج" + "wallet_seed_legacy": "میراثی پرس کا بیج", + "switchToEVMCompatibleWallet": "(Ethereum, Polygon) ﮟﯾﺮﮐ ﺶﺷﻮﮐ ﮦﺭﺎﺑﻭﺩ ﺭﻭﺍ ﮟﯾﺮﮐ ﭻﺋﻮﺳ ﺮﭘ ﭧﯿﻟﺍﻭ ﮯﻟﺍﻭ ﮯﻨﮭﮐﺭ ﺖﻘﺑﺎﻄﻣ " } diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index a3b8e98f0..789253bd7 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -748,5 +748,6 @@ "seed_language_chinese_traditional": "Kannada (ibile)", "dfx_option_description": "Ra crypto pẹlu EUR & CHF. Titi di 990 € laisi afikun KYC. Fun soobu ati awọn onibara ile-iṣẹ ni Yuroopu", "polygonscan_history": "PolygonScan itan", - "wallet_seed_legacy": "Irugbin akole" + "wallet_seed_legacy": "Irugbin akole", + "switchToEVMCompatibleWallet": "Jọwọ yipada si apamọwọ ibaramu EVM ki o tun gbiyanju lẹẹkansi (Ethereum, Polygon)" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 4de1e3f0a..336942d7a 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -753,5 +753,6 @@ "seed_language_chinese_traditional": "中国传统的)", "dfx_option_description": "用欧元和瑞士法郎购买加密货币。高达 990 欧元,无需额外 KYC。对于欧洲的零售和企业客户", "polygonscan_history": "多边形扫描历史", - "wallet_seed_legacy": "旧的钱包种子" + "wallet_seed_legacy": "旧的钱包种子", + "switchToEVMCompatibleWallet": "请切换到 EVM 兼容钱包并重试(以太坊、Polygon)" } diff --git a/scripts/android/pubspec_gen.sh b/scripts/android/pubspec_gen.sh index dd9852072..4b89c4afa 100755 --- a/scripts/android/pubspec_gen.sh +++ b/scripts/android/pubspec_gen.sh @@ -10,7 +10,7 @@ case $APP_ANDROID_TYPE in CONFIG_ARGS="--monero" ;; $CAKEWALLET) - CONFIG_ARGS="--monero --bitcoin --haven --ethereum --nano --bitcoinCash" + CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash" ;; $HAVEN) CONFIG_ARGS="--haven" diff --git a/scripts/ios/app_config.sh b/scripts/ios/app_config.sh index 8d999f594..81752a015 100755 --- a/scripts/ios/app_config.sh +++ b/scripts/ios/app_config.sh @@ -28,7 +28,7 @@ case $APP_IOS_TYPE in CONFIG_ARGS="--monero" ;; $CAKEWALLET) - CONFIG_ARGS="--monero --bitcoin --haven --ethereum --nano --bitcoinCash" + CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash" ;; $HAVEN) diff --git a/scripts/macos/app_config.sh b/scripts/macos/app_config.sh index 48b680330..2e6a945bf 100755 --- a/scripts/macos/app_config.sh +++ b/scripts/macos/app_config.sh @@ -23,7 +23,7 @@ CONFIG_ARGS="" case $APP_MACOS_TYPE in $CAKEWALLET) - CONFIG_ARGS="--monero --bitcoin --ethereum --nano --bitcoinCash";; #--haven + CONFIG_ARGS="--monero --bitcoin --ethereum --polygon --nano --bitcoinCash";; #--haven esac cp -rf pubspec_description.yaml pubspec.yaml