1
0

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:
SomberNight
2019-09-13 15:00:34 +02:00
parent 1f305bba39
commit c7346c1eb8
4 changed files with 21 additions and 6 deletions

View File

@@ -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]