aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libwalletqt/Wallet.cpp9
-rw-r--r--src/libwalletqt/Wallet.h4
2 files changed, 13 insertions, 0 deletions
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp
index 2f106aed..d2e659f0 100644
--- a/src/libwalletqt/Wallet.cpp
+++ b/src/libwalletqt/Wallet.cpp
@@ -634,6 +634,15 @@ void Wallet::setPaymentId(const QString &paymentId)
m_paymentId = paymentId;
}
+QString Wallet::getCacheAttribute(const QString &key) const {
+ return QString::fromStdString(m_walletImpl->getCacheAttribute(key.toStdString()));
+}
+
+bool Wallet::setCacheAttribute(const QString &key, const QString &val)
+{
+ return m_walletImpl->setCacheAttribute(key.toStdString(), val.toStdString());
+}
+
bool Wallet::setUserNote(const QString &txid, const QString &note)
{
return m_walletImpl->setUserNote(txid.toStdString(), note.toStdString());
diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h
index 39df6cc8..7fe8f026 100644
--- a/src/libwalletqt/Wallet.h
+++ b/src/libwalletqt/Wallet.h
@@ -294,6 +294,10 @@ public:
void setPaymentId(const QString &paymentId);
+ //! Namespace your cacheAttribute keys to avoid collisions
+ Q_INVOKABLE bool setCacheAttribute(const QString &key, const QString &val);
+ Q_INVOKABLE QString getCacheAttribute(const QString &key) const;
+
Q_INVOKABLE bool setUserNote(const QString &txid, const QString &note);
Q_INVOKABLE QString getUserNote(const QString &txid) const;
Q_INVOKABLE QString getTxKey(const QString &txid) const;