aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallet2_api.h')
-rw-r--r--src/wallet/wallet2_api.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h
index f0a9ea68b..6fe15d1e3 100644
--- a/src/wallet/wallet2_api.h
+++ b/src/wallet/wallet2_api.h
@@ -41,6 +41,20 @@ namespace Bitmonero {
namespace Utils {
bool isAddressLocal(const std::string &hostaddr);
}
+
+ template<typename T>
+ class optional {
+ public:
+ optional(): set(false) {}
+ optional(const T &t): t(t), set(true) {}
+ const T &operator*() const { return t; }
+ T &operator*() { return t; }
+ operator bool() const { return set; }
+ private:
+ T t;
+ bool set;
+ };
+
/**
* @brief Transaction-like interface for sending money
*/
@@ -332,7 +346,7 @@ struct Wallet
*/
virtual PendingTransaction * createTransaction(const std::string &dst_addr, const std::string &payment_id,
- uint64_t amount, uint32_t mixin_count,
+ optional<uint64_t> amount, uint32_t mixin_count,
PendingTransaction::Priority = PendingTransaction::Priority_Low) = 0;
/*!