From 27536fe6426551adc42e7799b3d5bc541ddfd6d1 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 3 Jul 2024 10:16:26 -0500 Subject: [PATCH] override needsGenerate is reuseAddress pref set --- .../wallet/wallet_mixin_interfaces/electrumx_interface.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart index 035ae649f..83752c3a7 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart @@ -1333,6 +1333,11 @@ mixin ElectrumXInterface needsGenerate = txCount > 0 || currentReceiving.derivationIndex < 0; } + // If the reuseAddress flag is set, don't generate a new address. + if (prefs.reuseAddress) { + return; + } + if (needsGenerate) { await generateNewReceivingAddress();