commit b7c4492d3b12dbe740be82bd1afe22dbf22f4e4b
parent dcc59d6f709dec68a8d0de0bad09e9ecfc95c71d
Author: ThomasV <thomasv@electrum.org>
Date: Mon, 15 Feb 2016 04:59:20 +0100
get_request_status: return PR_UNKNOWN if request is unknown
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/wallet.py b/lib/wallet.py
@@ -1323,7 +1323,9 @@ class Abstract_Wallet(PrintError):
def get_request_status(self, key):
from paymentrequest import PR_PAID, PR_UNPAID, PR_UNKNOWN, PR_EXPIRED
- r = self.receive_requests[key]
+ r = self.receive_requests.get(key)
+ if r is None:
+ return PR_UNKNOWN
address = r['address']
amount = r.get('amount')
timestamp = r.get('time', 0)