1
0
Fork 0
forked from lthn/blockchain

wallet RPC: enforce null asset id in destinations for asset emit operation

This commit is contained in:
sowle 2024-07-05 17:19:37 +02:00
parent 1ea5c1aa53
commit 9973546472
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -1304,6 +1304,11 @@ namespace tools
currency::transaction result_tx;
std::vector<currency::tx_destination_entry> 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);