kivy: fixes for on_qr
This commit is contained in:
parent
e8e36a61f4
commit
49ac8924fe
|
@ -237,6 +237,7 @@ class ElectrumWindow(App):
|
||||||
|
|
||||||
def on_qr(self, data):
|
def on_qr(self, data):
|
||||||
from electrum.bitcoin import base_decode, is_address
|
from electrum.bitcoin import base_decode, is_address
|
||||||
|
data = data.strip()
|
||||||
if is_address(data):
|
if is_address(data):
|
||||||
self.set_URI(data)
|
self.set_URI(data)
|
||||||
return
|
return
|
||||||
|
@ -248,6 +249,7 @@ class ElectrumWindow(App):
|
||||||
try:
|
try:
|
||||||
text = base_decode(data, None, base=43).encode('hex')
|
text = base_decode(data, None, base=43).encode('hex')
|
||||||
tx = Transaction(text)
|
tx = Transaction(text)
|
||||||
|
tx.deserialize()
|
||||||
except:
|
except:
|
||||||
tx = None
|
tx = None
|
||||||
if tx:
|
if tx:
|
||||||
|
|
Loading…
Reference in New Issue