Browse Source

minor fixes

283
ThomasV 10 years ago
parent
commit
508b5373ac
  1. 2
      gui/qt/main_window.py
  2. 4
      lib/paymentrequest.py

2
gui/qt/main_window.py

@ -685,7 +685,7 @@ class ElectrumWindow(QMainWindow):
return
addr = str(item.text(2))
req = self.wallet.receive_requests[addr]
expires = _('Never') if req.get('exp') is None else util.age(req['time'] + req['exp'])
expires = util.age(req['time'] + req['exp']) if req.get('exp') else _('Never')
amount = req['amount']
message = self.wallet.labels.get(addr, '')
self.receive_address_e.setText(addr)

4
lib/paymentrequest.py

@ -291,7 +291,7 @@ def make_unsigned_request(req):
from transaction import Transaction
addr = req['address']
time = req.get('time', 0)
expires = req.get('exp', 0)
exp = req.get('exp', 0)
if time and type(time) != int:
time = 0
if exp and type(exp) != int:
@ -306,7 +306,7 @@ def make_unsigned_request(req):
for script, amount in outputs:
pd.outputs.add(amount=amount, script=script)
pd.time = time
pd.expires = time + expires if expires else 0
pd.expires = time + exp if exp else 0
pd.memo = memo
pr = pb2.PaymentRequest()
pr.serialized_payment_details = pd.SerializeToString()

Loading…
Cancel
Save