kivy: fix paying onchain invoices
when pasting a new invoice and paying it
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/kivy/uix/screens.py", line 358, in _do_send_onchain
tx = self.app.wallet.make_unsigned_transaction(coins, outputs, None)
File "/home/user/wspace/electrum/electrum/wallet.py", line 849, in make_unsigned_transaction
if o.type == TYPE_ADDRESS:
AttributeError: 'tuple' object has no attribute 'type'
when loading back a saved invoice
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/kivy/uix/screens.py", line 358, in _do_send_onchain
tx = self.app.wallet.make_unsigned_transaction(coins, outputs, None)
File "/home/user/wspace/electrum/electrum/wallet.py", line 849, in make_unsigned_transaction
if o.type == TYPE_ADDRESS:
AttributeError: 'list' object has no attribute 'type'
This commit is contained in:
@@ -248,7 +248,7 @@ class PaymentRequest:
|
||||
return self.details.expires
|
||||
|
||||
def get_amount(self):
|
||||
return sum(map(lambda x:x[2], self.outputs))
|
||||
return sum(map(lambda x:x.value, self.outputs))
|
||||
|
||||
def get_address(self):
|
||||
o = self.outputs[0]
|
||||
|
||||
Reference in New Issue
Block a user