Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.8.0 Release Candidate #2472

Merged
merged 37 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3fdca22
use dev api
smk762 Jul 30, 2024
92b39a5
mm2 -> kdf
smk762 Aug 9, 2024
e0ddba7
update version to 0.8.0
smk762 Aug 12, 2024
fb1f352
limit decimals on large numbers
smk762 Aug 12, 2024
182582b
Fix pro view order form overflow
smk762 Aug 17, 2024
3ed4128
extend privacy mode redaction to more areas
smk762 Aug 19, 2024
cc205b1
text -> text_value
smk762 Aug 19, 2024
1b415db
disable orderbooks in privacy mode
smk762 Aug 19, 2024
1b146a4
rename kdf DB path to retain prior history
smk762 Aug 19, 2024
a3db7f3
fix nim build error
smk762 Aug 19, 2024
3eda9f2
Merge branch 'dev-kdf' into fix/privacy-mode-history
smk762 Aug 19, 2024
179b578
use parent folder
smk762 Aug 19, 2024
f72e91d
use parent folders
smk762 Aug 19, 2024
893c032
Merge pull request #2462 from KomodoPlatform/dev-kdf
smk762 Aug 21, 2024
a577aa9
Merge pull request #2467 from KomodoPlatform/fix/pro-field-overflow
smk762 Aug 21, 2024
d999356
add timesync service
smk762 Aug 21, 2024
c20f43a
include timesync service
smk762 Aug 21, 2024
90b1d02
add tooltip and default to portoflio when dex disabled
smk762 Aug 22, 2024
0c973f2
Merge pull request #2468 from KomodoPlatform/fix/privacy-mode-history
smk762 Aug 22, 2024
31de753
Merge pull request #2464 from KomodoPlatform/update/version
smk762 Aug 22, 2024
def7bd4
Merge pull request #2470 from KomodoPlatform/dev-kdf
smk762 Aug 22, 2024
f21317a
revert nim sed workaround
smk762 Aug 22, 2024
08ffc35
use static script pinned to nim 0.8.4
smk762 Aug 22, 2024
28c4ddb
Merge pull request #2471 from KomodoPlatform/fix/ci-nim-script
smk762 Aug 22, 2024
90d5af5
Merge branch 'dev' into enhance/time-sync-warning
smk762 Aug 22, 2024
45effc1
update binaries url
smk762 Aug 22, 2024
3a6322e
Merge branch 'dev' into enhance/time-sync-warning
smk762 Aug 22, 2024
8ea79d5
handle binary name change
smk762 Aug 22, 2024
5583759
handle binary name change
smk762 Aug 22, 2024
eeb767c
Merge pull request #2469 from KomodoPlatform/enhance/time-sync-warning
smk762 Aug 23, 2024
b34aedd
Merge branch 'dev' into fix/dexpro/orderbook/bignum-alignment
smk762 Aug 23, 2024
f9e8dad
rm dots, 6dp for middle and right cols
smk762 Aug 23, 2024
7a6e41d
Merge pull request #2465 from KomodoPlatform/fix/dexpro/orderbook/big…
smk762 Aug 26, 2024
76f6036
fix missing icons and overflow
smk762 Aug 27, 2024
6dc7212
check sync every 5 mins, default to ok.
smk762 Aug 27, 2024
b5ea876
Merge branch 'dev' into fix/timesync-checker
smk762 Aug 27, 2024
070cf55
Merge pull request #2474 from KomodoPlatform/fix/timesync-checker
smk762 Aug 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Please describe what you expected to happen.
**Operating Environment(s):**
- OS: [e.g. Windows/OSX/Linux. If Linux, include distro. ]
- OS version: [e.g. 7/10/11, 10.13/10.15, 18.04/20.04 ]
- Komodo Wallet Desktop Version: [e.g. 0.7.2]
- Komodo Wallet Desktop Version: [e.g. 0.8.0]
- Build branch: [e.g. master/dev]


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/atomicdex-desktop-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
DEX_PROJECT_NAME: "komodo-wallet"
DEX_DISPLAY_NAME: "Komodo Wallet"
DEX_COMPANY: "KomodoPlatform"
DEX_VERSION: "0.7.2"
DEX_VERSION: "0.8.0"
DEX_WEBSITE: "https://atomicdex.io/"

jobs:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/atomicdex-desktop-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ on:
workflow_dispatch:

env:
DEX_API: "mm2_kmd"
DEX_API: "kdf_kwd"
DEX_RPCPORT: 7762
DEX_RPC: "http://127.0.0.1:7762"
DEX_PROJECT_NAME: "komodo-wallet"
DEX_DISPLAY_NAME: "Komodo Wallet"
DEX_COMPANY: "KomodoPlatform"
DEX_VERSION: "0.7.2"
DEX_VERSION: "0.8.0"
DEX_WEBSITE: "https://atomicdex.io/"
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/b/vcpkg_cache
VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
Expand Down Expand Up @@ -159,9 +159,7 @@ jobs:
export SHELL=/bin/bash
echo "CHOOSENIM_CHOOSE_VERSION=1.6.2" >> $GITHUB_ENV
export CHOOSENIM_CHOOSE_VERSION=1.6.2
curl https://nim-lang.org/choosenim/init.sh > choosenim.sh
chmod +x choosenim.sh
./choosenim.sh -y
./ci_tools_atomic_dex/ci_scripts/choosenim.sh -y
export PATH=/home/runner/.nimble/bin:$PATH
chmod +x /home/runner/.choosenim/toolchains/nim-1.6.2/bin/*

Expand All @@ -170,9 +168,7 @@ jobs:
run: |
echo "CHOOSENIM_CHOOSE_VERSION=1.6.2" >> $GITHUB_ENV
export CHOOSENIM_CHOOSE_VERSION=1.6.2
curl https://nim-lang.org/choosenim/init.sh > choosenim.sh
chmod +x choosenim.sh
./choosenim.sh -y
./ci_tools_atomic_dex/ci_scripts/choosenim.sh -y
export PATH=/Users/runner/.nimble/bin:$PATH
chmod +x /Users/runner/.choosenim/toolchains/nim-1.6.2/bin/*

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Thumbs.db
# --------
*.exe

/assets/tools/mm2/
/assets/tools/kdf/
/ci_tools_atomic_dex/vcpkg-repo/
/ci_tools_atomic_dex/ci_tools_atomic_dex
ci_tools_atomic_dex/build-Release
Expand Down
28 changes: 14 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include(vcpkg_prerequisites)
include(qt_prerequisites)
include(cfg_hash)

project(${DEX_PROJECT_NAME} LANGUAGES CXX VERSION 0.7.2)
project(${DEX_PROJECT_NAME} LANGUAGES CXX VERSION 0.8.0)
message(STATUS "${PROJECT_NAME} is version ${PROJECT_VERSION}")

include(cmake_default_options)
Expand Down Expand Up @@ -59,14 +59,14 @@ endif ()

##! We fetch our dependencies
if (APPLE)
FetchContent_Declare(mm2
URL https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/v2.0.0-beta/mm2-b0fd99e84-Darwin-Release.zip)
FetchContent_Declare(kdf
URL https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/v2.1.0-beta/mm2-35e923949-Darwin-Release.zip)
elseif (UNIX AND NOT APPLE)
FetchContent_Declare(mm2
URL https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/v2.0.0-beta/mm2-b0fd99e84-Linux-Release.zip)
FetchContent_Declare(kdf
URL https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/v2.1.0-beta/mm2-35e923949-Linux-Release.zip)
else ()
FetchContent_Declare(mm2
URL https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/v2.0.0-beta/mm2-b0fd99e84-Win64.zip)
FetchContent_Declare(kdf
URL https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/v2.1.0-beta/mm2-35e923949-Win64.zip)
endif ()

#FetchContent_Declare(qmaterial URL https://github.com/KomodoPlatform/Qaterial/archive/last-clang-working-2.zip)
Expand All @@ -83,20 +83,20 @@ FetchContent_Declare(jl777-coins
#FetchContent_Declare(adex-generics-coins
# URL https://github.com/KomodoPlatform/komodo-wallet-desktop/archive/main.zip)

FetchContent_MakeAvailable(mm2 jl777-coins qmaterial)
FetchContent_MakeAvailable(kdf jl777-coins qmaterial)

##! Configure our needs.
if (UNIX)
configure_file(${jl777-coins_SOURCE_DIR}/utils/coins_config_tcp.json ${CMAKE_CURRENT_SOURCE_DIR}/assets/config/${PROJECT_VERSION}-coins.json COPYONLY)
configure_file(${jl777-coins_SOURCE_DIR}/coins ${CMAKE_CURRENT_SOURCE_DIR}/assets/tools/mm2/coins COPYONLY)
configure_file(${mm2_SOURCE_DIR}/mm2 ${CMAKE_CURRENT_SOURCE_DIR}/assets/tools/mm2/${DEX_API} COPYONLY)
configure_file(${jl777-coins_SOURCE_DIR}/coins ${CMAKE_CURRENT_SOURCE_DIR}/assets/tools/kdf/coins COPYONLY)
configure_file(${kdf_SOURCE_DIR}/mm2 ${CMAKE_CURRENT_SOURCE_DIR}/assets/tools/kdf/${DEX_API} COPYONLY)
file(COPY ${jl777-coins_SOURCE_DIR}/icons/ DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/atomic_defi_design/assets/images/coins/)
else ()
configure_file(${jl777-coins_SOURCE_DIR}/utils/coins_config_tcp.json ${CMAKE_BINARY_DIR}/bin/assets/config/${PROJECT_VERSION}-coins.json COPYONLY)
configure_file(${jl777-coins_SOURCE_DIR}/coins ${CMAKE_BINARY_DIR}/bin/assets/tools/mm2/coins COPYONLY)
configure_file(${mm2_SOURCE_DIR}/mm2.exe ${CMAKE_BINARY_DIR}/bin/assets/tools/mm2/${DEX_API}.exe COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ci_tools_atomic_dex/windows_misc/msvcp140.dll ${CMAKE_BINARY_DIR}/bin/assets/tools/mm2/msvcp140.dll COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ci_tools_atomic_dex/windows_misc/vcruntime140.dll ${CMAKE_BINARY_DIR}/bin/assets/tools/mm2/vcruntime140.dll COPYONLY)
configure_file(${jl777-coins_SOURCE_DIR}/coins ${CMAKE_BINARY_DIR}/bin/assets/tools/kdf/coins COPYONLY)
configure_file(${kdf_SOURCE_DIR}/mm2.exe ${CMAKE_BINARY_DIR}/bin/assets/tools/kdf/${DEX_API}.exe COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ci_tools_atomic_dex/windows_misc/msvcp140.dll ${CMAKE_BINARY_DIR}/bin/assets/tools/kdf/msvcp140.dll COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ci_tools_atomic_dex/windows_misc/vcruntime140.dll ${CMAKE_BINARY_DIR}/bin/assets/tools/kdf/vcruntime140.dll COPYONLY)
endif ()


Expand Down
1 change: 1 addition & 0 deletions assets/tools/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
mm2
coins
kdf
5 changes: 1 addition & 4 deletions atomic_defi_design/Dex/Components/DexLabel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ Text
}
}

text: privacy && Dex.General.privacy_mode ? Dex.General.privacy_text : text_value
font: monospace ? Dex.DexTypo.monoSmall : Dex.DexTypo.body2

color: enabled ? Dex.CurrentTheme.foregroundColor : Dex.CurrentTheme.textDisabledColor

text: privacy && Dex.General.privacy_mode ? Dex.General.privacy_text : text_value
wrapMode: Text.WordWrap

onLinkActivated: Qt.openUrlExternally(link)
linkColor: color
}
2 changes: 2 additions & 0 deletions atomic_defi_design/Dex/Components/DexTextField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ TextField

property alias left_text: left_text.text_value
property alias right_text: right_text.text_value
property alias left_fontsize: left_text.font.pixelSize
property alias right_fontsize: right_text.font.pixelSize
property alias radius: background.radius
property color backgroundColor: Dex.CurrentTheme.textFieldBackgroundColor
property color backgroundColorActive: Dex.CurrentTheme.textFieldActiveBackgroundColor
Expand Down
35 changes: 17 additions & 18 deletions atomic_defi_design/Dex/Components/PairItemBadge.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ DexRectangle
Layout.leftMargin: 10
Layout.rightMargin: 20

Dex.Text{
DexLabel
{
anchors.bottom: parent.top
anchors.bottomMargin: 5
anchors.horizontalCenter: parent.horizontalCenter
Expand All @@ -46,6 +47,7 @@ DexRectangle
Layout.leftMargin: 20
Layout.rightMargin: 20

// Coin Icon
Dex.Image
{
id: icon
Expand All @@ -58,49 +60,46 @@ DexRectangle
Layout.topMargin: 0
Layout.bottomMargin: 0
}

//
ColumnLayout
{
spacing: 2
Layout.alignment: Qt.AlignVCenter

Dex.Text
DexLabel
{
Layout.preferredWidth: parent.width - 15

text_value: `<font color="${Style.getCoinColor(ticker)}"><b>${ticker}</b></font>&nbsp;&nbsp;&nbsp;<font color="${Dex.CurrentTheme.foregroundColor}">${fullname}</font>`
font.pixelSize: Style.textSizeSmall3
font: Dex.DexTypo.body2
elide: Text.ElideRight
wrapMode: Text.NoWrap
}

Dex.Text
DexLabel
{
id: middle_line

property string coin_value: amount
text: coin_value
text_value: coin_value
Layout.fillWidth: true
elide: Text.ElideRight
color: Dex.CurrentTheme.foregroundColor
font: DexTypo.body2
wrapMode: Label.NoWrap
ToolTip.text: coin_value
Component.onCompleted: font.pixelSize = 11.5
font: DexTypo.body3
ToolTip.text: text_value
privacy: true
}

Dex.Text
DexLabel
{
id: bottom_line

property string fiat_value: General.getFiatText(amount, ticker)
text: fiat_value
text_value: fiat_value
Layout.fillWidth: true
elide: Text.ElideRight
color: Dex.CurrentTheme.foregroundColor
font: DexTypo.body2
font: DexTypo.body3
wrapMode: Label.NoWrap
ToolTip.text: fiat_value
Component.onCompleted: font.pixelSize = 11.5
ToolTip.text: text_value
privacy: true
}
}
}
Expand Down
52 changes: 40 additions & 12 deletions atomic_defi_design/Dex/Constants/General.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ QtObject {

function coinIcon(ticker)
{
if (ticker.toLowerCase() == "smart chain")
{
return coin_icons_path + "smart_chain.png"
}
if (ticker.toLowerCase() == "avx")
{
return coin_icons_path + "avax.png"
}
if (ticker === "" || ticker === "All" || ticker===undefined)
{
return ""
Expand Down Expand Up @@ -175,7 +183,7 @@ QtObject {
}

function coinContractAddress(ticker) {
var cfg = API.app.trading_pg.get_raw_mm2_coin_cfg(ticker)
var cfg = API.app.trading_pg.get_raw_kdf_coin_cfg(ticker)
if (cfg.hasOwnProperty('protocol')) {
if (cfg.protocol.hasOwnProperty('protocol_data')) {
if (cfg.protocol.protocol_data.hasOwnProperty('contract_address')) {
Expand All @@ -187,7 +195,7 @@ QtObject {
}

function coinPlatform(ticker) {
var cfg = API.app.trading_pg.get_raw_mm2_coin_cfg(ticker)
var cfg = API.app.trading_pg.get_raw_kdf_coin_cfg(ticker)
if (cfg.hasOwnProperty('protocol')) {
if (cfg.protocol.hasOwnProperty('protocol_data')) {
if (cfg.protocol.protocol_data.hasOwnProperty('platform')) {
Expand Down Expand Up @@ -419,6 +427,14 @@ QtObject {
}

function getFeesDetail(fees) {
if (privacy_mode) {
return [
{"label": privacy_text},
{"label": privacy_text},
{"label": privacy_text},
{"label": privacy_text}
]
}
return [
{"label": qsTr("<b>Taker tx fee:</b> "), "fee": fees.base_transaction_fees, "ticker": fees.base_transaction_fees_ticker},
{"label": qsTr("<b>Dex tx fee:</b> "), "fee": fees.fee_to_send_taker_fee, "ticker": fees.fee_to_send_taker_fee_ticker},
Expand All @@ -434,10 +450,23 @@ QtObject {
return feetype + " " + amount + " " + ticker + " (" + fiat_text + ")"
}

function reducedBignum(text, decimals=8, max_length=12) {
let val = new BigNumber(text).toFixed(decimals)
if (val.length > max_length)
{
return val.substring(0, max_length)
}
return val
}

function getSimpleFromPlaceholder(selectedTicker, selectedOrder, sell_ticker_balance) {
if (privacy_mode)
{
return "0"
}
if (sell_ticker_balance == 0)
{
return qsTr("%1 balance is zero").arg(selectedTicker)
return qsTr("Balance is zero!")
}
if (!isZhtlcReady(selectedTicker))
{
Expand Down Expand Up @@ -489,6 +518,7 @@ QtObject {
}

function getTxExplorerURL(ticker, txid, add_0x=true) {
if (privacy_mode) return ''
if(txid !== '') {
const coin_info = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker)
const txid_prefix = (add_0x && coin_info.is_erc_family) ? '0x' : ''
Expand All @@ -497,6 +527,7 @@ QtObject {
}

function getAddressExplorerURL(ticker, address) {
if (privacy_mode) return ''
if(address !== '') {
const coin_info = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker)
return coin_info.explorer_url + addressTxUri(coin_info) + address
Expand All @@ -505,12 +536,14 @@ QtObject {
}

function viewTxAtExplorer(ticker, txid, add_0x=true) {
if (privacy_mode) return ''
if(txid !== '') {
Qt.openUrlExternally(getTxExplorerURL(ticker, txid, add_0x))
}
}

function viewAddressAtExplorer(ticker, address) {
if (privacy_mode) return ''
if(address !== '') {
Qt.openUrlExternally(getAddressExplorerURL(ticker, address))
}
Expand Down Expand Up @@ -555,6 +588,7 @@ QtObject {
}

function convertUsd(v) {
if (privacy_mode) return ''
let rate = API.app.get_rate_conversion("USD", API.app.settings_pg.current_currency)
let value = parseFloat(v) / parseFloat(rate)

Expand All @@ -566,6 +600,7 @@ QtObject {
}

function formatFiat(received, amount, fiat, precision=2) {
if (privacy_mode) return ''
if (precision == 2 && fiat == "BTC") {
precision = 8
}
Expand All @@ -575,6 +610,7 @@ QtObject {
}

function formatPercent(value, show_prefix=true) {
if (privacy_mode) return ''
let prefix = ''
if(value > 0) prefix = '+ '
else if(value < 0) {
Expand Down Expand Up @@ -619,6 +655,7 @@ QtObject {
}

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) + ")" : "")
}

Expand Down Expand Up @@ -777,15 +814,10 @@ QtObject {
}

function feeText(trade_info, base_ticker, has_info_icon=true, has_limited_space=false) {


if(!trade_info || !trade_info.trading_fee) return ""

const tx_fee = txFeeText(trade_info, base_ticker, has_info_icon, has_limited_space)
const trading_fee = tradingFeeText(trade_info, base_ticker, has_info_icon)
const minimum_amount = minimumtradingFeeText(trade_info, base_ticker, has_info_icon)


return tx_fee + "\n" + trading_fee +"<br>"+minimum_amount
}

Expand All @@ -804,13 +836,9 @@ QtObject {
}

function txFeeText(trade_info, base_ticker, has_info_icon=true, has_limited_space=false) {

if(!trade_info || !trade_info.trading_fee) return ""

const has_parent_coin_fees = hasParentCoinFees(trade_info)

var info = qsTr('%1 Transaction Fee'.arg(trade_info.base_transaction_fees_ticker))+': '+ trade_info.base_transaction_fees + " (%1)".arg(getFiatText(trade_info.base_transaction_fees, trade_info.base_transaction_fees_ticker, has_info_icon))

if (has_parent_coin_fees) {
info = info+"<br>"+qsTr('%1 Transaction Fee'.arg(trade_info.rel_transaction_fees_ticker))+': '+ trade_info.rel_transaction_fees + " (%1)".arg(getFiatText(trade_info.rel_transaction_fees, trade_info.rel_transaction_fees_ticker, has_info_icon))
}
Expand Down
Loading
Loading