1
0
Fork 0
forked from lthn/blockchain

added api for UI to fetch balance after whitelisting of asset

This commit is contained in:
cryptozoidberg 2022-12-06 21:59:49 +01:00
parent 9c30c60881
commit 0dc8a42555
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
4 changed files with 14 additions and 2 deletions

View file

@ -2150,6 +2150,17 @@ QString MainWindow::remove_custom_asset_id(const QString& param)
return MAKE_RESPONSE(default_ar);
CATCH_ENTRY_FAIL_API_RESPONCE();
}
QString MainWindow::get_wallet_info(const QString& param)
{
TRY_ENTRY();
LOG_API_TIMING();
PREPARE_ARG_FROM_JSON(view::wallet_id_obj, waid);
PREPARE_RESPONSE(view::wallet_info, ar);
default_ar.error_code = m_backend.get_wallet_info(waid.wallet_id, ar.response_data);
return MAKE_RESPONSE(default_ar);
CATCH_ENTRY_FAIL_API_RESPONCE();
}
QString MainWindow::backup_wallet_keys(const QString& param)
{
TRY_ENTRY();

View file

@ -170,6 +170,7 @@ public:
void bool_toggle_icon(const QString& param);
QString add_custom_asset_id(const QString& param);
QString remove_custom_asset_id(const QString& param);
QString get_wallet_info(const QString& param);
bool get_is_disabled_notifications();

View file

@ -1538,7 +1538,7 @@ std::string wallets_manager::invoke(uint64_t wallet_id, std::string params)
return response_info.m_body;
}
std::string wallets_manager::get_wallet_info(size_t wallet_id, view::wallet_info& wi)
std::string wallets_manager::get_wallet_info(uint64_t wallet_id, view::wallet_info& wi)
{
GET_WALLET_OPT_BY_ID(wallet_id, w);
return get_wallet_info(w, wi);

View file

@ -104,7 +104,7 @@ public:
std::string get_wallet_status(uint64_t wallet_id);
std::string run_wallet(uint64_t wallet_id);
std::string get_recent_transfers(size_t wallet_id, uint64_t offset, uint64_t count, view::transfers_array& tr_hist, bool exclude_mining_txs = false);
std::string get_wallet_info(size_t wallet_id, view::wallet_info& wi);
std::string get_wallet_info(uint64_t wallet_id, view::wallet_info& wi);
std::string get_contracts(size_t wallet_id, std::vector<tools::wallet_public::escrow_contract_details>& contracts);
std::string create_proposal(const view::create_proposal_param_gui& cpp);
std::string accept_proposal(size_t wallet_id, const crypto::hash& contract_id);