throw error on null bch mnemonic passphrase

This commit is contained in:
sneurlax 2023-02-13 16:45:54 -06:00
parent 5d033dd446
commit 8ecf6e988a

View file

@ -1466,6 +1466,11 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
) async {
final _mnemonic = await mnemonicString;
final _mnemonicPassphrase = await mnemonicPassphrase;
if (_mnemonicPassphrase == null) {
Logging.instance.log(
"Exception in _generateAddressForChain: mnemonic passphrase null, possible migration issue; if using internal builds, delete wallet and restore from seed, if using a release build, please file bug report",
level: LogLevel.Error);
}
final derivePath = constructDerivePath(
derivePathType: derivePathType,
@ -2976,6 +2981,11 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
try {
final _mnemonic = await mnemonicString;
final _mnemonicPassphrase = await mnemonicPassphrase;
if (_mnemonicPassphrase == null) {
Logging.instance.log(
"Exception in fullRescan: mnemonic passphrase null, possible migration issue; if using internal builds, delete wallet and restore from seed, if using a release build, please file bug report",
level: LogLevel.Error);
}
await _recoverWalletFromBIP32SeedPhrase(
mnemonic: _mnemonic!,