From 867f47a28e1e73bd0d91e1ad6d021704d8ce61ca Mon Sep 17 00:00:00 2001 From: smk762 Date: Mon, 10 Jul 2023 19:42:55 +0800 Subject: [PATCH 1/6] update test coins --- .../api/mm2/mm2.rpc.trade.preimage.tests.cpp | 50 +++++++++---------- src/tests/atomic.dex.tests.hpp | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/tests/api/mm2/mm2.rpc.trade.preimage.tests.cpp b/src/tests/api/mm2/mm2.rpc.trade.preimage.tests.cpp index 1dce6caf12..5b088505ae 100644 --- a/src/tests/api/mm2/mm2.rpc.trade.preimage.tests.cpp +++ b/src/tests/api/mm2/mm2.rpc.trade.preimage.tests.cpp @@ -58,7 +58,7 @@ namespace "numer":"1" }, "amount_rat":[[1,[1]],[1,[10000]]], - "coin":"RICK" + "coin":"DOC" }, "taker_fee": { "coin": "MYCOIN1", @@ -72,7 +72,7 @@ namespace "numer":"1" }, "amount_rat":[[1,[1]],[1,[10000]]], - "coin":"RICK" + "coin":"DOC" } } )"_json; @@ -95,7 +95,7 @@ namespace "numer":"0" }, "amount_rat":[[0,[]],[1,[1]]], - "coin":"RICK" + "coin":"DOC" } } } @@ -119,7 +119,7 @@ namespace "numer":"1" }, "amount_rat":[[1,[1]],[1,[10000]]], - "coin":"RICK" + "coin":"DOC" }, "taker_fee": { "amount":"0.0001", @@ -128,7 +128,7 @@ namespace "numer":"1" }, "amount_rat":[[1,[1]],[1,[10000]]], - "coin":"RICK" + "coin":"DOC" }, "fee_to_send_taker_fee":{ @@ -138,7 +138,7 @@ namespace "numer":"1" }, "amount_rat":[[1,[1]],[1,[10000]]], - "coin":"RICK" + "coin":"DOC" } } } @@ -162,7 +162,7 @@ namespace "numer":"0" }, "amount_rat":[[0,[]],[1,[1]]], - "coin":"RICK" + "coin":"DOC" }, "volume":"2.21363478", "volume_fraction":{ @@ -176,7 +176,7 @@ namespace "numer":"0" }, "amount_rat":[[0,[]],[1,[1]]], - "coin":"RICK" + "coin":"DOC" }, "fee_to_send_taker_fee":{ "amount":"0.00033219", @@ -209,23 +209,23 @@ namespace "numer":"0" }, "amount_rat":[[0,[]],[1,[1]]], - "coin":"RICK" + "coin":"DOC" } } })"_json; - const nlohmann::json g_preimage_request_buy_rick_morty_real = R"( + const nlohmann::json g_preimage_request_buy_DOC_MARTY_real = R"( { - "base": "RICK", + "base": "DOC", "method": "trade_preimage", - "rel": "MORTY", + "rel": "MARTY", "swap_method": "buy", "userpass": "", "volume": "1", "price": "1" })"_json; - const nlohmann::json g_preimage_request_buy_rick_nonexistent_real = R"( + const nlohmann::json g_preimage_request_buy_DOC_nonexistent_real = R"( { - "base": "RICK", + "base": "DOC", "method": "trade_preimage", "rel": "NONEXISTENT", "swap_method": "buy", @@ -261,7 +261,7 @@ TEST_CASE("atomic_dex::mm2::preimage_answer_success deserialization from buy") TEST_SUITE("atomic_dex::mm2::preimage_answer deserialization test suites") { - TEST_CASE("setprice BTC/RICK") + TEST_CASE("setprice BTC/DOC") { atomic_dex::t_trade_preimage_answer answer; atomic_dex::mm2::from_json(g_preimage_answer_setprice, answer); @@ -270,7 +270,7 @@ TEST_SUITE("atomic_dex::mm2::preimage_answer deserialization test suites") CHECK_FALSE(answer.result.value().fee_to_send_taker_fee.has_value()); } - TEST_CASE("buy BTC/RICK") + TEST_CASE("buy BTC/DOC") { atomic_dex::t_trade_preimage_answer answer; atomic_dex::mm2::from_json(g_preimage_answer_buy, answer); @@ -279,7 +279,7 @@ TEST_SUITE("atomic_dex::mm2::preimage_answer deserialization test suites") CHECK(answer.result.value().fee_to_send_taker_fee.has_value()); } - TEST_CASE("sell max BTC/RICK") + TEST_CASE("sell max BTC/DOC") { atomic_dex::t_trade_preimage_answer answer; atomic_dex::mm2::from_json(g_preimage_answer_sell_max, answer); @@ -288,7 +288,7 @@ TEST_SUITE("atomic_dex::mm2::preimage_answer deserialization test suites") CHECK(answer.result.value().fee_to_send_taker_fee.has_value()); } - TEST_CASE("setprice ERC20 BAT/RICK") + TEST_CASE("setprice ERC20 BAT/DOC") { atomic_dex::t_trade_preimage_answer answer; atomic_dex::mm2::from_json(g_preimage_answer_setprice_erc, answer); @@ -371,11 +371,11 @@ SCENARIO("atomic_dex::mm2::preimage scenario") return atomic_dex::mm2::rpc_process_answer_batch(answers[0], "trade_preimage"); }; - //! A test with RICK/MORTY - GIVEN("Preparing a simple buy request RICK/MORTY") + //! A test with DOC/MARTY + GIVEN("Preparing a simple buy request DOC/MARTY") { //! Request values - atomic_dex::t_trade_preimage_request request{.base_coin = "RICK", .rel_coin = "MORTY", .swap_method = "buy", .volume = "1", .price = "1"}; + atomic_dex::t_trade_preimage_request request{.base_coin = "DOC", .rel_coin = "MARTY", .swap_method = "buy", .volume = "1", .price = "1"}; //! Transform request into json atomic_dex::mm2::to_json(request_json, request); @@ -386,7 +386,7 @@ SCENARIO("atomic_dex::mm2::preimage scenario") //! Check request without userpass against a constants at the top of the file auto copy_request = request_json; copy_request["userpass"] = ""; - CHECK_EQ(copy_request, g_preimage_request_buy_rick_morty_real); + CHECK_EQ(copy_request, g_preimage_request_buy_DOC_MARTY_real); //! A Test Case WHEN("I execute the request") @@ -403,14 +403,14 @@ SCENARIO("atomic_dex::mm2::preimage scenario") } //! See above - GIVEN("Preparing a wrong request RICK/NONEXISTENT coin") + GIVEN("Preparing a wrong request DOC/NONEXISTENT coin") { - atomic_dex::t_trade_preimage_request request{.base_coin = "RICK", .rel_coin = "NONEXISTENT", .swap_method = "buy", .volume = "1"}; + atomic_dex::t_trade_preimage_request request{.base_coin = "DOC", .rel_coin = "NONEXISTENT", .swap_method = "buy", .volume = "1"}; atomic_dex::mm2::to_json(request_json, request); batch.push_back(request_json); auto copy_request = request_json; copy_request["userpass"] = ""; - CHECK_EQ(copy_request, g_preimage_request_buy_rick_nonexistent_real); + CHECK_EQ(copy_request, g_preimage_request_buy_DOC_nonexistent_real); WHEN("I execute the request") { const atomic_dex::t_trade_preimage_answer answer = generic_resp_process(); diff --git a/src/tests/atomic.dex.tests.hpp b/src/tests/atomic.dex.tests.hpp index 205dcbf8cd..55f4ea8cd7 100644 --- a/src/tests/atomic.dex.tests.hpp +++ b/src/tests/atomic.dex.tests.hpp @@ -30,7 +30,7 @@ struct tests_context : public antara::gaming::world::app private: std::atomic_bool m_test_context_ready{false}; std::atomic_bool m_extra_coins_ready{false}; - std::vector m_extra_coins{"RICK", "MORTY"}; + std::vector m_extra_coins{"DOC", "MARTY"}; public: void From 06553952d197c818981bdde5fa8a508bd66cd039 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Wed, 26 Jul 2023 02:56:15 +0200 Subject: [PATCH 2/6] add missed optional header --- src/core/atomicdex/api/mm2/rpc2.enable_tendermint_token.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/atomicdex/api/mm2/rpc2.enable_tendermint_token.hpp b/src/core/atomicdex/api/mm2/rpc2.enable_tendermint_token.hpp index 1f8845ed1f..a41920ad3d 100644 --- a/src/core/atomicdex/api/mm2/rpc2.enable_tendermint_token.hpp +++ b/src/core/atomicdex/api/mm2/rpc2.enable_tendermint_token.hpp @@ -16,6 +16,7 @@ #pragma once +#include #include #include //> nlohmann::json From 50874ca19d00bae159d4916a246219f82eab31f4 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Wed, 26 Jul 2023 04:48:06 +0200 Subject: [PATCH 3/6] sidebar is always expanded, regardless of mouse position --- atomic_defi_design/Dex/Sidebar/Main.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atomic_defi_design/Dex/Sidebar/Main.qml b/atomic_defi_design/Dex/Sidebar/Main.qml index 212e949395..0f1a8b8091 100644 --- a/atomic_defi_design/Dex/Sidebar/Main.qml +++ b/atomic_defi_design/Dex/Sidebar/Main.qml @@ -17,7 +17,7 @@ Item Support } - property bool isExpanded: containsMouse + property bool isExpanded: true property real lineHeight: 44 property var currentLineType: Main.LineType.Portfolio property alias _selectionCursor: _selectionCursor From a7a741c5ba200de9901cee93395c71da2e31423b Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 2 Aug 2023 20:22:59 +0800 Subject: [PATCH 4/6] update prices url --- src/core/atomicdex/api/komodo_prices/komodo.prices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/atomicdex/api/komodo_prices/komodo.prices.cpp b/src/core/atomicdex/api/komodo_prices/komodo.prices.cpp index 02bd2b109a..f0616ad4d6 100644 --- a/src/core/atomicdex/api/komodo_prices/komodo.prices.cpp +++ b/src/core/atomicdex/api/komodo_prices/komodo.prices.cpp @@ -10,7 +10,7 @@ namespace { - constexpr const char* g_komodo_prices_endpoint = "https://prices.komodo.earth:1313"; + constexpr const char* g_komodo_prices_endpoint = "https://prices.komodo.earth"; constexpr const char* g_komodo_prices_endpoint_fallback = "https://prices.cipig.net:1717"; web::http::client::http_client_config g_komodo_prices_cfg{[]() From 498310075d5f210b65f11a6485dbcdbe161a9e54 Mon Sep 17 00:00:00 2001 From: cipig Date: Wed, 2 Aug 2023 16:32:38 +0000 Subject: [PATCH 5/6] fix GLIBC error --- ci_tools_atomic_dex/ci_scripts/linux_script.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci_tools_atomic_dex/ci_scripts/linux_script.sh b/ci_tools_atomic_dex/ci_scripts/linux_script.sh index c6d84279ab..6d67c27393 100755 --- a/ci_tools_atomic_dex/ci_scripts/linux_script.sh +++ b/ci_tools_atomic_dex/ci_scripts/linux_script.sh @@ -2,8 +2,8 @@ sudo apt-get update # prevents repo404 errors on apt-remove below sudo apt-get remove php* msodbcsql17 mysql* -sudo apt-get update -sudo ACCEPT_EULA=Y apt-get upgrade -y +#sudo apt-get update +#sudo ACCEPT_EULA=Y apt-get upgrade -y # base deps sudo apt-get install build-essential \ libgl1-mesa-dev \ From 537ec9865bbe963b13ae3651e23506b08b6b96b5 Mon Sep 17 00:00:00 2001 From: cipig Date: Thu, 10 Aug 2023 18:03:10 +0000 Subject: [PATCH 6/6] fix wally compile --- ci_tools_atomic_dex/ci_scripts/linux_script.sh | 2 +- ci_tools_atomic_dex/ci_scripts/osx_script.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci_tools_atomic_dex/ci_scripts/linux_script.sh b/ci_tools_atomic_dex/ci_scripts/linux_script.sh index 6d67c27393..95d20d4f4a 100755 --- a/ci_tools_atomic_dex/ci_scripts/linux_script.sh +++ b/ci_tools_atomic_dex/ci_scripts/linux_script.sh @@ -54,7 +54,7 @@ sudo cp -r * /usr/local/ cmake --version # get libwally -git clone https://github.com/KomodoPlatform/libwally-core.git +git clone https://github.com/KomodoPlatform/libwally-core.git --recurse-submodules cd libwally-core ./tools/autogen.sh ./configure --disable-shared diff --git a/ci_tools_atomic_dex/ci_scripts/osx_script.sh b/ci_tools_atomic_dex/ci_scripts/osx_script.sh index 949442963e..f47910cab6 100755 --- a/ci_tools_atomic_dex/ci_scripts/osx_script.sh +++ b/ci_tools_atomic_dex/ci_scripts/osx_script.sh @@ -31,7 +31,7 @@ export MACOSX_DEPLOYMENT_TARGET=10.15 #make -j3 install #cd ../ -git clone https://github.com/KomodoPlatform/libwally-core.git +git clone https://github.com/KomodoPlatform/libwally-core.git --recurse-submodules cd libwally-core ./tools/autogen.sh ./configure --disable-shared