1
0

Call wallet.set_paid after onchain broadcast. Check if invoices are expired in util.get_request_status

This commit is contained in:
ThomasV
2019-10-23 17:33:46 +02:00
parent e35bddcc09
commit a0ec2690cf
7 changed files with 44 additions and 45 deletions

View File

@@ -112,6 +112,8 @@ pr_expiration_values = {
def get_request_status(req):
status = req['status']
if req['status'] == PR_UNPAID and 'exp' in req and req['time'] + req['exp'] < time.time():
status = PR_EXPIRED
status_str = pr_tooltips[status]
if status == PR_UNPAID:
if req.get('exp'):
@@ -119,7 +121,7 @@ def get_request_status(req):
status_str = _('Expires') + ' ' + age(expiration, include_seconds=True)
else:
status_str = _('Pending')
return status_str
return status, status_str
class UnknownBaseUnit(Exception): pass