1
0

wallet_db: fix _convert_version_25 (bip70 expiration)

This commit is contained in:
SomberNight
2020-03-05 17:15:09 +01:00
parent c15cc42a32
commit bf4b2a15a6

View File

@@ -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()],