From b4379b005a729bd85d1d4ce08d2a5cebe3db2696 Mon Sep 17 00:00:00 2001 From: Some Random Crypto Guy Date: Wed, 10 Jul 2024 12:56:49 +0100 Subject: [PATCH] revised error message when querying balance of empty wallet via RPC - thanks @GeraldoNonKYC --- src/wallet/wallet_rpc_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 2839a7d44..44f1415fc 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -462,7 +462,7 @@ namespace tools std::string asset_type = req.asset_type.empty() ? "SAL" : boost::algorithm::to_upper_copy(req.asset_type); // verify that the asset is in the list of in-wallet assets if (std::find(assets_in_wallet.begin(), assets_in_wallet.end(), asset_type) == assets_in_wallet.end()) { - er.message = std::string("Invalid source asset specified: ") + asset_type; + er.message = std::string("Source asset '") + asset_type + "' not found in wallet"; return false; } std::vector assets = req.all_assets ? assets_in_wallet : std::vector{asset_type};