mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-16 17:27:38 +00:00
Display notifications for mining TX
This commit is contained in:
parent
ba6113d9c0
commit
8114fc66ee
1 changed files with 11 additions and 0 deletions
|
@ -482,6 +482,17 @@ void MainWindow::initWalletContext() {
|
|||
}
|
||||
});
|
||||
|
||||
connect(m_wallet, &Wallet::moneyReceived, this, [this](const QString &txId, uint64_t amount){
|
||||
if (m_wallet->isSynchronized() && !m_locked) {
|
||||
m_wallet->coins()->refresh();
|
||||
QVector<CoinsInfo*> new_tx_coins = m_wallet->coins()->coins_from_txid(txId);
|
||||
if(new_tx_coins.size() > 0 && new_tx_coins.front()->coinbase()) {
|
||||
auto notify = QString("%1 XMR (pending)").arg(WalletManager::displayAmount(amount, false));
|
||||
m_windowManager->notify("Mining payment received", notify, 5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Device
|
||||
connect(m_wallet, &Wallet::deviceButtonRequest, this, &MainWindow::onDeviceButtonRequest);
|
||||
connect(m_wallet, &Wallet::deviceButtonPressed, this, &MainWindow::onDeviceButtonPressed);
|
||||
|
|
Loading…
Reference in a new issue