1
0
Fork 0
forked from lthn/blockchain

small fixes over bug reports

This commit is contained in:
cryptozoidberg 2023-02-15 19:55:00 +01:00
parent 4a2f0c2165
commit 123e599202
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
2 changed files with 12 additions and 8 deletions

View file

@ -18,6 +18,7 @@
#define PREPARE_ARG_FROM_JSON(arg_type, var_name) \
arg_type var_name = AUTO_VAL_INIT(var_name); \
view::api_response default_ar = AUTO_VAL_INIT(default_ar); \
LOG_PRINT_BLUE("[REQUEST]: " << param.toStdString(), LOG_LEVEL_3); \
if (!epee::serialization::load_t_from_json(var_name, param.toStdString())) \
{ \
default_ar.error_code = API_RETURN_CODE_BAD_ARG; \
@ -28,6 +29,7 @@ template<typename T>
QString make_response(const T& r)
{
std::string str = epee::serialization::store_t_to_json(r);
LOG_PRINT_BLUE("[RESPONSE]: " << str, LOG_LEVEL_3);
return str.c_str();
}
@ -549,6 +551,14 @@ void MainWindow::store_pos(bool consider_showed)
void MainWindow::restore_pos(bool consider_showed)
{
TRY_ENTRY();
if (consider_showed)
{
if (m_config.is_showed)
this->showNormal();
else
this->showMinimized();
}
if (m_config.is_maximazed)
{
this->setWindowState(windowState() | Qt::WindowMaximized);
@ -580,14 +590,6 @@ void MainWindow::restore_pos(bool consider_showed)
}
}
if (consider_showed)
{
if (m_config.is_showed)
this->showNormal();
else
this->showMinimized();
}
CATCH_ENTRY2(void());
}
void MainWindow::trayIconActivated(QSystemTrayIcon::ActivationReason reason)

View file

@ -1275,6 +1275,8 @@ std::string wallets_manager::get_alias_info_by_name(const std::string& name, cur
if (!r)
return API_RETURN_CODE_FAIL;
if (res.status == API_RETURN_CODE_NOT_FOUND)
return API_RETURN_CODE_NOT_FOUND;
res_details.alias = name;
res_details.details = res.alias_details;