mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 17:40:43 +00:00
Merge branch 'main' into CW-529-Modify-2FA-introduction-screens
This commit is contained in:
commit
9a716d1dc9
64 changed files with 404 additions and 335 deletions
3
.github/workflows/pr_test_build.yml
vendored
3
.github/workflows/pr_test_build.yml
vendored
|
@ -119,6 +119,7 @@ jobs:
|
||||||
cd /opt/android/cake_wallet
|
cd /opt/android/cake_wallet
|
||||||
touch lib/.secrets.g.dart
|
touch lib/.secrets.g.dart
|
||||||
touch cw_ethereum/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 salt = '${{ secrets.SALT }}';" > lib/.secrets.g.dart
|
||||||
echo "const keychainSalt = '${{ secrets.KEY_CHAIN_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
|
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 fiatApiKey = '${{ secrets.FIAT_API_KEY }}';" >> lib/.secrets.g.dart
|
||||||
echo "const payfuraApiKey = '${{ secrets.PAYFURA_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 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 chatwootWebsiteToken = '${{ secrets.CHATWOOT_WEBSITE_TOKEN }}';" >> lib/.secrets.g.dart
|
||||||
echo "const exolixApiKey = '${{ secrets.EXOLIX_API_KEY }}';" >> 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 robinhoodApplicationId = '${{ secrets.ROBINHOOD_APPLICATION_ID }}';" >> lib/.secrets.g.dart
|
||||||
echo "const robinhoodCIdApiSecret = '${{ secrets.ROBINHOOD_CID_CLIENT_SECRET }}';" >> 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 walletConnectProjectId = '${{ secrets.WALLET_CONNECT_PROJECT_ID }}';" >> lib/.secrets.g.dart
|
||||||
echo "const moralisApiKey = '${{ secrets.MORALIS_API_KEY }}';" >> 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
|
- name: Rename app
|
||||||
run: echo -e "id=com.cakewallet.test\nname=${{ env.BRANCH_NAME }}" > /opt/android/cake_wallet/android/app.properties
|
run: echo -e "id=com.cakewallet.test\nname=${{ env.BRANCH_NAME }}" > /opt/android/cake_wallet/android/app.properties
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
-
|
|
||||||
uri: polygon-bor.publicnode.com
|
|
||||||
-
|
-
|
||||||
uri: polygon-rpc.com
|
uri: polygon-rpc.com
|
||||||
|
-
|
||||||
|
uri: polygon-bor.publicnode.com
|
||||||
-
|
-
|
||||||
uri: polygon.llamarpc.com
|
uri: polygon.llamarpc.com
|
|
@ -4,7 +4,10 @@ import 'package:cw_bitcoin/bitcoin_amount_format.dart';
|
||||||
import 'package:cw_core/balance.dart';
|
import 'package:cw_core/balance.dart';
|
||||||
|
|
||||||
class ElectrumBalance extends Balance {
|
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);
|
: super(confirmed, unconfirmed);
|
||||||
|
|
||||||
static ElectrumBalance? fromJSON(String? jsonSource) {
|
static ElectrumBalance? fromJSON(String? jsonSource) {
|
||||||
|
@ -25,16 +28,19 @@ class ElectrumBalance extends Balance {
|
||||||
final int frozen;
|
final int frozen;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get formattedAvailableBalance => bitcoinAmountToString(amount: confirmed - frozen);
|
String get formattedAvailableBalance =>
|
||||||
|
bitcoinAmountToString(amount: confirmed - unconfirmed.abs() - frozen);
|
||||||
|
|
||||||
@override
|
@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);
|
final frozenFormatted = bitcoinAmountToString(amount: frozen);
|
||||||
return frozenFormatted == '0.0' ? '' : frozenFormatted;
|
return frozenFormatted == '0.0' ? '' : frozenFormatted;
|
||||||
}
|
}
|
||||||
|
|
||||||
String toJSON() =>
|
String toJSON() => json.encode(
|
||||||
json.encode({'confirmed': confirmed, 'unconfirmed': unconfirmed, 'frozen': frozen});
|
{'confirmed': confirmed, 'unconfirmed': unconfirmed, 'frozen': frozen});
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ abstract class ElectrumWalletBase
|
||||||
bitcoin.HDWallet.fromSeed(seedBytes).derivePath("m/44'/145'/0'/0");
|
bitcoin.HDWallet.fromSeed(seedBytes).derivePath("m/44'/145'/0'/0");
|
||||||
|
|
||||||
static int estimatedTransactionSize(int inputsCount, int outputsCounts) =>
|
static int estimatedTransactionSize(int inputsCount, int outputsCounts) =>
|
||||||
inputsCount * 146 + outputsCounts * 33 + 8;
|
inputsCount * 68 + outputsCounts * 34 + 10;
|
||||||
|
|
||||||
final bitcoin.HDWallet hd;
|
final bitcoin.HDWallet hd;
|
||||||
final String mnemonic;
|
final String mnemonic;
|
||||||
|
|
|
@ -79,11 +79,11 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: cake-update-v3
|
ref: cake-update-v4
|
||||||
resolved-ref: df9204144011ed9419eff7d9ef3143102a40252d
|
resolved-ref: e19ffb7e7977278a75b27e0479b3c6f4034223b3
|
||||||
url: "https://github.com/cake-tech/bitcoin_flutter.git"
|
url: "https://github.com/cake-tech/bitcoin_flutter.git"
|
||||||
source: git
|
source: git
|
||||||
version: "2.0.2"
|
version: "2.1.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -244,7 +244,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.4"
|
version: "2.2.4"
|
||||||
encrypt:
|
encrypt:
|
||||||
dependency: "direct main"
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: encrypt
|
name: encrypt
|
||||||
sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb"
|
sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb"
|
||||||
|
@ -698,15 +698,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
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:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -93,6 +93,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
|
||||||
CryptoCurrency.dydx,
|
CryptoCurrency.dydx,
|
||||||
CryptoCurrency.steth,
|
CryptoCurrency.steth,
|
||||||
CryptoCurrency.banano,
|
CryptoCurrency.banano,
|
||||||
|
CryptoCurrency.usdtPoly,
|
||||||
|
CryptoCurrency.usdcEPoly,
|
||||||
];
|
];
|
||||||
|
|
||||||
static const havenCurrencies = [
|
static const havenCurrencies = [
|
||||||
|
@ -202,6 +204,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> 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 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 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 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<int, CryptoCurrency> _rawCurrencyMap =
|
static final Map<int, CryptoCurrency> _rawCurrencyMap =
|
||||||
|
|
|
@ -18,6 +18,8 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin {
|
||||||
bool _enabled;
|
bool _enabled;
|
||||||
@HiveField(5)
|
@HiveField(5)
|
||||||
final String? iconPath;
|
final String? iconPath;
|
||||||
|
@HiveField(6)
|
||||||
|
final String? tag;
|
||||||
|
|
||||||
bool get enabled => _enabled;
|
bool get enabled => _enabled;
|
||||||
|
|
||||||
|
@ -30,30 +32,31 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin {
|
||||||
required this.decimal,
|
required this.decimal,
|
||||||
bool enabled = true,
|
bool enabled = true,
|
||||||
this.iconPath,
|
this.iconPath,
|
||||||
|
this.tag,
|
||||||
}) : _enabled = enabled,
|
}) : _enabled = enabled,
|
||||||
super(
|
super(
|
||||||
name: symbol.toLowerCase(),
|
name: symbol.toLowerCase(),
|
||||||
title: symbol.toUpperCase(),
|
title: symbol.toUpperCase(),
|
||||||
fullName: name,
|
fullName: name,
|
||||||
tag: "ETH",
|
tag: tag,
|
||||||
iconPath: iconPath,
|
iconPath: iconPath,
|
||||||
decimals: decimal
|
decimals: decimal);
|
||||||
);
|
|
||||||
|
|
||||||
Erc20Token.copyWith(Erc20Token other, String? icon)
|
Erc20Token.copyWith(Erc20Token other, String? icon, String? tag)
|
||||||
: this.name = other.name,
|
: this.name = other.name,
|
||||||
this.symbol = other.symbol,
|
this.symbol = other.symbol,
|
||||||
this.contractAddress = other.contractAddress,
|
this.contractAddress = other.contractAddress,
|
||||||
this.decimal = other.decimal,
|
this.decimal = other.decimal,
|
||||||
this._enabled = other.enabled,
|
this._enabled = other.enabled,
|
||||||
|
this.tag = tag,
|
||||||
this.iconPath = icon,
|
this.iconPath = icon,
|
||||||
super(
|
super(
|
||||||
name: other.name,
|
name: other.name,
|
||||||
title: other.symbol.toUpperCase(),
|
title: other.symbol.toUpperCase(),
|
||||||
fullName: other.name,
|
fullName: other.name,
|
||||||
tag: "ETH",
|
tag: tag,
|
||||||
iconPath: icon,
|
iconPath: icon,
|
||||||
decimals: other.decimal
|
decimals: other.decimal,
|
||||||
);
|
);
|
||||||
|
|
||||||
static const typeId = ERC20_TOKEN_TYPE_ID;
|
static const typeId = ERC20_TOKEN_TYPE_ID;
|
||||||
|
@ -61,7 +64,8 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin {
|
||||||
static const polygonBoxName = ' PolygonErc20Tokens';
|
static const polygonBoxName = ' PolygonErc20Tokens';
|
||||||
|
|
||||||
@override
|
@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);
|
(other is CryptoCurrency && other.title == title);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -616,15 +616,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
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:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -300,10 +300,6 @@ class DefaultErc20Tokens {
|
||||||
.iconPath;
|
.iconPath;
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
||||||
if (iconPath != null) {
|
return Erc20Token.copyWith(token, iconPath, 'ETH');
|
||||||
return Erc20Token.copyWith(token, iconPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
return token;
|
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
|
@ -78,19 +78,18 @@ class EthereumClient {
|
||||||
currency == CryptoCurrency.maticpoly ||
|
currency == CryptoCurrency.maticpoly ||
|
||||||
contractAddress != null);
|
contractAddress != null);
|
||||||
|
|
||||||
bool _isEVMCompatibleChain = currency == CryptoCurrency.eth || currency == CryptoCurrency.maticpoly;
|
bool _isEVMCompatibleChain =
|
||||||
|
currency == CryptoCurrency.eth || currency == CryptoCurrency.maticpoly;
|
||||||
|
|
||||||
final price = _client!.getGasPrice();
|
final price = _client!.getGasPrice();
|
||||||
|
|
||||||
final Transaction transaction = Transaction(
|
final Transaction transaction = createTransaction(
|
||||||
from: privateKey.address,
|
from: privateKey.address,
|
||||||
to: EthereumAddress.fromHex(toAddress),
|
to: EthereumAddress.fromHex(toAddress),
|
||||||
maxPriorityFeePerGas: EtherAmount.fromInt(EtherUnit.gwei, priority.tip),
|
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 =
|
final signedTransaction =
|
||||||
await _client!.signTransaction(privateKey, transaction, chainId: chainId);
|
await _client!.signTransaction(privateKey, transaction, chainId: chainId);
|
||||||
|
|
||||||
|
@ -124,18 +123,27 @@ class EthereumClient {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
int _getChainIdForCurrency(CryptoCurrency currency) {
|
int get chainId => 1;
|
||||||
switch (currency) {
|
|
||||||
case CryptoCurrency.maticpoly:
|
Transaction createTransaction({
|
||||||
return 137;
|
required EthereumAddress from,
|
||||||
case CryptoCurrency.eth:
|
required EthereumAddress to,
|
||||||
default:
|
required EtherAmount amount,
|
||||||
return 1;
|
EtherAmount? maxPriorityFeePerGas,
|
||||||
}
|
}) {
|
||||||
|
return Transaction(
|
||||||
|
from: from,
|
||||||
|
to: to,
|
||||||
|
maxPriorityFeePerGas: maxPriorityFeePerGas,
|
||||||
|
value: amount,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> sendTransaction(Uint8List signedTransaction) async =>
|
Future<String> 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 {
|
Future getTransactionDetails(String transactionHash) async {
|
||||||
// Wait for the transaction receipt to become available
|
// Wait for the transaction receipt to become available
|
||||||
|
|
|
@ -14,7 +14,7 @@ import 'package:cw_core/transaction_priority.dart';
|
||||||
import 'package:cw_core/wallet_addresses.dart';
|
import 'package:cw_core/wallet_addresses.dart';
|
||||||
import 'package:cw_core/wallet_base.dart';
|
import 'package:cw_core/wallet_base.dart';
|
||||||
import 'package:cw_core/wallet_info.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/erc20_balance.dart';
|
||||||
import 'package:cw_ethereum/ethereum_client.dart';
|
import 'package:cw_ethereum/ethereum_client.dart';
|
||||||
import 'package:cw_ethereum/ethereum_exceptions.dart';
|
import 'package:cw_ethereum/ethereum_exceptions.dart';
|
||||||
|
@ -429,6 +429,7 @@ abstract class EthereumWalletBase
|
||||||
contractAddress: token.contractAddress,
|
contractAddress: token.contractAddress,
|
||||||
decimal: token.decimal,
|
decimal: token.decimal,
|
||||||
enabled: token.enabled,
|
enabled: token.enabled,
|
||||||
|
tag: token.tag ?? "ETH",
|
||||||
iconPath: iconPath,
|
iconPath: iconPath,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -492,7 +493,7 @@ abstract class EthereumWalletBase
|
||||||
_transactionsUpdateTimer!.cancel();
|
_transactionsUpdateTimer!.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
_transactionsUpdateTimer = Timer.periodic(Duration(seconds: 10), (_) {
|
_transactionsUpdateTimer = Timer.periodic(const Duration(seconds: 10), (_) {
|
||||||
_updateTransactions();
|
_updateTransactions();
|
||||||
_updateBalance();
|
_updateBalance();
|
||||||
});
|
});
|
||||||
|
@ -508,7 +509,7 @@ abstract class EthereumWalletBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String signMessage(String message, {String? address = null}) =>
|
String signMessage(String message, {String? address}) =>
|
||||||
bytesToHex(_ethPrivateKey.signPersonalMessageToUint8List(ascii.encode(message)));
|
bytesToHex(_ethPrivateKey.signPersonalMessageToUint8List(ascii.encode(message)));
|
||||||
|
|
||||||
Web3Client? getWeb3Client() => _client.getWeb3Client();
|
Web3Client? getWeb3Client() => _client.getWeb3Client();
|
||||||
|
|
|
@ -153,6 +153,22 @@ packages:
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
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:
|
http:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -308,12 +324,11 @@ packages:
|
||||||
polyseed:
|
polyseed:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
path: "."
|
name: polyseed
|
||||||
ref: HEAD
|
sha256: "9b48ec535b10863f78f6354ec983b4cc0c88ca69ff48fee469d0fd1954b01d4f"
|
||||||
resolved-ref: "504d58a5b147fccd3bc85a25f2e72fb32771ddd7"
|
url: "https://pub.dev"
|
||||||
url: "https://github.com/cake-tech/polyseed_dart.git"
|
source: hosted
|
||||||
source: git
|
version: "0.0.2"
|
||||||
version: "0.0.1"
|
|
||||||
process:
|
process:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -383,15 +398,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.1"
|
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:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -29,7 +29,7 @@ class DefaultPolygonErc20Tokens {
|
||||||
symbol: "USDC.e",
|
symbol: "USDC.e",
|
||||||
contractAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
|
contractAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
|
||||||
decimal: 6,
|
decimal: 6,
|
||||||
enabled: false,
|
enabled: true,
|
||||||
),
|
),
|
||||||
Erc20Token(
|
Erc20Token(
|
||||||
name: "Avalanche Token",
|
name: "Avalanche Token",
|
||||||
|
@ -73,14 +73,10 @@ class DefaultPolygonErc20Tokens {
|
||||||
try {
|
try {
|
||||||
iconPath = CryptoCurrency.all
|
iconPath = CryptoCurrency.all
|
||||||
.firstWhere((element) =>
|
.firstWhere((element) =>
|
||||||
element.title.toUpperCase() == token.symbol.toUpperCase())
|
element.title.toUpperCase() == token.symbol.split(".").first.toUpperCase())
|
||||||
.iconPath;
|
.iconPath;
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
||||||
if (iconPath != null) {
|
return Erc20Token.copyWith(token, iconPath, 'POLY');
|
||||||
return Erc20Token.copyWith(token, iconPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
return token;
|
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
|
@ -3,8 +3,30 @@ import 'dart:convert';
|
||||||
import 'package:cw_ethereum/ethereum_client.dart';
|
import 'package:cw_ethereum/ethereum_client.dart';
|
||||||
import 'package:cw_polygon/polygon_transaction_model.dart';
|
import 'package:cw_polygon/polygon_transaction_model.dart';
|
||||||
import 'package:cw_ethereum/.secrets.g.dart' as secrets;
|
import 'package:cw_ethereum/.secrets.g.dart' as secrets;
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:web3dart/web3dart.dart';
|
||||||
|
|
||||||
class PolygonClient extends EthereumClient {
|
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
|
@override
|
||||||
Future<List<PolygonTransactionModel>> fetchTransactions(String address,
|
Future<List<PolygonTransactionModel>> fetchTransactions(String address,
|
||||||
{String? contractAddress}) async {
|
{String? contractAddress}) async {
|
||||||
|
@ -27,7 +49,6 @@ class PolygonClient extends EthereumClient {
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,9 @@ import 'package:cw_core/wallet_base.dart';
|
||||||
import 'package:cw_core/wallet_info.dart';
|
import 'package:cw_core/wallet_info.dart';
|
||||||
import 'package:cw_ethereum/erc20_balance.dart';
|
import 'package:cw_ethereum/erc20_balance.dart';
|
||||||
import 'package:cw_ethereum/ethereum_formatter.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_ethereum/file.dart';
|
||||||
import 'package:cw_core/erc20_token.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_client.dart';
|
||||||
import 'package:cw_polygon/polygon_exceptions.dart';
|
import 'package:cw_polygon/polygon_exceptions.dart';
|
||||||
import 'package:cw_polygon/polygon_formatter.dart';
|
import 'package:cw_polygon/polygon_formatter.dart';
|
||||||
|
@ -42,28 +41,26 @@ part 'polygon_wallet.g.dart';
|
||||||
|
|
||||||
class PolygonWallet = PolygonWalletBase with _$PolygonWallet;
|
class PolygonWallet = PolygonWalletBase with _$PolygonWallet;
|
||||||
|
|
||||||
abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
abstract class PolygonWalletBase
|
||||||
PolygonTransactionHistory, PolygonTransactionInfo> with Store {
|
extends WalletBase<ERC20Balance, PolygonTransactionHistory, PolygonTransactionInfo> with Store {
|
||||||
PolygonWalletBase({
|
PolygonWalletBase({
|
||||||
required WalletInfo walletInfo,
|
required WalletInfo walletInfo,
|
||||||
String? mnemonic,
|
String? mnemonic,
|
||||||
String? privateKey,
|
String? privateKey,
|
||||||
required String password,
|
required String password,
|
||||||
ERC20Balance? initialBalance,
|
ERC20Balance? initialBalance,
|
||||||
}) : syncStatus = NotConnectedSyncStatus(),
|
}) : syncStatus = const NotConnectedSyncStatus(),
|
||||||
_password = password,
|
_password = password,
|
||||||
_mnemonic = mnemonic,
|
_mnemonic = mnemonic,
|
||||||
_hexPrivateKey = privateKey,
|
_hexPrivateKey = privateKey,
|
||||||
_isTransactionUpdating = false,
|
_isTransactionUpdating = false,
|
||||||
_client = PolygonClient(),
|
_client = PolygonClient(),
|
||||||
walletAddresses = PolygonWalletAddresses(walletInfo),
|
walletAddresses = PolygonWalletAddresses(walletInfo),
|
||||||
balance = ObservableMap<CryptoCurrency, ERC20Balance>.of({
|
balance = ObservableMap<CryptoCurrency, ERC20Balance>.of(
|
||||||
CryptoCurrency.maticpoly: initialBalance ?? ERC20Balance(BigInt.zero)
|
{CryptoCurrency.maticpoly: initialBalance ?? ERC20Balance(BigInt.zero)}),
|
||||||
}),
|
|
||||||
super(walletInfo) {
|
super(walletInfo) {
|
||||||
this.walletInfo = walletInfo;
|
this.walletInfo = walletInfo;
|
||||||
transactionHistory =
|
transactionHistory = PolygonTransactionHistory(walletInfo: walletInfo, password: password);
|
||||||
PolygonTransactionHistory(walletInfo: walletInfo, password: password);
|
|
||||||
|
|
||||||
if (!CakeHive.isAdapterRegistered(Erc20Token.typeId)) {
|
if (!CakeHive.isAdapterRegistered(Erc20Token.typeId)) {
|
||||||
CakeHive.registerAdapter(Erc20TokenAdapter());
|
CakeHive.registerAdapter(Erc20TokenAdapter());
|
||||||
|
@ -80,9 +77,9 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
|
|
||||||
late final EthPrivateKey _polygonPrivateKey;
|
late final EthPrivateKey _polygonPrivateKey;
|
||||||
|
|
||||||
EthPrivateKey get polygonPrivateKey => _polygonPrivateKey;
|
late final PolygonClient _client;
|
||||||
|
|
||||||
late PolygonClient _client;
|
EthPrivateKey get polygonPrivateKey => _polygonPrivateKey;
|
||||||
|
|
||||||
int? _gasPrice;
|
int? _gasPrice;
|
||||||
int? _estimatedGas;
|
int? _estimatedGas;
|
||||||
|
@ -102,11 +99,11 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
@observable
|
@observable
|
||||||
late ObservableMap<CryptoCurrency, ERC20Balance> balance;
|
late ObservableMap<CryptoCurrency, ERC20Balance> balance;
|
||||||
|
|
||||||
Completer<SharedPreferences> _sharedPrefs = Completer();
|
final Completer<SharedPreferences> _sharedPrefs = Completer();
|
||||||
|
|
||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
polygonErc20TokensBox =
|
polygonErc20TokensBox = await CakeHive.openBox<Erc20Token>(
|
||||||
await CakeHive.openBox<Erc20Token>(Erc20Token.polygonBoxName);
|
"${walletInfo.name.replaceAll(" ", "_")}_${Erc20Token.polygonBoxName}");
|
||||||
await walletAddresses.init();
|
await walletAddresses.init();
|
||||||
await transactionHistory.init();
|
await transactionHistory.init();
|
||||||
_polygonPrivateKey = await getPrivateKey(
|
_polygonPrivateKey = await getPrivateKey(
|
||||||
|
@ -122,8 +119,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
int calculateEstimatedFee(TransactionPriority priority, int? amount) {
|
int calculateEstimatedFee(TransactionPriority priority, int? amount) {
|
||||||
try {
|
try {
|
||||||
if (priority is PolygonTransactionPriority) {
|
if (priority is PolygonTransactionPriority) {
|
||||||
final priorityFee =
|
final priorityFee = EtherAmount.fromInt(EtherUnit.gwei, priority.tip).getInWei.toInt();
|
||||||
EtherAmount.fromInt(EtherUnit.gwei, priority.tip).getInWei.toInt();
|
|
||||||
return (_gasPrice! + priorityFee) * (_estimatedGas ?? 0);
|
return (_gasPrice! + priorityFee) * (_estimatedGas ?? 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,33 +164,29 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<PendingTransaction> createTransaction(Object credentials) async {
|
Future<PendingTransaction> createTransaction(Object credentials) async {
|
||||||
final _credentials = credentials as PolygonTransactionCredentials;
|
final credentials0 = credentials as PolygonTransactionCredentials;
|
||||||
final outputs = _credentials.outputs;
|
final outputs = credentials0.outputs;
|
||||||
final hasMultiDestination = outputs.length > 1;
|
final hasMultiDestination = outputs.length > 1;
|
||||||
|
|
||||||
final CryptoCurrency transactionCurrency = balance.keys
|
final CryptoCurrency transactionCurrency =
|
||||||
.firstWhere((element) => element.title == _credentials.currency.title);
|
balance.keys.firstWhere((element) => element.title == credentials0.currency.title);
|
||||||
|
|
||||||
final _erc20Balance = balance[transactionCurrency]!;
|
final erc20Balance = balance[transactionCurrency]!;
|
||||||
BigInt totalAmount = BigInt.zero;
|
BigInt totalAmount = BigInt.zero;
|
||||||
int exponent =
|
int exponent = transactionCurrency is Erc20Token ? transactionCurrency.decimal : 18;
|
||||||
transactionCurrency is Erc20Token ? transactionCurrency.decimal : 18;
|
|
||||||
num amountToPolygonMultiplier = pow(10, exponent);
|
num amountToPolygonMultiplier = pow(10, exponent);
|
||||||
|
|
||||||
// so far this can not be made with Polygon as Polygon does not support multiple recipients
|
// so far this can not be made with Polygon as Polygon does not support multiple recipients
|
||||||
if (hasMultiDestination) {
|
if (hasMultiDestination) {
|
||||||
if (outputs.any(
|
if (outputs.any((item) => item.sendAll || (item.formattedCryptoAmount ?? 0) <= 0)) {
|
||||||
(item) => item.sendAll || (item.formattedCryptoAmount ?? 0) <= 0)) {
|
|
||||||
throw PolygonTransactionCreationException(transactionCurrency);
|
throw PolygonTransactionCreationException(transactionCurrency);
|
||||||
}
|
}
|
||||||
|
|
||||||
final totalOriginalAmount = PolygonFormatter.parsePolygonAmountToDouble(
|
final totalOriginalAmount = PolygonFormatter.parsePolygonAmountToDouble(
|
||||||
outputs.fold(
|
outputs.fold(0, (acc, value) => acc + (value.formattedCryptoAmount ?? 0)));
|
||||||
0, (acc, value) => acc + (value.formattedCryptoAmount ?? 0)));
|
totalAmount = BigInt.from(totalOriginalAmount * amountToPolygonMultiplier);
|
||||||
totalAmount =
|
|
||||||
BigInt.from(totalOriginalAmount * amountToPolygonMultiplier);
|
|
||||||
|
|
||||||
if (_erc20Balance.balance < totalAmount) {
|
if (erc20Balance.balance < totalAmount) {
|
||||||
throw PolygonTransactionCreationException(transactionCurrency);
|
throw PolygonTransactionCreationException(transactionCurrency);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -203,35 +195,33 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
// then no need to subtract the fees from the amount if send all
|
// then no need to subtract the fees from the amount if send all
|
||||||
final BigInt allAmount;
|
final BigInt allAmount;
|
||||||
if (transactionCurrency is Erc20Token) {
|
if (transactionCurrency is Erc20Token) {
|
||||||
allAmount = _erc20Balance.balance;
|
allAmount = erc20Balance.balance;
|
||||||
} else {
|
} else {
|
||||||
allAmount = _erc20Balance.balance -
|
allAmount =
|
||||||
BigInt.from(calculateEstimatedFee(_credentials.priority!, null));
|
erc20Balance.balance - BigInt.from(calculateEstimatedFee(credentials0.priority!, null));
|
||||||
}
|
}
|
||||||
final totalOriginalAmount = EthereumFormatter.parseEthereumAmountToDouble(
|
final totalOriginalAmount =
|
||||||
output.formattedCryptoAmount ?? 0);
|
EthereumFormatter.parseEthereumAmountToDouble(output.formattedCryptoAmount ?? 0);
|
||||||
totalAmount = output.sendAll
|
totalAmount =
|
||||||
? allAmount
|
output.sendAll ? allAmount : BigInt.from(totalOriginalAmount * amountToPolygonMultiplier);
|
||||||
: BigInt.from(totalOriginalAmount * amountToPolygonMultiplier);
|
|
||||||
|
|
||||||
if (_erc20Balance.balance < totalAmount) {
|
if (erc20Balance.balance < totalAmount) {
|
||||||
throw PolygonTransactionCreationException(transactionCurrency);
|
throw PolygonTransactionCreationException(transactionCurrency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final pendingPolygonTransaction = await _client.signTransaction(
|
final pendingPolygonTransaction = await _client.signTransaction(
|
||||||
privateKey: _polygonPrivateKey,
|
privateKey: _polygonPrivateKey,
|
||||||
toAddress: _credentials.outputs.first.isParsedAddress
|
toAddress: credentials0.outputs.first.isParsedAddress
|
||||||
? _credentials.outputs.first.extractedAddress!
|
? credentials0.outputs.first.extractedAddress!
|
||||||
: _credentials.outputs.first.address,
|
: credentials0.outputs.first.address,
|
||||||
amount: totalAmount.toString(),
|
amount: totalAmount.toString(),
|
||||||
gas: _estimatedGas!,
|
gas: _estimatedGas!,
|
||||||
priority: _credentials.priority!,
|
priority: credentials0.priority!,
|
||||||
currency: transactionCurrency,
|
currency: transactionCurrency,
|
||||||
exponent: exponent,
|
exponent: exponent,
|
||||||
contractAddress: transactionCurrency is Erc20Token
|
contractAddress:
|
||||||
? transactionCurrency.contractAddress
|
transactionCurrency is Erc20Token ? transactionCurrency.contractAddress : null,
|
||||||
: null,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return pendingPolygonTransaction;
|
return pendingPolygonTransaction;
|
||||||
|
@ -262,15 +252,16 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
final address = _polygonPrivateKey.address.hex;
|
final address = _polygonPrivateKey.address.hex;
|
||||||
final transactions = await _client.fetchTransactions(address);
|
final transactions = await _client.fetchTransactions(address);
|
||||||
|
|
||||||
final List<Future<List<PolygonTransactionModel>>> polygonErc20TokensTransactions =
|
final List<Future<List<PolygonTransactionModel>>> polygonErc20TokensTransactions = [];
|
||||||
[];
|
|
||||||
|
|
||||||
for (var token in balance.keys) {
|
for (var token in balance.keys) {
|
||||||
if (token is Erc20Token) {
|
if (token is Erc20Token) {
|
||||||
polygonErc20TokensTransactions.add(_client.fetchTransactions(
|
polygonErc20TokensTransactions.add(
|
||||||
|
_client.fetchTransactions(
|
||||||
address,
|
address,
|
||||||
contractAddress: token.contractAddress,
|
contractAddress: token.contractAddress,
|
||||||
) as Future<List<PolygonTransactionModel>>);
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,8 +285,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
isPending: false,
|
isPending: false,
|
||||||
date: transactionModel.date,
|
date: transactionModel.date,
|
||||||
confirmations: transactionModel.confirmations,
|
confirmations: transactionModel.confirmations,
|
||||||
ethFee:
|
ethFee: BigInt.from(transactionModel.gasUsed) * transactionModel.gasPrice,
|
||||||
BigInt.from(transactionModel.gasUsed) * transactionModel.gasPrice,
|
|
||||||
exponent: transactionModel.tokenDecimal ?? 18,
|
exponent: transactionModel.tokenDecimal ?? 18,
|
||||||
tokenSymbol: transactionModel.tokenSymbol ?? "MATIC",
|
tokenSymbol: transactionModel.tokenSymbol ?? "MATIC",
|
||||||
to: transactionModel.to,
|
to: transactionModel.to,
|
||||||
|
@ -337,8 +327,8 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
_gasPrice = await _client.getGasUnitPrice();
|
_gasPrice = await _client.getGasUnitPrice();
|
||||||
_estimatedGas = await _client.getEstimatedGas();
|
_estimatedGas = await _client.getEstimatedGas();
|
||||||
|
|
||||||
Timer.periodic(const Duration(minutes: 1),
|
Timer.periodic(
|
||||||
(timer) async => _gasPrice = await _client.getGasUnitPrice());
|
const Duration(minutes: 1), (timer) async => _gasPrice = await _client.getGasUnitPrice());
|
||||||
Timer.periodic(const Duration(seconds: 10),
|
Timer.periodic(const Duration(seconds: 10),
|
||||||
(timer) async => _estimatedGas = await _client.getEstimatedGas());
|
(timer) async => _estimatedGas = await _client.getEstimatedGas());
|
||||||
|
|
||||||
|
@ -348,8 +338,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> makePath() async =>
|
Future<String> makePath() async => pathForWallet(name: walletInfo.name, type: walletInfo.type);
|
||||||
pathForWallet(name: walletInfo.name, type: walletInfo.type);
|
|
||||||
|
|
||||||
String toJSON() => json.encode({
|
String toJSON() => json.encode({
|
||||||
'mnemonic': _mnemonic,
|
'mnemonic': _mnemonic,
|
||||||
|
@ -367,8 +356,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
final data = json.decode(jsonSource) as Map;
|
final data = json.decode(jsonSource) as Map;
|
||||||
final mnemonic = data['mnemonic'] as String?;
|
final mnemonic = data['mnemonic'] as String?;
|
||||||
final privateKey = data['private_key'] as String?;
|
final privateKey = data['private_key'] as String?;
|
||||||
final balance = ERC20Balance.fromJSON(data['balance'] as String) ??
|
final balance = ERC20Balance.fromJSON(data['balance'] as String) ?? ERC20Balance(BigInt.zero);
|
||||||
ERC20Balance(BigInt.zero);
|
|
||||||
|
|
||||||
return PolygonWallet(
|
return PolygonWallet(
|
||||||
walletInfo: walletInfo,
|
walletInfo: walletInfo,
|
||||||
|
@ -418,14 +406,14 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
|
|
||||||
final root = bip32.BIP32.fromSeed(seed);
|
final root = bip32.BIP32.fromSeed(seed);
|
||||||
|
|
||||||
const _hdPathPolygon = "m/44'/60'/0'/0";
|
const hdPathPolygon = "m/44'/60'/0'/0";
|
||||||
const index = 0;
|
const index = 0;
|
||||||
final addressAtIndex = root.derivePath("$_hdPathPolygon/$index");
|
final addressAtIndex = root.derivePath("$hdPathPolygon/$index");
|
||||||
|
|
||||||
return EthPrivateKey.fromHex(
|
return EthPrivateKey.fromHex(HEX.encode(addressAtIndex.privateKey as List<int>));
|
||||||
HEX.encode(addressAtIndex.privateKey as List<int>));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
Future<void>? updateBalance() async => await _updateBalance();
|
Future<void>? updateBalance() async => await _updateBalance();
|
||||||
|
|
||||||
List<Erc20Token> get erc20Currencies => polygonErc20TokensBox.values.toList();
|
List<Erc20Token> get erc20Currencies => polygonErc20TokensBox.values.toList();
|
||||||
|
@ -434,29 +422,29 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
String? iconPath;
|
String? iconPath;
|
||||||
try {
|
try {
|
||||||
iconPath = CryptoCurrency.all
|
iconPath = CryptoCurrency.all
|
||||||
.firstWhere((element) =>
|
.firstWhere((element) => element.title.toUpperCase() == token.symbol.toUpperCase())
|
||||||
element.title.toUpperCase() == token.symbol.toUpperCase())
|
|
||||||
.iconPath;
|
.iconPath;
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
||||||
final _token = Erc20Token(
|
final token0 = Erc20Token(
|
||||||
name: token.name,
|
name: token.name,
|
||||||
symbol: token.symbol,
|
symbol: token.symbol,
|
||||||
contractAddress: token.contractAddress,
|
contractAddress: token.contractAddress,
|
||||||
decimal: token.decimal,
|
decimal: token.decimal,
|
||||||
enabled: token.enabled,
|
enabled: token.enabled,
|
||||||
|
tag: token.tag ?? "POLY",
|
||||||
iconPath: iconPath,
|
iconPath: iconPath,
|
||||||
);
|
);
|
||||||
|
|
||||||
await polygonErc20TokensBox.put(_token.contractAddress, _token);
|
await polygonErc20TokensBox.put(token0.contractAddress, token0);
|
||||||
|
|
||||||
if (_token.enabled) {
|
if (token0.enabled) {
|
||||||
balance[_token] = await _client.fetchERC20Balances(
|
balance[token0] = await _client.fetchERC20Balances(
|
||||||
_polygonPrivateKey.address,
|
_polygonPrivateKey.address,
|
||||||
_token.contractAddress,
|
token0.contractAddress,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
balance.remove(_token);
|
balance.remove(token0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,8 +464,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
}
|
}
|
||||||
|
|
||||||
void addInitialTokens() {
|
void addInitialTokens() {
|
||||||
final initialErc20Tokens =
|
final initialErc20Tokens = DefaultPolygonErc20Tokens().initialPolygonErc20Tokens;
|
||||||
DefaultPolygonErc20Tokens().initialPolygonErc20Tokens;
|
|
||||||
|
|
||||||
for (var token in initialErc20Tokens) {
|
for (var token in initialErc20Tokens) {
|
||||||
polygonErc20TokensBox.put(token.contractAddress, token);
|
polygonErc20TokensBox.put(token.contractAddress, token);
|
||||||
|
@ -486,26 +473,20 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> renameWalletFiles(String newWalletName) async {
|
Future<void> renameWalletFiles(String newWalletName) async {
|
||||||
final currentWalletPath =
|
final currentWalletPath = await pathForWallet(name: walletInfo.name, type: type);
|
||||||
await pathForWallet(name: walletInfo.name, type: type);
|
|
||||||
final currentWalletFile = File(currentWalletPath);
|
final currentWalletFile = File(currentWalletPath);
|
||||||
|
|
||||||
final currentDirPath =
|
final currentDirPath = await pathForWalletDir(name: walletInfo.name, type: type);
|
||||||
await pathForWalletDir(name: walletInfo.name, type: type);
|
final currentTransactionsFile = File('$currentDirPath/$transactionsHistoryFileName');
|
||||||
final currentTransactionsFile =
|
|
||||||
File('$currentDirPath/$transactionsHistoryFileName');
|
|
||||||
|
|
||||||
// Copies current wallet files into new wallet name's dir and files
|
// Copies current wallet files into new wallet name's dir and files
|
||||||
if (currentWalletFile.existsSync()) {
|
if (currentWalletFile.existsSync()) {
|
||||||
final newWalletPath =
|
final newWalletPath = await pathForWallet(name: newWalletName, type: type);
|
||||||
await pathForWallet(name: newWalletName, type: type);
|
|
||||||
await currentWalletFile.copy(newWalletPath);
|
await currentWalletFile.copy(newWalletPath);
|
||||||
}
|
}
|
||||||
if (currentTransactionsFile.existsSync()) {
|
if (currentTransactionsFile.existsSync()) {
|
||||||
final newDirPath =
|
final newDirPath = await pathForWalletDir(name: newWalletName, type: type);
|
||||||
await pathForWalletDir(name: newWalletName, type: type);
|
await currentTransactionsFile.copy('$newDirPath/$transactionsHistoryFileName');
|
||||||
await currentTransactionsFile
|
|
||||||
.copy('$newDirPath/$transactionsHistoryFileName');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete old name's dir and files
|
// Delete old name's dir and files
|
||||||
|
@ -517,7 +498,7 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
_transactionsUpdateTimer!.cancel();
|
_transactionsUpdateTimer!.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
_transactionsUpdateTimer = Timer.periodic(Duration(seconds: 10), (_) {
|
_transactionsUpdateTimer = Timer.periodic(const Duration(seconds: 10), (_) {
|
||||||
_updateTransactions();
|
_updateTransactions();
|
||||||
_updateBalance();
|
_updateBalance();
|
||||||
});
|
});
|
||||||
|
@ -533,8 +514,8 @@ abstract class PolygonWalletBase extends WalletBase<ERC20Balance,
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String signMessage(String message, {String? address = null}) => bytesToHex(
|
String signMessage(String message, {String? address}) =>
|
||||||
_polygonPrivateKey.signPersonalMessageToUint8List(ascii.encode(message)));
|
bytesToHex(_polygonPrivateKey.signPersonalMessageToUint8List(ascii.encode(message)));
|
||||||
|
|
||||||
Web3Client? getWeb3Client() => _client.getWeb3Client();
|
Web3Client? getWeb3Client() => _client.getWeb3Client();
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,8 @@ class AddressValidator extends TextValidator {
|
||||||
return '[0-9a-zA-Z_]';
|
return '[0-9a-zA-Z_]';
|
||||||
case CryptoCurrency.usdc:
|
case CryptoCurrency.usdc:
|
||||||
case CryptoCurrency.usdcpoly:
|
case CryptoCurrency.usdcpoly:
|
||||||
|
case CryptoCurrency.usdtPoly:
|
||||||
|
case CryptoCurrency.usdcEPoly:
|
||||||
case CryptoCurrency.ape:
|
case CryptoCurrency.ape:
|
||||||
case CryptoCurrency.avaxc:
|
case CryptoCurrency.avaxc:
|
||||||
case CryptoCurrency.eth:
|
case CryptoCurrency.eth:
|
||||||
|
@ -141,6 +143,8 @@ class AddressValidator extends TextValidator {
|
||||||
return [42];
|
return [42];
|
||||||
case CryptoCurrency.eth:
|
case CryptoCurrency.eth:
|
||||||
case CryptoCurrency.usdcpoly:
|
case CryptoCurrency.usdcpoly:
|
||||||
|
case CryptoCurrency.usdtPoly:
|
||||||
|
case CryptoCurrency.usdcEPoly:
|
||||||
case CryptoCurrency.mana:
|
case CryptoCurrency.mana:
|
||||||
case CryptoCurrency.matic:
|
case CryptoCurrency.matic:
|
||||||
case CryptoCurrency.maticpoly:
|
case CryptoCurrency.maticpoly:
|
||||||
|
|
|
@ -285,10 +285,12 @@ class EvmChainServiceImpl implements ChainService {
|
||||||
}
|
}
|
||||||
|
|
||||||
String _convertToReadable(Map<String, dynamic> data) {
|
String _convertToReadable(Map<String, dynamic> data) {
|
||||||
|
final tokenName = getTokenNameBasedOnWalletType(appStore.wallet!.type);
|
||||||
String gas = int.parse((data['gas'] as String).substring(2), radix: 16).toString();
|
String gas = int.parse((data['gas'] as String).substring(2), radix: 16).toString();
|
||||||
String value = data['value'] != null
|
String value = data['value'] != null
|
||||||
? (int.parse((data['value'] as String).substring(2), radix: 16) / 1e18).toString() + ' ETH'
|
? (int.parse((data['value'] as String).substring(2), radix: 16) / 1e18).toString() +
|
||||||
: '0 ETH';
|
' $tokenName'
|
||||||
|
: '0 $tokenName';
|
||||||
String from = data['from'] as String;
|
String from = data['from'] as String;
|
||||||
String to = data['to'] as String;
|
String to = data['to'] as String;
|
||||||
|
|
||||||
|
|
|
@ -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_gift_card.dart';
|
||||||
import 'package:cake_wallet/ionia/ionia_tip.dart';
|
import 'package:cake_wallet/ionia/ionia_tip.dart';
|
||||||
import 'package:cake_wallet/polygon/polygon.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/routes.dart';
|
||||||
import 'package:cake_wallet/src/screens/anonpay_details/anonpay_details_page.dart';
|
import 'package:cake_wallet/src/screens/anonpay_details/anonpay_details_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/buy/buy_options_page.dart';
|
import 'package:cake_wallet/src/screens/buy/buy_options_page.dart';
|
||||||
|
@ -756,13 +755,7 @@ Future<void> setup({
|
||||||
return PowNodeListViewModel(_powNodeSource, appStore);
|
return PowNodeListViewModel(_powNodeSource, appStore);
|
||||||
});
|
});
|
||||||
|
|
||||||
getIt.registerFactory(() {
|
getIt.registerFactory(() => ConnectionSyncPage(getIt.get<DashboardViewModel>()));
|
||||||
final wallet = getIt.get<AppStore>().wallet;
|
|
||||||
return ConnectionSyncPage(
|
|
||||||
getIt.get<DashboardViewModel>(),
|
|
||||||
isEVMCompatibleChain(wallet!.type) ? getIt.get<Web3WalletService>() : null,
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
getIt.registerFactory(
|
getIt.registerFactory(
|
||||||
() => SecurityBackupPage(getIt.get<SecuritySettingsViewModel>(), getIt.get<AuthService>()));
|
() => SecurityBackupPage(getIt.get<SecuritySettingsViewModel>(), getIt.get<AuthService>()));
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import 'dart:io' show Directory, File, Platform;
|
import 'dart:io' show Directory, File, Platform;
|
||||||
import 'package:cake_wallet/bitcoin/bitcoin.dart';
|
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:cake_wallet/entities/exchange_api_mode.dart';
|
||||||
import 'package:cw_core/pathForWallet.dart';
|
import 'package:cw_core/pathForWallet.dart';
|
||||||
import 'package:cake_wallet/entities/secret_store_key.dart';
|
import 'package:cake_wallet/entities/secret_store_key.dart';
|
||||||
|
@ -186,7 +185,6 @@ Future<void> defaultSettingsMigration(
|
||||||
case 25:
|
case 25:
|
||||||
await rewriteSecureStoragePin(secureStorage: secureStorage);
|
await rewriteSecureStoragePin(secureStorage: secureStorage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,8 +85,7 @@ Future<List<Node>> loadDefaultEthereumNodes() async {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<Node>> loadBitcoinCashElectrumServerList() async {
|
Future<List<Node>> loadBitcoinCashElectrumServerList() async {
|
||||||
final serverListRaw =
|
final serverListRaw = await rootBundle.loadString('assets/bitcoin_cash_electrum_server_list.yml');
|
||||||
await rootBundle.loadString('assets/bitcoin_cash_electrum_server_list.yml');
|
|
||||||
final loadedServerList = loadYaml(serverListRaw) as YamlList;
|
final loadedServerList = loadYaml(serverListRaw) as YamlList;
|
||||||
final serverList = <Node>[];
|
final serverList = <Node>[];
|
||||||
|
|
||||||
|
@ -141,6 +140,7 @@ Future<List<Node>> loadDefaultPolygonNodes() async {
|
||||||
for (final raw in loadedNodes) {
|
for (final raw in loadedNodes) {
|
||||||
if (raw is Map) {
|
if (raw is Map) {
|
||||||
final node = Node.fromMap(Map<String, Object>.from(raw));
|
final node = Node.fromMap(Map<String, Object>.from(raw));
|
||||||
|
|
||||||
node.type = WalletType.polygon;
|
node.type = WalletType.polygon;
|
||||||
nodes.add(node);
|
nodes.add(node);
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,6 @@ Future<void> resetToDefault(Box<Node> nodeSource) async {
|
||||||
final nanoNodes = await loadDefaultNanoNodes();
|
final nanoNodes = await loadDefaultNanoNodes();
|
||||||
final polygonNodes = await loadDefaultPolygonNodes();
|
final polygonNodes = await loadDefaultPolygonNodes();
|
||||||
|
|
||||||
|
|
||||||
final nodes = moneroNodes +
|
final nodes = moneroNodes +
|
||||||
bitcoinElectrumServerList +
|
bitcoinElectrumServerList +
|
||||||
litecoinElectrumServerList +
|
litecoinElectrumServerList +
|
||||||
|
|
|
@ -159,8 +159,8 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
||||||
url = apiBaseUrl + orderPath + '/fixed';
|
url = apiBaseUrl + orderPath + '/fixed';
|
||||||
} else {
|
} else {
|
||||||
url = apiBaseUrl + orderPath + '/variable';
|
url = apiBaseUrl + orderPath + '/variable';
|
||||||
body["depositCoin"] = request.fromCurrency.title.toLowerCase();
|
body["depositCoin"] = _normalizeCurrency(request.fromCurrency);
|
||||||
body["settleCoin"] = request.toCurrency.title.toLowerCase();
|
body["settleCoin"] = _normalizeCurrency(request.toCurrency);
|
||||||
body["settleNetwork"] = _networkFor(request.toCurrency);
|
body["settleNetwork"] = _networkFor(request.toCurrency);
|
||||||
body["depositNetwork"] = _networkFor(request.fromCurrency);
|
body["depositNetwork"] = _networkFor(request.fromCurrency);
|
||||||
}
|
}
|
||||||
|
@ -248,8 +248,8 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
||||||
final url = apiBaseUrl + quotePath;
|
final url = apiBaseUrl + quotePath;
|
||||||
final headers = {'Content-Type': 'application/json'};
|
final headers = {'Content-Type': 'application/json'};
|
||||||
final body = {
|
final body = {
|
||||||
'depositCoin': request.fromCurrency.title.toLowerCase(),
|
'depositCoin': _normalizeCurrency(request.fromCurrency),
|
||||||
'settleCoin': request.toCurrency.title.toLowerCase(),
|
'settleCoin': _normalizeCurrency(request.toCurrency),
|
||||||
'affiliateId': affiliateId,
|
'affiliateId': affiliateId,
|
||||||
'settleAmount': request.toAmount,
|
'settleAmount': request.toAmount,
|
||||||
'settleNetwork': _networkFor(request.toCurrency),
|
'settleNetwork': _networkFor(request.toCurrency),
|
||||||
|
@ -274,6 +274,15 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
||||||
return responseJSON['id'] as String;
|
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) =>
|
String _networkFor(CryptoCurrency currency) =>
|
||||||
currency.tag != null ? _normalizeTag(currency.tag!) : 'mainnet';
|
currency.tag != null ? _normalizeTag(currency.tag!) : 'mainnet';
|
||||||
|
|
||||||
|
|
|
@ -222,6 +222,10 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
|
||||||
return 'usdttrc20';
|
return 'usdttrc20';
|
||||||
case CryptoCurrency.usdcpoly:
|
case CryptoCurrency.usdcpoly:
|
||||||
return 'usdcpoly';
|
return 'usdcpoly';
|
||||||
|
case CryptoCurrency.usdtPoly:
|
||||||
|
return 'usdtpoly';
|
||||||
|
case CryptoCurrency.usdcEPoly:
|
||||||
|
return 'usdcepoly';
|
||||||
case CryptoCurrency.usdcsol:
|
case CryptoCurrency.usdcsol:
|
||||||
return 'usdcspl';
|
return 'usdcspl';
|
||||||
case CryptoCurrency.matic:
|
case CryptoCurrency.matic:
|
||||||
|
|
|
@ -271,6 +271,8 @@ class TrocadorExchangeProvider extends ExchangeProvider {
|
||||||
case CryptoCurrency.maticpoly:
|
case CryptoCurrency.maticpoly:
|
||||||
return 'Mainnet';
|
return 'Mainnet';
|
||||||
case CryptoCurrency.usdcpoly:
|
case CryptoCurrency.usdcpoly:
|
||||||
|
case CryptoCurrency.usdtPoly:
|
||||||
|
case CryptoCurrency.usdcEPoly:
|
||||||
return 'MATIC';
|
return 'MATIC';
|
||||||
case CryptoCurrency.zec:
|
case CryptoCurrency.zec:
|
||||||
return 'Mainnet';
|
return 'Mainnet';
|
||||||
|
@ -283,6 +285,8 @@ class TrocadorExchangeProvider extends ExchangeProvider {
|
||||||
switch (currency) {
|
switch (currency) {
|
||||||
case CryptoCurrency.zec:
|
case CryptoCurrency.zec:
|
||||||
return 'zec';
|
return 'zec';
|
||||||
|
case CryptoCurrency.usdcEPoly:
|
||||||
|
return 'usdce';
|
||||||
default:
|
default:
|
||||||
return currency.title.toLowerCase();
|
return currency.title.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,3 +44,14 @@ String getChainNameBasedOnWalletType(WalletType walletType) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String getTokenNameBasedOnWalletType(WalletType walletType) {
|
||||||
|
switch (walletType) {
|
||||||
|
case WalletType.ethereum:
|
||||||
|
return 'ETH';
|
||||||
|
case WalletType.polygon:
|
||||||
|
return 'MATIC';
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -135,6 +135,7 @@ class ContactListPage extends BasePage {
|
||||||
await showBar<void>(context, S.of(context).copied_to_clipboard);
|
await showBar<void>(context, S.of(context).copied_to_clipboard);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 24),
|
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 24),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
|
@ -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_picker_cell.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_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/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/menu_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
||||||
import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.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,
|
fillColor: Theme.of(context).cardColor,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.add,
|
Icons.add,
|
||||||
color: Theme.of(context).dialogTheme.backgroundColor,
|
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
||||||
size: 22.0,
|
size: 22.0,
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.all(12),
|
padding: EdgeInsets.all(12),
|
||||||
|
|
|
@ -18,6 +18,7 @@ class HomeScreenAccountWidget extends StatelessWidget {
|
||||||
context: context,
|
context: context,
|
||||||
builder: (_) => getIt.get<MoneroAccountListPage>());
|
builder: (_) => getIt.get<MoneroAccountListPage>());
|
||||||
},
|
},
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
|
@ -176,7 +176,7 @@ class RootState extends State<Root> with WidgetsBindingObserver {
|
||||||
);
|
);
|
||||||
launchUri = null;
|
launchUri = null;
|
||||||
} else {
|
} else {
|
||||||
_nonETHWalletErrorToast(S.current.switchToETHWallet);
|
_nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ class RootState extends State<Root> with WidgetsBindingObserver {
|
||||||
String? _getRouteToGo() {
|
String? _getRouteToGo() {
|
||||||
if (isWalletConnectLink) {
|
if (isWalletConnectLink) {
|
||||||
if (isEVMCompatibleChain(widget.appStore.wallet!.type)) {
|
if (isEVMCompatibleChain(widget.appStore.wallet!.type)) {
|
||||||
_nonETHWalletErrorToast(S.current.switchToETHWallet);
|
_nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return Routes.walletConnectConnectionsListing;
|
return Routes.walletConnectConnectionsListing;
|
||||||
|
|
|
@ -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/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_cell_with_arrow.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.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';
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
|
|
||||||
class ConnectionSyncPage extends BasePage {
|
class ConnectionSyncPage extends BasePage {
|
||||||
ConnectionSyncPage(this.dashboardViewModel, this.web3walletService);
|
ConnectionSyncPage(this.dashboardViewModel);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get title => S.current.connection_sync;
|
String get title => S.current.connection_sync;
|
||||||
|
|
||||||
final Web3WalletService? web3walletService;
|
|
||||||
final DashboardViewModel dashboardViewModel;
|
final DashboardViewModel dashboardViewModel;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -76,7 +76,7 @@ class DisplaySettingsPage extends BasePage {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (responsiveLayoutUtil.shouldRenderMobileUI && DeviceInfo.instance.isMobile)
|
if (responsiveLayoutUtil.shouldRenderMobileUI && DeviceInfo.instance.isMobile)
|
||||||
SettingsThemeChoicesCell(_displaySettingsViewModel),
|
Semantics(label: S.current.color_theme, child: SettingsThemeChoicesCell(_displaySettingsViewModel)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -31,8 +31,6 @@ class SettingsChoicesCell extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
Center(
|
Center(
|
||||||
child: SingleChildScrollView(
|
|
||||||
scrollDirection: Axis.horizontal,
|
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(30),
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
@ -42,18 +40,20 @@ class SettingsChoicesCell extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: choicesListItem.items.map((dynamic e) {
|
children: choicesListItem.items.map((dynamic e) {
|
||||||
final isSelected = choicesListItem.selectedItem == e;
|
final isSelected = choicesListItem.selectedItem == e;
|
||||||
return GestureDetector(
|
return Expanded(
|
||||||
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
choicesListItem.onItemSelected.call(e);
|
choicesListItem.onItemSelected.call(e);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 32, vertical: 8),
|
padding: EdgeInsets.symmetric(vertical: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(30),
|
borderRadius: BorderRadius.circular(30),
|
||||||
color: isSelected
|
color: isSelected
|
||||||
? Theme.of(context).primaryColor
|
? Theme.of(context).primaryColor
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
choicesListItem.displayItem.call(e),
|
choicesListItem.displayItem.call(e),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
@ -64,12 +64,13 @@ class SettingsChoicesCell extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -54,6 +54,9 @@ class SettingsThemeChoicesCell extends StatelessWidget {
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.all(5),
|
padding: EdgeInsets.all(5),
|
||||||
|
child: Semantics(
|
||||||
|
label: e.toString(),
|
||||||
|
selected: isSelected,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_displaySettingsViewModel.setTheme(e);
|
_displaySettingsViewModel.setTheme(e);
|
||||||
|
@ -108,6 +111,7 @@ class SettingsThemeChoicesCell extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
|
@ -14,7 +14,10 @@ class StandardSwitch extends StatefulWidget {
|
||||||
class StandardSwitchState extends State<StandardSwitch> {
|
class StandardSwitchState extends State<StandardSwitch> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
|
||||||
|
return Semantics(
|
||||||
|
toggled: widget.value,
|
||||||
|
child: GestureDetector(
|
||||||
onTap: widget.onTaped,
|
onTap: widget.onTaped,
|
||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
padding: EdgeInsets.only(left: 2.0, right: 2.0),
|
padding: EdgeInsets.only(left: 2.0, right: 2.0),
|
||||||
|
@ -35,6 +38,7 @@ class StandardSwitchState extends State<StandardSwitch> {
|
||||||
shape: BoxShape.circle),
|
shape: BoxShape.circle),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,9 @@ abstract class ContactListViewModelBase with Store {
|
||||||
walletContacts.where((element) => _isValidForCurrency(element)).toList();
|
walletContacts.where((element) => _isValidForCurrency(element)).toList();
|
||||||
|
|
||||||
bool _isValidForCurrency(ContactBase element) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -750,5 +750,6 @@
|
||||||
"seed_language_chinese_traditional": "تقاليد صينية)",
|
"seed_language_chinese_traditional": "تقاليد صينية)",
|
||||||
"dfx_option_description": "ﺎﺑﻭﺭﻭﺃ ﻲﻓ ﺕﺎﻛﺮﺸﻟﺍﻭ ﺔﺋﺰﺠﺘﻟﺍ ءﻼﻤﻌﻟ .ﻲﻓﺎﺿﺇ KYC ﻥﻭﺪﺑ ﻭﺭﻮﻳ 990 ﻰﻟﺇ ﻞﺼﻳ ﺎﻣ .ﻱﺮﺴﻳﻮﺴﻟﺍ",
|
"dfx_option_description": "ﺎﺑﻭﺭﻭﺃ ﻲﻓ ﺕﺎﻛﺮﺸﻟﺍﻭ ﺔﺋﺰﺠﺘﻟﺍ ءﻼﻤﻌﻟ .ﻲﻓﺎﺿﺇ KYC ﻥﻭﺪﺑ ﻭﺭﻮﻳ 990 ﻰﻟﺇ ﻞﺼﻳ ﺎﻣ .ﻱﺮﺴﻳﻮﺴﻟﺍ",
|
||||||
"polygonscan_history": "ﻥﺎﻜﺴﻧﻮﺠﻴﻟﻮﺑ ﺦﻳﺭﺎﺗ",
|
"polygonscan_history": "ﻥﺎﻜﺴﻧﻮﺠﻴﻟﻮﺑ ﺦﻳﺭﺎﺗ",
|
||||||
"wallet_seed_legacy": "بذرة محفظة قديمة"
|
"wallet_seed_legacy": "بذرة محفظة قديمة",
|
||||||
|
"switchToEVMCompatibleWallet": " (Ethereum، Polygon) ﻯﺮﺧﺃ ﺓﺮﻣ ﺔﻟﻭﺎﺤﻤﻟﺍﻭ EVM ﻊﻣ ﺔﻘﻓﺍﻮﺘﻣ ﺔﻈﻔﺤﻣ ﻰﻟﺇ ﻞﻳﺪﺒﺘﻟﺍ ﻰﺟﺮﻳ"
|
||||||
}
|
}
|
||||||
|
|
|
@ -746,5 +746,6 @@
|
||||||
"seed_language_chinese_traditional": "Традиционен китайски)",
|
"seed_language_chinese_traditional": "Традиционен китайски)",
|
||||||
"dfx_option_description": "Купете крипто с EUR и CHF. До 990 € без допълнителен KYC. За клиенти на дребно и корпоративни клиенти в Европа",
|
"dfx_option_description": "Купете крипто с EUR и CHF. До 990 € без допълнителен KYC. За клиенти на дребно и корпоративни клиенти в Европа",
|
||||||
"polygonscan_history": "История на PolygonScan",
|
"polygonscan_history": "История на PolygonScan",
|
||||||
"wallet_seed_legacy": "Наследено портфейл семе"
|
"wallet_seed_legacy": "Наследено портфейл семе",
|
||||||
|
"switchToEVMCompatibleWallet": "Моля, превключете към портфейл, съвместим с EVM, и опитайте отново (Ethereum, Polygon)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -746,5 +746,6 @@
|
||||||
"seed_language_chinese_traditional": "Číňan (tradiční)",
|
"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ě",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,5 +754,6 @@
|
||||||
"seed_language_chinese_traditional": "Chinesisch (Traditionell)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -755,5 +755,6 @@
|
||||||
"seed_language_chinese_traditional": "Chinese (Traditional)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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",
|
"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)",
|
"seed_language_chinese_traditional": "Chino (tradicional)",
|
||||||
"polygonscan_history": "Historial de PolygonScan",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,5 +754,6 @@
|
||||||
"seed_language_chinese_traditional": "Chinois (Traditionnel)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -735,5 +735,6 @@
|
||||||
"seed_language_chinese_traditional": "Sinanci (na gargajiya)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,5 +754,6 @@
|
||||||
"seed_language_chinese_traditional": "चीनी पारंपरिक)",
|
"seed_language_chinese_traditional": "चीनी पारंपरिक)",
|
||||||
"dfx_option_description": "EUR और CHF के साथ क्रिप्टो खरीदें। अतिरिक्त केवाईसी के बिना 990€ तक। यूरोप में खुदरा और कॉर्पोरेट ग्राहकों के लिए",
|
"dfx_option_description": "EUR और CHF के साथ क्रिप्टो खरीदें। अतिरिक्त केवाईसी के बिना 990€ तक। यूरोप में खुदरा और कॉर्पोरेट ग्राहकों के लिए",
|
||||||
"polygonscan_history": "पॉलीगॉनस्कैन इतिहास",
|
"polygonscan_history": "पॉलीगॉनस्कैन इतिहास",
|
||||||
"wallet_seed_legacy": "विरासत बटुए बीज"
|
"wallet_seed_legacy": "विरासत बटुए बीज",
|
||||||
|
"switchToEVMCompatibleWallet": "कृपया ईवीएम संगत वॉलेट पर स्विच करें और पुनः प्रयास करें (एथेरियम, पॉलीगॉन)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -749,8 +749,9 @@
|
||||||
"seedtype_polyseed": "Poliseed (16 riječi)",
|
"seedtype_polyseed": "Poliseed (16 riječi)",
|
||||||
"seed_language_czech": "češki",
|
"seed_language_czech": "češki",
|
||||||
"seed_language_korean": "korejski",
|
"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)",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -739,8 +739,9 @@
|
||||||
"seedtype_polyseed": "Polyseed (16 kata)",
|
"seedtype_polyseed": "Polyseed (16 kata)",
|
||||||
"seed_language_czech": "Ceko",
|
"seed_language_czech": "Ceko",
|
||||||
"seed_language_korean": "Korea",
|
"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)",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,5 +754,6 @@
|
||||||
"seed_language_chinese_traditional": "Cinese tradizionale)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,5 +754,6 @@
|
||||||
"seed_language_chinese_traditional": "中国の伝統的な)",
|
"seed_language_chinese_traditional": "中国の伝統的な)",
|
||||||
"dfx_option_description": "EUR と CHF で暗号通貨を購入します。追加のKYCなしで最大990ユーロ。ヨーロッパの小売および法人顧客向け",
|
"dfx_option_description": "EUR と CHF で暗号通貨を購入します。追加のKYCなしで最大990ユーロ。ヨーロッパの小売および法人顧客向け",
|
||||||
"polygonscan_history": "ポリゴンスキャン履歴",
|
"polygonscan_history": "ポリゴンスキャン履歴",
|
||||||
"wallet_seed_legacy": "レガシーウォレットシード"
|
"wallet_seed_legacy": "レガシーウォレットシード",
|
||||||
|
"switchToEVMCompatibleWallet": "EVM 互換のウォレットに切り替えて再試行してください (イーサリアム、ポリゴン)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -752,5 +752,6 @@
|
||||||
"seed_language_chinese_traditional": "중국 전통)",
|
"seed_language_chinese_traditional": "중국 전통)",
|
||||||
"dfx_option_description": "EUR 및 CHF로 암호화폐를 구매하세요. 추가 KYC 없이 최대 990€. 유럽의 소매 및 기업 고객용",
|
"dfx_option_description": "EUR 및 CHF로 암호화폐를 구매하세요. 추가 KYC 없이 최대 990€. 유럽의 소매 및 기업 고객용",
|
||||||
"polygonscan_history": "다각형 스캔 기록",
|
"polygonscan_history": "다각형 스캔 기록",
|
||||||
"wallet_seed_legacy": "레거시 지갑 시드"
|
"wallet_seed_legacy": "레거시 지갑 시드",
|
||||||
|
"switchToEVMCompatibleWallet": "EVM 호환 지갑으로 전환 후 다시 시도해 주세요. (이더리움, 폴리곤)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -752,5 +752,6 @@
|
||||||
"seed_language_chinese_traditional": "တရုတ်ရိုးရာ)",
|
"seed_language_chinese_traditional": "တရုတ်ရိုးရာ)",
|
||||||
"dfx_option_description": "EUR & CHF ဖြင့် crypto ကိုဝယ်ပါ။ အပို KYC မပါဘဲ 990€ အထိ။ ဥရောပရှိ လက်လီရောင်းချသူများနှင့် ကော်ပိုရိတ်ဖောက်သည်များအတွက်",
|
"dfx_option_description": "EUR & CHF ဖြင့် crypto ကိုဝယ်ပါ။ အပို KYC မပါဘဲ 990€ အထိ။ ဥရောပရှိ လက်လီရောင်းချသူများနှင့် ကော်ပိုရိတ်ဖောက်သည်များအတွက်",
|
||||||
"polygonscan_history": "PolygonScan မှတ်တမ်း",
|
"polygonscan_history": "PolygonScan မှတ်တမ်း",
|
||||||
"wallet_seed_legacy": "အမွေအနှစ်ပိုက်ဆံအိတ်မျိုးစေ့"
|
"wallet_seed_legacy": "အမွေအနှစ်ပိုက်ဆံအိတ်မျိုးစေ့",
|
||||||
|
"switchToEVMCompatibleWallet": "ကျေးဇူးပြု၍ EVM တွဲဖက်သုံးနိုင်သော ပိုက်ဆံအိတ်သို့ ပြောင်းပြီး ထပ်စမ်းကြည့်ပါ (Ethereum၊ Polygon)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -751,8 +751,9 @@
|
||||||
"seedtype_polyseed": "Polyseed (16 woorden)",
|
"seedtype_polyseed": "Polyseed (16 woorden)",
|
||||||
"seed_language_czech": "Tsjechisch",
|
"seed_language_czech": "Tsjechisch",
|
||||||
"seed_language_korean": "Koreaans",
|
"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)",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,5 +754,6 @@
|
||||||
"seed_language_chinese_traditional": "Chiński tradycyjny)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -753,5 +753,6 @@
|
||||||
"seed_language_chinese_traditional": "Chinês tradicional)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,5 +754,6 @@
|
||||||
"seed_language_chinese_traditional": "Китайский традиционный)",
|
"seed_language_chinese_traditional": "Китайский традиционный)",
|
||||||
"dfx_option_description": "Покупайте криптовалюту за EUR и CHF. До 990€ без дополнительного KYC. Для розничных и корпоративных клиентов в Европе",
|
"dfx_option_description": "Покупайте криптовалюту за EUR и CHF. До 990€ без дополнительного KYC. Для розничных и корпоративных клиентов в Европе",
|
||||||
"polygonscan_history": "История PolygonScan",
|
"polygonscan_history": "История PolygonScan",
|
||||||
"wallet_seed_legacy": "Наследие семя кошелька"
|
"wallet_seed_legacy": "Наследие семя кошелька",
|
||||||
|
"switchToEVMCompatibleWallet": "Пожалуйста, переключитесь на кошелек, совместимый с EVM, и повторите попытку (Ethereum, Polygon)."
|
||||||
}
|
}
|
||||||
|
|
|
@ -752,5 +752,6 @@
|
||||||
"seed_language_chinese_traditional": "จีน (ดั้งเดิม)",
|
"seed_language_chinese_traditional": "จีน (ดั้งเดิม)",
|
||||||
"dfx_option_description": "ซื้อ crypto ด้วย EUR และ CHF สูงถึง 990€ โดยไม่มี KYC เพิ่มเติม สำหรับลูกค้ารายย่อยและลูกค้าองค์กรในยุโรป",
|
"dfx_option_description": "ซื้อ crypto ด้วย EUR และ CHF สูงถึง 990€ โดยไม่มี KYC เพิ่มเติม สำหรับลูกค้ารายย่อยและลูกค้าองค์กรในยุโรป",
|
||||||
"polygonscan_history": "ประวัติ PolygonScan",
|
"polygonscan_history": "ประวัติ PolygonScan",
|
||||||
"wallet_seed_legacy": "เมล็ดกระเป๋าเงินมรดก"
|
"wallet_seed_legacy": "เมล็ดกระเป๋าเงินมรดก",
|
||||||
|
"switchToEVMCompatibleWallet": "โปรดเปลี่ยนไปใช้กระเป๋าเงินที่รองรับ EVM แล้วลองอีกครั้ง (Ethereum, Polygon)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -748,5 +748,6 @@
|
||||||
"seed_language_chinese_traditional": "Intsik (tradisyonal)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -752,5 +752,6 @@
|
||||||
"seed_language_chinese_traditional": "Çin geleneği)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,5 +754,6 @@
|
||||||
"dfx_option_description": "Купуйте криптовалюту за EUR і CHF. До 990 євро без додаткового KYC. Для роздрібних і корпоративних клієнтів у Європі",
|
"dfx_option_description": "Купуйте криптовалюту за EUR і CHF. До 990 євро без додаткового KYC. Для роздрібних і корпоративних клієнтів у Європі",
|
||||||
"seed_language_chinese_traditional": "Китайський (традиційний)",
|
"seed_language_chinese_traditional": "Китайський (традиційний)",
|
||||||
"polygonscan_history": "Історія PolygonScan",
|
"polygonscan_history": "Історія PolygonScan",
|
||||||
"wallet_seed_legacy": "Спадець насіння гаманця"
|
"wallet_seed_legacy": "Спадець насіння гаманця",
|
||||||
|
"switchToEVMCompatibleWallet": "Перейдіть на гаманець, сумісний з EVM, і повторіть спробу (Ethereum, Polygon)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -746,5 +746,6 @@
|
||||||
"seed_language_chinese_traditional": "چینی (روایتی)",
|
"seed_language_chinese_traditional": "چینی (روایتی)",
|
||||||
"dfx_option_description": "EUR ﺭﻭﺍ CHF ﯽﻓﺎﺿﺍ ۔ﮟﯾﺪﯾﺮﺧ ﻮﭩﭘﺮﮐ ﮫﺗﺎﺳ ﮯﮐ KYC ﮯﯿﻟ ﮯﮐ ﻦﯿﻓﺭﺎﺻ ﭧﯾﺭﻮﭘﺭﺎﮐ ﺭﻭﺍ ﮦﺩﺭﻮﺧ ﮟ",
|
"dfx_option_description": "EUR ﺭﻭﺍ CHF ﯽﻓﺎﺿﺍ ۔ﮟﯾﺪﯾﺮﺧ ﻮﭩﭘﺮﮐ ﮫﺗﺎﺳ ﮯﮐ KYC ﮯﯿﻟ ﮯﮐ ﻦﯿﻓﺭﺎﺻ ﭧﯾﺭﻮﭘﺭﺎﮐ ﺭﻭﺍ ﮦﺩﺭﻮﺧ ﮟ",
|
||||||
"polygonscan_history": "ﺦﯾﺭﺎﺗ ﯽﮐ ﻦﯿﮑﺳﺍ ﻥﻮﮔ ﯽﻟﻮﭘ",
|
"polygonscan_history": "ﺦﯾﺭﺎﺗ ﯽﮐ ﻦﯿﮑﺳﺍ ﻥﻮﮔ ﯽﻟﻮﭘ",
|
||||||
"wallet_seed_legacy": "میراثی پرس کا بیج"
|
"wallet_seed_legacy": "میراثی پرس کا بیج",
|
||||||
|
"switchToEVMCompatibleWallet": "(Ethereum, Polygon) ﮟﯾﺮﮐ ﺶﺷﻮﮐ ﮦﺭﺎﺑﻭﺩ ﺭﻭﺍ ﮟﯾﺮﮐ ﭻﺋﻮﺳ ﺮﭘ ﭧﯿﻟﺍﻭ ﮯﻟﺍﻭ ﮯﻨﮭﮐﺭ ﺖﻘﺑﺎﻄﻣ "
|
||||||
}
|
}
|
||||||
|
|
|
@ -748,5 +748,6 @@
|
||||||
"seed_language_chinese_traditional": "Kannada (ibile)",
|
"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",
|
"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",
|
"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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -753,5 +753,6 @@
|
||||||
"seed_language_chinese_traditional": "中国传统的)",
|
"seed_language_chinese_traditional": "中国传统的)",
|
||||||
"dfx_option_description": "用欧元和瑞士法郎购买加密货币。高达 990 欧元,无需额外 KYC。对于欧洲的零售和企业客户",
|
"dfx_option_description": "用欧元和瑞士法郎购买加密货币。高达 990 欧元,无需额外 KYC。对于欧洲的零售和企业客户",
|
||||||
"polygonscan_history": "多边形扫描历史",
|
"polygonscan_history": "多边形扫描历史",
|
||||||
"wallet_seed_legacy": "旧的钱包种子"
|
"wallet_seed_legacy": "旧的钱包种子",
|
||||||
|
"switchToEVMCompatibleWallet": "请切换到 EVM 兼容钱包并重试(以太坊、Polygon)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ case $APP_ANDROID_TYPE in
|
||||||
CONFIG_ARGS="--monero"
|
CONFIG_ARGS="--monero"
|
||||||
;;
|
;;
|
||||||
$CAKEWALLET)
|
$CAKEWALLET)
|
||||||
CONFIG_ARGS="--monero --bitcoin --haven --ethereum --nano --bitcoinCash"
|
CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash"
|
||||||
;;
|
;;
|
||||||
$HAVEN)
|
$HAVEN)
|
||||||
CONFIG_ARGS="--haven"
|
CONFIG_ARGS="--haven"
|
||||||
|
|
|
@ -28,7 +28,7 @@ case $APP_IOS_TYPE in
|
||||||
CONFIG_ARGS="--monero"
|
CONFIG_ARGS="--monero"
|
||||||
;;
|
;;
|
||||||
$CAKEWALLET)
|
$CAKEWALLET)
|
||||||
CONFIG_ARGS="--monero --bitcoin --haven --ethereum --nano --bitcoinCash"
|
CONFIG_ARGS="--monero --bitcoin --haven --ethereum --polygon --nano --bitcoinCash"
|
||||||
;;
|
;;
|
||||||
$HAVEN)
|
$HAVEN)
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ CONFIG_ARGS=""
|
||||||
|
|
||||||
case $APP_MACOS_TYPE in
|
case $APP_MACOS_TYPE in
|
||||||
$CAKEWALLET)
|
$CAKEWALLET)
|
||||||
CONFIG_ARGS="--monero --bitcoin --ethereum --nano --bitcoinCash";; #--haven
|
CONFIG_ARGS="--monero --bitcoin --ethereum --polygon --nano --bitcoinCash";; #--haven
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cp -rf pubspec_description.yaml pubspec.yaml
|
cp -rf pubspec_description.yaml pubspec.yaml
|
||||||
|
|
Loading…
Reference in a new issue