From 466c2bd2930aaf9c60d968564d5f01f773ed2e95 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 5 Sep 2019 11:33:09 +0200 Subject: [PATCH] for now, use PR_PAID for onchain unconfirmed --- electrum/daemon.py | 6 +++--- electrum/wallet.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/electrum/daemon.py b/electrum/daemon.py index 51b6b364b..e51860c79 100644 --- a/electrum/daemon.py +++ b/electrum/daemon.py @@ -180,9 +180,9 @@ class HttpServer(Logger): self.pending = defaultdict(asyncio.Event) self.daemon.network.register_callback(self.on_payment, ['payment_received']) - async def on_payment(self, evt, *args): - print(evt, args) - #await self.pending[key].set() + async def on_payment(self, evt, wallet, key, status): + if status == PR_PAID: + await self.pending[key].set() async def run(self): host = self.config.get('http_host', 'localhost') diff --git a/electrum/wallet.py b/electrum/wallet.py index 056a950b1..8d7f295a4 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -1317,7 +1317,7 @@ class Abstract_Wallet(AddressSynchronizer): else: status = PR_UNPAID else: - status = PR_INFLIGHT if conf <= 0 else PR_PAID + status = PR_PAID return status, conf def get_request(self, key):