History: Show num of confirmations + unconfirmed payments

history: refresh on new block
This commit is contained in:
Jaquee
2017-01-12 19:57:30 +01:00
parent 593839a374
commit 205bfcdd7b
8 changed files with 43 additions and 3 deletions

View File

@@ -208,6 +208,7 @@ ApplicationWindow {
currentWallet.newBlock.disconnect(onWalletNewBlock)
currentWallet.moneySpent.disconnect(onWalletMoneySent)
currentWallet.moneyReceived.disconnect(onWalletMoneyReceived)
currentWallet.unconfirmedMoneyReceived.disconnect(onWalletUnconfirmedMoneyReceived)
currentWallet.transactionCreated.disconnect(onTransactionCreated)
currentWallet.connectionStatusChanged.disconnect(onWalletConnectionStatusChanged)
middlePanel.paymentClicked.disconnect(handlePayment);
@@ -229,6 +230,7 @@ ApplicationWindow {
currentWallet.newBlock.connect(onWalletNewBlock)
currentWallet.moneySpent.connect(onWalletMoneySent)
currentWallet.moneyReceived.connect(onWalletMoneyReceived)
currentWallet.unconfirmedMoneyReceived.connect(onWalletUnconfirmedMoneyReceived)
currentWallet.transactionCreated.connect(onTransactionCreated)
currentWallet.connectionStatusChanged.connect(onWalletConnectionStatusChanged)
middlePanel.paymentClicked.connect(handlePayment);
@@ -378,6 +380,10 @@ ApplicationWindow {
splashCounter = currHeight
leftPanel.progressBar.updateProgress(currHeight,currentWallet.daemonBlockChainTargetHeight());
}
// Update num of confirmations on history page
// TODO: check performance on big wallets. Maybe no need to refresh full history?
currentWallet.history.refresh()
}
function onWalletMoneyReceived(txId, amount) {
@@ -386,6 +392,11 @@ ApplicationWindow {
currentWallet.history.refresh() // this will refresh model
}
function onWalletUnconfirmedMoneyReceived(txId, amount) {
// refresh history
currentWallet.history.refresh()
}
function onWalletMoneySent(txId, amount) {
// refresh transaction history here
currentWallet.refresh()