Make list of destinations a tuple, like argument to transfer_multiple();

Initialize destinations as empty list, make iterations straightforward
This commit is contained in:
Michał Sałaban 2018-10-18 23:47:22 +02:00
parent 55ce01f555
commit 2d9843fec9
3 changed files with 10 additions and 4 deletions

View file

@ -247,7 +247,7 @@ class JSONRPCWallet(object):
}
if 'destinations' in data:
result['destinations'] = [
{'address': address(x['address']), 'amount': from_atomic(data['amount'])}
(address(x['address']), from_atomic(data['amount']))
for x in data.get('destinations')
]
return result

View file

@ -50,7 +50,7 @@ class OutgoingPayment(Payment):
destinations = None
def __init__(self, **kwargs):
self.destinations = kwargs.pop('destinations', self.destinations)
self.destinations = kwargs.pop('destinations', [])
super(OutgoingPayment, self).__init__(**kwargs)
_reprstr = "out: {} @ {} {:.12f} id={}"