Skip to content

Commit 056f76f

Browse files
authored
Merge pull request #2459 from KomodoPlatform/dev
v0.7.2 Release Candidate
2 parents 1952847 + 1e6c540 commit 056f76f

File tree

23 files changed

+161
-38
lines changed

23 files changed

+161
-38
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Please describe what you expected to happen.
2626
**Operating Environment(s):**
2727
- OS: [e.g. Windows/OSX/Linux. If Linux, include distro. ]
2828
- OS version: [e.g. 7/10/11, 10.13/10.15, 18.04/20.04 ]
29-
- Komodo Wallet Version: [e.g. 0.7.1]
29+
- Komodo Wallet Desktop Version: [e.g. 0.7.2]
3030
- Build branch: [e.g. master/dev]
3131

3232

.github/workflows/atomicdex-desktop-cd.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99
DEX_PROJECT_NAME: "komodo-wallet"
1010
DEX_DISPLAY_NAME: "Komodo Wallet"
1111
DEX_COMPANY: "KomodoPlatform"
12-
DEX_VERSION: "0.7.1"
12+
DEX_VERSION: "0.7.2"
1313
DEX_WEBSITE: "https://atomicdex.io/"
1414

1515
jobs:
@@ -367,7 +367,7 @@ jobs:
367367

368368
windows-release:
369369
name: Win Build/Release
370-
runs-on: windows-latest
370+
runs-on: windows-2019
371371

372372
steps:
373373
- uses: actions/checkout@v2
@@ -445,7 +445,7 @@ jobs:
445445

446446
windows-debug:
447447
name: Win Build/Debug
448-
runs-on: windows-latest
448+
runs-on: windows-2019
449449

450450
steps:
451451
- uses: actions/checkout@v2

.github/workflows/atomicdex-desktop-ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
DEX_PROJECT_NAME: "komodo-wallet"
1818
DEX_DISPLAY_NAME: "Komodo Wallet"
1919
DEX_COMPANY: "KomodoPlatform"
20-
DEX_VERSION: "0.7.1"
20+
DEX_VERSION: "0.7.2"
2121
DEX_WEBSITE: "https://atomicdex.io/"
2222
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/b/vcpkg_cache
2323
VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
@@ -68,13 +68,13 @@ jobs:
6868
host: 'mac'
6969

7070
- name: windows-release
71-
os: windows-latest
71+
os: windows-2019
7272
qt: '5.15.2'
7373
type: 'Release'
7474
host: 'windows'
7575

7676
- name: windows-debug
77-
os: windows-latest
77+
os: windows-2019
7878
qt: '5.15.2'
7979
type: 'Debug'
8080
host: 'windows'

CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ include(vcpkg_prerequisites)
1111
include(qt_prerequisites)
1212
include(cfg_hash)
1313

14-
project(${DEX_PROJECT_NAME} LANGUAGES CXX VERSION 0.7.1)
14+
project(${DEX_PROJECT_NAME} LANGUAGES CXX VERSION 0.7.2)
1515
message(STATUS "${PROJECT_NAME} is version ${PROJECT_VERSION}")
1616

1717
include(cmake_default_options)
@@ -60,13 +60,13 @@ endif ()
6060
##! We fetch our dependencies
6161
if (APPLE)
6262
FetchContent_Declare(mm2
63-
URL https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-mac-x86-64.zip)
63+
URL https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/v2.0.0-beta/mm2-b0fd99e84-Darwin-Release.zip)
6464
elseif (UNIX AND NOT APPLE)
6565
FetchContent_Declare(mm2
66-
URL https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-linux-x86-64.zip)
66+
URL https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/v2.0.0-beta/mm2-b0fd99e84-Linux-Release.zip)
6767
else ()
6868
FetchContent_Declare(mm2
69-
URL https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-win-x86-64.zip)
69+
URL https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/v2.0.0-beta/mm2-b0fd99e84-Win64.zip)
7070
endif ()
7171

7272
#FetchContent_Declare(qmaterial URL https://github.com/KomodoPlatform/Qaterial/archive/last-clang-working-2.zip)

assets/config/cfg.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"notification_enabled": true,
33
"spamfilter_enabled": false,
4+
"postorder_enabled": false,
45
"use_static_rpcpass": false,
56
"current_currency": "USD",
67
"current_fiat": "USD",

atomic_defi_design/Dex/Constants/General.qml

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ QtObject {
571571
}
572572
return diffPrefix(received) +
573573
(fiat === API.app.settings_pg.current_fiat ? API.app.settings_pg.current_fiat_sign : API.app.settings_pg.current_currency_sign)
574-
+ " " + (amount < 1E5 ? formatDouble(parseFloat(amount), precision, true) : nFormatter(parseFloat(amount), 2))
574+
+ " " + (amount < 1E5 ? formatDouble(parseFloat(amount), precision, true) : nFormatter(parseFloat(amount), precision))
575575
}
576576

577577
function formatPercent(value, show_prefix=true) {

atomic_defi_design/Dex/Exchange/Trade/OrderBook/List.qml

+45-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Item
1212
id: _control
1313

1414
property bool isAsk
15-
property bool isVertical: false
1615
width: parent.width
1716
height: parent.height
1817

@@ -29,7 +28,11 @@ Item
2928

3029
onContentHeightChanged:
3130
{
32-
if (isVertical) _tm.start();
31+
if (isAsk){
32+
// Duplication is intended. Sometimes data takes too long to load so slowscroll is a backup.
33+
slowscroll_timer.start();
34+
quickscroll_timer.start()
35+
}
3336
}
3437

3538
delegate: Item
@@ -47,12 +50,50 @@ Item
4750

4851
Timer
4952
{
50-
id: _tm
51-
interval: 2000
53+
id: slowscroll_timer
54+
interval: 1500
5255
onTriggered:
5356
{
5457
orderbook_list.positionViewAtEnd()
5558
}
5659
}
60+
Timer
61+
{
62+
id: quickscroll_timer
63+
interval: 500
64+
onTriggered:
65+
{
66+
orderbook_list.positionViewAtEnd()
67+
}
68+
}
69+
onModelChanged: {
70+
if (isAsk) quickscroll_timer.start()
71+
}
72+
}
73+
74+
Connections {
75+
target: API.app.trading_pg;
76+
77+
function onMarketModeChanged()
78+
{
79+
if (isAsk)
80+
{
81+
quickscroll_timer.start()
82+
}
83+
}
84+
function onOrderbookChanged()
85+
{
86+
if (isAsk)
87+
{
88+
quickscroll_timer.start()
89+
}
90+
}
91+
function onMarketPairsChanged()
92+
{
93+
if (isAsk)
94+
{
95+
quickscroll_timer.start()
96+
}
97+
}
5798
}
5899
}

atomic_defi_design/Dex/Exchange/Trade/OrderBook/Vertical.qml

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Widget
2929
List
3030
{
3131
isAsk: true
32-
isVertical: true
3332
Layout.fillHeight: true
3433
Layout.fillWidth: true
3534
}

atomic_defi_design/Dex/Exchange/Trade/ProView.qml

+5-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ RowLayout
102102
General.prettifyJSON(response.result), false)
103103

104104
General.prevent_coin_disabling.restart()
105-
tradingInfo.currentIndex = 1
105+
// Show the orders tab unless settings say otherwise
106+
if (API.app.settings_pg.postorder_enabled)
107+
{
108+
tradingInfo.currentIndex = 1
109+
}
106110
}
107111
}
108112
}

atomic_defi_design/Dex/Exchange/Trade/SimpleView/Main.qml

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ Item
2929
target: exchange_trade
3030
function onOrderPlaced()
3131
{
32-
currentSubPage = subPages.Orders
32+
if (API.app.settings_pg.postorder_enabled)
33+
{
34+
currentSubPage = subPages.Orders
35+
}
3336
}
3437
}
3538

atomic_defi_design/Dex/Settings/SettingModal.qml

+26
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,32 @@ Qaterial.Dialog
482482
}
483483
}
484484
}
485+
486+
// Post-order placement toggle
487+
RowLayout
488+
{
489+
width: parent.width - 30
490+
anchors.horizontalCenter: parent.horizontalCenter
491+
height: 50
492+
493+
DexLabel
494+
{
495+
Layout.alignment: Qt.AlignVCenter
496+
Layout.fillWidth: true
497+
font: DexTypo.subtitle1
498+
text: qsTr("Show orders after placement")
499+
}
500+
501+
Item { Layout.fillWidth: true }
502+
503+
DexSwitch
504+
{
505+
Layout.alignment: Qt.AlignVCenter
506+
Component.onCompleted: checked = API.app.settings_pg.postorder_enabled
507+
onCheckedChanged: API.app.settings_pg.postorder_enabled = checked
508+
}
509+
}
510+
485511
}
486512
}
487513
Item

atomic_defi_design/Dex/Wallet/Main.qml

+4-1
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,10 @@ Item
675675
content.anchors.leftMargin: enabled ? 23 : 48
676676
content.anchors.rightMargin: 23
677677

678-
onClicked: Qt.openUrlExternally("https://vote.komodoplatform.com/")
678+
onClicked: {
679+
let url = "https://vote.komodoplatform.com/" + api_wallet_page.ticker.toLowerCase() + "/";
680+
Qt.openUrlExternally(url);
681+
}
679682

680683
Row
681684
{

cmake/project.metadata.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(DEX_DISPLAY_NAME "Komodo Wallet")
77
set(DEX_MAINTENANCE_TOOL_NAME "Komodo Wallet Maintenance Tool")
88
set(DEX_COMPANY "KomodoPlatform")
99
set(DEX_WEBSITE "https://atomicdex.io/")
10-
set(DEX_VERSION "0.7.1")
10+
set(DEX_VERSION "0.7.2")
1111
set(DEX_SUPPORT_PAGE "https://support.komodoplatform.com/support/home")
1212
set(DEX_DISCORD "https://komodoplatform.com/discord")
1313
set(DEX_TWITTER "https://twitter.com/AtomicDEX")

src/core/atomicdex/config/app.cfg.cpp

+20
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ namespace
5050
config_json_data["available_signs"] = config.available_currency_signs;
5151
config_json_data["notification_enabled"] = config.notification_enabled;
5252
config_json_data["spamfilter_enabled"] = config.spamfilter_enabled;
53+
config_json_data["postorder_enabled"] = config.postorder_enabled;
5354
config_json_data["static_rpcpass_enabled"] = config.static_rpcpass_enabled;
5455

5556
file.close();
@@ -85,6 +86,15 @@ namespace atomic_dex
8586
config.spamfilter_enabled = true;
8687
}
8788

89+
if (j.contains("postorder_enabled"))
90+
{
91+
j.at("postorder_enabled").get_to(config.postorder_enabled);
92+
}
93+
else
94+
{
95+
config.postorder_enabled = true;
96+
}
97+
8898
if (j.contains("static_rpcpass_enabled"))
8999
{
90100
j.at("static_rpcpass_enabled").get_to(config.static_rpcpass_enabled);
@@ -105,6 +115,16 @@ namespace atomic_dex
105115
}
106116
}
107117

118+
void
119+
change_postorder_status(cfg& config, bool is_enabled)
120+
{
121+
if (config.postorder_enabled != is_enabled)
122+
{
123+
config.postorder_enabled = is_enabled;
124+
upgrade_cfg(config);
125+
}
126+
}
127+
108128
void
109129
change_spamfilter_status(cfg& config, bool is_enabled)
110130
{

src/core/atomicdex/config/app.cfg.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ namespace atomic_dex
3232
std::vector<std::string> recommended_fiat;
3333
std::vector<std::string> possible_currencies;
3434
bool notification_enabled;
35+
bool postorder_enabled{false};
3536
bool spamfilter_enabled{false};
3637
bool static_rpcpass_enabled{false};
3738
};
@@ -40,6 +41,7 @@ namespace atomic_dex
4041
void change_currency(cfg& config, const std::string& new_currency);
4142
void change_fiat(cfg& config, const std::string& new_fiat);
4243
void change_notification_status(cfg& config, bool is_enabled);
44+
void change_postorder_status(cfg& config, bool is_enabled);
4345
void change_spamfilter_status(cfg& config, bool is_enabled);
4446
void change_static_rpcpass_status(cfg& config, bool is_enabled);
4547
[[nodiscard]] bool is_this_currency_a_fiat(const cfg& config, const std::string& currency);

src/core/atomicdex/constants/dex.constants.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ namespace atomic_dex
1212
g_second_primary_dex_coin,
1313
"BTC-segwit",
1414
"DGB-segwit",
15+
"VOTE2024",
1516
};
1617
inline const std::vector<std::string> g_faucet_coins{
1718
"DOC",

src/core/atomicdex/models/qt.portfolio.model.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ namespace atomic_dex
109109
bool
110110
portfolio_model::update_activation_status()
111111
{
112+
// This feels a bit heavy handed. There should be a better way to do this.
113+
// Function may be unused.
112114
const auto& mm2_system = this->m_system_manager.get_system<mm2_service>();
113115
const auto coins = this->m_system_manager.get_system<portfolio_page>().get_global_cfg()->get_enabled_coins();
114116

src/core/atomicdex/pages/qt.settings.page.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,20 @@ namespace atomic_dex
226226
}
227227
}
228228

229+
bool atomic_dex::settings_page::is_postorder_enabled() const
230+
{
231+
return m_config.postorder_enabled;
232+
}
233+
234+
void settings_page::set_postorder_enabled(bool is_enabled)
235+
{
236+
if (m_config.postorder_enabled != is_enabled)
237+
{
238+
change_postorder_status(m_config, is_enabled);
239+
emit onPostOrderEnabledChanged();
240+
}
241+
}
242+
229243
bool atomic_dex::settings_page::is_notification_enabled() const
230244
{
231245
return m_config.notification_enabled;

src/core/atomicdex/pages/qt.settings.page.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ namespace atomic_dex
4646
Q_PROPERTY(QString current_fiat READ get_current_fiat WRITE set_current_fiat NOTIFY onFiatChanged)
4747
Q_PROPERTY(bool notification_enabled READ is_notification_enabled WRITE set_notification_enabled NOTIFY onNotificationEnabledChanged)
4848
Q_PROPERTY(bool spamfilter_enabled READ is_spamfilter_enabled WRITE set_spamfilter_enabled NOTIFY onSpamFilterEnabledChanged)
49+
Q_PROPERTY(bool postorder_enabled READ is_postorder_enabled WRITE set_postorder_enabled NOTIFY onPostOrderEnabledChanged)
4950
Q_PROPERTY(bool static_rpcpass_enabled READ is_static_rpcpass_enabled WRITE set_static_rpcpass_enabled NOTIFY onStaticRpcPassEnabledChanged)
5051
Q_PROPERTY(QVariant custom_token_data READ get_custom_token_data WRITE set_custom_token_data NOTIFY customTokenDataChanged)
5152
Q_PROPERTY(bool fetching_custom_token_data_busy READ is_fetching_custom_token_data_busy WRITE set_fetching_custom_token_data_busy NOTIFY customTokenDataStatusChanged)
@@ -94,6 +95,8 @@ namespace atomic_dex
9495
bool set_zhtlc_status(nlohmann::json data);
9596
[[nodiscard]] bool is_spamfilter_enabled() const;
9697
void set_spamfilter_enabled(bool is_enabled);
98+
[[nodiscard]] bool is_postorder_enabled() const;
99+
void set_postorder_enabled(bool is_enabled);
97100
void set_current_currency(const QString& current_currency);
98101
void set_current_fiat(const QString& current_fiat);
99102
[[nodiscard]] bool is_fetching_custom_token_data_busy() const;
@@ -143,6 +146,7 @@ namespace atomic_dex
143146
void onFiatSignChanged();
144147
void onFiatChanged();
145148
void onNotificationEnabledChanged();
149+
void onPostOrderEnabledChanged();
146150
void onSpamFilterEnabledChanged();
147151
void onStaticRpcPassEnabledChanged();
148152
void customTokenDataChanged();

src/core/atomicdex/pages/qt.wallet.page.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ namespace atomic_dex
735735

736736
nlohmann::json json_data = mm2::template_request("withdraw", true);
737737
mm2::to_json(json_data, withdraw_req);
738-
SPDLOG_DEBUG("final json: {}", json_data.dump(4));
738+
739739
batch.push_back(json_data);
740740

741741
std::string amount_std = amount.toStdString();

0 commit comments

Comments
 (0)