diff --git a/atomic_defi_design/Dex/Exchange/Trade/ConfirmTradeModal.qml b/atomic_defi_design/Dex/Exchange/Trade/ConfirmTradeModal.qml index 00025081f3..8056ecbef9 100644 --- a/atomic_defi_design/Dex/Exchange/Trade/ConfirmTradeModal.qml +++ b/atomic_defi_design/Dex/Exchange/Trade/ConfirmTradeModal.qml @@ -29,7 +29,7 @@ MultipageModal titleAlignment: Qt.AlignHCenter titleTopMargin: 0 topMarginAfterTitle: 10 - flickMax: window.height - 430 + flickMax: window.height - 385 header: [ RowLayout @@ -77,62 +77,6 @@ MultipageModal { id: price_line Layout.fillWidth: true - }, - - ColumnLayout - { - id: warnings_text - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - - // Large margin warning - FloatingBackground - { - Layout.alignment: Qt.AlignCenter - width: childrenRect.width - height: childrenRect.height - color: Style.colorRed2 - visible: Math.abs(parseFloat(API.app.trading_pg.cex_price_diff)) >= 50 - - RowLayout - { - Layout.fillWidth: true - - Item { width: 3 } - - DefaultCheckBox - { - id: allow_bad_trade - Layout.alignment: Qt.AlignCenter - textColor: Style.colorWhite0 - visible: Math.abs(parseFloat(API.app.trading_pg.cex_price_diff)) >= 50 - spacing: 2 - boxWidth: 16 - boxHeight: 16 - boxRadius: 8 - label.wrapMode: Label.NoWrap - text: qsTr("Trade price is more than 50% different to CEX! Confirm?") - font: DexTypo.caption - } - } - } - - DefaultText - { - Layout.alignment: Qt.AlignHCenter - text_value: qsTr("This swap request can not be undone and is a final event!") - font: DexTypo.italic12 - color: Dex.CurrentTheme.foregroundColor2 - } - - DefaultText - { - id: warnings_tx_time_text - Layout.alignment: Qt.AlignHCenter - text_value: qsTr("This transaction can take up to 60 mins - DO NOT close this application!") - font: DexTypo.italic12 - color: Dex.CurrentTheme.foregroundColor2 - } } ] @@ -244,6 +188,38 @@ MultipageModal } } + // Large margin warning + FloatingBackground + { + Layout.alignment: Qt.AlignCenter + width: childrenRect.width + height: childrenRect.height + color: Style.colorRed2 + visible: Math.abs(parseFloat(API.app.trading_pg.cex_price_diff)) >= 50 + + RowLayout + { + Layout.fillWidth: true + + Item { width: 3 } + + DefaultCheckBox + { + id: allow_bad_trade + Layout.alignment: Qt.AlignCenter + textColor: Style.colorWhite0 + visible: Math.abs(parseFloat(API.app.trading_pg.cex_price_diff)) >= 50 + spacing: 2 + boxWidth: 16 + boxHeight: 16 + boxRadius: 8 + label.wrapMode: Label.NoWrap + text: qsTr("Trade price is more than 50% different to CEX! Confirm?") + font: DexTypo.caption + } + } + } + // Custom config section Item { @@ -416,6 +392,31 @@ MultipageModal } } + ColumnLayout + { + id: warnings_text + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter + + + DefaultText + { + Layout.alignment: Qt.AlignHCenter + text_value: qsTr("This swap request can not be undone and is a final event!") + font: DexTypo.italic12 + color: Dex.CurrentTheme.foregroundColor2 + } + + DefaultText + { + id: warnings_tx_time_text + Layout.alignment: Qt.AlignHCenter + text_value: qsTr("This transaction can take up to 60 mins - DO NOT close this application!") + font: DexTypo.italic12 + color: Dex.CurrentTheme.foregroundColor2 + } + } + Item { visible: buy_sell_rpc_busy diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp index 29a50e8adf..4b702b2116 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp @@ -81,7 +81,7 @@ namespace atomic_dex void qt_orderbook_wrapper::refresh_orderbook_model_data(mm2::orderbook_result_rpc answer) { - SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] bids/asks size: {}/{}", answer.bids.size(), answer.asks.size()); + // SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] bids/asks size: {}/{}", answer.bids.size(), answer.asks.size()); this->m_asks->refresh_orderbook_model_data(answer.asks); this->m_bids->refresh_orderbook_model_data(answer.bids); const auto data = this->m_system_manager.get_system().get_bestorders_data(); @@ -91,12 +91,12 @@ namespace atomic_dex } else if (m_best_orders->rowCount() == 0) { - SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : reset_best_orders"); + // SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : reset_best_orders"); m_best_orders->reset_orderbook(data, true); } else { - SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : refresh_best_orders"); + // SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : refresh_best_orders"); m_best_orders->refresh_orderbook_model_data(data, true); } this->set_both_taker_vol();