From 8ecf6e988a170b45035b96993329d3e526196dd1 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Mon, 13 Feb 2023 16:45:54 -0600 Subject: [PATCH] throw error on null bch mnemonic passphrase --- lib/services/coins/bitcoincash/bitcoincash_wallet.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index 8c12af9aa..71032a0c3 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -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!,