commit 16e293c289ddba7c055f6cccaddd7315f09fb3ba
parent 8e4fe051d32481a5d0cb130f9b8f5452ec3898a4
Author: ThomasV <thomasv@electrum.org>
Date: Tue, 10 Sep 2019 16:24:21 +0200
follow-up cefa4762ba904ef92d32b4c90005013dd7a7ac4a
Diffstat:
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/electrum/plugins/trustedcoin/qt.py b/electrum/plugins/trustedcoin/qt.py
@@ -193,7 +193,7 @@ class Plugin(TrustedCoinPlugin):
vbox.addLayout(grid)
price_per_tx = wallet.price_per_tx
- n_prepay = wallet.num_prepay(self.config)
+ n_prepay = wallet.num_prepay()
i = 0
for k, v in sorted(price_per_tx.items()):
if k == 1:
diff --git a/electrum/plugins/trustedcoin/trustedcoin.py b/electrum/plugins/trustedcoin/trustedcoin.py
@@ -291,14 +291,14 @@ class Wallet_2fa(Multisig_Wallet):
def min_prepay(self):
return min(self.price_per_tx.keys())
- def num_prepay(self, config):
+ def num_prepay(self):
default = self.min_prepay()
- n = config.get('trustedcoin_prepay', default)
+ n = self.config.get('trustedcoin_prepay', default)
if n not in self.price_per_tx:
n = default
return n
- def extra_fee(self, config):
+ def extra_fee(self):
if self.can_sign_without_server():
return 0
if self.billing_info is None:
@@ -308,17 +308,17 @@ class Wallet_2fa(Multisig_Wallet):
return 0
if self.is_billing:
return 0
- n = self.num_prepay(config)
+ n = self.num_prepay()
price = int(self.price_per_tx[n])
if price > 100000 * n:
raise Exception('too high trustedcoin fee ({} for {} txns)'.format(price, n))
return price
- def make_unsigned_transaction(self, coins, outputs, config, fixed_fee=None,
+ def make_unsigned_transaction(self, coins, outputs, fixed_fee=None,
change_addr=None, is_sweep=False):
mk_tx = lambda o: Multisig_Wallet.make_unsigned_transaction(
- self, coins, o, config, fixed_fee, change_addr)
- fee = self.extra_fee(config) if not is_sweep else 0
+ self, coins, o, fixed_fee, change_addr)
+ fee = self.extra_fee() if not is_sweep else 0
if fee:
address = self.billing_info['billing_address_segwit']
fee_output = TxOutput(TYPE_ADDRESS, address, fee)