Skip to content

Commit

Permalink
Merge branch 'dev' into add_coins
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Sep 27, 2022
2 parents 932b36e + e7f14f5 commit 7b59f49
Show file tree
Hide file tree
Showing 123 changed files with 1,929 additions and 1,077 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/atomicdex-desktop-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,28 @@ jobs:
with:
python-version: '3.9'

- name: Install MSVC
if: runner.os == 'Windows'
uses: ilammy/[email protected]

- name: Build libwally (Windows)
if: runner.os == 'Windows'
run: |
cd '${{ github.workspace }}'
git clone -b v0.8.5 --recurse-submodules https://github.com/KomodoPlatform/libwally-core.git
cd '${{ github.workspace }}\libwally-core'
git submodule init
git submodule sync --recursive
git submodule update --init --recursive
Get-ChildItem -Filter build -Recurse -ErrorAction SilentlyContinue
$env:LIBWALLY_DIR='${{ github.workspace }}\libwally-core'
"$env:LIBWALLY_DIR\tools\msvc\gen_ecmult_static_context.bat"
copy src\ccan\ccan\str\hex\hex.c src\ccan\ccan\str\hex\hex_.c
copy src\ccan\ccan\base64\base64.c src\ccan\ccan\base64\base64_.c
cl /utf-8 /DUSE_ECMULT_STATIC_PRECOMPUTATION /DECMULT_WINDOW_SIZE=15 /DWALLY_CORE_BUILD /DHAVE_CONFIG_H /DSECP256K1_BUILD /I$env:LIBWALLY_DIR\src\wrap_js\windows_config /I$env:LIBWALLY_DIR /I$env:LIBWALLY_DIR\src /I$env:LIBWALLY_DIR\include /I$env:LIBWALLY_DIR\src\ccan /I$env:LIBWALLY_DIR\src\ccan\base64 /I$env:LIBWALLY_DIR\src\secp256k1 /Zi /LD src/aes.c src/anti_exfil.c src/base58.c src/base64.c src/bech32.c src/bip32.c src/bip38.c src/bip39.c src/blech32.c src/ecdh.c src/elements.c src/hex.c src/hmac.c src/internal.c src/mnemonic.c src/pbkdf2.c src/pullpush.c src/psbt.c src/script.c src/scrypt.c src/sign.c src/symmetric.c src/transaction.c src/wif.c src/wordlist.c src/ccan/ccan/crypto/ripemd160/ripemd160.c src/ccan/ccan/crypto/sha256/sha256.c src/ccan/ccan/crypto/sha512/sha512.c src/ccan/ccan/base64/base64_.c src\ccan\ccan\str\hex\hex_.c src/secp256k1/src/secp256k1.c src/secp256k1/src/precomputed_ecmult_gen.c src/secp256k1/src/precomputed_ecmult.c /Fewally.dll
Copy-Item "${{ github.workspace }}\libwally-core\wally.dll" -Destination "${{ github.workspace }}\wally\wally.dll" -force
- name: Install QT (Linux)
if: runner.os == 'Linux'
uses: KomodoPlatform/[email protected]
Expand Down Expand Up @@ -92,7 +114,7 @@ jobs:
- name: Install QT IFW (MacOS)
if: runner.os == 'macOS'
run: |
python3 -m aqt tool mac tools_ifw 4.4.1 qt.tools.ifw.44 --outputdir ${{ github.workspace }}/Qt
python3 -m aqt tool mac tools_ifw 4.4.2 qt.tools.ifw.44 --outputdir ${{ github.workspace }}/Qt
echo "${{ github.workspace }}/Qt/Tools/QtInstallerFramework/4.4/bin" >> $GITHUB_PATH
- name: Install QT (Windows)
Expand All @@ -110,7 +132,7 @@ jobs:
if: runner.os == 'Windows'
run: |
python -m pip install --upgrade pip
python -m aqt tool windows tools_ifw 4.4.1 qt.tools.ifw.44 --outputdir C:/Qt
python -m aqt tool windows tools_ifw 4.4.2 qt.tools.ifw.44 --outputdir C:/Qt
echo "C:/Qt/Tools/QtInstallerFramework/4.4/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo $env:GITHUB_PATH
echo $env:PATH
Expand Down
186 changes: 99 additions & 87 deletions assets/config/0.5.6-coins.json
Original file line number Diff line number Diff line change
Expand Up @@ -876,94 +876,10 @@
"https://bchd.fountainhead.cash:443"
],
"allow_slp_unsafe_conf": false,
"type": "BCH",
"type": "UTXO",
"other_types": ["SLP"],
"name": "Bitcoin Cash"
},
"sTST": {
"coin": "sTST",
"active": false,
"is_testnet": true,
"coingecko_id": "test-coin",
"coinpaprika_id": "test-coin",
"currently_enabled": false,
"explorer_url": [
"https://testnet.simpleledger.info/"
],
"explorer_tx_url": "#tx/",
"type": "tBCH",
"name": "sTST"
},
"HONK": {
"coin": "HONK",
"active": false,
"coingecko_id": "test-coin",
"coinpaprika_id": "test-coin",
"currently_enabled": false,
"explorer_url": [
"https://simpleledger.info/"
],
"explorer_tx_url": "#tx/",
"type": "BCH",
"name": "HONK HONK"
},
"ASLP": {
"coin": "ASLP",
"active": false,
"coingecko_id": "test-coin",
"coinpaprika_id": "test-coin",
"currently_enabled": false,
"explorer_url": [
"https://simpleledger.info/"
],
"explorer_tx_url": "#tx/",
"type": "BCH",
"name": "AtomicSLP"
},
"USDF": {
"coin": "USDF",
"active": false,
"is_testnet": true,
"coingecko_id": "test-coin",
"coinpaprika_id": "test-coin",
"currently_enabled": false,
"explorer_url": [
"https://testnet.simpleledger.info/"
],
"explorer_tx_url": "#tx/",
"type": "tBCH",
"name": "Fake USD (Testnet)"
},
"tBCH": {
"coin": "tBCH",
"active": false,
"is_testnet": true,
"coingecko_id": "test-coin",
"coinpaprika_id": "test-coin",
"currently_enabled": false,
"electrum": [
{
"url": "tbch.loping.net:60002",
"protocol": "SSL"
},
{
"url": "electroncash.de:50004",
"protocol": "SSL"
},
{
"url": "testnet.bitcoincash.network:60002",
"protocol": "SSL"
}
],
"explorer_url": [
"https://tbch.loping.net/"
],
"bchd_urls": [
"https://bchd-testnet.greyh.at:18335"
],
"allow_slp_unsafe_conf": false,
"type": "BCH",
"name": "Bitcoin Cash (Testnet)"
},
"USDT-SLP": {
"coin": "USDT-SLP",
"active": false,
Expand All @@ -974,7 +890,7 @@
"https://simpleledger.info/"
],
"explorer_tx_url": "#tx/",
"type": "BCH",
"type": "SLP",
"name": "Tether"
},
"BCH-ERC20": {
Expand Down Expand Up @@ -5553,6 +5469,18 @@
{
"url": "electrum1.cipig.net:10001",
"ws_url": "electrum1.cipig.net:30001"
},
{
"url": "electrum3.cipig.net:20001",
"protocol": "SSL"
},
{
"url": "electrum2.cipig.net:20001",
"protocol": "SSL"
},
{
"url": "electrum1.cipig.net:20001",
"protocol": "SSL"
}
],
"explorer_url": [
Expand Down Expand Up @@ -5875,6 +5803,18 @@
{
"url": "electrum1.cipig.net:10017",
"ws_url": "electrum1.cipig.net:30017"
},
{
"url": "electrum3.cipig.net:20017",
"protocol": "SSL"
},
{
"url": "electrum2.cipig.net:20017",
"protocol": "SSL"
},
{
"url": "electrum1.cipig.net:20017",
"protocol": "SSL"
}
],
"explorer_url": [
Expand Down Expand Up @@ -5902,6 +5842,18 @@
{
"url": "electrum1.cipig.net:10018",
"ws_url": "electrum1.cipig.net:30018"
},
{
"url": "electrum3.cipig.net:20018",
"protocol": "SSL"
},
{
"url": "electrum2.cipig.net:20018",
"protocol": "SSL"
},
{
"url": "electrum1.cipig.net:20018",
"protocol": "SSL"
}
],
"explorer_url": [
Expand Down Expand Up @@ -10877,5 +10829,65 @@
"active": false,
"currently_enabled": false,
"wallet_only": false
},
"sTST": {
"coin": "sTST",
"active": false,
"is_testnet": true,
"coingecko_id": "test-coin",
"coinpaprika_id": "test-coin",
"currently_enabled": false,
"explorer_url": [
"https://testnet.simpleledger.info/"
],
"explorer_tx_url": "#tx/",
"type": "SLP",
"name": "sTST"
},
"USDF": {
"coin": "USDF",
"active": false,
"is_testnet": true,
"coingecko_id": "test-coin",
"coinpaprika_id": "test-coin",
"currently_enabled": false,
"explorer_url": [
"https://testnet.simpleledger.info/"
],
"explorer_tx_url": "#tx/",
"type": "SLP",
"name": "Fake USD (Testnet)"
},
"tBCH": {
"coin": "tBCH",
"active": false,
"is_testnet": true,
"coingecko_id": "test-coin",
"coinpaprika_id": "test-coin",
"currently_enabled": false,
"electrum": [
{
"url": "tbch.loping.net:60002",
"protocol": "SSL"
},
{
"url": "electroncash.de:50004",
"protocol": "SSL"
},
{
"url": "testnet.bitcoincash.network:60002",
"protocol": "SSL"
}
],
"explorer_url": [
"https://tbch.loping.net/"
],
"bchd_urls": [
"https://bchd-testnet.greyh.at:18335"
],
"allow_slp_unsafe_conf": false,
"type": "UTXO",
"other_types": ["SLP"],
"name": "Bitcoin Cash (Testnet)"
}
}
22 changes: 12 additions & 10 deletions atomic_defi_design/Dex/Addressbook/AddAddressForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Dex.Rectangle
property string addressKey
property string addressValue

property var availableNetworkStandards: ["QRC-20", "ERC-20", "BEP-20", "Smart Chain"]
property var availableNetworkStandards: ["QRC-20", "ERC-20", "BEP-20", "Smart Chain", "SLP"]

// Return the asset type that will be used in the backend to validate the address
function getTypeForAddressChecker(addressType)
Expand All @@ -32,11 +32,11 @@ Dex.Rectangle
case "BEP-20": return "BNB"
case "ERC-20": return "ETH"
case "Smart Chain": return "KMD"
case "SLP": return "BCH"
case "SLP": return "USDT-SLP"
}

let coinInfo = Dex.API.app.portfolio_pg.global_cfg_mdl.get_coin_info(addressType);
if (coinInfo.has_parent_fees_ticker)
if (coinInfo.has_parent_fees_ticker && coinInfo.type !== "SLP")
return coinInfo.fees_ticker;
return addressType
}
Expand All @@ -46,11 +46,11 @@ Dex.Rectangle
{
switch (addressType)
{
case "QRC-20": return true
case "BEP-20": return true
case "ERC-20": return true
case "Smart Chain": return true
case "SLP": return true
case "QRC-20": return true
case "BEP-20": return true
case "ERC-20": return true
case "Smart Chain": return true
case "SLP": return true
}
return false
}
Expand Down Expand Up @@ -156,10 +156,12 @@ Dex.Rectangle
Dex.Text
{
id: invalidAddressValueLabel
Layout.fillWidth: true
Layout.preferredWidth: 458
Layout.preferredHeight: 60
visible: text !== ""
color: Dex.CurrentTheme.noColor
wrapMode: Dex.Text.Wrap
wrapMode: Dex.Text.WordWrap
elide: Dex.Text.ElideRight
horizontalAlignment: Text.AlignHCenter
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ ColumnLayout
let volume = input_volume.text * 0.50
setMinimumAmount(General.formatDouble(volume))
}
fiat_value: General.getFiatText(non_null_volume, left_ticker)
fiat_value: General.getFiatText(API.app.trading_pg.min_trade_vol, left_ticker)
left_label: "10%"
middle_label: "25%"
right_label: "50%"
Expand Down
2 changes: 1 addition & 1 deletion cmake/compiler_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ target_compile_definitions(antara_optimize_settings INTERFACE
$<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Linux>>:NDEBUG>
$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Linux>>:DEBUG>
$<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Darwin>>:NDEBUG>
$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Darwin>>:-DEBUG>
$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Darwin>>:DEBUG>
$<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:AppleClang>,$<PLATFORM_ID:Darwin>>:NDEBUG>
$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:AppleClang>,$<PLATFORM_ID:Darwin>>:DEBUG>
)
Expand Down
11 changes: 11 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@ add_executable(${PROJECT_NAME}_tests MACOSX_BUNDLE ${ICON}

##! CFG
tests/config/coins.cfg.tests.cpp

##! API
tests/api/coingecko/coingecko.tests.cpp
tests/api/komodo_prices/komodo.prices.tests.cpp
tests/api/mm2/mm2.rpc.trade.preimage.tests.cpp
tests/api/mm2/mm2.fraction.tests.cpp
tests/api/mm2/enable_bch_with_tokens_rpc_tests.cpp

##! Utilities
tests/utilities/qt.utilities.tests.cpp
tests/utilities/global.utilities.tests.cpp

##! Managers
tests/managers/addressbook.manager.tests.cpp
Expand Down
Loading

0 comments on commit 7b59f49

Please sign in to comment.