diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py index 627b2d2af..a99d5348a 100644 --- a/gui/kivy/uix/screens.py +++ b/gui/kivy/uix/screens.py @@ -310,12 +310,15 @@ class ReceiveScreen(CScreen): return True def on_address(self, addr): - req = self.app.wallet.receive_requests.get(addr) + req = self.app.wallet.get_payment_request(addr, self.app.electrum_config) + self.screen.status = '' if req: self.screen.message = unicode(req.get('memo', '')) amount = req.get('amount') if amount: self.screen.amount = self.app.format_amount_and_units(amount) + if req.get('status') == PR_PAID: + self.screen.status = _('Payment received') Clock.schedule_once(lambda dt: self.update_qr()) def amount_callback(self, popup): diff --git a/gui/kivy/uix/ui_screens/receive.kv b/gui/kivy/uix/ui_screens/receive.kv index 10b44b5b8..ad7a5e0e8 100644 --- a/gui/kivy/uix/ui_screens/receive.kv +++ b/gui/kivy/uix/ui_screens/receive.kv @@ -13,6 +13,7 @@ ReceiveScreen: address: '' amount: '' message: '' + status: '' on_address: self.parent.on_address(self.address) @@ -37,6 +38,20 @@ ReceiveScreen: on_touch_down: self.shaded = not self.shaded self.foreground_color = (0, 0, 0, 0.5) if self.shaded else (0, 0, 0, 0) + Label: + text: root.status + opacity: 1 if root.status else 0 + pos_hint: {'center': (.5, .5)} + size_hint: None, 1 + width: min(self.height, bl.width) + bcolor: 0.3, 0.3, 0.3, 0.9 + canvas.before: + Color: + rgba: self.bcolor + Rectangle: + pos: self.pos + size: self.size + SendReceiveBlueBottom: id: blue_bottom