Browse Source

get_tx_fee

283
ThomasV 10 years ago
parent
commit
590659ff4d
  1. 2
      gui/qt/main_window.py
  2. 4
      lib/wallet.py

2
gui/qt/main_window.py

@ -952,7 +952,7 @@ class ElectrumWindow(QMainWindow):
tx = self.wallet.make_unsigned_transaction(outputs, fee, coins = self.get_coins())
self.not_enough_funds = (tx is None)
if not is_fee:
fee = tx.get_fee() if tx else None
fee = self.wallet.get_tx_fee(tx) if tx else None
self.fee_e.setAmount(fee)
self.payto_e.textChanged.connect(lambda:text_edited(False))

4
lib/wallet.py

@ -693,6 +693,10 @@ class Abstract_Wallet(object):
return default_label
def get_tx_fee(self, tx):
# this method can be overloaded
return tx.get_fee()
def estimated_fee(self, tx):
estimated_size = len(tx.serialize(-1))/2
fee = int(self.fee_per_kb*estimated_size/1000.)

Loading…
Cancel
Save