Generic fixes (#1304)

* fix mobx no element error

* fix mobx issue

* Remove unused code

* Enhance error handling for monero sync failure case

* Separate litecoin mnemonic exception from bitcoin

* - Enable onramper for polygon
- Add Kaspa validation

* Set null as the default length of address validation

* Modify EVM fee text [skip ci]

* Add seed length option to polygon

* Add digibyte

* Update configure_cake_wallet.sh and fix conflicts

* Pin bottom section

* Fix Solana missing isTestnet param
This commit is contained in:
Omar Hatem 2024-02-23 19:09:24 +02:00 committed by GitHub
parent a3a35f05e1
commit cbc0c3afd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 84 additions and 70 deletions

View file

@ -25,7 +25,6 @@ class DefaultSPLTokens {
mintAddress: '2FPyTwcZLUg1MDrwsyoP4D6s1tM7hAkHYRjkNb5w6Pxk',
decimal: 6,
mint: 'soEth',
enabled: true,
iconPath: 'assets/images/eth_icon.png',
),
SPLToken(
@ -34,7 +33,6 @@ class DefaultSPLTokens {
mintAddress: 'So11111111111111111111111111111111111111112',
decimal: 9,
mint: 'WSOL',
enabled: true,
iconPath: 'assets/images/sol_icon.png',
),
SPLToken(

View file

@ -19,7 +19,7 @@ class SolanaWalletService extends WalletService<SolanaNewWalletCredentials,
final Box<WalletInfo> walletInfoSource;
@override
Future<SolanaWallet> create(SolanaNewWalletCredentials credentials) async {
Future<SolanaWallet> create(SolanaNewWalletCredentials credentials, {bool? isTestnet}) async {
final strength = credentials.seedPhraseLength == 24 ? 256 : 128;
final mnemonic = bip39.generateMnemonic(strength: strength);
@ -67,7 +67,8 @@ class SolanaWalletService extends WalletService<SolanaNewWalletCredentials,
}
@override
Future<SolanaWallet> restoreFromKeys(SolanaRestoreWalletFromPrivateKey credentials) async {
Future<SolanaWallet> restoreFromKeys(SolanaRestoreWalletFromPrivateKey credentials,
{bool? isTestnet}) async {
final wallet = SolanaWallet(
password: credentials.password!,
privateKey: credentials.privateKey,
@ -82,7 +83,8 @@ class SolanaWalletService extends WalletService<SolanaNewWalletCredentials,
}
@override
Future<SolanaWallet> restoreFromSeed(SolanaRestoreWalletFromSeedCredentials credentials) async {
Future<SolanaWallet> restoreFromSeed(SolanaRestoreWalletFromSeedCredentials credentials,
{bool? isTestnet}) async {
if (!bip39.validateMnemonic(credentials.mnemonic)) {
throw SolanaMnemonicIsIncorrectException();
}