mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-04 21:05:11 +00:00
follow-up cefa4762ba
This commit is contained in:
parent
8e4fe051d3
commit
16e293c289
2 changed files with 8 additions and 8 deletions
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue