Browse Source

qml: fix crashes on tx finalizing

patch-4
Sander van Grieken 2 years ago
parent
commit
090706bfd6
  1. 4
      electrum/gui/qml/qechannelopener.py
  2. 2
      electrum/gui/qml/qetxfinalizer.py
  3. 2
      electrum/gui/qml/qewallet.py

4
electrum/gui/qml/qechannelopener.py

@ -35,7 +35,7 @@ class QEChannelOpener(QObject, AuthMixin):
conflictingBackup = pyqtSignal([str], arguments=['message'])
channelOpening = pyqtSignal([str], arguments=['peer'])
channelOpenError = pyqtSignal([str], arguments=['message'])
channelOpenSuccess = pyqtSignal([str,bool,int], arguments=['cid','has_onchain_backup','min_depth','tx_complete'])
channelOpenSuccess = pyqtSignal([str,bool,int,bool], arguments=['cid','has_onchain_backup','min_depth','tx_complete'])
dataChanged = pyqtSignal() # generic notify signal
@ -163,7 +163,7 @@ class QEChannelOpener(QObject, AuthMixin):
node_id=self._peer.pubkey,
fee_est=None)
acpt = lambda tx: self.do_open_channel(tx, str(self._peer), None)
acpt = lambda tx: self.do_open_channel(tx, str(self._peer), self._wallet.password)
self._finalizer = QETxFinalizer(self, make_tx=mktx, accept=acpt)
self._finalizer.canRbf = False

2
electrum/gui/qml/qetxfinalizer.py

@ -280,7 +280,7 @@ class QETxFinalizer(QObject):
fee = tx.get_fee()
feerate = Decimal(fee) / tx_size # sat/byte
self.fee.satsInt = fee
self._fee.satsInt = int(fee)
self.feeRate = f'{feerate:.1f}'
#TODO

2
electrum/gui/qml/qewallet.py

@ -407,7 +407,7 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
@auth_protect
def sign(self, tx, *, broadcast: bool = False):
tx = self.wallet.sign_transaction(tx, None)
tx = self.wallet.sign_transaction(tx, self.password)
if tx is None:
self._logger.info('did not sign')

Loading…
Cancel
Save