@@ -214,7 +214,7 @@ Pane {
|
||||
Layout.preferredWidth: 1
|
||||
text: qsTr('Lightning swap');
|
||||
visible: Daemon.currentWallet.isLightning
|
||||
enabled: Daemon.currentWallet.lightningCanSend.satsInt > 0 || Daemon.currentWallet.lightningCanReceive.satInt > 0
|
||||
enabled: Daemon.currentWallet.lightningCanSend.satsInt > 0 || Daemon.currentWallet.lightningCanReceive.satsInt > 0
|
||||
icon.source: Qt.resolvedUrl('../../icons/update.png')
|
||||
onClicked: app.startSwap()
|
||||
}
|
||||
|
||||
@@ -175,6 +175,7 @@ Item {
|
||||
Connections {
|
||||
target: Daemon.currentWallet
|
||||
function onBalanceChanged() {
|
||||
console.log("BalanceSummary: balanceChanged signal received - updating balances")
|
||||
setBalances()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,8 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
||||
def on_event_adb_tx_height_changed(self, adb, txid, old_height, new_height):
|
||||
if adb == self.wallet.adb:
|
||||
self._logger.info(f'tx_height_changed {txid}. {old_height} -> {new_height}')
|
||||
self.historyModel.setDirty() # assuming wallet.is_up_to_date triggers after
|
||||
self.historyModel.setDirty()
|
||||
self.balanceChanged.emit() # Update balance when transaction height changes (confirmations)
|
||||
|
||||
@qt_event_listener
|
||||
def on_event_removed_transaction(self, wallet, tx):
|
||||
@@ -241,6 +242,13 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
||||
self.balanceChanged.emit()
|
||||
self.peersUpdated.emit()
|
||||
|
||||
@event_listener
|
||||
def on_event_blockchain_updated(self):
|
||||
# Emit balanceChanged when new block arrives because:
|
||||
# 1. Coinbase outputs might have matured (COINBASE_MATURITY = 120 blocks)
|
||||
# 2. Transaction confirmations increased
|
||||
self.balanceChanged.emit()
|
||||
|
||||
@qt_event_listener
|
||||
def on_event_payment_succeeded(self, wallet, key):
|
||||
if wallet == self.wallet:
|
||||
|
||||
Reference in New Issue
Block a user