qml: qetxdetails was missing this in 9eb7ee74e1
This commit is contained in:
@@ -18,6 +18,7 @@ class QETxDetails(QObject):
|
||||
|
||||
_status = ''
|
||||
_amount = QEAmount(amount_sat=0)
|
||||
_lnamount = QEAmount(amount_sat=0)
|
||||
_fee = QEAmount(amount_sat=0)
|
||||
_inputs = []
|
||||
_outputs = []
|
||||
@@ -86,6 +87,10 @@ class QETxDetails(QObject):
|
||||
def amount(self):
|
||||
return self._amount
|
||||
|
||||
@pyqtProperty(QEAmount, notify=detailsChanged)
|
||||
def lnAmount(self):
|
||||
return self._lnamount
|
||||
|
||||
@pyqtProperty(QEAmount, notify=detailsChanged)
|
||||
def fee(self):
|
||||
return self._fee
|
||||
@@ -185,7 +190,7 @@ class QETxDetails(QObject):
|
||||
self._status = txinfo.status
|
||||
self._fee = QEAmount(amount_sat=txinfo.fee)
|
||||
|
||||
self._is_mined = txinfo.tx_mined_status != None
|
||||
self._is_mined = False if not txinfo.tx_mined_status else txinfo.tx_mined_status.height > 0
|
||||
if self._is_mined:
|
||||
self.update_mined_status(txinfo.tx_mined_status)
|
||||
else:
|
||||
@@ -194,6 +199,14 @@ class QETxDetails(QObject):
|
||||
self._logger.error('TX is not mined, yet mempool_depth_bytes is None')
|
||||
self._mempool_depth = self._wallet.wallet.config.depth_tooltip(txinfo.mempool_depth_bytes)
|
||||
|
||||
if self._wallet.wallet.lnworker:
|
||||
lnworker_history = self._wallet.wallet.lnworker.get_onchain_history()
|
||||
if self._txid in lnworker_history:
|
||||
item = lnworker_history[self._txid]
|
||||
self._lnamount = QEAmount(amount_sat=item['amount_msat'] / 1000)
|
||||
else:
|
||||
self._lnamount = QEAmount(amount_sat=0)
|
||||
|
||||
self._is_lightning_funding_tx = txinfo.is_lightning_funding_tx
|
||||
self._can_bump = txinfo.can_bump
|
||||
self._can_dscancel = txinfo.can_dscancel
|
||||
|
||||
Reference in New Issue
Block a user