raise maxNumberOfIndexesToCheck for bch

This commit is contained in:
sneurlax 2023-10-21 16:45:35 -05:00
parent c6a370e4f5
commit 4627af9208

View file

@ -117,7 +117,12 @@ class _RestoringWalletCardState extends ConsumerState<RestoringWalletCard> {
if (coin == Coin.firo) {
maxUnusedAddressGap = 50;
}
const maxNumberOfIndexesToCheck = 1000;
int maxNumberOfIndexesToCheck = 1000;
// If Bitcoin Cash, multiply by 100.
if (coin == Coin.bitcoincash) {
maxNumberOfIndexesToCheck *= 100;
}
if (mnemonicList.isEmpty) {
await manager.recoverFromMnemonic(
@ -262,7 +267,12 @@ class _RestoringWalletCardState extends ConsumerState<RestoringWalletCard> {
if (coin == Coin.firo) {
maxUnusedAddressGap = 50;
}
const maxNumberOfIndexesToCheck = 1000;
int maxNumberOfIndexesToCheck = 1000;
// If Bitcoin Cash, multiply by 100.
if (coin == Coin.bitcoincash) {
maxNumberOfIndexesToCheck *= 100;
}
if (mnemonicList.isEmpty) {
await manager.recoverFromMnemonic(