1
0

require network to show request status

This commit is contained in:
ThomasV
2015-06-12 09:58:29 +02:00
parent cbcb799eec
commit 1fbbd5d65d
2 changed files with 13 additions and 9 deletions

View File

@@ -1261,10 +1261,13 @@ class Abstract_Wallet(object):
timestamp = r.get('timestamp', 0)
expiration = r.get('expiration')
if amount:
paid = amount <= self.get_addr_received(address)
status = PR_PAID if paid else PR_UNPAID
if status == PR_UNPAID and expiration is not None and time.time() > timestamp + expiration:
status = PR_EXPIRED
if self.up_to_date:
paid = amount <= self.get_addr_received(address)
status = PR_PAID if paid else PR_UNPAID
if status == PR_UNPAID and expiration is not None and time.time() > timestamp + expiration:
status = PR_EXPIRED
else:
status = PR_UNKNOWN
else:
status = PR_UNKNOWN
return status