diff --git a/.gitignore b/.gitignore index fea9171c0..9e91929fb 100644 --- a/.gitignore +++ b/.gitignore @@ -88,4 +88,9 @@ atomic_legacy_imgui .vscode/settings.json .vscode/tasks.json bundled -build.log \ No newline at end of file +build.log +.venv/* +ci_tools_atomic_dex/cmake-3.19.0-rc3-Linux-x86_64/* +ci_tools_atomic_dex/cmake-3.19.0-rc3-Linux-x86_64 +cmake-3.19.0-rc3-Linux-x86_64/* +cmake-3.19.0-rc3-Linux-x86_64 diff --git a/Dockerfile b/Dockerfile index 82e97057e..79f2a4ba1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,7 @@ RUN apt-get update -y && \ libtool \ autoconf \ unzip \ + fuse \ libfuse2 \ libssl-dev \ libxkbcommon-x11-0 \ @@ -73,6 +74,8 @@ RUN apt-get update -y && \ libnss3-dev \ libnspr4-dev \ libgstreamer-plugins-base1.0-dev \ + libqt5charts5-dev \ + libqt5webchannel5-dev \ libasound2-dev RUN git config --global --add safe.directory /build/komodo-wallet-desktop @@ -86,9 +89,10 @@ ENV CC=clang-12 # Install Qt RUN python3 -m venv /build/.venv && \ - /build/.venv/bin/pip install aqtinstall==3.1.1 && \ + /build/.venv/bin/pip install aqtinstall && \ /build/.venv/bin/python -m aqt install-qt linux desktop 5.15.2 -O $HOME/Qt -b https://qt-mirror.dannhauer.de/ -m qtcharts debug_info qtwebengine + ENV DEBIAN_FRONTEND=noninteractive ENV SHELL=/bin/bash ENV QT_INSTALL_CMAKE_PATH=/root/Qt/5.15.2/gcc_64/lib/cmake diff --git a/assets/themes/Binance - Dark/colors.json b/assets/themes/Binance - Dark/colors.json index 96f4325b4..1cf3211a5 100644 --- a/assets/themes/Binance - Dark/colors.json +++ b/assets/themes/Binance - Dark/colors.json @@ -133,6 +133,10 @@ "arrowUpColor": "#F85757", "arrowDownColor": "#845FEF", + "colorPlaceholderText": "#444444FF", + "colorSelectedText": "#0E1021FF", + "colorSelection": "#14bca6FF", + "lineSeparatorColor": "#161515" diff --git a/assets/themes/Default - Dark/colors.json b/assets/themes/Default - Dark/colors.json index faee423f3..6d490c596 100644 --- a/assets/themes/Default - Dark/colors.json +++ b/assets/themes/Default - Dark/colors.json @@ -132,6 +132,9 @@ "arrowUpColor": "#F85757FF", "arrowDownColor": "#845FEFFF", + "colorPlaceholderText": "#444444FF", + "colorSelectedText": "#0E1021FF", + "colorSelection": "#14bca6FF", "lineSeparatorColor": "#262941FF" } diff --git a/assets/themes/Default - Light/colors.json b/assets/themes/Default - Light/colors.json index de287782f..057405e60 100644 --- a/assets/themes/Default - Light/colors.json +++ b/assets/themes/Default - Light/colors.json @@ -130,6 +130,10 @@ "arrowUpColor": "#F85757FF", "arrowDownColor": "#845FEFFF", + "colorPlaceholderText": "#8E9293FF", + "colorSelectedText": "#F9F9FBFF", + "colorSelection": "#14bca6FF", + "lineSeparatorColor": "#CDD3DC88" } diff --git a/atomic_defi_design/Dex/Components/DexTextArea.qml b/atomic_defi_design/Dex/Components/DexTextArea.qml index 47c46d2ab..ac8642f89 100644 --- a/atomic_defi_design/Dex/Components/DexTextArea.qml +++ b/atomic_defi_design/Dex/Components/DexTextArea.qml @@ -2,6 +2,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import "../Constants" import App 1.0 +import Dex.Components 1.0 as Dex import Dex.Themes 1.0 as Dex TextArea { diff --git a/atomic_defi_design/Dex/Components/Toast.qml b/atomic_defi_design/Dex/Components/Toast.qml index 0ee00584d..57d9149fd 100644 --- a/atomic_defi_design/Dex/Components/Toast.qml +++ b/atomic_defi_design/Dex/Components/Toast.qml @@ -2,8 +2,10 @@ // https://gist.github.com/jonmcclung/bae669101d17b103e94790341301c129 import QtQuick 2.15 -import "../Constants" import App 1.0 +import Dex.Components 1.0 as Dex +import "../Components" as Dex +import "../Constants" as Dex import Dex.Themes 1.0 as Dex AnimatedRectangle { @@ -37,7 +39,7 @@ AnimatedRectangle { radius: margin / 3 opacity: 0 - color: isError ? Dex.CurrentTheme.warningColor : Dex.CurrentTheme.colorTheme1 + color: isError ? Dex.CurrentTheme.warningColor : "#3CC9BF" z: 1000 DexLabel { @@ -51,7 +53,7 @@ AnimatedRectangle { margins: margin / 2 } font.pixelSize: Style.textSizeSmall2 - text_value: title + (General.isFilled(details) ? (" - " + qsTr("Click here to see the details")) : "") + text_value: title + (Dex.General.isFilled(details) ? (" - " + qsTr("Click here to see the details")) : "") } SequentialAnimation on opacity { diff --git a/atomic_defi_design/Dex/Constants/DexTheme.qml b/atomic_defi_design/Dex/Constants/DexTheme.qml index 7653d2e24..2a552837c 100644 --- a/atomic_defi_design/Dex/Constants/DexTheme.qml +++ b/atomic_defi_design/Dex/Constants/DexTheme.qml @@ -317,9 +317,9 @@ QtObject { readonly property string colorText2: dark_theme ? "#79808C" : "#3C5368" readonly property string colorTextDisabled: dark_theme ? Style.colorWhite8 : "#B5B9C1" - readonly property string colorPlaceholderText: Style.colorWhite9 - readonly property string colorSelectedText: Style.colorTheme9 - readonly property string colorSelection: Style.colorGreen2 + readonly property string colorPlaceholderText: dark_theme ? Style.colorWhite9 : Style.colorWhite9 + readonly property string colorSelectedText: dark_theme ? Style.colorTheme9 : Style.colorTheme9 + readonly property string colorSelection: dark_theme ? Style.colorGreen2 : Style.colorGreen2 readonly property string colorTrendingLine: dark_theme ? Style.colorGreen : "#37a6ef" diff --git a/atomic_defi_design/Dex/Constants/General.qml b/atomic_defi_design/Dex/Constants/General.qml index 2b269e21d..0d2d23c27 100644 --- a/atomic_defi_design/Dex/Constants/General.qml +++ b/atomic_defi_design/Dex/Constants/General.qml @@ -599,14 +599,14 @@ QtObject { return formatFiat("", value, API.app.settings_pg.current_currency) } - function formatFiat(received, amount, fiat, precision=2) { + function formatFiat(received, amount, fiat, sf=2) { if (privacy_mode) return '' - if (precision == 2 && fiat == "BTC") { - precision = 8 + if (sf == 2 && fiat == "BTC") { + sf = 8 } return diffPrefix(received) + (fiat === API.app.settings_pg.current_fiat ? API.app.settings_pg.current_fiat_sign : API.app.settings_pg.current_currency_sign) - + " " + (amount < 1E5 ? formatDouble(parseFloat(amount), precision, true) : nFormatter(parseFloat(amount), precision)) + + " " + (amount < 1E5 ? formatDouble(parseFloat(amount), sf, true) : nFormatter(parseFloat(amount), sf)) } function formatPercent(value, show_prefix=true) { @@ -621,7 +621,17 @@ QtObject { return (show_prefix ? prefix : '') + parseFloat(value).toFixed(3) + ' %' } - readonly property int amountPrecision: 8 + + function formatCexRates(value) { + if (value === "0") return "N/A" + if (parseFloat(value) > 0) { + return "+"+formatNumber(value, 2)+"%" + } + return formatNumber(value, 2)+"%" + } + + + readonly property int defaultPrecision: 8 readonly property int sliderDigitLimit: 9 readonly property int recommendedPrecision: -1337 @@ -631,17 +641,58 @@ QtObject { function getRecommendedPrecision(v, limit) { const lim = limit || sliderDigitLimit - return Math.min(Math.max(lim - getDigitCount(v), 0), amountPrecision) + return Math.min(Math.max(lim - getDigitCount(v), 0), defaultPrecision) + } + + /** + * Converts a float into a readable string with K, M, B, etc. + * @param {number} num - The number to format. + * @param {number} decimals - The number of decimal places to include (default is 2). + * @param {number} extra_decimals - The number of decimal places to include if no suffix (default is 8). + * @returns {string} - The formatted string. + */ + function formatNumber(num, decimals = 8) { + let r = "0"; + let suffix = ""; + + if (isNaN(num) || num === null) { + return r; + } + + if (typeof(num) == 'string') { + num = parseFloat(num) + } + + const suffixes = ['', 'K', 'M', 'B', 'T']; // Add more as needed for larger numbers + const tier = Math.floor(Math.log10(Math.abs(num)) / 3); // Determine the tier (e.g., thousands, millions) + + if ([-1, 0].includes(tier)) { + r = num.toFixed(decimals); + return r + } + if (tier <= suffixes.length - 1) { + suffix = suffixes[tier] + if (suffix != '') + { + num = (num / Math.pow(10, tier * 3)); + } + } + else { + suffix = "e" + tier * 3 + num = (num / Math.pow(10, tier * 3)); + } + r = num.toFixed(decimals) + "" + suffix; + return r; } - function formatDouble(v, precision, trail_zeros) { + function formatDouble(v, sf = defaultPrecision, trail_zeros = true) { if(v === '') return "0" - if(precision === recommendedPrecision) precision = getRecommendedPrecision(v) + if(sf === recommendedPrecision) sf = getRecommendedPrecision(v) - if(precision === 0) return parseInt(v).toString() + if(sf === 0) return parseInt(v).toString() // Remove more than n decimals, then convert to string without trailing zeros - const full_double = parseFloat(v).toFixed(precision || amountPrecision) + const full_double = parseFloat(v).toFixed(sf || defaultPrecision) return trail_zeros ? full_double : full_double.replace(/\.?0+$/,"") } @@ -654,9 +705,12 @@ QtObject { return parseFloat(formatDouble(value, 2)) } - function formatCrypto(received, amount, ticker, fiat_amount, fiat, precision, trail_zeros) { - if (privacy_mode) return '' - return diffPrefix(received) + ticker + " " + formatDouble(amount, precision, trail_zeros) + (fiat_amount ? " (" + formatFiat("", fiat_amount, fiat) + ")" : "") + function formatCrypto(received, amount, ticker, fiat_amount, fiat, sf, trail_zeros) { + if (privacy_mode) { + return "" + } + const prefix = diffPrefix(received) + return prefix + ticker + " " + formatDouble(amount, sf, trail_zeros) + (fiat_amount ? " (" + formatFiat("", fiat_amount, fiat) + ")" : "") } function formatFullCrypto(received, amount, ticker, fiat_amount, fiat, use_full_ticker) { diff --git a/atomic_defi_design/Dex/Constants/Style.qml b/atomic_defi_design/Dex/Constants/Style.qml index b94d05749..57337b256 100644 --- a/atomic_defi_design/Dex/Constants/Style.qml +++ b/atomic_defi_design/Dex/Constants/Style.qml @@ -167,9 +167,9 @@ QtObject { readonly property string colorText2: dark_theme ? "#79808C" : "#3C5368" readonly property string colorTextDisabled: dark_theme ? Style.colorWhite8 : "#B5B9C1" - readonly property string colorPlaceholderText: Style.colorWhite9 - readonly property string colorSelectedText: Style.colorTheme9 - readonly property string colorSelection: Style.colorGreen2 + readonly property string colorPlaceholderText: dark_theme ? Style.colorWhite9 : Style.colorWhite9 + readonly property string colorSelectedText: dark_theme ? Style.colorTheme9 : Style.colorTheme9 + readonly property string colorSelection: dark_theme ? Style.colorGreen2 : Style.colorGreen2 readonly property string colorTrendingLine: dark_theme ? Style.colorGreen : "#37a6ef" diff --git a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Main.qml b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Main.qml index feb3ebd7f..85a4d2e09 100644 --- a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Main.qml +++ b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Main.qml @@ -38,7 +38,7 @@ Item Column { - width: root.currentSubPage === subPages.Trade ? _simpleTrade.best ? 600 : 450 : 450 + width: root.currentSubPage === subPages.Trade ? _simpleTrade.best ? 720 : 450 : 450 y: 60 spacing: 30 anchors.horizontalCenter: parent.horizontalCenter @@ -133,7 +133,7 @@ Item id: _swipeSimplifiedView currentIndex: root.currentSubPage anchors.horizontalCenter: parent.horizontalCenter - width: 600 + width: 720 height: 650 clip: true interactive: false @@ -144,7 +144,7 @@ Item { id: subTradePage height: _simpleTrade.height - width: _simpleTrade.best ? 600 : _simpleTrade.coinSelection ? 450 : 380 + width: _simpleTrade.best ? 720 : _simpleTrade.coinSelection ? 450 : 380 anchors.horizontalCenter: parent.horizontalCenter radius: 20 diff --git a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/SubBestOrder.qml b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/SubBestOrder.qml index d01600f8d..5a58a1e34 100644 --- a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/SubBestOrder.qml +++ b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/SubBestOrder.qml @@ -27,11 +27,11 @@ DexListView property int _rowWidth: width property int _rowHeight: 40 - property int _tokenColumnSize: 90 - property int _quantityColumnSize: 90 + property int _tokenColumnSize: 120 + property int _quantityColumnSize: 95 property int _quantityInBaseColumnSize: 120 - property int _fiatVolumeColumnSize: 80 - property int _cexRateColumnSize: 60 + property int _fiatVolumeColumnSize: 95 + property int _cexRateColumnSize: 75 headerPositioning: ListView.OverlayHeader reuseItems: true @@ -187,7 +187,7 @@ DexListView { Layout.preferredWidth: _quantityColumnSize horizontalAlignment: Text.AlignRight - text_value: parseFloat(General.formatDouble(rel_max_volume, General.amountPrecision, true)).toFixed(8) + text_value: Constants.General.formatNumber(rel_max_volume) font.pixelSize: 14 opacity: !_isCoinEnabled? .3 : 1 } @@ -196,7 +196,7 @@ DexListView { Layout.preferredWidth: _quantityInBaseColumnSize horizontalAlignment: Text.AlignRight - text_value: parseFloat(General.formatDouble(base_max_volume, General.amountPrecision, true)).toFixed(8) + text_value: Constants.General.formatNumber(base_max_volume) font.pixelSize: 14 opacity: !_isCoinEnabled? .3 : 1 } @@ -206,16 +206,16 @@ DexListView Layout.preferredWidth: _fiatVolumeColumnSize horizontalAlignment: Text.AlignRight // TODO: Adjust fiat to left/right sign based on region - text_value: parseFloat(price_fiat).toFixed(2)+Constants.API.app.settings_pg.current_fiat_sign + text_value: Constants.General.formatFiat("", price_fiat, Constants.API.app.settings_pg.current_fiat_sign) opacity: !_isCoinEnabled? .3 : 1 } - DexLabel + DexLabel // Order CEX Rate { Layout.preferredWidth: _cexRateColumnSize horizontalAlignment: Text.AlignRight color: cex_rates=== "0" ? Qt.darker(DexTheme.foregroundColor) : parseFloat(cex_rates)>0? DexTheme.warningColor : DexTheme.okColor - text_value: cex_rates=== "0" ? "N/A" : parseFloat(cex_rates)>0? "+"+parseFloat(cex_rates).toFixed(2)+"%" : parseFloat(cex_rates).toFixed(2)+"%" + text_value: Constants.General.formatCexRates(cex_rates) opacity: !_isCoinEnabled? .3 : 1 } diff --git a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml index 0eccd7fdb..adf8ecb14 100644 --- a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml +++ b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml @@ -47,7 +47,7 @@ ClipRRect // Trade Card Component.onCompleted: _fromValue.forceActiveFocus() onBestChanged: if (best) Constants.API.app.trading_pg.orderbook.refresh_best_orders() - width: bestOrderSimplified.visible ? 600 : coinSelection ? 450 : 380 + width: bestOrderSimplified.visible ? 720 : coinSelection ? 450 : 380 height: swap_card_content.height + 15 radius: 20 @@ -865,7 +865,7 @@ ClipRRect // Trade Card tradeCard: _tradeCard anchors.fill: parent anchors.topMargin: 10 - visible: _tradeCard.width == 600 + visible: _tradeCard.width == 720 onSelectedOrderChanged: { diff --git a/atomic_defi_design/Dex/Themes/CurrentTheme.qml b/atomic_defi_design/Dex/Themes/CurrentTheme.qml index 94ef9960d..809c3ccf9 100644 --- a/atomic_defi_design/Dex/Themes/CurrentTheme.qml +++ b/atomic_defi_design/Dex/Themes/CurrentTheme.qml @@ -212,7 +212,6 @@ ThemeData { addressBookTagColors[i] = Dex.Color.argbStrFromRgbaStr(addressBookTagColors[i]) } - okColor = Dex.Color.argbStrFromRgbaStr(themeData.okColor || defaultTheme.okColor); warningColor = Dex.Color.argbStrFromRgbaStr(themeData.warningColor || defaultTheme.warningColor); swapIconColor = Dex.Color.argbStrFromRgbaStr(themeData.swapIconColor || defaultTheme.swapIconColor); @@ -221,6 +220,7 @@ ThemeData receiverColorStart = Dex.Color.argbStrFromRgbaStr(themeData.receiverColorStart || defaultTheme.receiverColorStart); lineSeparatorColor = Dex.Color.argbStrFromRgbaStr(themeData.lineSeparatorColor || defaultTheme.lineSeparatorColor); + colorPlaceholderText = Dex.Color.argbStrFromRgbaStr(themeData.colorPlaceholderText || defaultTheme.colorPlaceholderText); } function loadLogo(themeName) @@ -341,6 +341,7 @@ ThemeData console.info("Dex.Themes.CurrentTheme.printValues.receiverColorStart : %1".arg(receiverColorStart)); console.info("Dex.Themes.CurrentTheme.printValues.lineSeparatorColor : %1".arg(lineSeparatorColor)); + console.info("Dex.Themes.CurrentTheme.printValues.colorPlaceholderText : %1".arg(colorPlaceholderText)); console.info("Dex.Themes.CurrentTheme.printValues.logoPath : %1".arg(logoPath)); console.info("Dex.Themes.CurrentTheme.printValues.bigLogoPath : %1".arg(bigLogoPath)); diff --git a/atomic_defi_design/Dex/Themes/DefaultTheme.js b/atomic_defi_design/Dex/Themes/DefaultTheme.js index 07467a985..558244855 100644 --- a/atomic_defi_design/Dex/Themes/DefaultTheme.js +++ b/atomic_defi_design/Dex/Themes/DefaultTheme.js @@ -127,6 +127,7 @@ function getHardcoded() okColor: "#00C058FF", warningColor: "#E52167FF", + colorTheme1: "#3CC9BFFF", senderColorStart: "#F85757FF", receiverColorStart: "#845FEFFF", @@ -134,6 +135,11 @@ function getHardcoded() arrowUpColor: "#F85757FF", arrowDownColor: "#845FEFFF", - lineSeparatorColor: "#CDD3DCFF" + lineSeparatorColor: "#CDD3DCFF", + + colorPlaceholderText: "#444444FF", + colorSelectedText: "#0E1021FF", + colorSelection: "#14bca6FF" + } } diff --git a/atomic_defi_design/Dex/Themes/ThemeData.qml b/atomic_defi_design/Dex/Themes/ThemeData.qml index a138eb816..7c3bc69d5 100644 --- a/atomic_defi_design/Dex/Themes/ThemeData.qml +++ b/atomic_defi_design/Dex/Themes/ThemeData.qml @@ -138,6 +138,9 @@ QtObject property color receiverColorStart property color lineSeparatorColor + property color colorPlaceholderText + property color colorSelectedText + property color colorSelection // Logos property string logoPath diff --git a/ci_tools_atomic_dex/linux_misc/linuxdeployqt-continuous-x86_64.AppImage b/ci_tools_atomic_dex/linux_misc/linuxdeployqt-continuous-x86_64.AppImage index 7a4ba9121..be8cf1844 100755 Binary files a/ci_tools_atomic_dex/linux_misc/linuxdeployqt-continuous-x86_64.AppImage and b/ci_tools_atomic_dex/linux_misc/linuxdeployqt-continuous-x86_64.AppImage differ diff --git a/cmake/install/linux/linux_post_install.cmake b/cmake/install/linux/linux_post_install.cmake index 75731d903..4eb4a2225 100644 --- a/cmake/install/linux/linux_post_install.cmake +++ b/cmake/install/linux/linux_post_install.cmake @@ -34,7 +34,7 @@ else () message(FATAL_ERROR "Didn't find ${PROJECT_APP_PATH}") endif () -set(LINUX_DEPLOY_PATH ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/linux_misc/linuxdeployqt-7-x86_64.AppImage) +set(LINUX_DEPLOY_PATH ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/linux_misc/linuxdeployqt-continuous-x86_64.AppImage) if (EXISTS ${LINUX_DEPLOY_PATH}) message(STATUS "linuxdeployqt path is -> ${LINUX_DEPLOY_PATH}") else () @@ -62,12 +62,17 @@ foreach (current_lib ${LIST_LIBS}) endforeach () message(STATUS "Executing linuxdeployqt to fix dependencies") -message(STATUS "Executing cmd: [${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs='libnss3.so,libnssutil3.so' -unsupported-allow-new-glibc -no-copy-copyright-files -verbose=1 -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage]") -execute_process(COMMAND ${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs='libnss3.so,libnssutil3.so' -unsupported-allow-new-glibc -no-copy-copyright-files -verbose=1 -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage +message(STATUS "Executing cmd: [${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs='libnss3.so,libnssutil3.so' -unsupported-allow-new-glibc -no-copy-copyright-files -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage -verbose=2]") +execute_process(COMMAND ${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs='libnss3.so,libnssutil3.so' -unsupported-allow-new-glibc -no-copy-copyright-files -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage -verbose=2 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE) +message(STATUS "Renaming ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-${VERSION_ID}-x86_64.AppImage to ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-linux-${VERSION_ID}-x86_64.AppImage") +file(RENAME ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-${VERSION_ID}-x86_64.AppImage ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-linux-${VERSION_ID}-x86_64.AppImage) + +file(COPY ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-linux-${VERSION_ID}-x86_64.AppImage DESTINATION ${TARGET_APP_PATH}) + message(STATUS "Copying ${PROJECT_APP_PATH} to ${TARGET_APP_PATH}/${PROJECT_APP_DIR}") file(COPY ${PROJECT_APP_PATH} DESTINATION ${TARGET_APP_PATH}) execute_process(COMMAND zip -r ${DEX_PROJECT_NAME}-linux-${VERSION_ID}.zip AntaraAtomicDexAppDir @@ -79,8 +84,3 @@ execute_process(COMMAND tar --zstd -cf ${DEX_PROJECT_NAME}-linux-${VERSION_ID}.t WORKING_DIRECTORY ${TARGET_APP_PATH} ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE) - -message(STATUS "Renaming ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-${VERSION_ID}-x86_64.AppImage to ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-linux-${VERSION_ID}-x86_64.AppImage") -file(RENAME ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-${VERSION_ID}-x86_64.AppImage ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-linux-${VERSION_ID}-x86_64.AppImage) - -file(COPY ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-linux-${VERSION_ID}-x86_64.AppImage DESTINATION ${TARGET_APP_PATH}) \ No newline at end of file diff --git a/docker-build-linux.sh b/docker-build-linux.sh index b9eb88b40..01ffb9e9e 100755 --- a/docker-build-linux.sh +++ b/docker-build-linux.sh @@ -1,9 +1,10 @@ #!/bin/bash +sudo rm -rf build bundled # Define the target for the build (Debug or Release) TARGET="${1:-Debug}" -docker run -v "$(pwd)":/build/komodo-wallet-desktop \ +docker run -v "$(pwd)":/build/komodo-wallet-desktop --privileged -v /dev/fuse:/dev/fuse \ kw-build-container \ bash -c "cd /build/komodo-wallet-desktop/ci_tools_atomic_dex && \ nimble build -y && \ @@ -15,6 +16,8 @@ if [ "${PIPESTATUS[0]}" -eq 0 ]; then echo "Build completed successfully!" else echo "Build failed. Check build.log for details." - echo "Make sure you run 'docker build -t kw-build-container -f .docker/Dockerfile .' first" + echo "Make sure you run 'docker build -t kw-build-container .' first" exit 1 fi + +sudo chown $USER:$USER bundled -R diff --git a/src/core/atomicdex/services/sync/timesync.checker.service.cpp b/src/core/atomicdex/services/sync/timesync.checker.service.cpp index 8d539c84e..d1c1327e0 100644 --- a/src/core/atomicdex/services/sync/timesync.checker.service.cpp +++ b/src/core/atomicdex/services/sync/timesync.checker.service.cpp @@ -85,8 +85,11 @@ namespace atomic_dex int64_t ts_diff = now_ts - m_timesync_clock_ts; if (abs(ts_diff) > 300) { - fetch_timesync_status(); - m_timesync_clock = std::chrono::high_resolution_clock::now(); + if (!m_timesync_status) + { + fetch_timesync_status(); + m_timesync_clock = std::chrono::high_resolution_clock::now(); + } } }