From a01819fa0a3fe4611189f35f94fa4037a29ac434 Mon Sep 17 00:00:00 2001 From: thomasv Date: Thu, 29 Nov 2012 16:40:05 +0100 Subject: [PATCH] save label invoice string --- lib/gui_qt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/gui_qt.py b/lib/gui_qt.py index 4046f604..b3519d4b 100644 --- a/lib/gui_qt.py +++ b/lib/gui_qt.py @@ -531,7 +531,7 @@ class ElectrumWindow(QMainWindow): return try: - amount = int( Decimal( unicode(text)) * 100000000 ) + amount = int( Decimal(text) * 100000000 ) item.setText(3,format_satoshis(amount,False, self.wallet.num_zeros)) except: amount = self.wallet.requested_amounts.get(address) @@ -544,8 +544,9 @@ class ElectrumWindow(QMainWindow): self.wallet.requested_amounts[address] = amount label = self.wallet.labels.get(address) - if not label: + if label is None: label = 'invoice %04d'%(index+1) + self.wallet.labels[address] = label self.update_receive_item(self.receive_list.currentItem()) if self.qr_window: