Polygon-Wallet-fixes (#1222)

* fix: Fix issues surrounding polygon release * Add polygon generation command to pubspec script * Remove unnecesary cast * fix: Remove unneeded code * fix: Adjust workflow file to pick polygonScan apikey * fix: Issues noticed while testing * fix: Issues noticed while testing * fix: Transaction should reflect the token name * fix: Remove unused import * feat: Add alchemy node to default migration settings * Fix sending Polygon delay Remove alchemy node Minor Enhancements * Remove scrolling from multiple choices settings row and make them fill the whole space [skip ci] * Add USDT poly Add icon for USDC.e * Fix ERC20 tokens overriding old wallets Add USDC.e to exchange * - Remove unnecessary code - Minor Enhancements --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>

Adegoke David committed Dec 13, 2023 at 15:03 UTC ef7762eaca5ff53597777242597272374b7d6e5b
57 files changed +320 -271
.github/workflows/pr_test_build.yml
+2 -1
@@ -119,6 +119,7 @@ jobs:
119 cd /opt/android/cake_wallet
120 touch lib/.secrets.g.dart
121 touch cw_ethereum/lib/.secrets.g.dart
122 + touch cw_polygon/lib/.secrets.g.dart
123 echo "const salt = '${{ secrets.SALT }}';" > lib/.secrets.g.dart
124 echo "const keychainSalt = '${{ secrets.KEY_CHAIN_SALT }}';" >> lib/.secrets.g.dart
125 echo "const key = '${{ secrets.KEY }}';" >> lib/.secrets.g.dart
@@ -146,13 +147,13 @@ jobs:
147 echo "const fiatApiKey = '${{ secrets.FIAT_API_KEY }}';" >> lib/.secrets.g.dart
148 echo "const payfuraApiKey = '${{ secrets.PAYFURA_API_KEY }}';" >> lib/.secrets.g.dart
149 echo "const etherScanApiKey = '${{ secrets.ETHER_SCAN_API_KEY }}';" >> cw_ethereum/lib/.secrets.g.dart
149 - echo "const polygonScanApiKey = '${{ secrets.POLYGON_SCAN_API_KEY }}';" >> cw_ethereum/lib/.secrets.g.dart
150 echo "const chatwootWebsiteToken = '${{ secrets.CHATWOOT_WEBSITE_TOKEN }}';" >> lib/.secrets.g.dart
151 echo "const exolixApiKey = '${{ secrets.EXOLIX_API_KEY }}';" >> lib/.secrets.g.dart
152 echo "const robinhoodApplicationId = '${{ secrets.ROBINHOOD_APPLICATION_ID }}';" >> lib/.secrets.g.dart
153 echo "const robinhoodCIdApiSecret = '${{ secrets.ROBINHOOD_CID_CLIENT_SECRET }}';" >> lib/.secrets.g.dart
154 echo "const walletConnectProjectId = '${{ secrets.WALLET_CONNECT_PROJECT_ID }}';" >> lib/.secrets.g.dart
155 echo "const moralisApiKey = '${{ secrets.MORALIS_API_KEY }}';" >> lib/.secrets.g.dart
156 + echo "const polygonScanApiKey = '${{ secrets.POLYGON_SCAN_API_KEY }}';" >> cw_ethereum/lib/.secrets.g.dart
157
158 - name: Rename app
159 run: echo -e "id=com.cakewallet.test\nname=${{ env.BRANCH_NAME }}" > /opt/android/cake_wallet/android/app.properties
assets/polygon_node_list.yml
+2 -2
@@ -1,6 +1,6 @@
1 +-
2 + uri: polygon-rpc.com
3 -
4 uri: polygon-bor.publicnode.com
5 -
4 - uri: polygon-rpc.com
5 --
6 uri: polygon.llamarpc.com
\ No newline at end of file
cw_bitcoin/pubspec.lock
+4 -13
@@ -79,11 +79,11 @@ packages:
79 dependency: "direct main"
80 description:
81 path: "."
82 - ref: cake-update-v3
83 - resolved-ref: df9204144011ed9419eff7d9ef3143102a40252d
82 + ref: cake-update-v4
83 + resolved-ref: e19ffb7e7977278a75b27e0479b3c6f4034223b3
84 url: "https://github.com/cake-tech/bitcoin_flutter.git"
85 source: git
86 - version: "2.0.2"
86 + version: "2.1.0"
87 boolean_selector:
88 dependency: transitive
89 description:
@@ -244,7 +244,7 @@ packages:
244 source: hosted
245 version: "2.2.4"
246 encrypt:
247 - dependency: "direct main"
247 + dependency: transitive
248 description:
249 name: encrypt
250 sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb"
@@ -698,15 +698,6 @@ packages:
698 url: "https://pub.dev"
699 source: hosted
700 version: "1.0.1"
701 - tor:
702 - dependency: transitive
703 - description:
704 - path: "."
705 - ref: main
706 - resolved-ref: "09ba92cb11d4e3cacf97256e57863b805f79f2e5"
707 - url: "https://github.com/cake-tech/tor.git"
708 - source: git
709 - version: "0.0.1"
701 typed_data:
702 dependency: transitive
703 description:
cw_core/lib/crypto_currency.dart
+4
@@ -93,6 +93,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
93 CryptoCurrency.dydx,
94 CryptoCurrency.steth,
95 CryptoCurrency.banano,
96 + CryptoCurrency.usdtPoly,
97 + CryptoCurrency.usdcEPoly,
98 ];
99
100 static const havenCurrencies = [
@@ -202,6 +204,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
204 static const dydx = CryptoCurrency(title: 'DYDX', tag: 'ETH', fullName: 'dYdX', raw: 84, name: 'dydx', iconPath: 'assets/images/dydx_icon.png', decimals: 18);
205 static const steth = CryptoCurrency(title: 'STETH', tag: 'ETH', fullName: 'Lido Staked Ethereum', raw: 85, name: 'steth', iconPath: 'assets/images/steth_icon.png', decimals: 18);
206 static const banano = CryptoCurrency(title: 'BAN', fullName: 'Banano', raw: 86, name: 'banano', iconPath: 'assets/images/nano_icon.png', decimals: 29);
207 + static const usdtPoly = CryptoCurrency(title: 'USDT', tag: 'POLY', fullName: 'Tether USD (PoS)', raw: 87, name: 'usdtpoly', iconPath: 'assets/images/usdt_icon.png', decimals: 6);
208 + 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);
209
210
211 static final Map<int, CryptoCurrency> _rawCurrencyMap =
cw_core/lib/erc20_token.dart
+15 -11
@@ -18,6 +18,8 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin {
18 bool _enabled;
19 @HiveField(5)
20 final String? iconPath;
21 + @HiveField(6)
22 + final String? tag;
23
24 bool get enabled => _enabled;
25
@@ -30,30 +32,31 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin {
32 required this.decimal,
33 bool enabled = true,
34 this.iconPath,
35 + this.tag,
36 }) : _enabled = enabled,
37 super(
35 - name: symbol.toLowerCase(),
36 - title: symbol.toUpperCase(),
37 - fullName: name,
38 - tag: "ETH",
39 - iconPath: iconPath,
40 - decimals: decimal
41 - );
38 + name: symbol.toLowerCase(),
39 + title: symbol.toUpperCase(),
40 + fullName: name,
41 + tag: tag,
42 + iconPath: iconPath,
43 + decimals: decimal);
44
43 - Erc20Token.copyWith(Erc20Token other, String? icon)
45 + Erc20Token.copyWith(Erc20Token other, String? icon, String? tag)
46 : this.name = other.name,
47 this.symbol = other.symbol,
48 this.contractAddress = other.contractAddress,
49 this.decimal = other.decimal,
50 this._enabled = other.enabled,
51 + this.tag = tag,
52 this.iconPath = icon,
53 super(
54 name: other.name,
55 title: other.symbol.toUpperCase(),
56 fullName: other.name,
54 - tag: "ETH",
57 + tag: tag,
58 iconPath: icon,
56 - decimals: other.decimal
59 + decimals: other.decimal,
60 );
61
62 static const typeId = ERC20_TOKEN_TYPE_ID;
@@ -61,7 +64,8 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin {
64 static const polygonBoxName = ' PolygonErc20Tokens';
65
66 @override
64 - bool operator ==(other) => (other is Erc20Token && other.contractAddress == contractAddress) ||
67 + bool operator ==(other) =>
68 + (other is Erc20Token && other.contractAddress == contractAddress) ||
69 (other is CryptoCurrency && other.title == title);
70
71 @override
cw_core/lib/node.dart
+1 -1
@@ -214,7 +214,7 @@ class Node extends HiveObject with Keyable {
214 }
215
216 Future<bool> requestNodeWithProxy() async {
217 - if (!isValidProxyAddress/* && !Tor.instance.enabled*/) {
217 + if (!isValidProxyAddress /* && !Tor.instance.enabled*/) {
218 return false;
219 }
220
cw_core/pubspec.lock
-9
@@ -616,15 +616,6 @@ packages:
616 url: "https://pub.dev"
617 source: hosted
618 version: "1.0.1"
619 - tor:
620 - dependency: "direct main"
621 - description:
622 - path: "."
623 - ref: main
624 - resolved-ref: "09ba92cb11d4e3cacf97256e57863b805f79f2e5"
625 - url: "https://github.com/cake-tech/tor.git"
626 - source: git
627 - version: "0.0.1"
619 typed_data:
620 dependency: transitive
621 description:
cw_ethereum/lib/default_ethereum_erc20_tokens.dart renamed
+8 -12
@@ -293,17 +293,13 @@ class DefaultErc20Tokens {
293 ];
294
295 List<Erc20Token> get initialErc20Tokens => _defaultTokens.map((token) {
296 - String? iconPath;
297 - try {
298 - iconPath = CryptoCurrency.all
299 - .firstWhere((element) => element.title.toUpperCase() == token.symbol.toUpperCase())
300 - .iconPath;
301 - } catch (_) {}
296 + String? iconPath;
297 + try {
298 + iconPath = CryptoCurrency.all
299 + .firstWhere((element) => element.title.toUpperCase() == token.symbol.toUpperCase())
300 + .iconPath;
301 + } catch (_) {}
302
303 - if (iconPath != null) {
304 - return Erc20Token.copyWith(token, iconPath);
305 - }
306 -
307 - return token;
308 - }).toList();
303 + return Erc20Token.copyWith(token, iconPath, 'ETH');
304 + }).toList();
305 }
cw_ethereum/lib/ethereum_client.dart
+22 -14
@@ -78,19 +78,18 @@ class EthereumClient {
78 currency == CryptoCurrency.maticpoly ||
79 contractAddress != null);
80
81 - bool _isEVMCompatibleChain = currency == CryptoCurrency.eth || currency == CryptoCurrency.maticpoly;
81 + bool _isEVMCompatibleChain =
82 + currency == CryptoCurrency.eth || currency == CryptoCurrency.maticpoly;
83
84 final price = _client!.getGasPrice();
85
85 - final Transaction transaction = Transaction(
86 + final Transaction transaction = createTransaction(
87 from: privateKey.address,
88 to: EthereumAddress.fromHex(toAddress),
89 maxPriorityFeePerGas: EtherAmount.fromInt(EtherUnit.gwei, priority.tip),
89 - value: _isEVMCompatibleChain ? EtherAmount.inWei(BigInt.parse(amount)) : EtherAmount.zero(),
90 + amount: _isEVMCompatibleChain ? EtherAmount.inWei(BigInt.parse(amount)) : EtherAmount.zero(),
91 );
92
92 - final chainId = _getChainIdForCurrency(currency);
93 -
93 final signedTransaction =
94 await _client!.signTransaction(privateKey, transaction, chainId: chainId);
95
@@ -124,18 +123,27 @@ class EthereumClient {
123 );
124 }
125
127 - int _getChainIdForCurrency(CryptoCurrency currency) {
128 - switch (currency) {
129 - case CryptoCurrency.maticpoly:
130 - return 137;
131 - case CryptoCurrency.eth:
132 - default:
133 - return 1;
134 - }
126 + int get chainId => 1;
127 +
128 + Transaction createTransaction({
129 + required EthereumAddress from,
130 + required EthereumAddress to,
131 + required EtherAmount amount,
132 + EtherAmount? maxPriorityFeePerGas,
133 + }) {
134 + return Transaction(
135 + from: from,
136 + to: to,
137 + maxPriorityFeePerGas: maxPriorityFeePerGas,
138 + value: amount,
139 + );
140 }
141
142 Future<String> sendTransaction(Uint8List signedTransaction) async =>
138 - await _client!.sendRawTransaction(prependTransactionType(0x02, signedTransaction));
143 + await _client!.sendRawTransaction(prepareSignedTransactionForSending(signedTransaction));
144 +
145 + Uint8List prepareSignedTransactionForSending(Uint8List signedTransaction) =>
146 + prependTransactionType(0x02, signedTransaction);
147
148 Future getTransactionDetails(String transactionHash) async {
149 // Wait for the transaction receipt to become available
cw_ethereum/lib/ethereum_wallet.dart
+4 -3
@@ -14,7 +14,7 @@ import 'package:cw_core/transaction_priority.dart';
14 import 'package:cw_core/wallet_addresses.dart';
15 import 'package:cw_core/wallet_base.dart';
16 import 'package:cw_core/wallet_info.dart';
17 -import 'package:cw_ethereum/default_erc20_tokens.dart';
17 +import 'package:cw_ethereum/default_ethereum_erc20_tokens.dart';
18 import 'package:cw_ethereum/erc20_balance.dart';
19 import 'package:cw_ethereum/ethereum_client.dart';
20 import 'package:cw_ethereum/ethereum_exceptions.dart';
@@ -429,6 +429,7 @@ abstract class EthereumWalletBase
429 contractAddress: token.contractAddress,
430 decimal: token.decimal,
431 enabled: token.enabled,
432 + tag: token.tag ?? "ETH",
433 iconPath: iconPath,
434 );
435
@@ -492,7 +493,7 @@ abstract class EthereumWalletBase
493 _transactionsUpdateTimer!.cancel();
494 }
495
495 - _transactionsUpdateTimer = Timer.periodic(Duration(seconds: 10), (_) {
496 + _transactionsUpdateTimer = Timer.periodic(const Duration(seconds: 10), (_) {
497 _updateTransactions();
498 _updateBalance();
499 });
@@ -508,7 +509,7 @@ abstract class EthereumWalletBase
509 }
510
511 @override
511 - String signMessage(String message, {String? address = null}) =>
512 + String signMessage(String message, {String? address}) =>
513 bytesToHex(_ethPrivateKey.signPersonalMessageToUint8List(ascii.encode(message)));
514
515 Web3Client? getWeb3Client() => _client.getWeb3Client();
cw_monero/example/pubspec.lock
+21 -15
@@ -153,6 +153,22 @@ packages:
153 description: flutter
154 source: sdk
155 version: "0.0.0"
156 + hashlib:
157 + dependency: transitive
158 + description:
159 + name: hashlib
160 + sha256: "71bf102329ddb8e50c8a995ee4645ae7f1728bb65e575c17196b4d8262121a96"
161 + url: "https://pub.dev"
162 + source: hosted
163 + version: "1.12.0"
164 + hashlib_codecs:
165 + dependency: transitive
166 + description:
167 + name: hashlib_codecs
168 + sha256: "49e2a471f74b15f1854263e58c2ac11f2b631b5b12c836f9708a35397d36d626"
169 + url: "https://pub.dev"
170 + source: hosted
171 + version: "2.2.0"
172 http:
173 dependency: transitive
174 description:
@@ -308,12 +324,11 @@ packages:
324 polyseed:
325 dependency: transitive
326 description:
311 - path: "."
312 - ref: HEAD
313 - resolved-ref: "504d58a5b147fccd3bc85a25f2e72fb32771ddd7"
314 - url: "https://github.com/cake-tech/polyseed_dart.git"
315 - source: git
316 - version: "0.0.1"
327 + name: polyseed
328 + sha256: "9b48ec535b10863f78f6354ec983b4cc0c88ca69ff48fee469d0fd1954b01d4f"
329 + url: "https://pub.dev"
330 + source: hosted
331 + version: "0.0.2"
332 process:
333 dependency: transitive
334 description:
@@ -383,15 +398,6 @@ packages:
398 url: "https://pub.dev"
399 source: hosted
400 version: "0.5.1"
386 - tor:
387 - dependency: transitive
388 - description:
389 - path: "."
390 - ref: main
391 - resolved-ref: "09ba92cb11d4e3cacf97256e57863b805f79f2e5"
392 - url: "https://github.com/cake-tech/tor.git"
393 - source: git
394 - version: "0.0.1"
401 typed_data:
402 dependency: transitive
403 description:
cw_polygon/lib/default_polygon_erc20_tokens.dart renamed
+3 -7
@@ -29,7 +29,7 @@ class DefaultPolygonErc20Tokens {
29 symbol: "USDC.e",
30 contractAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
31 decimal: 6,
32 - enabled: false,
32 + enabled: true,
33 ),
34 Erc20Token(
35 name: "Avalanche Token",
@@ -73,14 +73,10 @@ class DefaultPolygonErc20Tokens {
73 try {
74 iconPath = CryptoCurrency.all
75 .firstWhere((element) =>
76 - element.title.toUpperCase() == token.symbol.toUpperCase())
76 + element.title.toUpperCase() == token.symbol.split(".").first.toUpperCase())
77 .iconPath;
78 } catch (_) {}
79
80 - if (iconPath != null) {
81 - return Erc20Token.copyWith(token, iconPath);
82 - }
83 -
84 - return token;
80 + return Erc20Token.copyWith(token, iconPath, 'POLY');
81 }).toList();
82 }
cw_polygon/lib/polygon_client.dart
+22 -1
@@ -3,8 +3,30 @@ import 'dart:convert';
3 import 'package:cw_ethereum/ethereum_client.dart';
4 import 'package:cw_polygon/polygon_transaction_model.dart';
5 import 'package:cw_ethereum/.secrets.g.dart' as secrets;
6 +import 'package:flutter/foundation.dart';
7 +import 'package:web3dart/web3dart.dart';
8
9 class PolygonClient extends EthereumClient {
10 + @override
11 + Transaction createTransaction({
12 + required EthereumAddress from,
13 + required EthereumAddress to,
14 + required EtherAmount amount,
15 + EtherAmount? maxPriorityFeePerGas,
16 + }) {
17 + return Transaction(
18 + from: from,
19 + to: to,
20 + value: amount,
21 + );
22 + }
23 +
24 + @override
25 + Uint8List prepareSignedTransactionForSending(Uint8List signedTransaction) => signedTransaction;
26 +
27 + @override
28 + int get chainId => 137;
29 +
30 @override
31 Future<List<PolygonTransactionModel>> fetchTransactions(String address,
32 {String? contractAddress}) async {
@@ -27,7 +49,6 @@ class PolygonClient extends EthereumClient {
49
50 return [];
51 } catch (e) {
30 - print(e);
52 return [];
53 }
54 }
cw_polygon/lib/polygon_wallet.dart
+71 -90
@@ -16,10 +16,9 @@ import 'package:cw_core/wallet_base.dart';
16 import 'package:cw_core/wallet_info.dart';
17 import 'package:cw_ethereum/erc20_balance.dart';
18 import 'package:cw_ethereum/ethereum_formatter.dart';
19 -import 'package:cw_ethereum/ethereum_transaction_model.dart';
19 import 'package:cw_ethereum/file.dart';
20 import 'package:cw_core/erc20_token.dart';
22 -import 'package:cw_polygon/default_erc20_tokens.dart';
21 +import 'package:cw_polygon/default_polygon_erc20_tokens.dart';
22 import 'package:cw_polygon/polygon_client.dart';
23 import 'package:cw_polygon/polygon_exceptions.dart';
24 import 'package:cw_polygon/polygon_formatter.dart';
@@ -42,28 +41,26 @@ part 'polygon_wallet.g.dart';
41
42 class PolygonWallet = PolygonWalletBase with _$PolygonWallet;
43
45 -abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
46 - PolygonTransactionHistory, PolygonTransactionInfo> with Store {
44 +abstract class PolygonWalletBase
45 + extends WalletBase<ERC20Balance, PolygonTransactionHistory, PolygonTransactionInfo> with Store {
46 PolygonWalletBase({
47 required WalletInfo walletInfo,
48 String? mnemonic,
49 String? privateKey,
50 required String password,
51 ERC20Balance? initialBalance,
53 - }) : syncStatus = NotConnectedSyncStatus(),
52 + }) : syncStatus = const NotConnectedSyncStatus(),
53 _password = password,
54 _mnemonic = mnemonic,
55 _hexPrivateKey = privateKey,
56 _isTransactionUpdating = false,
57 _client = PolygonClient(),
58 walletAddresses = PolygonWalletAddresses(walletInfo),
60 - balance = ObservableMap<CryptoCurrency, ERC20Balance>.of({
61 - CryptoCurrency.maticpoly: initialBalance ?? ERC20Balance(BigInt.zero)
62 - }),
59 + balance = ObservableMap<CryptoCurrency, ERC20Balance>.of(
60 + {CryptoCurrency.maticpoly: initialBalance ?? ERC20Balance(BigInt.zero)}),
61 super(walletInfo) {
62 this.walletInfo = walletInfo;
65 - transactionHistory =
66 - PolygonTransactionHistory(walletInfo: walletInfo, password: password);
63 + transactionHistory = PolygonTransactionHistory(walletInfo: walletInfo, password: password);
64
65 if (!CakeHive.isAdapterRegistered(Erc20Token.typeId)) {
66 CakeHive.registerAdapter(Erc20TokenAdapter());
@@ -80,9 +77,9 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
77
78 late final EthPrivateKey _polygonPrivateKey;
79
83 - EthPrivateKey get polygonPrivateKey => _polygonPrivateKey;
80 + late final PolygonClient _client;
81
85 - late PolygonClient _client;
82 + EthPrivateKey get polygonPrivateKey => _polygonPrivateKey;
83
84 int? _gasPrice;
85 int? _estimatedGas;
@@ -102,11 +99,11 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
99 @observable
100 late ObservableMap<CryptoCurrency, ERC20Balance> balance;
101
105 - Completer<SharedPreferences> _sharedPrefs = Completer();
102 + final Completer<SharedPreferences> _sharedPrefs = Completer();
103
104 Future<void> init() async {
108 - polygonErc20TokensBox =
109 - await CakeHive.openBox<Erc20Token>(Erc20Token.polygonBoxName);
105 + polygonErc20TokensBox = await CakeHive.openBox<Erc20Token>(
106 + "${walletInfo.name.replaceAll(" ", "_")}_${Erc20Token.polygonBoxName}");
107 await walletAddresses.init();
108 await transactionHistory.init();
109 _polygonPrivateKey = await getPrivateKey(
@@ -122,8 +119,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
119 int calculateEstimatedFee(TransactionPriority priority, int? amount) {
120 try {
121 if (priority is PolygonTransactionPriority) {
125 - final priorityFee =
126 - EtherAmount.fromInt(EtherUnit.gwei, priority.tip).getInWei.toInt();
122 + final priorityFee = EtherAmount.fromInt(EtherUnit.gwei, priority.tip).getInWei.toInt();
123 return (_gasPrice! + priorityFee) * (_estimatedGas ?? 0);
124 }
125
@@ -168,33 +164,29 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
164
165 @override
166 Future<PendingTransaction> createTransaction(Object credentials) async {
171 - final _credentials = credentials as PolygonTransactionCredentials;
172 - final outputs = _credentials.outputs;
167 + final credentials0 = credentials as PolygonTransactionCredentials;
168 + final outputs = credentials0.outputs;
169 final hasMultiDestination = outputs.length > 1;
170
175 - final CryptoCurrency transactionCurrency = balance.keys
176 - .firstWhere((element) => element.title == _credentials.currency.title);
171 + final CryptoCurrency transactionCurrency =
172 + balance.keys.firstWhere((element) => element.title == credentials0.currency.title);
173
178 - final _erc20Balance = balance[transactionCurrency]!;
174 + final erc20Balance = balance[transactionCurrency]!;
175 BigInt totalAmount = BigInt.zero;
180 - int exponent =
181 - transactionCurrency is Erc20Token ? transactionCurrency.decimal : 18;
176 + int exponent = transactionCurrency is Erc20Token ? transactionCurrency.decimal : 18;
177 num amountToPolygonMultiplier = pow(10, exponent);
178
179 // so far this can not be made with Polygon as Polygon does not support multiple recipients
180 if (hasMultiDestination) {
186 - if (outputs.any(
187 - (item) => item.sendAll || (item.formattedCryptoAmount ?? 0) <= 0)) {
181 + if (outputs.any((item) => item.sendAll || (item.formattedCryptoAmount ?? 0) <= 0)) {
182 throw PolygonTransactionCreationException(transactionCurrency);
183 }
184
185 final totalOriginalAmount = PolygonFormatter.parsePolygonAmountToDouble(
192 - outputs.fold(
193 - 0, (acc, value) => acc + (value.formattedCryptoAmount ?? 0)));
194 - totalAmount =
195 - BigInt.from(totalOriginalAmount * amountToPolygonMultiplier);
186 + outputs.fold(0, (acc, value) => acc + (value.formattedCryptoAmount ?? 0)));
187 + totalAmount = BigInt.from(totalOriginalAmount * amountToPolygonMultiplier);
188
197 - if (_erc20Balance.balance < totalAmount) {
189 + if (erc20Balance.balance < totalAmount) {
190 throw PolygonTransactionCreationException(transactionCurrency);
191 }
192 } else {
@@ -203,35 +195,33 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
195 // then no need to subtract the fees from the amount if send all
196 final BigInt allAmount;
197 if (transactionCurrency is Erc20Token) {
206 - allAmount = _erc20Balance.balance;
198 + allAmount = erc20Balance.balance;
199 } else {
208 - allAmount = _erc20Balance.balance -
209 - BigInt.from(calculateEstimatedFee(_credentials.priority!, null));
200 + allAmount =
201 + erc20Balance.balance - BigInt.from(calculateEstimatedFee(credentials0.priority!, null));
202 }
211 - final totalOriginalAmount = EthereumFormatter.parseEthereumAmountToDouble(
212 - output.formattedCryptoAmount ?? 0);
213 - totalAmount = output.sendAll
214 - ? allAmount
215 - : BigInt.from(totalOriginalAmount * amountToPolygonMultiplier);
203 + final totalOriginalAmount =
204 + EthereumFormatter.parseEthereumAmountToDouble(output.formattedCryptoAmount ?? 0);
205 + totalAmount =
206 + output.sendAll ? allAmount : BigInt.from(totalOriginalAmount * amountToPolygonMultiplier);
207
217 - if (_erc20Balance.balance < totalAmount) {
208 + if (erc20Balance.balance < totalAmount) {
209 throw PolygonTransactionCreationException(transactionCurrency);
210 }
211 }
212
213 final pendingPolygonTransaction = await _client.signTransaction(
214 privateKey: _polygonPrivateKey,
224 - toAddress: _credentials.outputs.first.isParsedAddress
225 - ? _credentials.outputs.first.extractedAddress!
226 - : _credentials.outputs.first.address,
215 + toAddress: credentials0.outputs.first.isParsedAddress
216 + ? credentials0.outputs.first.extractedAddress!
217 + : credentials0.outputs.first.address,
218 amount: totalAmount.toString(),
219 gas: _estimatedGas!,
229 - priority: _credentials.priority!,
220 + priority: credentials0.priority!,
221 currency: transactionCurrency,
222 exponent: exponent,
232 - contractAddress: transactionCurrency is Erc20Token
233 - ? transactionCurrency.contractAddress
234 - : null,
223 + contractAddress:
224 + transactionCurrency is Erc20Token ? transactionCurrency.contractAddress : null,
225 );
226
227 return pendingPolygonTransaction;
@@ -262,15 +252,16 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
252 final address = _polygonPrivateKey.address.hex;
253 final transactions = await _client.fetchTransactions(address);
254
265 - final List<Future<List<PolygonTransactionModel>>> polygonErc20TokensTransactions =
266 - [];
255 + final List<Future<List<PolygonTransactionModel>>> polygonErc20TokensTransactions = [];
256
257 for (var token in balance.keys) {
258 if (token is Erc20Token) {
270 - polygonErc20TokensTransactions.add(_client.fetchTransactions(
271 - address,
272 - contractAddress: token.contractAddress,
273 - ) as Future<List<PolygonTransactionModel>>);
259 + polygonErc20TokensTransactions.add(
260 + _client.fetchTransactions(
261 + address,
262 + contractAddress: token.contractAddress,
263 + ),
264 + );
265 }
266 }
267
@@ -294,8 +285,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
285 isPending: false,
286 date: transactionModel.date,
287 confirmations: transactionModel.confirmations,
297 - ethFee:
298 - BigInt.from(transactionModel.gasUsed) * transactionModel.gasPrice,
288 + ethFee: BigInt.from(transactionModel.gasUsed) * transactionModel.gasPrice,
289 exponent: transactionModel.tokenDecimal ?? 18,
290 tokenSymbol: transactionModel.tokenSymbol ?? "MATIC",
291 to: transactionModel.to,
@@ -337,8 +327,8 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
327 _gasPrice = await _client.getGasUnitPrice();
328 _estimatedGas = await _client.getEstimatedGas();
329
340 - Timer.periodic(const Duration(minutes: 1),
341 - (timer) async => _gasPrice = await _client.getGasUnitPrice());
330 + Timer.periodic(
331 + const Duration(minutes: 1), (timer) async => _gasPrice = await _client.getGasUnitPrice());
332 Timer.periodic(const Duration(seconds: 10),
333 (timer) async => _estimatedGas = await _client.getEstimatedGas());
334
@@ -348,8 +338,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
338 }
339 }
340
351 - Future<String> makePath() async =>
352 - pathForWallet(name: walletInfo.name, type: walletInfo.type);
341 + Future<String> makePath() async => pathForWallet(name: walletInfo.name, type: walletInfo.type);
342
343 String toJSON() => json.encode({
344 'mnemonic': _mnemonic,
@@ -367,8 +356,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
356 final data = json.decode(jsonSource) as Map;
357 final mnemonic = data['mnemonic'] as String?;
358 final privateKey = data['private_key'] as String?;
370 - final balance = ERC20Balance.fromJSON(data['balance'] as String) ??
371 - ERC20Balance(BigInt.zero);
359 + final balance = ERC20Balance.fromJSON(data['balance'] as String) ?? ERC20Balance(BigInt.zero);
360
361 return PolygonWallet(
362 walletInfo: walletInfo,
@@ -418,14 +406,14 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
406
407 final root = bip32.BIP32.fromSeed(seed);
408
421 - const _hdPathPolygon = "m/44'/60'/0'/0";
409 + const hdPathPolygon = "m/44'/60'/0'/0";
410 const index = 0;
423 - final addressAtIndex = root.derivePath("$_hdPathPolygon/$index");
411 + final addressAtIndex = root.derivePath("$hdPathPolygon/$index");
412
425 - return EthPrivateKey.fromHex(
426 - HEX.encode(addressAtIndex.privateKey as List<int>));
413 + return EthPrivateKey.fromHex(HEX.encode(addressAtIndex.privateKey as List<int>));
414 }
415
416 + @override
417 Future<void>? updateBalance() async => await _updateBalance();
418
419 List<Erc20Token> get erc20Currencies => polygonErc20TokensBox.values.toList();
@@ -434,29 +422,29 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
422 String? iconPath;
423 try {
424 iconPath = CryptoCurrency.all
437 - .firstWhere((element) =>
438 - element.title.toUpperCase() == token.symbol.toUpperCase())
425 + .firstWhere((element) => element.title.toUpperCase() == token.symbol.toUpperCase())
426 .iconPath;
427 } catch (_) {}
428
442 - final _token = Erc20Token(
429 + final token0 = Erc20Token(
430 name: token.name,
431 symbol: token.symbol,
432 contractAddress: token.contractAddress,
433 decimal: token.decimal,
434 enabled: token.enabled,
435 + tag: token.tag ?? "POLY",
436 iconPath: iconPath,
437 );
438
451 - await polygonErc20TokensBox.put(_token.contractAddress, _token);
439 + await polygonErc20TokensBox.put(token0.contractAddress, token0);
440
453 - if (_token.enabled) {
454 - balance[_token] = await _client.fetchERC20Balances(
441 + if (token0.enabled) {
442 + balance[token0] = await _client.fetchERC20Balances(
443 _polygonPrivateKey.address,
456 - _token.contractAddress,
444 + token0.contractAddress,
445 );
446 } else {
459 - balance.remove(_token);
447 + balance.remove(token0);
448 }
449 }
450
@@ -476,8 +464,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
464 }
465
466 void addInitialTokens() {
479 - final initialErc20Tokens =
480 - DefaultPolygonErc20Tokens().initialPolygonErc20Tokens;
467 + final initialErc20Tokens = DefaultPolygonErc20Tokens().initialPolygonErc20Tokens;
468
469 for (var token in initialErc20Tokens) {
470 polygonErc20TokensBox.put(token.contractAddress, token);
@@ -486,26 +473,20 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
473
474 @override
475 Future<void> renameWalletFiles(String newWalletName) async {
489 - final currentWalletPath =
490 - await pathForWallet(name: walletInfo.name, type: type);
476 + final currentWalletPath = await pathForWallet(name: walletInfo.name, type: type);
477 final currentWalletFile = File(currentWalletPath);
478
493 - final currentDirPath =
494 - await pathForWalletDir(name: walletInfo.name, type: type);
495 - final currentTransactionsFile =
496 - File('$currentDirPath/$transactionsHistoryFileName');
479 + final currentDirPath = await pathForWalletDir(name: walletInfo.name, type: type);
480 + final currentTransactionsFile = File('$currentDirPath/$transactionsHistoryFileName');
481
482 // Copies current wallet files into new wallet name's dir and files
483 if (currentWalletFile.existsSync()) {
500 - final newWalletPath =
501 - await pathForWallet(name: newWalletName, type: type);
484 + final newWalletPath = await pathForWallet(name: newWalletName, type: type);
485 await currentWalletFile.copy(newWalletPath);
486 }
487 if (currentTransactionsFile.existsSync()) {
505 - final newDirPath =
506 - await pathForWalletDir(name: newWalletName, type: type);
507 - await currentTransactionsFile
508 - .copy('$newDirPath/$transactionsHistoryFileName');
488 + final newDirPath = await pathForWalletDir(name: newWalletName, type: type);
489 + await currentTransactionsFile.copy('$newDirPath/$transactionsHistoryFileName');
490 }
491
492 // Delete old name's dir and files
@@ -517,7 +498,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
498 _transactionsUpdateTimer!.cancel();
499 }
500
520 - _transactionsUpdateTimer = Timer.periodic(Duration(seconds: 10), (_) {
501 + _transactionsUpdateTimer = Timer.periodic(const Duration(seconds: 10), (_) {
502 _updateTransactions();
503 _updateBalance();
504 });
@@ -533,8 +514,8 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
514 }
515
516 @override
536 - String signMessage(String message, {String? address = null}) => bytesToHex(
537 - _polygonPrivateKey.signPersonalMessageToUint8List(ascii.encode(message)));
517 + String signMessage(String message, {String? address}) =>
518 + bytesToHex(_polygonPrivateKey.signPersonalMessageToUint8List(ascii.encode(message)));
519
520 Web3Client? getWeb3Client() => _client.getWeb3Client();
521 }
lib/core/address_validator.dart
+4
@@ -32,6 +32,8 @@ class AddressValidator extends TextValidator {
32 return '[0-9a-zA-Z_]';
33 case CryptoCurrency.usdc:
34 case CryptoCurrency.usdcpoly:
35 + case CryptoCurrency.usdtPoly:
36 + case CryptoCurrency.usdcEPoly:
37 case CryptoCurrency.ape:
38 case CryptoCurrency.avaxc:
39 case CryptoCurrency.eth:
@@ -141,6 +143,8 @@ class AddressValidator extends TextValidator {
143 return [42];
144 case CryptoCurrency.eth:
145 case CryptoCurrency.usdcpoly:
146 + case CryptoCurrency.usdtPoly:
147 + case CryptoCurrency.usdcEPoly:
148 case CryptoCurrency.mana:
149 case CryptoCurrency.matic:
150 case CryptoCurrency.maticpoly:
lib/core/wallet_connect/evm_chain_service.dart
+4 -2
@@ -285,10 +285,12 @@ class EvmChainServiceImpl implements ChainService {
285 }
286
287 String _convertToReadable(Map<String, dynamic> data) {
288 + final tokenName = getTokenNameBasedOnWalletType(appStore.wallet!.type);
289 String gas = int.parse((data['gas'] as String).substring(2), radix: 16).toString();
290 String value = data['value'] != null
290 - ? (int.parse((data['value'] as String).substring(2), radix: 16) / 1e18).toString() + ' ETH'
291 - : '0 ETH';
291 + ? (int.parse((data['value'] as String).substring(2), radix: 16) / 1e18).toString() +
292 + ' $tokenName'
293 + : '0 $tokenName';
294 String from = data['from'] as String;
295 String to = data['to'] as String;
296
lib/di.dart
+1 -8
@@ -19,7 +19,6 @@ import 'package:cake_wallet/ionia/ionia_anypay.dart';
19 import 'package:cake_wallet/ionia/ionia_gift_card.dart';
20 import 'package:cake_wallet/ionia/ionia_tip.dart';
21 import 'package:cake_wallet/polygon/polygon.dart';
22 -import 'package:cake_wallet/reactions/wallet_connect.dart';
22 import 'package:cake_wallet/routes.dart';
23 import 'package:cake_wallet/src/screens/anonpay_details/anonpay_details_page.dart';
24 import 'package:cake_wallet/src/screens/buy/buy_options_page.dart';
@@ -752,13 +751,7 @@ Future<void> setup({
751 return PowNodeListViewModel(_powNodeSource, appStore);
752 });
753
755 - getIt.registerFactory(() {
756 - final wallet = getIt.get<AppStore>().wallet;
757 - return ConnectionSyncPage(
758 - getIt.get<DashboardViewModel>(),
759 - isEVMCompatibleChain(wallet!.type) ? getIt.get<Web3WalletService>() : null,
760 - );
761 - });
754 + getIt.registerFactory(() => ConnectionSyncPage(getIt.get<DashboardViewModel>()));
755
756 getIt.registerFactory(
757 () => SecurityBackupPage(getIt.get<SecuritySettingsViewModel>(), getIt.get<AuthService>()));
lib/entities/default_settings_migration.dart
-2
@@ -1,6 +1,5 @@
1 import 'dart:io' show Directory, File, Platform;
2 import 'package:cake_wallet/bitcoin/bitcoin.dart';
3 -import 'package:cake_wallet/entities/encrypt.dart';
3 import 'package:cake_wallet/entities/exchange_api_mode.dart';
4 import 'package:cw_core/pathForWallet.dart';
5 import 'package:cake_wallet/entities/secret_store_key.dart';
@@ -186,7 +185,6 @@ Future<void> defaultSettingsMigration(
185 case 25:
186 await rewriteSecureStoragePin(secureStorage: secureStorage);
187 break;
189 -
188 default:
189 break;
190 }
lib/entities/node_list.dart
+3 -4
@@ -85,8 +85,7 @@ Future<List<Node>> loadDefaultEthereumNodes() async {
85 }
86
87 Future<List<Node>> loadBitcoinCashElectrumServerList() async {
88 - final serverListRaw =
89 - await rootBundle.loadString('assets/bitcoin_cash_electrum_server_list.yml');
88 + final serverListRaw = await rootBundle.loadString('assets/bitcoin_cash_electrum_server_list.yml');
89 final loadedServerList = loadYaml(serverListRaw) as YamlList;
90 final serverList = <Node>[];
91
@@ -141,6 +140,7 @@ Future<List<Node>> loadDefaultPolygonNodes() async {
140 for (final raw in loadedNodes) {
141 if (raw is Map) {
142 final node = Node.fromMap(Map<String, Object>.from(raw));
143 +
144 node.type = WalletType.polygon;
145 nodes.add(node);
146 }
@@ -159,7 +159,6 @@ Future<void> resetToDefault(Box<Node> nodeSource) async {
159 final nanoNodes = await loadDefaultNanoNodes();
160 final polygonNodes = await loadDefaultPolygonNodes();
161
162 -
162 final nodes = moneroNodes +
163 bitcoinElectrumServerList +
164 litecoinElectrumServerList +
@@ -178,4 +177,4 @@ Future<void> resetPowToDefault(Box<Node> powNodeSource) async {
177 final nodes = nanoPowNodes;
178 await powNodeSource.clear();
179 await powNodeSource.addAll(nodes);
181 -}
\ No newline at end of file
180 +}
lib/exchange/provider/sideshift_exchange_provider.dart
+13 -4
@@ -159,8 +159,8 @@ class SideShiftExchangeProvider extends ExchangeProvider {
159 url = apiBaseUrl + orderPath + '/fixed';
160 } else {
161 url = apiBaseUrl + orderPath + '/variable';
162 - body["depositCoin"] = request.fromCurrency.title.toLowerCase();
163 - body["settleCoin"] = request.toCurrency.title.toLowerCase();
162 + body["depositCoin"] = _normalizeCurrency(request.fromCurrency);
163 + body["settleCoin"] = _normalizeCurrency(request.toCurrency);
164 body["settleNetwork"] = _networkFor(request.toCurrency);
165 body["depositNetwork"] = _networkFor(request.fromCurrency);
166 }
@@ -248,8 +248,8 @@ class SideShiftExchangeProvider extends ExchangeProvider {
248 final url = apiBaseUrl + quotePath;
249 final headers = {'Content-Type': 'application/json'};
250 final body = {
251 - 'depositCoin': request.fromCurrency.title.toLowerCase(),
252 - 'settleCoin': request.toCurrency.title.toLowerCase(),
251 + 'depositCoin': _normalizeCurrency(request.fromCurrency),
252 + 'settleCoin': _normalizeCurrency(request.toCurrency),
253 'affiliateId': affiliateId,
254 'settleAmount': request.toAmount,
255 'settleNetwork': _networkFor(request.toCurrency),
@@ -274,6 +274,15 @@ class SideShiftExchangeProvider extends ExchangeProvider {
274 return responseJSON['id'] as String;
275 }
276
277 + String _normalizeCurrency(CryptoCurrency currency) {
278 + switch (currency) {
279 + case CryptoCurrency.usdcEPoly:
280 + return 'usdc';
281 + default:
282 + return currency.title.toLowerCase();
283 + }
284 + }
285 +
286 String _networkFor(CryptoCurrency currency) =>
287 currency.tag != null ? _normalizeTag(currency.tag!) : 'mainnet';
288
lib/exchange/provider/simpleswap_exchange_provider.dart
+4
@@ -222,6 +222,10 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
222 return 'usdttrc20';
223 case CryptoCurrency.usdcpoly:
224 return 'usdcpoly';
225 + case CryptoCurrency.usdtPoly:
226 + return 'usdtpoly';
227 + case CryptoCurrency.usdcEPoly:
228 + return 'usdcepoly';
229 case CryptoCurrency.usdcsol:
230 return 'usdcspl';
231 case CryptoCurrency.matic:
lib/exchange/provider/trocador_exchange_provider.dart
+4
@@ -271,6 +271,8 @@ class TrocadorExchangeProvider extends ExchangeProvider {
271 case CryptoCurrency.maticpoly:
272 return 'Mainnet';
273 case CryptoCurrency.usdcpoly:
274 + case CryptoCurrency.usdtPoly:
275 + case CryptoCurrency.usdcEPoly:
276 return 'MATIC';
277 case CryptoCurrency.zec:
278 return 'Mainnet';
@@ -283,6 +285,8 @@ class TrocadorExchangeProvider extends ExchangeProvider {
285 switch (currency) {
286 case CryptoCurrency.zec:
287 return 'zec';
288 + case CryptoCurrency.usdcEPoly:
289 + return 'usdce';
290 default:
291 return currency.title.toLowerCase();
292 }
lib/reactions/wallet_connect.dart
+11
@@ -44,3 +44,14 @@ String getChainNameBasedOnWalletType(WalletType walletType) {
44 return '';
45 }
46 }
47 +
48 +String getTokenNameBasedOnWalletType(WalletType walletType) {
49 + switch (walletType) {
50 + case WalletType.ethereum:
51 + return 'ETH';
52 + case WalletType.polygon:
53 + return 'MATIC';
54 + default:
55 + return '';
56 + }
57 +}
lib/src/screens/dashboard/home_settings_page.dart
+2 -1
@@ -8,6 +8,7 @@ import 'package:cake_wallet/src/screens/base_page.dart';
8 import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
9 import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
10 import 'package:cake_wallet/themes/extensions/address_theme.dart';
11 +import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
12 import 'package:cake_wallet/themes/extensions/menu_theme.dart';
13 import 'package:cake_wallet/themes/extensions/picker_theme.dart';
14 import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart';
@@ -91,7 +92,7 @@ class HomeSettingsPage extends BasePage {
92 fillColor: Theme.of(context).cardColor,
93 child: Icon(
94 Icons.add,
94 - color: Theme.of(context).dialogTheme.backgroundColor,
95 + color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
96 size: 22.0,
97 ),
98 padding: EdgeInsets.all(12),
lib/src/screens/root/root.dart
+2 -2
@@ -176,7 +176,7 @@ class RootState extends State<Root> with WidgetsBindingObserver {
176 );
177 launchUri = null;
178 } else {
179 - _nonETHWalletErrorToast(S.current.switchToETHWallet);
179 + _nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet);
180 }
181 }
182
@@ -206,7 +206,7 @@ class RootState extends State<Root> with WidgetsBindingObserver {
206 String? _getRouteToGo() {
207 if (isWalletConnectLink) {
208 if (isEVMCompatibleChain(widget.appStore.wallet!.type)) {
209 - _nonETHWalletErrorToast(S.current.switchToETHWallet);
209 + _nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet);
210 return null;
211 }
212 return Routes.walletConnectConnectionsListing;
lib/src/screens/settings/connection_sync_page.dart
+1 -3
@@ -1,4 +1,3 @@
1 -import 'package:cake_wallet/core/wallet_connect/web3wallet_service.dart';
1 import 'package:cake_wallet/reactions/wallet_connect.dart';
2 import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart';
3 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';
17 import 'package:flutter_mobx/flutter_mobx.dart';
18
19 class ConnectionSyncPage extends BasePage {
21 - ConnectionSyncPage(this.dashboardViewModel, this.web3walletService);
20 + ConnectionSyncPage(this.dashboardViewModel);
21
22 @override
23 String get title => S.current.connection_sync;
24
26 - final Web3WalletService? web3walletService;
25 final DashboardViewModel dashboardViewModel;
26
27 @override
lib/src/screens/settings/widgets/settings_choices_cell.dart
+24 -23
@@ -31,42 +31,43 @@ class SettingsChoicesCell extends StatelessWidget {
31 ),
32 const SizedBox(height: 24),
33 Center(
34 - child: SingleChildScrollView(
35 - scrollDirection: Axis.horizontal,
36 - child: Container(
37 - decoration: BoxDecoration(
38 - borderRadius: BorderRadius.circular(30),
39 - color: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
40 - ),
41 - child: Row(
42 - mainAxisAlignment: MainAxisAlignment.center,
43 - children: choicesListItem.items.map((dynamic e) {
44 - final isSelected = choicesListItem.selectedItem == e;
45 - return GestureDetector(
34 + child: Container(
35 + decoration: BoxDecoration(
36 + borderRadius: BorderRadius.circular(30),
37 + color: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
38 + ),
39 + child: Row(
40 + mainAxisAlignment: MainAxisAlignment.center,
41 + children: choicesListItem.items.map((dynamic e) {
42 + final isSelected = choicesListItem.selectedItem == e;
43 + return Expanded(
44 + child: GestureDetector(
45 onTap: () {
46 choicesListItem.onItemSelected.call(e);
47 },
48 child: Container(
50 - padding: EdgeInsets.symmetric(horizontal: 32, vertical: 8),
49 + padding: EdgeInsets.symmetric(vertical: 8),
50 decoration: BoxDecoration(
51 borderRadius: BorderRadius.circular(30),
52 color: isSelected
53 ? Theme.of(context).primaryColor
54 : null,
55 ),
57 - child: Text(
58 - choicesListItem.displayItem.call(e),
59 - style: TextStyle(
60 - color: isSelected
61 - ? Colors.white
62 - : Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
63 - fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal,
56 + child: Center(
57 + child: Text(
58 + choicesListItem.displayItem.call(e),
59 + style: TextStyle(
60 + color: isSelected
61 + ? Colors.white
62 + : Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
63 + fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal,
64 + ),
65 ),
66 ),
67 ),
67 - );
68 - }).toList(),
69 - ),
68 + ),
69 + );
70 + }).toList(),
71 ),
72 ),
73 ),
lib/view_model/contact_list/contact_list_view_model.dart
+4 -1
@@ -91,6 +91,9 @@ abstract class ContactListViewModelBase with Store {
91 walletContacts.where((element) => _isValidForCurrency(element)).toList();
92
93 bool _isValidForCurrency(ContactBase element) {
94 - return _currency == null || element.type == _currency || element.type.title == _currency!.tag;
94 + return _currency == null ||
95 + element.type == _currency ||
96 + element.type.title == _currency!.tag ||
97 + element.type.tag == _currency!.tag;
98 }
99 }
res/values/strings_ar.arb
+2 -1
@@ -748,5 +748,6 @@
748 "seed_language_chinese_traditional": "تقاليد صينية)",
749 "dfx_option_description": "ﺎﺑﻭﺭﻭﺃ ﻲﻓ ﺕﺎﻛﺮﺸﻟﺍﻭ ﺔﺋﺰﺠﺘﻟﺍ ءﻼﻤﻌﻟ .ﻲﻓﺎﺿﺇ KYC ﻥﻭﺪﺑ ﻭﺭﻮﻳ 990 ﻰﻟﺇ ﻞﺼﻳ ﺎﻣ .ﻱﺮﺴﻳﻮﺴﻟﺍ",
750 "polygonscan_history": "ﻥﺎﻜﺴﻧﻮﺠﻴﻟﻮﺑ ﺦﻳﺭﺎﺗ",
751 - "wallet_seed_legacy": "بذرة محفظة قديمة"
751 + "wallet_seed_legacy": "بذرة محفظة قديمة",
752 + "switchToEVMCompatibleWallet": " (Ethereum، Polygon) ﻯﺮﺧﺃ ﺓﺮﻣ ﺔﻟﻭﺎﺤﻤﻟﺍﻭ EVM ﻊﻣ ﺔﻘﻓﺍﻮﺘﻣ ﺔﻈﻔﺤﻣ ﻰﻟﺇ ﻞﻳﺪﺒﺘﻟﺍ ﻰﺟﺮﻳ"
753 }
res/values/strings_bg.arb
+2 -1
@@ -744,5 +744,6 @@
744 "seed_language_chinese_traditional": "Традиционен китайски)",
745 "dfx_option_description": "Купете крипто с EUR и CHF. До 990 € без допълнителен KYC. За клиенти на дребно и корпоративни клиенти в Европа",
746 "polygonscan_history": "История на PolygonScan",
747 - "wallet_seed_legacy": "Наследено портфейл семе"
747 + "wallet_seed_legacy": "Наследено портфейл семе",
748 + "switchToEVMCompatibleWallet": "Моля, превключете към портфейл, съвместим с EVM, и опитайте отново (Ethereum, Polygon)"
749 }
res/values/strings_cs.arb
+2 -1
@@ -744,5 +744,6 @@
744 "seed_language_chinese_traditional": "Číňan (tradiční)",
745 "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ě",
746 "polygonscan_history": "Historie PolygonScan",
747 - "wallet_seed_legacy": "Starší semeno peněženky"
747 + "wallet_seed_legacy": "Starší semeno peněženky",
748 + "switchToEVMCompatibleWallet": "Přepněte na peněženku kompatibilní s EVM a zkuste to znovu (Ethereum, Polygon)"
749 }
res/values/strings_de.arb
+2 -1
@@ -752,5 +752,6 @@
752 "seed_language_chinese_traditional": "Chinesisch (Traditionell)",
753 "dfx_option_description": "Krypto mit EUR und CHF kaufen. Bis zu 990€ ohne zusätzliches KYC. Für Privat- und Firmenkunden in Europa",
754 "polygonscan_history": "PolygonScan-Verlauf",
755 - "wallet_seed_legacy": "Legacy Wallet Seed"
755 + "wallet_seed_legacy": "Legacy Wallet Seed",
756 + "switchToEVMCompatibleWallet": "Bitte wechseln Sie zu einem EVM-kompatiblen Wallet und versuchen Sie es erneut (Ethereum, Polygon)"
757 }
res/values/strings_en.arb
+2 -1
@@ -753,5 +753,6 @@
753 "seed_language_chinese_traditional": "Chinese (Traditional)",
754 "dfx_option_description": "Buy crypto with EUR & CHF. Up to 990€ without additional KYC. For retail and corporate customers in Europe",
755 "polygonscan_history": "PolygonScan history",
756 - "wallet_seed_legacy": "Legacy wallet seed"
756 + "wallet_seed_legacy": "Legacy wallet seed",
757 + "switchToEVMCompatibleWallet": "Please switch to an EVM compatible wallet and try again (Ethereum, Polygon)"
758 }
res/values/strings_es.arb
+4 -4
@@ -749,9 +749,9 @@
749 "seedtype_polyseed": "Polieta (16 palabras)",
750 "seed_language_czech": "checo",
751 "seed_language_korean": "coreano",
752 - "seed_language_chinese_traditional": "Chino tradicional)",
753 - "dfx_option_description": "Compre criptomonedas con EUR y CHF. Hasta 990€ sin KYC adicional. Para clientes minoristas y corporativos en Europa",
752 "seed_language_chinese_traditional": "Chino (tradicional)",
753 + "dfx_option_description": "Compre criptomonedas con EUR y CHF. Hasta 990€ sin KYC adicional. Para clientes minoristas y corporativos en Europa",
754 "polygonscan_history": "Historial de PolygonScan",
756 - "wallet_seed_legacy": "Semilla de billetera heredada"
757 -}
\ No newline at end of file
755 + "wallet_seed_legacy": "Semilla de billetera heredada",
756 + "switchToEVMCompatibleWallet": "Cambie a una billetera compatible con EVM e inténtelo nuevamente (Ethereum, Polygon)"
757 +}
res/values/strings_fr.arb
+2 -1
@@ -752,5 +752,6 @@
752 "seed_language_chinese_traditional": "Chinois (Traditionnel)",
753 "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",
754 "polygonscan_history": "Historique de PolygonScan",
755 - "wallet_seed_legacy": "Graine de portefeuille hérité"
755 + "wallet_seed_legacy": "Graine de portefeuille hérité",
756 + "switchToEVMCompatibleWallet": "Veuillez passer à un portefeuille compatible EVM et réessayer (Ethereum, Polygon)"
757 }
res/values/strings_ha.arb
+2 -1
@@ -730,5 +730,6 @@
730 "seed_language_chinese_traditional": "Sinanci (na gargajiya)",
731 "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",
732 "polygonscan_history": "PolygonScan tarihin kowane zamani",
733 - "wallet_seed_legacy": "Tallarin walat walat"
733 + "wallet_seed_legacy": "Tallarin walat walat",
734 + "switchToEVMCompatibleWallet": "Da fatan za a canza zuwa walat ɗin EVM mai jituwa kuma a sake gwadawa (Ethereum, Polygon)"
735 }
res/values/strings_hi.arb
+2 -1
@@ -752,5 +752,6 @@
752 "seed_language_chinese_traditional": "चीनी पारंपरिक)",
753 "dfx_option_description": "EUR और CHF के साथ क्रिप्टो खरीदें। अतिरिक्त केवाईसी के बिना 990€ तक। यूरोप में खुदरा और कॉर्पोरेट ग्राहकों के लिए",
754 "polygonscan_history": "पॉलीगॉनस्कैन इतिहास",
755 - "wallet_seed_legacy": "विरासत बटुए बीज"
755 + "wallet_seed_legacy": "विरासत बटुए बीज",
756 + "switchToEVMCompatibleWallet": "कृपया ईवीएम संगत वॉलेट पर स्विच करें और पुनः प्रयास करें (एथेरियम, पॉलीगॉन)"
757 }
res/values/strings_hr.arb
+4 -4
@@ -747,9 +747,9 @@
747 "seedtype_polyseed": "Poliseed (16 riječi)",
748 "seed_language_czech": "češki",
749 "seed_language_korean": "korejski",
750 - "seed_language_chinese_traditional": "Kinesko tradicionalno)",
751 - "dfx_option_description": "Kupujte kripto s EUR i CHF. Do 990 € bez dodatnog KYC-a. Za maloprodajne i poslovne korisnike u Europi",
750 "seed_language_chinese_traditional": "Kinesko (tradicionalno)",
751 + "dfx_option_description": "Kupujte kripto s EUR i CHF. Do 990 € bez dodatnog KYC-a. Za maloprodajne i poslovne korisnike u Europi",
752 "polygonscan_history": "Povijest PolygonScan",
754 - "wallet_seed_legacy": "Sjeme naslijeđenog novčanika"
755 -}
\ No newline at end of file
753 + "wallet_seed_legacy": "Sjeme naslijeđenog novčanika",
754 + "switchToEVMCompatibleWallet": "Prijeđite na novčanik kompatibilan s EVM-om i pokušajte ponovno (Ethereum, Polygon)"
755 +}
res/values/strings_id.arb
+4 -4
@@ -737,9 +737,9 @@
737 "seedtype_polyseed": "Polyseed (16 kata)",
738 "seed_language_czech": "Ceko",
739 "seed_language_korean": "Korea",
740 - "seed_language_chinese_traditional": "Cina tradisional)",
741 - "dfx_option_description": "Beli kripto dengan EUR & CHF. Hingga 990€ tanpa KYC tambahan. Untuk pelanggan ritel dan korporat di Eropa",
740 "seed_language_chinese_traditional": "Cina (tradisional)",
741 + "dfx_option_description": "Beli kripto dengan EUR & CHF. Hingga 990€ tanpa KYC tambahan. Untuk pelanggan ritel dan korporat di Eropa",
742 "polygonscan_history": "Sejarah PolygonScan",
744 - "wallet_seed_legacy": "Biji dompet warisan"
745 -}
\ No newline at end of file
743 + "wallet_seed_legacy": "Biji dompet warisan",
744 + "switchToEVMCompatibleWallet": "Silakan beralih ke dompet yang kompatibel dengan EVM dan coba lagi (Ethereum, Polygon)"
745 +}
res/values/strings_it.arb
+2 -1
@@ -752,5 +752,6 @@
752 "seed_language_chinese_traditional": "Cinese tradizionale)",
753 "dfx_option_description": "Acquista criptovalute con EUR e CHF. Fino a 990€ senza KYC aggiuntivi. Per clienti al dettaglio e aziendali in Europa",
754 "polygonscan_history": "Cronologia PolygonScan",
755 - "wallet_seed_legacy": "Seme di portafoglio legacy"
755 + "wallet_seed_legacy": "Seme di portafoglio legacy",
756 + "switchToEVMCompatibleWallet": "Passa a un portafoglio compatibile con EVM e riprova (Ethereum, Polygon)"
757 }
res/values/strings_ja.arb
+2 -1
@@ -752,5 +752,6 @@
752 "seed_language_chinese_traditional": "中国の伝統的な)",
753 "dfx_option_description": "EUR と CHF で暗号通貨を購入します。追加のKYCなしで最大990ユーロ。ヨーロッパの小売および法人顧客向け",
754 "polygonscan_history": "ポリゴンスキャン履歴",
755 - "wallet_seed_legacy": "レガシーウォレットシード"
755 + "wallet_seed_legacy": "レガシーウォレットシード",
756 + "switchToEVMCompatibleWallet": "EVM 互換のウォレットに切り替えて再試行してください (イーサリアム、ポリゴン)"
757 }
res/values/strings_ko.arb
+2 -1
@@ -750,5 +750,6 @@
750 "seed_language_chinese_traditional": "중국 전통)",
751 "dfx_option_description": "EUR 및 CHF로 암호화폐를 구매하세요. 추가 KYC 없이 최대 990€. 유럽의 소매 및 기업 고객용",
752 "polygonscan_history": "다각형 스캔 기록",
753 - "wallet_seed_legacy": "레거시 지갑 시드"
753 + "wallet_seed_legacy": "레거시 지갑 시드",
754 + "switchToEVMCompatibleWallet": "EVM 호환 지갑으로 전환 후 다시 시도해 주세요. (이더리움, 폴리곤)"
755 }
res/values/strings_my.arb
+2 -1
@@ -750,5 +750,6 @@
750 "seed_language_chinese_traditional": "တရုတ်ရိုးရာ)",
751 "dfx_option_description": "EUR & CHF ဖြင့် crypto ကိုဝယ်ပါ။ အပို KYC မပါဘဲ 990€ အထိ။ ဥရောပရှိ လက်လီရောင်းချသူများနှင့် ကော်ပိုရိတ်ဖောက်သည်များအတွက်",
752 "polygonscan_history": "PolygonScan မှတ်တမ်း",
753 - "wallet_seed_legacy": "အမွေအနှစ်ပိုက်ဆံအိတ်မျိုးစေ့"
753 + "wallet_seed_legacy": "အမွေအနှစ်ပိုက်ဆံအိတ်မျိုးစေ့",
754 + "switchToEVMCompatibleWallet": "ကျေးဇူးပြု၍ EVM တွဲဖက်သုံးနိုင်သော ပိုက်ဆံအိတ်သို့ ပြောင်းပြီး ထပ်စမ်းကြည့်ပါ (Ethereum၊ Polygon)"
755 }
res/values/strings_nl.arb
+4 -4
@@ -749,9 +749,9 @@
749 "seedtype_polyseed": "Polyseed (16 woorden)",
750 "seed_language_czech": "Tsjechisch",
751 "seed_language_korean": "Koreaans",
752 - "seed_language_chinese_traditional": "Chinese traditionele)",
753 - "dfx_option_description": "Koop crypto met EUR & CHF. Tot 990€ zonder extra KYC. Voor particuliere en zakelijke klanten in Europa",
752 "seed_language_chinese_traditional": "Chinese (traditionele)",
753 + "dfx_option_description": "Koop crypto met EUR & CHF. Tot 990€ zonder extra KYC. Voor particuliere en zakelijke klanten in Europa",
754 "polygonscan_history": "PolygonScan-geschiedenis",
756 - "wallet_seed_legacy": "Legacy portemonnee zaad"
757 -}
\ No newline at end of file
755 + "wallet_seed_legacy": "Legacy portemonnee zaad",
756 + "switchToEVMCompatibleWallet": "Schakel over naar een EVM-compatibele portemonnee en probeer het opnieuw (Ethereum, Polygon)"
757 +}
res/values/strings_pl.arb
+2 -1
@@ -752,5 +752,6 @@
752 "seed_language_chinese_traditional": "Chiński tradycyjny)",
753 "dfx_option_description": "Kupuj kryptowaluty za EUR i CHF. Do 990 € bez dodatkowego KYC. Dla klientów detalicznych i korporacyjnych w Europie",
754 "polygonscan_history": "Historia PolygonScan",
755 - "wallet_seed_legacy": "Dziedziczne ziarno portfela"
755 + "wallet_seed_legacy": "Dziedziczne ziarno portfela",
756 + "switchToEVMCompatibleWallet": "Przejdź na portfel zgodny z EVM i spróbuj ponownie (Ethereum, Polygon)"
757 }
res/values/strings_pt.arb
+2 -1
@@ -751,5 +751,6 @@
751 "seed_language_chinese_traditional": "Chinês tradicional)",
752 "dfx_option_description": "Compre criptografia com EUR e CHF. Até 990€ sem KYC adicional. Para clientes de varejo e corporativos na Europa",
753 "polygonscan_history": "História do PolygonScan",
754 - "wallet_seed_legacy": "Semente de carteira herdada"
754 + "wallet_seed_legacy": "Semente de carteira herdada",
755 + "switchToEVMCompatibleWallet": "Mude para uma carteira compatível com EVM e tente novamente (Ethereum, Polygon)"
756 }
res/values/strings_ru.arb
+2 -1
@@ -752,5 +752,6 @@
752 "seed_language_chinese_traditional": "Китайский традиционный)",
753 "dfx_option_description": "Покупайте криптовалюту за EUR и CHF. До 990€ без дополнительного KYC. Для розничных и корпоративных клиентов в Европе",
754 "polygonscan_history": "История PolygonScan",
755 - "wallet_seed_legacy": "Наследие семя кошелька"
755 + "wallet_seed_legacy": "Наследие семя кошелька",
756 + "switchToEVMCompatibleWallet": "Пожалуйста, переключитесь на кошелек, совместимый с EVM, и повторите попытку (Ethereum, Polygon)."
757 }
res/values/strings_th.arb
+2 -1
@@ -750,5 +750,6 @@
750 "seed_language_chinese_traditional": "จีน (ดั้งเดิม)",
751 "dfx_option_description": "ซื้อ crypto ด้วย EUR และ CHF สูงถึง 990€ โดยไม่มี KYC เพิ่มเติม สำหรับลูกค้ารายย่อยและลูกค้าองค์กรในยุโรป",
752 "polygonscan_history": "ประวัติ PolygonScan",
753 - "wallet_seed_legacy": "เมล็ดกระเป๋าเงินมรดก"
753 + "wallet_seed_legacy": "เมล็ดกระเป๋าเงินมรดก",
754 + "switchToEVMCompatibleWallet": "โปรดเปลี่ยนไปใช้กระเป๋าเงินที่รองรับ EVM แล้วลองอีกครั้ง (Ethereum, Polygon)"
755 }
res/values/strings_tl.arb
+2 -1
@@ -746,5 +746,6 @@
746 "seed_language_chinese_traditional": "Intsik (tradisyonal)",
747 "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",
748 "polygonscan_history": "Kasaysayan ng PolygonScan",
749 - "wallet_seed_legacy": "Legacy wallet seed"
749 + "wallet_seed_legacy": "Legacy wallet seed",
750 + "switchToEVMCompatibleWallet": "Mangyaring lumipat sa isang EVM compatible na wallet at subukang muli (Ethereum, Polygon)"
751 }
res/values/strings_tr.arb
+2 -1
@@ -750,5 +750,6 @@
750 "seed_language_chinese_traditional": "Çin geleneği)",
751 "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",
752 "polygonscan_history": "PolygonScan geçmişi",
753 - "wallet_seed_legacy": "Eski cüzdan tohumu"
753 + "wallet_seed_legacy": "Eski cüzdan tohumu",
754 + "switchToEVMCompatibleWallet": "Lütfen EVM uyumlu bir cüzdana geçin ve tekrar deneyin (Ethereum, Polygon)"
755 }
res/values/strings_uk.arb
+3 -2
@@ -752,5 +752,6 @@
752 "dfx_option_description": "Купуйте криптовалюту за EUR і CHF. До 990 євро без додаткового KYC. Для роздрібних і корпоративних клієнтів у Європі",
753 "seed_language_chinese_traditional": "Китайський (традиційний)",
754 "polygonscan_history": "Історія PolygonScan",
755 - "wallet_seed_legacy": "Спадець насіння гаманця"
756 -}
\ No newline at end of file
755 + "wallet_seed_legacy": "Спадець насіння гаманця",
756 + "switchToEVMCompatibleWallet": "Перейдіть на гаманець, сумісний з EVM, і повторіть спробу (Ethereum, Polygon)"
757 +}
res/values/strings_ur.arb
+2 -1
@@ -744,5 +744,6 @@
744 "seed_language_chinese_traditional": "چینی (روایتی)",
745 "dfx_option_description": "EUR ﺭﻭﺍ CHF ﯽﻓﺎﺿﺍ ۔ﮟﯾﺪﯾﺮﺧ ﻮﭩﭘﺮﮐ ﮫﺗﺎﺳ ﮯﮐ KYC ﮯﯿﻟ ﮯﮐ ﻦﯿﻓﺭﺎﺻ ﭧﯾﺭﻮﭘﺭﺎﮐ ﺭﻭﺍ ﮦﺩﺭﻮﺧ ﮟ",
746 "polygonscan_history": "ﺦﯾﺭﺎﺗ ﯽﮐ ﻦﯿﮑﺳﺍ ﻥﻮﮔ ﯽﻟﻮﭘ",
747 - "wallet_seed_legacy": "میراثی پرس کا بیج"
747 + "wallet_seed_legacy": "میراثی پرس کا بیج",
748 + "switchToEVMCompatibleWallet": "(Ethereum, Polygon) ﮟﯾﺮﮐ ﺶﺷﻮﮐ ﮦﺭﺎﺑﻭﺩ ﺭﻭﺍ ﮟﯾﺮﮐ ﭻﺋﻮﺳ ﺮﭘ ﭧﯿﻟﺍﻭ ﮯﻟﺍﻭ ﮯﻨﮭﮐﺭ ﺖﻘﺑﺎﻄﻣ "
749 }
res/values/strings_yo.arb
+2 -1
@@ -746,5 +746,6 @@
746 "seed_language_chinese_traditional": "Kannada (ibile)",
747 "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",
748 "polygonscan_history": "PolygonScan itan",
749 - "wallet_seed_legacy": "Irugbin akole"
749 + "wallet_seed_legacy": "Irugbin akole",
750 + "switchToEVMCompatibleWallet": "Jọwọ yipada si apamọwọ ibaramu EVM ki o tun gbiyanju lẹẹkansi (Ethereum, Polygon)"
751 }
res/values/strings_zh.arb
+2 -1
@@ -751,5 +751,6 @@
751 "seed_language_chinese_traditional": "中国传统的)",
752 "dfx_option_description": "用欧元和瑞士法郎购买加密货币。高达 990 欧元,无需额外 KYC。对于欧洲的零售和企业客户",
753 "polygonscan_history": "多边形扫描历史",
754 - "wallet_seed_legacy": "旧的钱包种子"
754 + "wallet_seed_legacy": "旧的钱包种子",
755 + "switchToEVMCompatibleWallet": "请切换到 EVM 兼容钱包并重试(以太坊、Polygon)"
756 }
scripts/android/pubspec_gen.sh
+1 -1
@@ -10,7 +10,7 @@ case $APP_ANDROID_TYPE in
10 CONFIG_ARGS="--monero"
11 ;;
12 $CAKEWALLET)
13 - CONFIG_ARGS="--monero --bitcoin --haven --ethereum --nano --bitcoinCash"
13 + CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash"
14 ;;
15 $HAVEN)
16 CONFIG_ARGS="--haven"
scripts/ios/app_config.sh
+1 -1
@@ -28,7 +28,7 @@ case $APP_IOS_TYPE in
28 CONFIG_ARGS="--monero"
29 ;;
30 $CAKEWALLET)
31 - CONFIG_ARGS="--monero --bitcoin --haven --ethereum --nano --bitcoinCash"
31 + CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash"
32 ;;
33 $HAVEN)
34
scripts/macos/app_config.sh
+1 -1
@@ -23,7 +23,7 @@ CONFIG_ARGS=""
23
24 case $APP_MACOS_TYPE in
25 $CAKEWALLET)
26 - CONFIG_ARGS="--monero --bitcoin --ethereum --nano --bitcoinCash";; #--haven
26 + CONFIG_ARGS="--monero --bitcoin --ethereum --polygon --nano --bitcoinCash";; #--haven
27 esac
28
29 cp -rf pubspec_description.yaml pubspec.yaml