aboutsummaryrefslogtreecommitdiff
path: root/src/libwalletqt/WalletManager.cpp
diff options
context:
space:
mode:
authormoneromooo.monero <moneromooo.monero@users.noreply.github.com>2016-11-05 14:58:49 +0000
committermoneromooo.monero <moneromooo.monero@users.noreply.github.com>2016-11-06 18:34:42 +0000
commit06e94e2fbe7a3b3e259876dd0b1d08ff42e01ab3 (patch)
tree3cd325316e2ec5e78bcd45aa938629055f62b66b /src/libwalletqt/WalletManager.cpp
parentc9bb2f571895edb6a01ca5528c944d09bc222823 (diff)
downloadmonzero-gui-06e94e2fbe7a3b3e259876dd0b1d08ff42e01ab3.tar.gz
monzero-gui-06e94e2fbe7a3b3e259876dd0b1d08ff42e01ab3.tar.xz
monzero-gui-06e94e2fbe7a3b3e259876dd0b1d08ff42e01ab3.zip
Add a page for checking payments via the tx key
Diffstat (limited to 'src/libwalletqt/WalletManager.cpp')
-rw-r--r--src/libwalletqt/WalletManager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libwalletqt/WalletManager.cpp b/src/libwalletqt/WalletManager.cpp
index 7b60c528..de800776 100644
--- a/src/libwalletqt/WalletManager.cpp
+++ b/src/libwalletqt/WalletManager.cpp
@@ -164,6 +164,16 @@ QString WalletManager::paymentIdFromAddress(const QString &address, bool testnet
return QString::fromStdString(Bitmonero::Wallet::paymentIdFromAddress(address.toStdString(), testnet));
}
+QString WalletManager::checkPayment(const QString &address, const QString &txid, const QString &txkey, const QString &daemon_address) const
+{
+ uint64_t received = 0, height = 0;
+ std::string error = "";
+ bool ret = m_pimpl->checkPayment(address.toStdString(), txid.toStdString(), txkey.toStdString(), daemon_address.toStdString(), received, height, error);
+ // bypass qml being unable to pass structures without preposterous complexity
+ std::string result = std::string(ret ? "true" : "false") + "|" + QString::number(received).toStdString() + "|" + QString::number(height).toStdString() + "|" + error;
+ return QString::fromStdString(result);
+}
+
void WalletManager::setLogLevel(int logLevel)
{
Bitmonero::WalletManagerFactory::setLogLevel(logLevel);