From 32bbeee32d64ab4141163bac1c83088c7be53222 Mon Sep 17 00:00:00 2001 From: tommy Date: Thu, 17 Aug 2023 15:31:10 +0200 Subject: [PATCH] feat: add support to double XPRV We are moving the business logic related to the XPRV length to the witnet.dart library (https://github.com/witnet/witnet.dart). So, in this PR, we only remove the XPRV length validation while importing a wallet. The logic to handle a double XPRV is implemented here: https://github.com/witnet/witnet.dart/pull/31 --- lib/screens/create_wallet/bloc/api_create_wallet.dart | 3 +-- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/screens/create_wallet/bloc/api_create_wallet.dart b/lib/screens/create_wallet/bloc/api_create_wallet.dart index 2ca268af4..6cab54f87 100644 --- a/lib/screens/create_wallet/bloc/api_create_wallet.dart +++ b/lib/screens/create_wallet/bloc/api_create_wallet.dart @@ -50,8 +50,7 @@ class ApiCreateWallet { try { int xprvLength = xprvString.length; String? xprvDecripted; - if (xprvLength == ENCRYPTED_XPRV_LENGTH && - _xprvType == CreateWalletType.encryptedXprv) { + if (_xprvType == CreateWalletType.encryptedXprv) { xprvDecripted = await apiCrypto.decryptXprv( xprv: xprvString, password: password?.value ?? ''); } else if (xprvLength == XPRV_LENGTH && diff --git a/pubspec.yaml b/pubspec.yaml index 692aa6dd5..31b19fb1a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -43,7 +43,7 @@ dependencies: worker_manager: ^4.0.2 toml: ^0.13.1 decimal: 2.3.2 - witnet: 0.2.7 + witnet: 0.3.0 table_calendar: ^3.0.3 qr_flutter: ^4.0.0 window_manager: ^0.3.2