Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into z-coin-optional-date
Browse files Browse the repository at this point in the history
  • Loading branch information
cipig committed Oct 1, 2023
2 parents d707f74 + a28d71c commit f328d42
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 35 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/atomicdex-desktop-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,24 +156,24 @@ jobs:
run: |
export DEBIAN_FRONTEND=noninteractive
export SHELL=/bin/bash
echo "CHOOSENIM_CHOOSE_VERSION=1.6.10" >> $GITHUB_ENV
export CHOOSENIM_CHOOSE_VERSION=1.6.10
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
export PATH=/home/runner/.nimble/bin:$PATH
chmod +x /home/runner/.choosenim/toolchains/nim-1.6.10/bin/*
chmod +x /home/runner/.choosenim/toolchains/nim-1.6.2/bin/*
- name: Install nim (MacOS)
if: runner.os == 'macOS'
run: |
echo "CHOOSENIM_CHOOSE_VERSION=1.6.10" >> $GITHUB_ENV
export CHOOSENIM_CHOOSE_VERSION=1.6.10
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
export PATH=/Users/runner/.nimble/bin:$PATH
chmod +x /Users/runner/.choosenim/toolchains/nim-1.6.10/bin/*
chmod +x /Users/runner/.choosenim/toolchains/nim-1.6.2/bin/*
- name: Install deps (Linux)
if: runner.os == 'Linux'
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ FetchContent_Declare(
)

FetchContent_Declare(jl777-coins
URL https://github.com/KomodoPlatform/coins/archive/ssl-only-coins-config.zip)
URL https://github.com/KomodoPlatform/coins/archive/master.zip)

#FetchContent_Declare(adex-generics-coins
# URL https://github.com/KomodoPlatform/komodo-wallet-desktop/archive/main.zip)
Expand All @@ -87,12 +87,12 @@ FetchContent_MakeAvailable(mm2 jl777-coins qmaterial)

##! Configure our needs.
if (UNIX)
configure_file(${jl777-coins_SOURCE_DIR}/utils/coins_config.json ${CMAKE_CURRENT_SOURCE_DIR}/assets/config/${PROJECT_VERSION}-coins.json COPYONLY)
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)
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.json ${CMAKE_BINARY_DIR}/bin/assets/config/${PROJECT_VERSION}-coins.json COPYONLY)
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)
Expand Down
2 changes: 1 addition & 1 deletion atomic_defi_design/Dex/Support/SupportModal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Network fees can vary greatly depending on your selected trading pair.").arg(API
FAQLine
{
title: qsTr("I see a transaction in my wallet that was marked as 'poison'. What does this mean?")
text: qsTr('Address poisoning is a relatively new tye of phishing attack, where a malicious actor aims to trick you into sending funds to an address that you did not intend to send funds to.
text: qsTr('Address poisoning is a relatively new type of phishing attack, where a malicious actor aims to trick you into sending funds to an address that you did not intend to send funds to.
This is often done by sending a zero value transaction to your wallet from an address which looks very similar to your actual address, with the exact same letters at the start and end. This transaction will then appear in your transaction history, with the scammer hoping you will mistake the fake address for your own and send funds to it.
Expand Down
41 changes: 16 additions & 25 deletions src/core/atomicdex/services/mm2/mm2.service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1298,36 +1298,27 @@ namespace atomic_dex
std::size_t limit = 5000;
bool requires_v2 = false;
std::string method = "my_tx_history";
if (coin_info.coin_type == CoinTypeGadget::SLP || coin_info.ticker == "tBCH" || coin_info.ticker == "BCH")
if (coin_info.coin_type == CoinTypeGadget::ZHTLC || coin_info.coin_type == CoinTypeGadget::TENDERMINT || coin_info.coin_type == CoinTypeGadget::TENDERMINTTOKEN || coin_info.coin_type == CoinTypeGadget::SLP || coin_info.ticker == "tBCH" || coin_info.ticker == "BCH")
{
requires_v2 = true;
t_tx_history_request request{.coin = ticker, .limit = limit};
nlohmann::json j = mm2::template_request(method, requires_v2);
mm2::to_json(j, request);
batch_array.push_back(j);
}
else if (coin_info.is_zhtlc_family)
{
// Don't request balance / history if not completely activated.
if (coin_info.activation_status.at("result").at("status") == "Ok")
if (coin_info.is_zhtlc_family)
{
limit = 50;
requires_v2 = true;
method = "z_coin_tx_history";
t_tx_history_request request{.coin = ticker, .limit = limit};
nlohmann::json j = mm2::template_request(method, requires_v2);
mm2::to_json(j, request);
batch_array.push_back(j);
// Don't request balance / history if not completely activated.
if (coin_info.activation_status.at("result").at("status") == "Ok")
{
limit = 50;
method = "z_coin_tx_history";
}
else
{
return std::make_tuple(batch_array, tickers_idx, tokens_to_fetch);
}
}
}
else
{
t_tx_history_request request{.coin = ticker, .limit = limit};
nlohmann::json j = mm2::template_request(method, requires_v2);
mm2::to_json(j, request);
batch_array.push_back(j);
}

t_tx_history_request request{.coin = ticker, .limit = limit};
nlohmann::json j = mm2::template_request(method, requires_v2);
mm2::to_json(j, request);
batch_array.push_back(j);
}

if (not only_tx)
Expand Down

0 comments on commit f328d42

Please sign in to comment.