diff --git a/src/multisig/multisig_tx_builder_ringct.cpp b/src/multisig/multisig_tx_builder_ringct.cpp index 45166e4..f9a510a 100644 --- a/src/multisig/multisig_tx_builder_ringct.cpp +++ b/src/multisig/multisig_tx_builder_ringct.cpp @@ -1138,11 +1138,7 @@ bool tx_builder_ringct_t::init( // misc. fields unsigned_tx.unlock_time = unlock_time; unsigned_tx.type = (tx_type == cryptonote::transaction_type::RETURN) ? cryptonote::TRANSFER : tx_type; - unsigned_tx.source_asset_type = "SAL"; - if (tx_type == cryptonote::transaction_type::BURN) - unsigned_tx.destination_asset_type = "BURN"; - else - unsigned_tx.destination_asset_type = "SAL"; + unsigned_tx.source_asset_type = "SAL1"; // sort inputs sort_sources(sources); diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 68a5592..692f871 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2432,7 +2432,7 @@ bool wallet2::get_yield_summary_info(uint64_t &total_burnt, } boost::multiprecision::uint128_t total_supply_128 = 0; for (auto supply_asset: supply_amounts) { - if (supply_asset.first == "SAL") { + if (supply_asset.first == "SAL1") { boost::multiprecision::uint128_t supply_128(supply_asset.second); total_supply_128 = supply_128; break; @@ -8332,8 +8332,8 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector> circ_amounts; THROW_WALLET_EXCEPTION_IF(!get_circulating_supply(circ_amounts), error::wallet_internal_error, "Failed to get circulating supply"); // To-do - work out the source_asset and dest_asset. - std::string source_asset = "SAL"; - std::string dest_asset = "SAL"; + std::string source_asset = "SAL1"; + std::string dest_asset = "SAL1"; bool r = cryptonote::construct_tx_and_get_tx_key(m_account.get_keys(), m_subaddresses, sd.sources, sd.splitted_dsts, hf_version, source_asset, dest_asset, sd.tx_type, sd.change_dts.addr, sd.extra, ptx.tx, sd.unlock_time, tx_key, additional_tx_keys, sd.use_rct, rct_config, sd.use_view_tags); THROW_WALLET_EXCEPTION_IF(!r, error::tx_not_constructed, sd.sources, sd.splitted_dsts, sd.unlock_time, m_nettype); // we don't test tx size, because we don't know the current limit, due to not having a blockchain, @@ -12005,7 +12005,7 @@ std::vector wallet2::create_transactions_single(const crypt break; } } - return create_transactions_from(address, cryptonote::transaction_type::TRANSFER, "SAL", is_subaddress, outputs, unused_transfers_indices, unused_dust_indices, fake_outs_count, unlock_time, priority, extra); + return create_transactions_from(address, cryptonote::transaction_type::TRANSFER, "SAL1", is_subaddress, outputs, unused_transfers_indices, unused_dust_indices, fake_outs_count, unlock_time, priority, extra); } //---------------------------------------------------------------------------------------------------- @@ -12646,7 +12646,7 @@ std::vector wallet2::create_unmixable_sweep_transactions() unmixable_transfer_outputs.push_back(n); } - return create_transactions_from(m_account_public_address, cryptonote::transaction_type::TRANSFER, "SAL", false, 1, unmixable_transfer_outputs, unmixable_dust_outputs, 0 /*fake_outs_count */, 0 /* unlock_time */, 1 /*priority */, std::vector()); + return create_transactions_from(m_account_public_address, cryptonote::transaction_type::TRANSFER, "SAL1", false, 1, unmixable_transfer_outputs, unmixable_dust_outputs, 0 /*fake_outs_count */, 0 /* unlock_time */, 1 /*priority */, std::vector()); } //---------------------------------------------------------------------------------------------------- void wallet2::discard_unmixable_outputs() @@ -13540,8 +13540,8 @@ bool wallet2::check_tx_proof(const cryptonote::transaction &tx, const cryptonote std::string wallet2::get_reserve_proof(const boost::optional> &account_minreserve, const std::string &message) { THROW_WALLET_EXCEPTION_IF(m_watch_only || m_multisig, error::wallet_internal_error, "Reserve proof can only be generated by a full wallet"); - THROW_WALLET_EXCEPTION_IF(balance_all(true, "SAL") == 0, error::wallet_internal_error, "Zero balance"); - THROW_WALLET_EXCEPTION_IF(account_minreserve && balance(account_minreserve->first, "SAL", true) < account_minreserve->second, error::wallet_internal_error, + THROW_WALLET_EXCEPTION_IF(balance_all(true, "SAL1") == 0, error::wallet_internal_error, "Zero balance"); + THROW_WALLET_EXCEPTION_IF(account_minreserve && balance(account_minreserve->first, "SAL1", true) < account_minreserve->second, error::wallet_internal_error, "Not enough balance in this account for the requested minimum reserve amount"); // determine which outputs to include in the proof diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index ba4ef85..58312f0 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -535,7 +535,7 @@ namespace tools if (!m_wallet) return not_open(er); std::vector assets_in_wallet = m_wallet->list_asset_types(); - std::string asset_type = req.asset_type.empty() ? "SAL" : boost::algorithm::to_upper_copy(req.asset_type); + std::string asset_type = req.asset_type.empty() ? "SAL1" : 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("Source asset '") + asset_type + "' not found in wallet"; @@ -754,8 +754,8 @@ namespace tools info.base_address = m_wallet->get_subaddress_as_str(subaddr_index); //for (const auto& asset: asset_types) { - info.balance = m_wallet->balance(subaddr_index.major, "SAL", req.strict_balances); - info.unlocked_balance = m_wallet->unlocked_balance(subaddr_index.major, "SAL", req.strict_balances); + info.balance = m_wallet->balance(subaddr_index.major, "SAL1", req.strict_balances); + info.unlocked_balance = m_wallet->unlocked_balance(subaddr_index.major, "SAL1", req.strict_balances); //} info.label = m_wallet->get_subaddress_label(subaddr_index); info.tag = account_tags.second[subaddr_index.major]; @@ -1774,7 +1774,7 @@ namespace tools CHECK_MULTISIG_ENABLED(); - std::string asset_type = req.asset_type.empty() ? "SAL" : req.asset_type; + std::string asset_type = req.asset_type.empty() ? "SAL1" : req.asset_type; // validate the transfer requested and populate dsts & extra std::list destinations; @@ -1846,7 +1846,7 @@ namespace tools CHECK_MULTISIG_ENABLED(); - std::string asset_type = req.asset_type.empty() ? "SAL" : req.asset_type; + std::string asset_type = req.asset_type.empty() ? "SAL1" : req.asset_type; // validate the transfer requested and populate dsts & extra std::list destinations;