mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-13 12:33:40 +02:00
parent
ebf9e55004
commit
f9ea973be9
3 changed files with 6 additions and 6 deletions
|
|
@ -2273,7 +2273,7 @@ class FidelityBondMixin(object):
|
|||
path = self.script_to_path(script)
|
||||
if not self.is_timelocked_path(path):
|
||||
return
|
||||
if datetime.utcfromtimestamp(path[-1]) > datetime.now():
|
||||
if (datetime.utcfromtimestamp(0) + timedelta(seconds=path[-1])) > datetime.now():
|
||||
#freeze utxo if its timelock is in the future
|
||||
self.disable_utxo(txid, index, disable=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import json
|
|||
import os
|
||||
import sqlite3
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta
|
||||
from calendar import timegm
|
||||
from optparse import OptionParser
|
||||
from numbers import Integral
|
||||
|
|
@ -378,7 +378,7 @@ def wallet_showutxos(wallet_service, showprivkey):
|
|||
if showprivkey:
|
||||
unsp[us]['privkey'] = wallet_service.get_wif_path(av['path'])
|
||||
if locktime:
|
||||
unsp[us]["locktime"] = str(datetime.utcfromtimestamp(locktime))
|
||||
unsp[us]["locktime"] = str(datetime.utcfromtimestamp(0) + timedelta(seconds=locktime))
|
||||
|
||||
used_commitments, external_commitments = podle.get_podle_commitments()
|
||||
for u, ec in external_commitments.items():
|
||||
|
|
@ -477,7 +477,7 @@ def wallet_display(wallet_service, showprivkey, displayall=False,
|
|||
for timenumber in range(FidelityBondMixin.TIMENUMBER_COUNT):
|
||||
path = wallet_service.get_path(m, address_type, timenumber, timenumber)
|
||||
addr = wallet_service.get_address_from_path(path)
|
||||
timelock = datetime.utcfromtimestamp(path[-1])
|
||||
timelock = datetime.utcfromtimestamp(0) + timedelta(seconds=path[-1])
|
||||
|
||||
balance = sum([utxodata["value"] for utxo, utxodata in
|
||||
utxos[m].items() if path == utxodata["path"]])
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ from future.moves.urllib.parse import parse_qs
|
|||
from decimal import Decimal
|
||||
from optparse import OptionParser
|
||||
from twisted.internet import reactor
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
if sys.version_info < (3, 7):
|
||||
print("ERROR: this script requires at least python 3.7")
|
||||
|
|
@ -352,7 +352,7 @@ class OrderbookPageRequestHeader(http.server.SimpleHTTPRequestHandler):
|
|||
utxo_value_str = "No data"
|
||||
else:
|
||||
bond_value_str = satoshi_to_unit_power(bond_value, 2*unit_to_power[btc_unit])
|
||||
conf_time_str = str(datetime.utcfromtimestamp(conf_time))
|
||||
conf_time_str = str(datetime.utcfromtimestamp(0) + timedelta(seconds=conf_time))
|
||||
utxo_value_str = satoshi_to_unit(utxo_data["value"], None, btc_unit, 0)
|
||||
bondtable += ("<tr>"
|
||||
+ elem(bond_data.maker_nick)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue