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

@@ -572,7 +572,9 @@ class ElectrumWindow(App):
def get_max_amount(self):
inputs = self.wallet.get_spendable_coins(None)
addr = str(self.send_screen.screen.address) or self.wallet.dummy_address()
amount, fee = self.wallet.get_max_amount(self.electrum_config, inputs, (TYPE_ADDRESS, addr), None)
outputs = [(TYPE_ADDRESS, addr, '!')]
tx = self.wallet.make_unsigned_transaction(inputs, outputs, self.electrum_config)
amount = tx.output_value()
return format_satoshis_plain(amount, self.decimal_point())
def format_amount(self, x, is_diff=False, whitespaces=False):