commit 54fdb011f99eb19ceaeb6e778c2f117ec074744c
parent f4dc93cb7d8bbcd33163e8bd957315905f8548b2
Author: SomberNight <somber.night@protonmail.com>
Date: Fri, 24 Apr 2020 15:32:05 +0200
fixups for CallbackManager refactor
92244041081db96b92925c9e76b117035e241011
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git 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
@@ -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())