diff --git a/electrum/util.py b/electrum/util.py index 6f998bb7f..3c907d1d0 100644 --- a/electrum/util.py +++ b/electrum/util.py @@ -1152,7 +1152,7 @@ class NetworkJobOnDefaultServer(Logger): raise NotImplementedError() # implemented by subclasses async def stop(self): - self.network.unregister_callback(self._restart) + unregister_callback(self._restart) await self._stop() async def _stop(self): diff --git a/electrum/wallet.py b/electrum/wallet.py index 68ff677d5..7bfb2e461 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -46,6 +46,7 @@ import itertools from .i18n import _ from .bip32 import BIP32Node, convert_bip32_intpath_to_strpath, convert_bip32_path_to_list_of_uint32 from .crypto import sha256 +from . import util from .util import (NotEnoughFunds, UserCancelled, profiler, format_satoshis, format_fee_satoshis, NoDynamicFeeEstimates, WalletFileException, BitcoinException, MultipleSpendMaxTxOutputs, @@ -1615,7 +1616,7 @@ class Abstract_Wallet(AddressSynchronizer, ABC): addr = self.get_txout_address(txo) if addr in self.receive_requests: status, conf = self.get_request_status(addr) - self.network.trigger_callback('payment_received', self, addr, status) + util.trigger_callback('payment_received', self, addr, status) def make_payment_request(self, addr, amount, message, expiration): timestamp = int(time.time())