Qt GUI: let users type tx output in script language
This commit is contained in:
@@ -418,7 +418,7 @@ class Commands:
|
||||
if amount == '!':
|
||||
assert len(outputs) == 1
|
||||
inputs = self.wallet.get_spendable_coins(domain)
|
||||
amount, fee = self.wallet.get_max_amount(self.config, inputs, address, fee)
|
||||
amount, fee = self.wallet.get_max_amount(self.config, inputs, (TYPE_ADDRESS, address), fee)
|
||||
else:
|
||||
amount = int(COIN*Decimal(amount))
|
||||
final_outputs.append((TYPE_ADDRESS, address, amount))
|
||||
|
||||
@@ -681,7 +681,8 @@ class Abstract_Wallet(PrintError):
|
||||
if fee is None:
|
||||
for i in inputs:
|
||||
self.add_input_info(i)
|
||||
outputs = [(TYPE_ADDRESS, recipient, sendable)]
|
||||
_type, addr = recipient
|
||||
outputs = [(_type, addr, sendable)]
|
||||
dummy_tx = Transaction.from_io(inputs, outputs)
|
||||
fee = self.estimate_fee(config, dummy_tx.estimated_size())
|
||||
amount = max(0, sendable - fee)
|
||||
|
||||
Reference in New Issue
Block a user