From 9973546472b63378e0fc79eff4fbc0b8f8968369 Mon Sep 17 00:00:00 2001 From: sowle Date: Fri, 5 Jul 2024 17:19:37 +0200 Subject: [PATCH] wallet RPC: enforce null asset id in destinations for asset emit operation --- src/wallet/wallet_rpc_server.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 192c642a..39c75e27 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -1304,6 +1304,11 @@ namespace tools currency::transaction result_tx; std::vector currency_destinations; rpc_destinations_to_currency_destination(req.destinations, currency_destinations); + //fix for default asset_id + for (auto& d : currency_destinations) + { + d.asset_id = currency::null_pkey; + } w.get_wallet()->emit_asset(req.asset_id, currency_destinations, result_tx); res.result_tx = currency::get_transaction_hash(result_tx);