override needsGenerate is reuseAddress pref set

This commit is contained in:
sneurlax 2024-07-03 10:16:26 -05:00 committed by julian-CStack
parent e88e0fb5b7
commit 27536fe642

View file

@ -1333,6 +1333,11 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
needsGenerate = txCount > 0 || currentReceiving.derivationIndex < 0; needsGenerate = txCount > 0 || currentReceiving.derivationIndex < 0;
} }
// If the reuseAddress flag is set, don't generate a new address.
if (prefs.reuseAddress) {
return;
}
if (needsGenerate) { if (needsGenerate) {
await generateNewReceivingAddress(); await generateNewReceivingAddress();