Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into nogeo
Browse files Browse the repository at this point in the history
  • Loading branch information
cipig committed Feb 22, 2024
2 parents 15fe164 + b98fc25 commit edca5e1
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 19 deletions.
13 changes: 10 additions & 3 deletions atomic_defi_design/Dex/Exchange/ProView/Chart.qml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ Item
{
pair_supported = false
selected_testcoin = left_ticker
console.log("no chart, testcoin", selected_testcoin)
return
}
if (General.is_testcoin(right_ticker))
{
pair_supported = false
selected_testcoin = right_ticker
console.log("no chart, testcoin", selected_testcoin)
return
}

Expand All @@ -52,9 +54,13 @@ Item
{
pair_supported = true
symbol = rel_ticker+"-"+base_ticker
console.log("symbol", symbol)
console.log("loaded_symbol", loaded_symbol)

if (symbol === loaded_symbol && !force)
{
webEngineViewPlaceHolder.visible = true
console.log("symbol === loaded_symbol, ok")
return
}
chart_html = `
Expand All @@ -70,7 +76,7 @@ Item
`
}
}
// console.log(chart_html)
console.log(chart_html)

if (chart_html == "")
{
Expand All @@ -84,6 +90,7 @@ Item
if (!symbol)
{
pair_supported = false
console.log("pair not supported", pair, pair_reversed)
return
}

Expand Down Expand Up @@ -165,7 +172,7 @@ Item
DefaultText
{
visible: pair_supported
text_value: qsTr("Loading market data") + "..."
text_value: qsTr("Loading pair chart data") + "..."
}

DefaultText
Expand All @@ -190,7 +197,7 @@ Item
id: webEngineViewPlaceHolder
anchors.fill: parent
anchors.centerIn: parent
visible: false
visible: true

Component.onCompleted:
{
Expand Down
5 changes: 0 additions & 5 deletions atomic_defi_design/Dex/Exchange/ProView/TradingInfo/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ Widget
background: null
margins: 0

Connections
{
target: exchange_trade
function onOrderSelected() { tabView.currentIndex = 0; }
}

Qaterial.LatoTabBar
{
Expand Down
2 changes: 1 addition & 1 deletion atomic_defi_design/Dex/Wallet/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ Item

DefaultText
{
text_value: qsTr("Loading market data") + "..."
text_value: qsTr("Loading ticker chart data") + "..."
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/core/atomicdex/api/komodo_prices/komodo.prices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ namespace atomic_dex::komodo_prices::api
{
web::http::http_request req;
req.set_method(web::http::methods::GET);
//std::string endpoint = fallback ? "/api/v2/tickers?expire_at=259200" : "/api/v3/prices/tickers_v2?expire_at=259200";
std::string endpoint = "/api/v2/tickers";
std::string endpoint = fallback ? "api/v2/tickers?expire_at=259200" : "api/v3/prices/tickers_v2.json?expire_at=259200";
if (fallback)
{
SPDLOG_INFO("url: {}", TO_STD_STR(g_komodo_prices_client_fallback->base_uri().to_string()) + endpoint);
Expand Down
6 changes: 1 addition & 5 deletions src/core/atomicdex/api/mm2/mm2.client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ namespace
Rpc process_rpc_answer(const web::http::http_response& answer)
{
std::string body = TO_STD_STR(answer.extract_string(true).get());
if (body.size() > 1000)
{
SPDLOG_DEBUG("redacted rpc answer: {}", body.substr(0, 1000));
}
SPDLOG_DEBUG("body: {}", body);
// SPDLOG_DEBUG("body: {}", body);
nlohmann::json json_answer;
Rpc rpc;
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace atomic_dex
const auto now = std::chrono::high_resolution_clock::now();
const auto s = std::chrono::duration_cast<std::chrono::seconds>(now - m_clock);

if (s >= 30s)
if (s >= 45s)
{
process_update();
m_clock = std::chrono::high_resolution_clock::now();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace atomic_dex

const auto now = std::chrono::high_resolution_clock::now();
const auto s = std::chrono::duration_cast<std::chrono::seconds>(now - m_update_clock);
if (s >= 30s)
if (s >= 45s)
{
SPDLOG_DEBUG("<<<<<<<<<<< orderbook_scanner_service update loop after 30 seconds >>>>>>>>>>>>>");
process_best_orders();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace atomic_dex

const auto now = std::chrono::high_resolution_clock::now();
const auto s = std::chrono::duration_cast<std::chrono::seconds>(now - m_update_clock);
if (s >= 1s)
if (s >= 15s)
{
// TODO: We could use this for an ETA
}
Expand Down

0 comments on commit edca5e1

Please sign in to comment.