summaryrefslogtreecommitdiff
path: root/libbridge/src/main/cpp/wallet2_api_c.cpp
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-03 14:11:19 +0100
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-03 14:11:19 +0100
commit53d14fc615abd664781af98f8b9992cde4268ad3 (patch)
tree420add6941fd3244e5e7b3847bf55b85952bc9a5 /libbridge/src/main/cpp/wallet2_api_c.cpp
parent476c3a43e46f9ddbf18a089c1b32d00642308737 (diff)
prepare for sweep
Diffstat (limited to 'libbridge/src/main/cpp/wallet2_api_c.cpp')
-rw-r--r--libbridge/src/main/cpp/wallet2_api_c.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbridge/src/main/cpp/wallet2_api_c.cpp b/libbridge/src/main/cpp/wallet2_api_c.cpp
index 6faa922..97b6fa8 100644
--- a/libbridge/src/main/cpp/wallet2_api_c.cpp
+++ b/libbridge/src/main/cpp/wallet2_api_c.cpp
@@ -1109,8 +1109,12 @@ void* MONERO_Wallet_createTransaction(void* wallet_ptr, const char* dst_addr, co
int pendingTransactionPriority,
uint32_t subaddr_account) {
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
+ Monero::optional<uint64_t> optAmount;
+ if (amount != 0) {
+ optAmount = amount;
+ }
return wallet->createTransaction(std::string(dst_addr), std::string(payment_id),
- amount, mixin_count,
+ optAmount, mixin_count,
Monero::PendingTransaction::Priority_Low,
subaddr_account /*, subaddr_indices */);
}