disable wownero 14 word seeds

This commit is contained in:
julian 2024-12-05 00:28:59 -06:00 committed by julian-CStack
parent 9eb233ec76
commit 3f8cf2583c
5 changed files with 11 additions and 10 deletions

View file

@ -48,6 +48,7 @@ import '../../../wallets/isar/models/wallet_info.dart';
import '../../../wallets/wallet/impl/epiccash_wallet.dart'; import '../../../wallets/wallet/impl/epiccash_wallet.dart';
import '../../../wallets/wallet/impl/monero_wallet.dart'; import '../../../wallets/wallet/impl/monero_wallet.dart';
import '../../../wallets/wallet/impl/wownero_wallet.dart'; import '../../../wallets/wallet/impl/wownero_wallet.dart';
import '../../../wallets/wallet/intermediate/lib_monero_wallet.dart';
import '../../../wallets/wallet/supporting/epiccash_wallet_info_extension.dart'; import '../../../wallets/wallet/supporting/epiccash_wallet_info_extension.dart';
import '../../../wallets/wallet/wallet.dart'; import '../../../wallets/wallet/wallet.dart';
import '../../../widgets/custom_buttons/app_bar_icon_button.dart'; import '../../../widgets/custom_buttons/app_bar_icon_button.dart';
@ -369,6 +370,10 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
await wallet.recover(isRescan: false); await wallet.recover(isRescan: false);
if (wallet is LibMoneroWallet) {
await wallet.exit();
}
// check if state is still active before continuing // check if state is still active before continuing
if (mounted) { if (mounted) {
await wallet.info.setMnemonicVerified( await wallet.info.setMnemonicVerified(

View file

@ -82,7 +82,7 @@ class Wownero extends CryptonoteCurrency {
} }
@override @override
int get defaultSeedPhraseLength => 14; int get defaultSeedPhraseLength => 16; //14;
@override @override
int get fractionDigits => 11; int get fractionDigits => 11;
@ -94,7 +94,7 @@ class Wownero extends CryptonoteCurrency {
bool get hasMnemonicPassphraseSupport => false; bool get hasMnemonicPassphraseSupport => false;
@override @override
List<int> get possibleMnemonicLengths => [defaultSeedPhraseLength, 16, 25]; List<int> get possibleMnemonicLengths => [defaultSeedPhraseLength, 25];
@override @override
BigInt get satsPerCoin => BigInt.from(100000000000); BigInt get satsPerCoin => BigInt.from(100000000000);

View file

@ -115,10 +115,6 @@ class WowneroWallet extends LibMoneroWallet {
}) async { }) async {
final lib_monero.WowneroSeedType type; final lib_monero.WowneroSeedType type;
switch (wordCount) { switch (wordCount) {
case 14:
type = lib_monero.WowneroSeedType.fourteen;
break;
case 16: case 16:
type = lib_monero.WowneroSeedType.sixteen; type = lib_monero.WowneroSeedType.sixteen;
break; break;
@ -171,7 +167,7 @@ class WowneroWallet extends LibMoneroWallet {
@override @override
void invalidSeedLengthCheck(int length) { void invalidSeedLengthCheck(int length) {
if (!(length == 14 || length == 16 || length == 25)) { if (!(length == 16 || length == 25)) {
throw Exception("Invalid wownero mnemonic length found: $length"); throw Exception("Invalid wownero mnemonic length found: $length");
} }
} }

View file

@ -435,10 +435,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: cs_monero name: cs_monero
sha256: b9b9db6602361587b1ce512002f174fd833818ff2a63787c3058e0532fc0d9d8 sha256: "8b2c1451d8eb09fc2a1248ecd652f2332343946a1d622b2f623b74d5f999c8d5"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0-pre" version: "1.0.0-pre.1"
cs_monero_flutter_libs: cs_monero_flutter_libs:
dependency: "direct main" dependency: "direct main"
description: description:

View file

@ -195,7 +195,7 @@ dependencies:
blockchain_utils: ^3.3.0 blockchain_utils: ^3.3.0
on_chain: ^4.0.1 on_chain: ^4.0.1
cbor: ^6.3.3 cbor: ^6.3.3
cs_monero: 1.0.0-pre cs_monero: 1.0.0-pre.1
cs_monero_flutter_libs: 1.0.0-pre.0 cs_monero_flutter_libs: 1.0.0-pre.0
dev_dependencies: dev_dependencies: