Add passphrase support for Eth, Polygon, and Tron (#1719)

* Add passphrase support for Eth, Polygon, and Tron

* move passphrase to advanced settings even for restore
This commit is contained in:
Omar Hatem
2024-10-04 20:01:46 +03:00
committed by GitHub
parent fc14bf4e2b
commit 4b4d8a4840
29 changed files with 249 additions and 154 deletions
+4
View File
@@ -95,6 +95,7 @@ class CWNano extends Nano {
String? password,
String? mnemonic,
String? parentAddress,
String? passphrase,
}) =>
NanoNewWalletCredentials(
name: name,
@@ -102,6 +103,7 @@ class CWNano extends Nano {
mnemonic: mnemonic,
parentAddress: parentAddress,
walletInfo: walletInfo,
passphrase: passphrase,
);
@override
@@ -110,6 +112,7 @@ class CWNano extends Nano {
required String password,
required String mnemonic,
required DerivationType derivationType,
String? passphrase,
}) {
if (mnemonic.split(" ").length == 12 && derivationType != DerivationType.bip39) {
throw Exception("Invalid mnemonic for derivation type!");
@@ -120,6 +123,7 @@ class CWNano extends Nano {
password: password,
mnemonic: mnemonic,
derivationType: derivationType,
passphrase: passphrase,
);
}