Skip to content

Commit

Permalink
Merge pull request #30 from KomodoPlatform/rc-review-fixes
Browse files Browse the repository at this point in the history
Rc review fixes
  • Loading branch information
smk762 authored Jan 14, 2025
2 parents 461102b + cd31e7f commit 6a841f9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
16 changes: 11 additions & 5 deletions atomic_defi_design/Dex/NewUpdateModal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,17 @@ Dex.MultipageModal

Component.onCompleted:
{
let status = Dex.API.app.updateCheckerService.updateInfo.status
if ( status === "recommended" || status === "required")
if (Dex.API.app.updateCheckerService.updateInfo)
{
root.open()
console.log("init updateInfo.status: " + Dex.API.app.updateCheckerService.updateInfo.status)
console.log("init updateInfo.updateNeeded: " + Dex.API.app.updateCheckerService.updateInfo.updateNeeded)
console.log("init updateInfo.newVersion: " + Dex.API.app.updateCheckerService.updateInfo.newVersion)
console.log("init updateInfo.downloadUrl: " + Dex.API.app.updateCheckerService.updateInfo.downloadUrl)
console.log("init updateInfo.changelog: " + Dex.API.app.updateCheckerService.updateInfo.changelog)
if (Dex.API.app.updateCheckerService.updateInfo.updateNeeded == true)
{
root.open()
}
}
}

Expand Down Expand Up @@ -160,8 +167,7 @@ Dex.MultipageModal
console.log("updateInfo.changelog: " + Dex.API.app.updateCheckerService.updateInfo.changelog)
if (Dex.API.app.updateCheckerService.updateInfo)
{
let status = Dex.API.app.updateCheckerService.updateInfo.status
if (status === "recommended" || status === "required")
if (Dex.API.app.updateCheckerService.updateInfo.updateNeeded == true)
{
root.open()
}
Expand Down
4 changes: 2 additions & 2 deletions atomic_defi_design/Dex/Sidebar/Center.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MouseArea

signal lineSelected(var lineType)

height: lineHeight * 5
height: lineHeight * 4
hoverEnabled: true

Connections
Expand Down Expand Up @@ -109,7 +109,7 @@ MouseArea
label.color: timesyncInfo ? Dex.CurrentTheme.textDisabledColor : Dex.CurrentTheme.textDisabledColor
label.text: qsTr("DEX")
icon.source: General.image_path + "menu-exchange-white.svg"
disabled_tt_text: qsTr("DEX is temporarily disabled. Please check https://komodoplatform.com/en/blog/ for more details.")
disabled_tt_text: qsTr("DEX is temporarily disabled.")
}

FigurativeLine
Expand Down
8 changes: 4 additions & 4 deletions src/core/atomicdex/config/enable.cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ namespace atomic_dex
to_json(nlohmann::json& j, const node& cfg)
{
j["url"] = cfg.url;
if (cfg.gui_auth.has_value())
if (cfg.komodo_proxy.has_value())
{
j["gui_auth"] = cfg.gui_auth.value();
j["komodo_proxy"] = cfg.komodo_proxy.value();
}
}

void
from_json(const nlohmann::json& j, node& cfg)
{
j.at("url").get_to(cfg.url);
if (j.count("gui_auth") == 1)
if (j.count("komodo_proxy") == 1)
{
cfg.gui_auth = j.at("gui_auth").get<bool>();
cfg.komodo_proxy = j.at("komodo_proxy").get<bool>();
}
}
} // namespace atomic_dex
2 changes: 1 addition & 1 deletion src/core/atomicdex/config/enable.cfg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace atomic_dex
struct node
{
std::string url;
std::optional<bool> gui_auth{false};
std::optional<bool> komodo_proxy{false};
};

void to_json(nlohmann::json& j, const node& cfg);
Expand Down
9 changes: 3 additions & 6 deletions src/core/atomicdex/services/update/update.checker.service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,11 @@ namespace atomic_dex
emit isFetchingChanged();
async_check_retrieve()
.then([this](web::http::http_response resp) {
nlohmann::json result = process_update_info_resp(resp);
this->m_update_info = result;
this->m_update_info = process_update_info_resp(resp);
SPDLOG_INFO("UpdateInfo has updated...");
is_fetching = false;
emit isFetchingChanged();
if (result["updateNeeded"] == true)
{
emit updateInfoChanged();
}
emit updateInfoChanged();
})
.then(&handle_exception_pplx_task);
}
Expand Down

0 comments on commit 6a841f9

Please sign in to comment.