aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/transactions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/rpc/transactions.cpp')
-rw-r--r--src/wallet/rpc/transactions.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wallet/rpc/transactions.cpp b/src/wallet/rpc/transactions.cpp
index 844657a71c..5579cb6c49 100644
--- a/src/wallet/rpc/transactions.cpp
+++ b/src/wallet/rpc/transactions.cpp
@@ -635,10 +635,9 @@ RPCHelpMan listsinceblock()
bool include_removed = (request.params[3].isNull() || request.params[3].get_bool());
bool include_change = (!request.params[4].isNull() && request.params[4].get_bool());
+ // Only set it if 'label' was provided.
std::optional<std::string> filter_label;
- if (!request.params[5].isNull()) {
- filter_label = LabelFromValue(request.params[5]);
- }
+ if (!request.params[5].isNull()) filter_label.emplace(LabelFromValue(request.params[5]));
int depth = height ? wallet.GetLastBlockHeight() + 1 - *height : -1;