From d185052dc92eda8a7dcfb4321951620cd53d93a0 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 +-- 1 file changed, 1 insertion(+), 2 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 &&