1
0

Improve 'send all coins' function:

* do use coin chooser when sending all coins (fixes #2000)
* allow "!" syntax for multiple outputs (fixes #1698)
This commit is contained in:
ThomasV
2016-12-31 16:29:18 +01:00
parent 662577aea6
commit e123774ea8
5 changed files with 59 additions and 53 deletions

View File

@@ -404,11 +404,7 @@ class Commands:
final_outputs = []
for address, amount in outputs:
address = self._resolver(address)
if amount == '!':
assert len(outputs) == 1
inputs = self.wallet.get_spendable_coins(domain)
amount, fee = self.wallet.get_max_amount(self.config, inputs, (TYPE_ADDRESS, address), fee)
else:
if amount != '!':
amount = int(COIN*Decimal(amount))
final_outputs.append((TYPE_ADDRESS, address, amount))