1
0

sweep: trivial clean-up

- wallet.get_receiving_addresses is guaranteed to exist (maybe it was only for HD wallets in the past)
- wallet.is_mine is stricter than wallet.adb.is_mine, usually we want the former
This commit is contained in:
SomberNight
2024-10-09 15:09:49 +00:00
parent d918067f77
commit 48527b1501
2 changed files with 2 additions and 5 deletions

View File

@@ -901,7 +901,7 @@ class QETxSweepFinalizer(QETxFinalizer):
def make_sweep_tx(self):
address = self._wallet.wallet.get_receiving_address()
assert self._wallet.wallet.adb.is_mine(address)
assert self._wallet.wallet.is_mine(address)
coins, keypairs = copy.deepcopy(self._txins)
outputs = [PartialTxOutput.from_address_and_value(address, value='!')]

View File

@@ -2387,10 +2387,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
addresses = self.wallet.get_unused_addresses()
if not addresses:
try:
addresses = self.wallet.get_receiving_addresses()
except AttributeError:
addresses = self.wallet.get_addresses()
addresses = self.wallet.get_receiving_addresses()
h, address_e = address_field(addresses)
vbox.addLayout(h)