Skip to content

Commit

Permalink
Merge pull request #29 from KomodoPlatform/dev
Browse files Browse the repository at this point in the history
v0.8.2 Release Candidate
  • Loading branch information
smk762 authored Jan 15, 2025
2 parents e6dd8a2 + 6a841f9 commit ef2ef07
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Please describe what you expected to happen.
**Operating Environment(s):**
- OS: [e.g. Windows/OSX/Linux. If Linux, include distro. ]
- OS version: [e.g. 7/10/11, 10.13/10.15, 18.04/20.04 ]
- Komodo Wallet Desktop Version: [e.g. 0.8.1]
- Komodo Wallet Desktop Version: [e.g. 0.8.2]
- Build branch: [e.g. master/dev]


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/atomicdex-desktop-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
DEX_PROJECT_NAME: "komodo-wallet"
DEX_DISPLAY_NAME: "Komodo Wallet"
DEX_COMPANY: "KomodoPlatform"
DEX_VERSION: "0.8.1"
DEX_VERSION: "0.8.2"
DEX_WEBSITE: "https://atomicdex.io/"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/atomicdex-desktop-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
DEX_PROJECT_NAME: "komodo-wallet"
DEX_DISPLAY_NAME: "Komodo Wallet"
DEX_COMPANY: "KomodoPlatform"
DEX_VERSION: "0.8.1"
DEX_VERSION: "0.8.2"
DEX_WEBSITE: "https://atomicdex.io/"
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/b/vcpkg_cache
VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include(vcpkg_prerequisites)
include(qt_prerequisites)
include(cfg_hash)

project(${DEX_PROJECT_NAME} LANGUAGES CXX VERSION 0.8.1)
project(${DEX_PROJECT_NAME} LANGUAGES CXX VERSION 0.8.2)
message(STATUS "${PROJECT_NAME} is version ${PROJECT_VERSION}")

include(cmake_default_options)
Expand Down
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
25 changes: 6 additions & 19 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 @@ -47,15 +47,14 @@ MouseArea
_walletLine.label.opacity = 0;
_dexLine.label.opacity = 0;
_addressBookLine.label.opacity = 0;
_fiatLine.label.opacity = 0;
}
}
}

NumberAnimation
{
id: waitForSidebarExpansionAnimation
targets: [_portfolioLine.label, _walletLine.label, _dexLine.label, _addressBookLine.label, _fiatLine.label]
targets: [_portfolioLine.label, _walletLine.label, _dexLine.label, _addressBookLine.label]
properties: "opacity"
duration: 200
from: 0
Expand All @@ -66,7 +65,7 @@ MouseArea
NumberAnimation
{
id: labelsOpacityAnimation
targets: [_portfolioLine.label, _walletLine.label, _dexLine.label, _addressBookLine.label, _fiatLine.label]
targets: [_portfolioLine.label, _walletLine.label, _dexLine.label, _addressBookLine.label]
properties: "opacity"
duration: 350
from: 0.0
Expand Down Expand Up @@ -107,11 +106,10 @@ MouseArea

Layout.fillWidth: true
type: Main.LineType.DEX
label.color: timesyncInfo ? Dex.CurrentTheme.foregroundColor : Dex.CurrentTheme.textDisabledColor
label.text: qsTr("DEX") // isExpanded ? qsTr("DEX") : ""
label.color: timesyncInfo ? Dex.CurrentTheme.textDisabledColor : Dex.CurrentTheme.textDisabledColor
label.text: qsTr("DEX")
icon.source: General.image_path + "menu-exchange-white.svg"
onClicked: timesyncInfo ? lineSelected(type) : null
disabled_tt_text: timesyncInfo ? "" : qsTr("DEX is disabled due to system clock synchronization issues. Please check your device time settings.")
disabled_tt_text: qsTr("DEX is temporarily disabled.")
}

FigurativeLine
Expand All @@ -124,16 +122,5 @@ MouseArea
icon.source: General.image_path + "menu-news-white.svg"
onClicked: lineSelected(type)
}

FigurativeLine
{
id: _fiatLine

label.enabled: false
icon.enabled: false
Layout.fillWidth: true
label.text: qsTr("Fiat") // isExpanded ? qsTr("Fiat") : ""
icon.source: General.image_path + "bill.svg"
}
}
}
2 changes: 2 additions & 0 deletions atomic_defi_design/Dex/Sidebar/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ Item
anchors.topMargin: 70
onLineSelected:
{
if (lineType === Main.LineType.DEX)
return;
if (currentLineType === lineType)
return;
currentLineType = lineType;
Expand Down
1 change: 1 addition & 0 deletions atomic_defi_design/Dex/Wallet/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ Item
{
Layout.preferredWidth: 165
Layout.preferredHeight: 40
visible: false

DefaultButton
{
Expand Down
2 changes: 1 addition & 1 deletion cmake/project.metadata.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(DEX_DISPLAY_NAME "Komodo Wallet")
set(DEX_MAINTENANCE_TOOL_NAME "Komodo Wallet Maintenance Tool")
set(DEX_COMPANY "KomodoPlatform")
set(DEX_WEBSITE "https://atomicdex.io/")
set(DEX_VERSION "0.8.1")
set(DEX_VERSION "0.8.2")
set(DEX_SUPPORT_PAGE "https://support.komodoplatform.com/support/home")
set(DEX_DISCORD "https://komodoplatform.com/discord")
set(DEX_TWITTER "https://twitter.com/AtomicDEX")
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
12 changes: 6 additions & 6 deletions src/core/atomicdex/services/kdf/kdf.service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ namespace atomic_dex
m_coins_informations[coin.ticker].currently_enabled = false;
failed_tickers.push_back(coin.ticker);
}
update_coin_active(failed_tickers, false);
//update_coin_active(failed_tickers, false);
fetch_infos_thread(false, false);
}
}
Expand Down Expand Up @@ -818,7 +818,7 @@ namespace atomic_dex
m_coins_informations[coin.ticker].currently_enabled = false;
failed_tickers.push_back(coin.ticker);
}
update_coin_active(failed_tickers, false);
//update_coin_active(failed_tickers, false);
fetch_infos_thread(false, false);
}
}
Expand Down Expand Up @@ -908,7 +908,7 @@ namespace atomic_dex
SPDLOG_ERROR("marking {} as inactive: {}", rpc.request.ticker, rpc.error->error_type);
std::unique_lock lock(m_coin_cfg_mutex);
m_coins_informations[rpc.request.ticker].currently_enabled = false;
update_coin_active({rpc.request.ticker}, false);
//update_coin_active({rpc.request.ticker}, false);
this->dispatcher_.trigger<enabling_coin_failed>(rpc.request.ticker, rpc.error->error);
}
}
Expand Down Expand Up @@ -1038,7 +1038,7 @@ namespace atomic_dex
SPDLOG_DEBUG("{} failed to activate", rpc.request.ticker);
std::unique_lock lock(m_coin_cfg_mutex);
m_coins_informations[rpc.request.ticker].currently_enabled = false;
update_coin_active({rpc.request.ticker}, false);
//update_coin_active({rpc.request.ticker}, false);
this->dispatcher_.trigger<enabling_coin_failed>(rpc.request.ticker, rpc.error->error);
}
}
Expand Down Expand Up @@ -1246,7 +1246,7 @@ namespace atomic_dex
{
std::unique_lock lock(m_coin_cfg_mutex);
m_coins_informations[rpc.request.ticker].currently_enabled = false;
update_coin_active({rpc.request.ticker}, false);
//update_coin_active({rpc.request.ticker}, false);
this->dispatcher_.trigger<enabling_coin_failed>(rpc.request.ticker, rpc.error->error);
}
}
Expand Down Expand Up @@ -1353,7 +1353,7 @@ namespace atomic_dex
{
std::unique_lock lock(m_coin_cfg_mutex);
m_coins_informations[rpc.request.ticker].currently_enabled = false;
update_coin_active({rpc.request.ticker}, false);
//update_coin_active({rpc.request.ticker}, false);
this->dispatcher_.trigger<enabling_coin_failed>(rpc.request.ticker, rpc.error->error);
}
}
Expand Down
31 changes: 15 additions & 16 deletions src/core/atomicdex/services/update/update.checker.service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ namespace

pplx::task<web::http::http_response> async_check_retrieve()
{
nlohmann::json json_data{{"currentVersion", atomic_dex::get_raw_version()}};
// Uncomment this when testing the next release.
// nlohmann::json json_data{{"testing", true}};
nlohmann::json json_data{{"testing", false}};
return g_komodolive_client->request(create_json_post_request(std::move(json_data)));
}

nlohmann::json get_update_info_rpc(web::http::http_response resp_http)
nlohmann::json process_update_info_resp(web::http::http_response resp_http)
{
using namespace std::string_literals;
nlohmann::json resp;
Expand All @@ -59,20 +61,16 @@ namespace
result["currentVersion"] = atomic_dex::get_raw_version();
if (resp_http.status_code() == 200)
{
bool update_needed = false;
std::string current_version_str = atomic_dex::get_raw_version();
std::string endpoint_version = resp.at("new_version").get<std::string>();
boost::algorithm::replace_all(current_version_str, ".", "");
boost::algorithm::replace_all(endpoint_version, ".", "");
boost::algorithm::trim_left_if(current_version_str, boost::is_any_of("0"));
boost::algorithm::trim_left_if(endpoint_version, boost::is_any_of("0"));
update_needed = std::stoi(current_version_str) < std::stoi(endpoint_version);
result["updateNeeded"] = update_needed;
result["newVersion"] = resp["new_version"];
result["downloadUrl"] = resp["download_url"];
result["changelog"] = resp["changelog"];
result["status"] = resp["status"];
int current_version = atomic_dex::get_num_version();
int endpoint_version = stoi(resp.at("version_num").get<std::string>());
result["updateNeeded"] = current_version < endpoint_version;
result["newVersion"] = resp["new_version"];
result["downloadUrl"] = resp["download_url"];
result["changelog"] = resp["changelog"];
result["status"] = resp["status"];
result["version_num"] = resp["version_num"];
}
SPDLOG_INFO(result.dump());
return result;
}
}
Expand Down Expand Up @@ -107,7 +105,8 @@ namespace atomic_dex
emit isFetchingChanged();
async_check_retrieve()
.then([this](web::http::http_response resp) {
this->m_update_info = get_update_info_rpc(resp);
this->m_update_info = process_update_info_resp(resp);
SPDLOG_INFO("UpdateInfo has updated...");
is_fetching = false;
emit isFetchingChanged();
emit updateInfoChanged();
Expand Down
8 changes: 4 additions & 4 deletions src/core/atomicdex/version/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ namespace atomic_dex
constexpr const char*
get_version()
{
return "0.8.1-beta";
return "0.8.2-beta";
}

constexpr int
get_num_version() noexcept
{
return 81;
return 82;
}

constexpr const char*
get_raw_version()
{
return "0.8.1";
return "0.8.2";
}

constexpr const char*
get_precedent_raw_version()
{
return "0.8.0";
return "0.8.1";
}
} // namespace atomic_dex
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "komodo-wallet-desktop",
"version-string": "0.8.1",
"version-string": "0.8.2",
"dependencies": [
"entt",
"boost-multiprecision",
Expand Down
4 changes: 2 additions & 2 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "0.8.1",
"update": "recommended"
"version": "0.8.2",
"update": "required"
}

0 comments on commit ef2ef07

Please sign in to comment.