From 65950f46f40561f594114064009670d96a47301c Mon Sep 17 00:00:00 2001 From: cyan Date: Wed, 11 Dec 2024 12:21:44 -0500 Subject: [PATCH 1/2] Fix coin control error message (#94) * Fix coin control error message * fix string format --- ...fix-error-messages-with-coin-control.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 patches/monero/0021-fix-error-messages-with-coin-control.patch diff --git a/patches/monero/0021-fix-error-messages-with-coin-control.patch b/patches/monero/0021-fix-error-messages-with-coin-control.patch new file mode 100644 index 0000000..b4e3625 --- /dev/null +++ b/patches/monero/0021-fix-error-messages-with-coin-control.patch @@ -0,0 +1,53 @@ +From 6259ee6acea965c2bc0bc2e4a24a73e543b062cb Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto +Date: Mon, 9 Dec 2024 11:21:06 -0500 +Subject: [PATCH] fix error messages with coin control + +--- + src/wallet/api/wallet.cpp | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp +index de507b3..731055a 100644 +--- a/src/wallet/api/wallet.cpp ++++ b/src/wallet/api/wallet.cpp +@@ -2156,8 +2156,9 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vector preferred_input_list; ++ uint64_t max_coin_control_input = 0; + if (!preferred_inputs.empty()) { +- LOG_ERROR("empty"); ++ LOG_ERROR("not empty"); + + for (const auto &public_key : preferred_inputs) { + crypto::key_image keyImage; +@@ -2173,6 +2174,13 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vectorget_num_transfer_details(); ++i) { ++ const tools::wallet2::transfer_details &td = m_wallet->get_transfer_details(i); ++ if (td.m_key_image == keyImage) { ++ max_coin_control_input += td.amount(); ++ } ++ } ++ + preferred_input_list.push_back(keyImage); + } + } else { +@@ -2252,6 +2260,11 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vector Date: Wed, 11 Dec 2024 20:48:13 -0500 Subject: [PATCH 2/2] detailed error messages (#95) --- ...fix-error-messages-with-coin-control.patch | 57 ++++++++++++++++--- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/patches/monero/0021-fix-error-messages-with-coin-control.patch b/patches/monero/0021-fix-error-messages-with-coin-control.patch index b4e3625..1caf15c 100644 --- a/patches/monero/0021-fix-error-messages-with-coin-control.patch +++ b/patches/monero/0021-fix-error-messages-with-coin-control.patch @@ -1,28 +1,29 @@ -From 6259ee6acea965c2bc0bc2e4a24a73e543b062cb Mon Sep 17 00:00:00 2001 +From 1737ff03788db38d198955dab136d0388d674ba2 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 9 Dec 2024 11:21:06 -0500 Subject: [PATCH] fix error messages with coin control --- - src/wallet/api/wallet.cpp | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) + src/wallet/api/wallet.cpp | 44 ++++++++++++++++++++++++++++++++++++++- + 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index de507b3..731055a 100644 +index de507b3de..3e33a318c 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp -@@ -2156,8 +2156,9 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vector preferred_input_list; + uint64_t max_coin_control_input = 0; ++ uint64_t max_frozen_input = 0; if (!preferred_inputs.empty()) { - LOG_ERROR("empty"); + LOG_ERROR("not empty"); for (const auto &public_key : preferred_inputs) { crypto::key_image keyImage; -@@ -2173,6 +2174,13 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vector