electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 98d43846417ee6986cd96b5699b03a55ca5eb916
parent 9b44635e3cc29f18c9bb42751ee63a023b0408cc
Author: ThomasV <thomasv@electrum.org>
Date:   Sun, 13 Dec 2015 17:49:51 +0100

kivy: fix set amount

Diffstat:
Mgui/kivy/uix/screens.py | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -201,12 +201,11 @@ class SendScreen(CScreen): payment_request = None def set_URI(self, uri): - print "set uri", uri self.screen.address = uri.get('address', '') self.screen.message = uri.get('message', '') amount = uri.get('amount') if amount: - self.screen.amount = self.format_amount_and_units(amount) + self.screen.amount = self.app.format_amount_and_units(amount) def update(self): if self.app.current_invoice: @@ -221,7 +220,9 @@ class SendScreen(CScreen): def set_request(self, pr): self.payment_request = pr self.screen.address = pr.get_requestor() - self.screen.amount = self.app.format_amount_and_units(pr.get_amount()) + amount = pr.get_amount() + if amount: + self.screen.amount = self.app.format_amount_and_units(amount) self.screen.message = pr.get_memo() def do_paste(self): @@ -288,8 +289,10 @@ class ReceiveScreen(CScreen): self.screen.address = addr req = self.app.wallet.receive_requests.get(addr) if req: - self.screen.amount = self.app.format_amount_and_units(req.get('amount')) self.screen.message = unicode(req.get('memo', '')) + amount = req.get('amount') + if amount: + self.screen.amount = self.app.format_amount_and_units(amount) def amount_callback(self, popup): amount_label = self.screen.ids.get('amount')