From bf4b2a15a68979fb689fc7d54e86de2d2359a187 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 5 Mar 2020 17:15:09 +0100 Subject: [PATCH] wallet_db: fix _convert_version_25 (bip70 expiration) --- electrum/wallet_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/wallet_db.py b/electrum/wallet_db.py index 825b7b03f..8e83926c8 100644 --- a/electrum/wallet_db.py +++ b/electrum/wallet_db.py @@ -538,7 +538,7 @@ class WalletDB(JsonDB): def _convert_version_25(self): if not self._is_upgrade_method_needed(24, 24): return - # add 'type' feld to onchain requests + # add 'type' field to onchain requests requests = self.data.get('payment_requests', {}) for k, r in list(requests.items()): if r.get('address') == k: @@ -563,7 +563,7 @@ class WalletDB(JsonDB): 'type': PR_TYPE_ONCHAIN, 'amount': pr.get_amount(), 'bip70': data, - 'exp': pr.get_expiration_date(), + 'exp': pr.get_expiration_date() - pr.get_time(), 'id': pr.id, 'message': pr.get_memo(), 'outputs': [x.to_legacy_tuple() for x in pr.get_outputs()],