update hardcoded sal assets to sal1
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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<wallet2::pendin
|
||||
std::vector<std::pair<std::string, std::string>> 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::pending_tx> 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::pending_tx> 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<uint8_t>());
|
||||
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<uint8_t>());
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
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<std::pair<uint32_t, uint64_t>> &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
|
||||
|
||||
@@ -535,7 +535,7 @@ namespace tools
|
||||
if (!m_wallet) return not_open(er);
|
||||
|
||||
std::vector<std::string> 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<wallet_rpc::transfer_destination> 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<wallet_rpc::transfer_destination> destinations;
|
||||
|
||||
Reference in New Issue
Block a user