aboutsummaryrefslogtreecommitdiff
path: root/src/libwalletqt/Wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libwalletqt/Wallet.cpp')
-rw-r--r--src/libwalletqt/Wallet.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp
index e6368ad2..3697984e 100644
--- a/src/libwalletqt/Wallet.cpp
+++ b/src/libwalletqt/Wallet.cpp
@@ -14,6 +14,45 @@ namespace {
}
+class WalletListenerImpl : public Bitmonero::WalletListener
+{
+public:
+ WalletListenerImpl(Wallet * w)
+ : m_wallet(w)
+ {
+
+ }
+
+ virtual void moneySpent(const std::string &txId, uint64_t amount)
+ {
+ // TODO
+ Q_UNUSED(txId)
+ Q_UNUSED(amount)
+ }
+
+ virtual void moneyReceived(const std::string &txId, uint64_t amount)
+ {
+ // TODO
+ Q_UNUSED(txId)
+ Q_UNUSED(amount)
+ }
+
+ virtual void updated()
+ {
+ emit m_wallet->updated();
+ }
+
+ // called when wallet refreshed by background thread or explicitly
+ virtual void refreshed()
+ {
+ emit m_wallet->refreshed();
+ }
+
+private:
+ Wallet * m_wallet;
+};
+
+
QString Wallet::getSeed() const
{
@@ -88,6 +127,11 @@ bool Wallet::refresh()
return result;
}
+void Wallet::refreshAsync()
+{
+ m_walletImpl->refreshAsync();
+}
+
PendingTransaction *Wallet::createTransaction(const QString &dst_addr, const QString &payment_id,
quint64 amount, quint32 mixin_count,
PendingTransaction::Priority priority)