diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9210ebc2b..1ec4dac85b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,13 +60,13 @@ endif ()
##! We fetch our dependencies
if (APPLE)
FetchContent_Declare(mm2
- URL https://sdk.devbuilds.komodo.earth/dev/mm2_466d4f2-mac-x86-64.zip)
+ URL https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-mac-x86-64.zip)
elseif (UNIX AND NOT APPLE)
FetchContent_Declare(mm2
- URL https://sdk.devbuilds.komodo.earth/dev/mm2_466d4f2-linux-x86-64.zip)
+ URL https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-linux-x86-64.zip)
else ()
FetchContent_Declare(mm2
- URL https://sdk.devbuilds.komodo.earth/dev/mm2_466d4f2-win-x86-64.zip)
+ URL https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-win-x86-64.zip)
endif ()
#FetchContent_Declare(qmaterial URL https://github.com/KomodoPlatform/Qaterial/archive/last-clang-working-2.zip)
diff --git a/atomic_defi_design/Dex/Constants/General.qml b/atomic_defi_design/Dex/Constants/General.qml
index 60a60c88a3..0c784d0b98 100644
--- a/atomic_defi_design/Dex/Constants/General.qml
+++ b/atomic_defi_design/Dex/Constants/General.qml
@@ -476,6 +476,11 @@ QtObject {
return coin_info.tx_uri
}
+ function getBlockUri(coin_info) {
+ if (coin_info.block_uri == "") return "block/"
+ return coin_info.block_uri
+ }
+
function getTxExplorerURL(ticker, txid, add_0x=true) {
if(txid !== '') {
const coin_info = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker)
@@ -684,7 +689,7 @@ QtObject {
if (prevent_coin_disabling.running) return false
if (ticker === atomic_app_primary_coin || ticker === atomic_app_secondary_coin) return false
if (ticker === "ETH") return !General.isParentCoinNeeded("ETH", "ERC-20")
- if (ticker === "MATIC") return !General.isParentCoinNeeded("MATIC", "Matic")
+ if (ticker === "MATIC") return !General.isParentCoinNeeded("MATIC", "PLG-20")
if (ticker === "FTM") return !General.isParentCoinNeeded("FTM", "FTM-20")
if (ticker === "AVAX") return !General.isParentCoinNeeded("AVAX", "AVX-20")
if (ticker === "BNB") return !General.isParentCoinNeeded("BNB", "BEP-20")
@@ -722,7 +727,11 @@ QtObject {
}
function isERC20(current_ticker_infos) {
- return current_ticker_infos.type === "ERC-20" || current_ticker_infos.type === "BEP-20" || current_ticker_infos.type == "Matic"
+ return current_ticker_infos.type === "ERC-20"
+ || current_ticker_infos.type === "BEP-20"
+ || current_ticker_infos.type == "PLG-20"
+ || current_ticker_infos.type == "FTM-20"
+ || current_ticker_infos.type == "AVX-20"
}
function isParentCoin(ticker) {
diff --git a/atomic_defi_design/Dex/Constants/Style.qml b/atomic_defi_design/Dex/Constants/Style.qml
index e53a2422bf..dd10970115 100644
--- a/atomic_defi_design/Dex/Constants/Style.qml
+++ b/atomic_defi_design/Dex/Constants/Style.qml
@@ -203,7 +203,7 @@ QtObject {
case 'QRC-20': return dark_theme ? colorCoinDark["QTUM"] : colorCoin["QTUM"]
case 'KRC-20': return dark_theme ? colorCoinDark["KCS"] : colorCoin["KCS"]
case 'Smart Chain': return dark_theme ? colorCoinDark["KMD"] : colorCoin["KMD"]
- case 'Matic': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"]
+ case 'PLG-20': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"]
case 'Moonriver': return dark_theme ? colorCoinDark["MOVR"] : colorCoin["MOVR"]
case 'HRC-20': return dark_theme ? colorCoinDark["ONE"] : colorCoin["ONE"]
case 'SmartBCH': return dark_theme ? colorCoinDark["SBCH"] : colorCoin["SBCH"]
@@ -245,7 +245,7 @@ QtObject {
case 'QRC-20': return dark_theme ? colorCoinDark["QTUM"] : colorCoin["QTUM"]
case 'KRC-20': return dark_theme ? colorCoinDark["KCS"] : colorCoin["KCS"]
case 'Smart Chain': return dark_theme ? colorCoinDark["KMD"] : colorCoin["KMD"]
- case 'Matic': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"]
+ case 'PLG-20': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"]
case 'Moonriver': return dark_theme ? colorCoinDark["MOVR"] : colorCoin["MOVR"]
case 'HRC-20': return dark_theme ? colorCoinDark["ONE"] : colorCoin["ONE"]
case 'SmartBCH': return dark_theme ? colorCoinDark["SBCH"] : colorCoin["SBCH"]
diff --git a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml
index ebea341ac2..0665bba275 100644
--- a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml
+++ b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml
@@ -398,7 +398,7 @@ ClipRRect // Trade Card
width: 60
- text: _selectedTickerIcon.enabled ? atomic_qt_utilities.retrieve_main_ticker(selectedTicker) : qsTr("Pick a coin")
+ text: _selectedTickerIcon.enabled ? atomic_qt_utilities.retrieve_main_ticker(selectedTicker, false, true) : qsTr("Pick a coin")
font.pixelSize: Constants.Style.textSizeSmall2
wrapMode: Text.NoWrap
@@ -580,7 +580,7 @@ ClipRRect // Trade Card
anchors.leftMargin: 10
width: 60
- text: enabled ? atomic_qt_utilities.retrieve_main_ticker(selectedOrder.coin) : ""
+ text: enabled ? atomic_qt_utilities.retrieve_main_ticker(selectedOrder.coin, false, true) : ""
font.pixelSize: Constants.Style.textSizeSmall2
wrapMode: Text.NoWrap
diff --git a/atomic_defi_design/Dex/Settings/AddCustomCoinModal.qml b/atomic_defi_design/Dex/Settings/AddCustomCoinModal.qml
index d3dd686fed..d48dffbc28 100644
--- a/atomic_defi_design/Dex/Settings/AddCustomCoinModal.qml
+++ b/atomic_defi_design/Dex/Settings/AddCustomCoinModal.qml
@@ -14,6 +14,9 @@ MultipageModal
id: root
width: 700
+ horizontalPadding: 20
+ verticalPadding: 20
+ closePolicy: Popup.NoAutoClose
onClosed:
{
@@ -22,7 +25,7 @@ MultipageModal
}
property var config_fields: ({})
- property var typeList: ["ERC-20", "QRC-20","BEP-20"]
+ property var typeList: ["ERC-20", "BEP-20"] // QRC removed due to unresolved issues and lack of use
readonly property var custom_token_data: API.app.settings_pg.custom_token_data
readonly property string general_message: qsTr('Get the contract address from')
readonly property bool fetching_custom_token_data_busy: API.app.settings_pg.fetching_custom_token_data_busy
@@ -67,7 +70,7 @@ MultipageModal
addToConfig(input_name, "name", input_name.field.text)
addToConfig(input_contract_address, "contract_address", input_contract_address.text)
addToConfig(input_active, "active", input_active.checked)
- addToConfig(input_coingecko_id, "coingecko_id", input_coingecko_id.field.text)
+ addToConfig(input_coingecko_id, "coingecko_id", input_coingecko_id.field.text)
fields['coinType'] = currentType.coinType
root.config_fields = General.clone(fields)
@@ -86,6 +89,24 @@ MultipageModal
{
id: type_model
+ // ListElement
+ // {
+ // text: "AVX-20"
+ // prefix: ""
+ // url: "https://snowtrace.io/tokens"
+ // name: 'SnowTrace'
+ // image: "avax"
+ // coinType: CoinType.AVX20
+ // }
+ ListElement
+ {
+ text: "BEP-20"
+ prefix: ""
+ url: "https://bscscan.com/tokens"
+ name: 'BscScan'
+ image: "bep"
+ coinType: CoinType.BEP20
+ }
ListElement
{
text: "ERC-20"
@@ -95,26 +116,26 @@ MultipageModal
name: 'Etherscan'
coinType: CoinType.ERC20
}
+ // ListElement
+ // {
+ // text: "PLG-20"
+ // prefix: ""
+ // image: "matic"
+ // url: "https://polygonscan.com/tokens"
+ // name: 'Polygonscan'
+ // coinType: CoinType.ERC20
+ // }
+
+ // ListElement
+ // {
+ // text: "QRC-20"
+ // prefix: "0x"
+ // image: "qrc"
+ // url: "https://explorer.qtum.org/tokens/search"
+ // name: 'QTUM Insight'
+ // coinType: CoinType.QRC20
+ // }
- ListElement
- {
- text: "QRC-20"
- prefix: "0x"
- image: "qrc"
- url: "https://explorer.qtum.org/tokens/search"
- name: 'QTUM Insight'
- coinType: CoinType.QRC20
- }
-
- ListElement
- {
- text: "BEP-20"
- prefix: ""
- url: "https://bscscan.com/tokens"
- name: 'BscScan'
- image: "bep"
- coinType: CoinType.BEP20
- }
}
readonly property bool has_contract_address: typeList.indexOf(input_type.currentText)!==-1
@@ -125,6 +146,9 @@ MultipageModal
{
titleText: qsTr("Choose the asset type")
height: 450
+ titleTopMargin: 0
+ topMarginAfterTitle: 10
+ flickMax: window.height - 480
DefaultComboBox
{
@@ -401,13 +425,13 @@ MultipageModal
// Preview
MultipageModalContent {
- titleText: qsTr("Preview")
+ titleText: qsTr("Preview Token Configuration")
DefaultText {
id: warning_message
visible: coin_name.visible
Layout.fillWidth: true
- text_value: qsTr("WARNING: Application will restart immidiately to apply the changes!")
+ text_value: qsTr("WARNING: Application will restart immediately to apply the changes!")
color: Style.colorRed
horizontalAlignment: Text.AlignHCenter
}
diff --git a/atomic_defi_design/Dex/Settings/SettingModal.qml b/atomic_defi_design/Dex/Settings/SettingModal.qml
index 0b4565e827..6fc3ea22c3 100644
--- a/atomic_defi_design/Dex/Settings/SettingModal.qml
+++ b/atomic_defi_design/Dex/Settings/SettingModal.qml
@@ -20,7 +20,6 @@ Qaterial.Dialog
{
id: setting_modal
property alias selectedMenuIndex: menu_list.currentIndex
- readonly property string mm2_version: API.app.settings_pg.get_mm2_version()
property var recommended_fiats: API.app.settings_pg.get_recommended_fiats()
property var fiats: API.app.settings_pg.get_available_fiats()
property var enableable_coins_count: enableable_coins_count_combo_box.currentValue
@@ -733,6 +732,29 @@ Qaterial.Dialog
onCopyNotificationMsg: qsTr("Qt Version copied to clipboard.")
}
}
+
+ RowLayout
+ {
+ width: parent.width - 30
+ anchors.horizontalCenter: parent.horizontalCenter
+ height: 60
+
+ DexLabel
+ {
+ Layout.alignment: Qt.AlignVCenter
+ Layout.fillWidth: true
+ text: qsTr("Peer ID")
+ }
+
+ DexCopyableLabel
+ {
+ Layout.alignment: Qt.AlignVCenter
+ text: API.app.settings_pg.get_peerid()
+ onCopyNotificationTitle: qsTr("Peer ID")
+ onCopyNotificationMsg: qsTr("Peer ID copied to clipboard.")
+ }
+ }
+
}
}
}
diff --git a/atomic_defi_design/Dex/Support/SupportModal.qml b/atomic_defi_design/Dex/Support/SupportModal.qml
index 591bf8587d..b850e3885e 100644
--- a/atomic_defi_design/Dex/Support/SupportModal.qml
+++ b/atomic_defi_design/Dex/Support/SupportModal.qml
@@ -110,16 +110,22 @@ Qaterial.Dialog
%1 enables you to natively trade across two different blockchain networks without proxy tokens. You can also place multiple orders with the same funds. For example, you can sell 0.1 BTC for KMD, QTUM, or VRSC — the first order that fills automatically cancels all other orders.").arg(API.app_name)
}
+ FAQLine
+ {
+ title: qsTr("Where can I see the orderbook or market statistics online?")
+ text: qsTr('You can view an online orderbook and market statistics at https://markets.atomicdex.io/, or use the Komodo Wallet in your browser at https://app.komodoplatform.com!')
+ }
+
FAQLine
{
title: qsTr("How long does each atomic swap take?")
- text: qsTr('Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a notarization.').arg(API.app_name)
+ text: qsTr('Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a notarization.').arg(API.app_name)
}
FAQLine
{
title: qsTr("Do I need to be online for the duration of the swap?")
- text: qsTr("Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker.
+ text: qsTr("Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline.
The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic.
@@ -202,7 +208,7 @@ There is a toggle in settings where you can turn on/off the display of these tra
Layout.preferredHeight: column_layout.height
hoverEnabled: true
- onClicked: Qt.openUrlExternally("https://github.com/KomodoPlatform/komodo-wallet-desktop/pull/2296")
+ onClicked: Qt.openUrlExternally("https://github.com/KomodoPlatform/komodo-wallet-desktop/pull/2388")
ColumnLayout
{
diff --git a/atomic_defi_design/assets/languages/atomic_defi_de.ts b/atomic_defi_design/assets/languages/atomic_defi_de.ts
index 2a7b4afc2f..2686cdcffb 100644
--- a/atomic_defi_design/assets/languages/atomic_defi_de.ts
+++ b/atomic_defi_design/assets/languages/atomic_defi_de.ts
@@ -58,148 +58,152 @@
AddCustomCoinModal
-
+
Erhalten Sie die Vertragsadresse von
-
+
Wählen Sie den Asset-Typ aus
-
+
Abbrechen
-
-
-
+
+
+
Weiter
-
+
Vertragsadresse
-
+
Geben Sie die Vertragsadresse ein
-
+
Wählen Sie den Asset-Ticker
-
+
Ticker
-
+
Geben Sie den Ticker ein
-
+
Erhalten Sie die Vertragsadresse von
-
-
-
-
+
+
+
+
Vorherige
-
+
Wählen Sie ein Logo für das Asset aus
-
+
Durchsuchen
-
+
Bitte wählen Sie für das Asset ein Logo aus
-
+
Konfiguration
-
+
Alle Konfigurationsfelder werden mit der von Ihnen angegebenen Vertragsadresse abgerufen.
-
+
Name
-
+
Geben Sie den Namen ein
-
+
Coingecko ID
-
+
Geben Sie die Coingecko-ID ein
-
+
Coingecko-ID erhalten
-
+
Aktiv
-
-
+
Vorschau
-
-
- WARNUNG: Die Anwendung wird sofort neu gestartet, um die Änderungen zu übernehmen!
+
+
+
+
+
+
+
+
Asset nicht gefunden, bitte gehen Sie zurück und stellen Sie sicher, dass die Vertragsadresse korrekt ist
-
+
Konfigurationsfelder
-
+
Abgerufene Daten
-
+
Bestätigen und Neu starten
@@ -1511,67 +1515,67 @@ Beispiel: Kennwort = 1234 Suffix=56 Eingabe beim Login=123456Betrag eingeben
-
+
Handelsgebühr
-
+
Mindesthandelsbetrag
-
+
WALLETNAME
Brieftasche %1 existiert bereits
-
+
Das %1 Guthaben ist niedriger als der Gebührenbetrag: %2 %3
-
+
Handelbares %1 Guthaben (nach Gebühren) ist niedriger als der Mindesthandelsbetrag
-
+
Bitte füllen Sie das Preisfeld aus
-
+
-
-
+
+
-
-
+
+
%1 Volumen ist niedriger als der minimale Handelsbetrag
-
-
+
+
%1 muss aktiviert werden, um %2 verwenden zu können
-
-
+
+
Das %1 Guthaben muss finanziert werden, ein Guthaben größer Null ist erforderlich, um das Benzin von %2 Transaktionen zu bezahlen
-
+
Unbekannter Fehler
@@ -3415,252 +3419,263 @@ Bitte wählen Sie eine neue Order aus.
SettingModal
-
-
+
+
Abbrechen
-
+
Einstellungen
-
+
Allgemein
-
+
Sprache
-
+
Benutzeroberfläche
-
+
Sicherheit
-
+
Desktop-Benachrichtigungen aktivieren
-
+
-
+
Maximale Anzahl aktivierter Coins
-
+
Protokolle
-
+
Ordner öffnen
-
+
-
+
-
+
-
+
Zurücksetzen
-
+
Aktuelle Schriftart
-
+
Aktuelle Schriftart in %1 geändert.
-
+
Thema
-
+
Design zu %1 geändert
-
+
2FA deaktivieren?
-
+
Geben Sie zur Bestätigung das Kennwort ihrer Brieftasche ein
-
+
Kennwort eingeben
-
+
2FA Status
-
+
2FA erfolgreich deaktiviert
-
-
+
+
Ok
-
+
Falsches Kennwort!
-
+
Kennwort der Brieftasche ist falsch
-
+
-
+
Anwendungsversion
-
+
In die Zwischenablage kopiert
-
+
Über & Version
-
-
+
+
Konfiguration der Brieftasche zurücksetzen
-
+
Dadurch wird Ihre Brieftasche mit den Standardeinstellungen neu gestartet
-
-
+
+
Bestätigen
-
+
Vor dem Senden von Coins nach dem Kennwort des Systems fragen? (2FA)
-
+
Seed- und privaten Schlüsseln anzeigen
-
-
+
+
Zeigen
-
+
Tarnkennwort einrichten
-
+
Öffnen
-
+
Haftungsausschluss und Nutzungsbedingungen
-
+
Anwendungsversion
-
+
MM2 Version
-
+
MM2 Version
-
+
MM2 Version in die Zwischenablage kopiert.
-
+
+
+
+
+
+
+
+
+
+
+
+
Qt Version
-
+
Qt Version
-
+
Qt Version in die Zwischenablage kopiert.
-
+
Update suchen
-
+
Abmelden
@@ -3897,19 +3912,19 @@ Bitte wählen Sie eine neue Order aus.
Wie lange dauert ein Atomic Swap?
-
-
-
- Mehrere Faktoren bestimmen die Bearbeitungszeit für einen Swap. Die Blockzeit der gehandelten Assets hängt vom jeweiligen Netzwerk ab (Bitcoin ist normalerweise das langsamste). Außerdem kann der Benutzer die Sicherheitseinstellungen anpassen. Zum Beispiel (können Sie %1 bitten, eine KMD-Transaktion nach nur 3 Bestätigungen als endgültig zu betrachten, wodurch die Tauschzeit kürzer wird als beim Warten auf eine <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">Beglaubigung </a>).
-
Muss ich für die Dauer des Austauschs online sein?
+
+
+
+
+
-
@@ -4546,7 +4553,7 @@ This might take a few minutes...
atomic_dex::settings_page
-
+
An error has occurred.
@@ -4554,62 +4561,62 @@ This might take a few minutes...
atomic_dex::wallet_page
-
+
You do not have enough funds.
Sie haben nicht genügend Kapital.
-
+
%1 is not activated: click on the button to enable it or enable it manually
%1 ist nicht aktiviert: Klicken Sie auf die Schaltfläche, um es zu aktivieren, oder aktivieren Sie es manuell
-
+
You need to have %1 to pay the gas for %2 transactions.
Sie benötigen %1, um das Benzin für %2 Transaktionen zu bezahlen.
-
+
Checksum verification failed for %1.
Überprüfung der Prüfsumme für %1 fehlgeschlagen.
-
+
Invalid checksum for %1. Click the button to convert to mixed case address.
Ungültige Prüfsumme für %1. Klicken Sie auf die Schaltfläche, um die Adresse in Groß-/Kleinschreibung umzuwandeln.
-
+
Legacy address used for %1. Click the button to convert to a Cashaddress.
Legacy-Adresse für %1 verwendet. Klicken Sie auf die Schaltfläche, um sie in eine Cashadresse umzuwandeln.
-
+
%1 address must be prefixed with 0x
%1 Adresse muss 0x vorangestellt werden
-
+
%1 address length is invalid, please use a valid address.
Länge der %1 Adresse ist ungültig, bitte verwenden Sie eine gültige Adresse.
-
+
%1 address is invalid.
%1 Adresse ist ungültig.
-
+
Invalid checksum.
Ungültige Prüfsumme.
-
+
%1 address has invalid prefixes.
%1 Adresse hat ungültige Vorsilben.
-
+
Backend error: %1
Backend Fehler: %1
diff --git a/atomic_defi_design/assets/languages/atomic_defi_en.ts b/atomic_defi_design/assets/languages/atomic_defi_en.ts
index c5f21ab0ca..ce47611e61 100644
--- a/atomic_defi_design/assets/languages/atomic_defi_en.ts
+++ b/atomic_defi_design/assets/languages/atomic_defi_en.ts
@@ -58,148 +58,152 @@
AddCustomCoinModal
-
+
Get the contract address from
-
+
Choose the asset type
-
+
Cancel
Cancel
-
-
-
+
+
+
Next
-
+
Contract address
-
+
Enter the contract address
-
+
Choose the asset ticker
-
+
Ticker
-
+
Enter the ticker
-
+
Get the contract address from
-
-
-
-
+
+
+
+
Previous
-
+
Choose the asset logo
-
+
Browse
-
+
Please choose the asset logo
-
+
Configuration
-
+
All configuration fields will be fetched using the contract address you provided.
-
+
Name
-
+
Enter the name
-
+
Coingecko ID
-
+
Enter the Coingecko ID
-
+
Get the Coingecko ID
-
+
Active
-
-
+
Preview
-
- WARNING: Application will restart immidiately to apply the changes!
+
+ Preview Token Configuration
+ WARNING: Application will restart immediately to apply the changes!
+
+
+
+
Asset not found, please go back and make sure Contract Address is correct
-
+
Config Fields
-
+
Fetched Data
-
+
Submit & Restart
@@ -1510,67 +1514,67 @@
-
+
Trading Fee
-
+
Minimum Trading Amount
-
+
Wallet %1 already exists
WALLETNAME
-
+
%1 balance is lower than the fees amount: %2 %3
-
+
Tradable (after fees) %1 balance is lower than minimum trade amount
-
+
Please fill the price field
-
+
Please fill the volume field
-
-
+
+
Please wait for %1 to fully activate
-
-
+
+
%1 volume is lower than minimum trade amount
-
-
+
+
%1 needs to be enabled in order to use %2
-
-
+
+
%1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions
-
+
Unknown Error
@@ -3413,252 +3417,263 @@ Please select a new order.
SettingModal
-
-
+
+
Cancel
Cancel
-
+
Settings
-
+
General
-
+
Language
-
+
User Interface
-
+
Security
-
+
Enable Desktop Notifications
-
+
Maximum number of enabled coins
-
+
Logs
-
+
Open Folder
-
+
Reset
-
+
Current Font
-
+
Current font changed to %1.
-
+
Theme
-
+
Changing theme to %1
-
+
Application Version
-
+
copied to clipboard
-
+
About & Version
-
+
Hide Poison Transactions in History
-
+
ZHTLC sync date
-
+
use date sync
-
+
Sync Date
-
-
+
+
Reset wallet configuration
-
+
This will restart your wallet with default settings
-
-
+
+
Confirm
-
+
Ask system's password before sending coins ? (2FA)
-
+
Disable 2FA?
-
+
Enter your wallet password to confirm
-
+
Type password
-
+
2FA status
-
+
2FA disabled successfully
-
-
+
+
Ok
-
+
Wrong password!
-
+
Wallet password is incorrect
-
+
View seed and private keys
-
-
+
+
Show
-
+
Setup Camouflage Password
-
+
Open
-
+
Reuse static RPC password
-
+
Disclaimer and ToS
-
+
Application version
-
+
MM2 version
-
+
MM2 Version
-
+
MM2 Version copied to clipboard.
-
+
+
+ Peer ID
+
+
+
+
+ Peer ID copied to clipboard.
+
+
+
+
Qt version
-
+
Qt Version
-
+
Qt Version copied to clipboard.
-
+
Search Update
-
+
Logout
@@ -3894,18 +3909,18 @@ Please select a new order.
-
- Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
+
+ Do I need to be online for the duration of the swap?
-
- Do I need to be online for the duration of the swap?
+
+ Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
- Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker.
+ Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline.
The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic.
@@ -4528,7 +4543,7 @@ This might take a few minutes...
atomic_dex::settings_page
-
+
An error has occurred.
@@ -4536,62 +4551,62 @@ This might take a few minutes...
atomic_dex::wallet_page
-
+
You do not have enough funds.
-
+
%1 is not activated: click on the button to enable it or enable it manually
-
+
You need to have %1 to pay the gas for %2 transactions.
-
+
Checksum verification failed for %1.
-
+
Invalid checksum for %1. Click the button to convert to mixed case address.
-
+
Legacy address used for %1. Click the button to convert to a Cashaddress.
-
+
%1 address must be prefixed with 0x
-
+
%1 address length is invalid, please use a valid address.
-
+
%1 address is invalid.
-
+
Invalid checksum.
-
+
%1 address has invalid prefixes.
-
+
Backend error: %1
diff --git a/atomic_defi_design/assets/languages/atomic_defi_es.ts b/atomic_defi_design/assets/languages/atomic_defi_es.ts
index f739653a59..6999f70a16 100644
--- a/atomic_defi_design/assets/languages/atomic_defi_es.ts
+++ b/atomic_defi_design/assets/languages/atomic_defi_es.ts
@@ -58,148 +58,152 @@
AddCustomCoinModal
-
+
Get the contract address from
Obtener la dirección del contrato de
-
+
Choose the asset type
Elija el tipo de activo
-
+
Cancel
Cancelar
-
-
-
+
+
+
Next
Siguiente
-
+
Contract address
Dirección del contrato
-
+
Enter the contract address
Ingrese la dirección del contrato
-
+
Choose the asset ticker
Elija el ticker del activo
-
+
Ticker
Ticker
-
+
Enter the ticker
Ingrese el ticker
-
+
Get the contract address from
Obtener la dirección del contrato de
-
-
-
-
+
+
+
+
Previous
Anterior
-
+
Choose the asset logo
Elija el logotipo del activo
-
+
Browse
Navegar
-
+
Please choose the asset logo
Elija el logotipo del activo
-
+
Configuration
Configuración
-
+
All configuration fields will be fetched using the contract address you provided.
Todos los campos de configuración se obtendrán usando la dirección del contrato que proporcionó.
-
+
Name
Nombre
-
+
Enter the name
Ingrese el nombre
-
+
Coingecko ID
Coingecko ID
-
+
Enter the Coingecko ID
Ingrese el Coingecko ID
-
+
Get the Coingecko ID
Obtener el Coingecko ID
-
+
Active
Activo
-
-
+
Preview
Vista previa
-
- WARNING: Application will restart immidiately to apply the changes!
- ADVERTENCIA: ¡La aplicación se reiniciará inmediatamente para aplicar los cambios!
+
+ Preview Token Configuration
+
+ WARNING: Application will restart immediately to apply the changes!
+
+
+
+
Asset not found, please go back and make sure Contract Address is correct
Activo no encontrado, regrese y asegúrese de que la dirección del contrato sea correcta
-
+
Config Fields
Campos de configuracion
-
+
Fetched Data
Datos obtenidos
-
+
Submit & Restart
Enviar & Reiniciar
@@ -1510,67 +1514,67 @@
Ingrese una cantidad
-
+
Trading Fee
Tarifa de Intercambio
-
+
Minimum Trading Amount
Cantidad Mínima de Intercambio
-
+
Wallet %1 already exists
WALLETNAME
Monedero %1 ya existe
-
+
%1 balance is lower than the fees amount: %2 %3
El saldo de %1 es inferior al monto de las tarifas: %2 %3
-
+
Tradable (after fees) %1 balance is lower than minimum trade amount
El saldo de %1 (después de las tarifas) es inferior al monto mínimo de intercambio
-
+
Please fill the price field
Por favor complete el campo de precio
-
+
Please fill the volume field
Complete el campo de volumen
-
-
+
+
Please wait for %1 to fully activate
Espere a que %1 se active por completo
-
-
+
+
%1 volume is lower than minimum trade amount
El volumen de %1 es inferior al monto mínimo de intercambio
-
-
+
+
%1 needs to be enabled in order to use %2
%1 debe habilitarse para usar %2
-
-
+
+
%1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions
se debe rellenar el saldo de %1, se requiere un saldo distinto de cero para pagar el gas de %2 transacciones
-
+
Unknown Error
Error Desconocido
@@ -3417,252 +3421,263 @@ Seleccione un nuevo pedido.
SettingModal
-
-
+
+
Cancel
Cancelar
-
+
Settings
Configuración
-
+
General
General
-
+
Language
Idioma
-
+
User Interface
Interfaz
-
+
Security
Seguridad
-
+
Enable Desktop Notifications
Habilitar notificaciones de escritorio
-
+
Maximum number of enabled coins
Número máximo de monedas habilitadas
-
+
Logs
Registros
-
+
Open Folder
Carpeta Abierta
-
+
Reset
Restablecer
-
+
Current Font
Fuente Actual
-
+
Current font changed to %1.
La fuente actual cambió a %1.
-
+
Theme
Tema
-
+
Changing theme to %1
Cambiando el tema a %1
-
+
Application Version
La versión de la aplicación
-
+
copied to clipboard
copiado al portapapeles
-
+
About & Version
Acerca de & Versión
-
+
Hide Poison Transactions in History
-
+
ZHTLC sync date
-
+
use date sync
-
+
Sync Date
-
-
+
+
Reset wallet configuration
Restablecer configuración de billetera
-
+
This will restart your wallet with default settings
Esto reiniciará su billetera con la configuración predeterminada
-
-
+
+
Confirm
Confirmar
-
+
Ask system's password before sending coins ? (2FA)
¿Preguntar la contraseña del sistema antes de enviar monedas? (2FA)
-
+
Disable 2FA?
¿Deshabilitar 2FA?
-
+
Enter your wallet password to confirm
Ingrese la contraseña de su billetera para confirmar
-
+
Type password
Escriba la contraseña
-
+
2FA status
Estado 2FA
-
+
2FA disabled successfully
2FA deshabilitado correctamente
-
-
+
+
Ok
Ok
-
+
Wrong password!
¡Contraseña incorrecta!
-
+
Wallet password is incorrect
Contraseña de la billetera es incorrecta
-
+
View seed and private keys
Ver semilla y claves privadas
-
-
+
+
Show
Mostrar
-
+
Setup Camouflage Password
Configuración de Contraseña Camuflaje
-
+
Open
Abrir
-
+
Reuse static RPC password
-
+
Disclaimer and ToS
Descargo de Responsabilidad y Terminos de Servicio
-
+
Application version
Versión de Aplicación
-
+
MM2 version
Versión MM2
-
+
MM2 Version
Versión MM2
-
+
MM2 Version copied to clipboard.
Versión MM2 copiada al portapapeles.
-
+
+
+ Peer ID
+
+
+
+
+ Peer ID copied to clipboard.
+
+
+
+
Qt version
Versión Qt
-
+
Qt Version
Versión Qt
-
+
Qt Version copied to clipboard.
Versión de Qt copiada al portapapeles.
-
+
Search Update
Buscar Actualizacion
-
+
Logout
Cerrar sesión
@@ -3899,19 +3914,19 @@ Seleccione un nuevo pedido.
How long does each atomic swap take?
¿Cuánto tiempo toma cada intercambio atómico?
-
-
- Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
- Varios factores determinan el tiempo de procesamiento de cada intercambio. El tiempo de bloqueo de los activos negociados depende de cada red (Bitcoin suele ser la más lenta). Además, el usuario puede personalizar las preferencias de seguridad. Por ejemplo, (puede pedirle a %1 que considere una transacción KMD como final después de solo 3 confirmaciones, lo que hace que el tiempo de intercambio sea más corto en comparación con esperar un <a href="https://komodoplatform.com/security-delayed- prueba de trabajo-dpow/">certificación notarial</a>.
-
Do I need to be online for the duration of the swap?
¿Necesito estar en línea durante la duración del intercambio?
+
+
+ Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
+
+
- Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker.
+ Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline.
The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic.
@@ -3920,15 +3935,7 @@ If you go offline, so will your orders, and any that are in progress will fail,
When you come back online, your orders will begin to broadcast again at the price you set before you went offline. If there has been significant price movement in the meantime, you might unintentionally offer someone a bargain!
For this reason, we recommend cancelling orders before closing %1, or reviewing and revising your prices when restarting %1.
- Sí. Debe permanecer conectado a Internet y tener su aplicación ejecutándose para completar con éxito cada intercambio atómico (las interrupciones muy breves en la conectividad generalmente están bien). De lo contrario, existe el riesgo de cancelación de la operación si es un creador y el riesgo de pérdida de fondos si es un tomador.
-
-El protocolo de intercambio atómico requiere que ambos participantes permanezcan en línea y monitoreen las cadenas de bloques involucradas para que el proceso permanezca atómico.
-
-Si se desconecta, también lo harán sus pedidos, y cualquiera que esté en curso fallará, lo que provocará una posible pérdida de tarifas comerciales / de transacción, y una espera para que el intercambio se agote y emita un reembolso. También puede afectar negativamente el puntaje de reputación de su billetera para futuras coincidencias comerciales.
-
-Cuando vuelva a estar en línea, sus pedidos comenzarán a transmitirse nuevamente al precio que estableció antes de desconectarse. Si ha habido un movimiento de precios significativo en el ínterin, ¡es posible que involuntariamente le ofrezcas a alguien una ganga!
-
-Por este motivo, recomendamos cancelar los pedidos antes de cerrar %1 o revisar y revisar sus precios al reiniciar %1.
+
@@ -4549,7 +4556,7 @@ Esto puede tardar unos minutos...
atomic_dex::settings_page
-
+
An error has occurred.
Se ha producido un error.
@@ -4557,62 +4564,62 @@ Esto puede tardar unos minutos...
atomic_dex::wallet_page
-
+
You do not have enough funds.
No tiene fondos suficientes.
-
+
%1 is not activated: click on the button to enable it or enable it manually
%1 no está activado: haga clic en el botón para habilitarlo o habilítelo manualmente
-
+
You need to have %1 to pay the gas for %2 transactions.
Necesita tener %1 para pagar la gasolina de %2 transacciones.
-
+
Checksum verification failed for %1.
La verificación de la suma de comprobación falló para %1.
-
+
Invalid checksum for %1. Click the button to convert to mixed case address.
Suma de comprobación no válida para %1. Haga clic en el botón para convertir a dirección de mayúsculas y minúsculas.
-
+
Legacy address used for %1. Click the button to convert to a Cashaddress.
Dirección heredada utilizada para %1. Haga clic en el botón para convertir a una dirección de efectivo.
-
+
%1 address must be prefixed with 0x
La dirección %1 debe tener el prefijo 0x
-
+
%1 address length is invalid, please use a valid address.
La longitud de la dirección %1 no es válida, utilice una dirección válida.
-
+
%1 address is invalid.
La dirección %1 no es válida.
-
+
Invalid checksum.
Suma de comprobación no válida.
-
+
%1 address has invalid prefixes.
La dirección %1 tiene prefijos no válidos.
-
+
Backend error: %1
Error de backend: %1
diff --git a/atomic_defi_design/assets/languages/atomic_defi_fr.ts b/atomic_defi_design/assets/languages/atomic_defi_fr.ts
index c342c96189..6322084b96 100644
--- a/atomic_defi_design/assets/languages/atomic_defi_fr.ts
+++ b/atomic_defi_design/assets/languages/atomic_defi_fr.ts
@@ -58,148 +58,152 @@
AddCustomCoinModal
-
+
Choose the asset type
Choisir le type d'actif
-
+
Cancel
Annuler
-
-
-
+
+
+
Next
Suivant
-
+
Enter the contract address
Entrer l'adresse du contrat
-
+
Choose the asset ticker
Choisissez le symbole de l'actif
-
+
Ticker
Symbole
-
+
Enter the ticker
Entrez le symbole
-
+
Get the contract address from
Obtenez l'adresse du contrat de
-
+
Contract address
-
+
Get the contract address from
Obtenez l'adresse du contrat de
-
-
-
-
+
+
+
+
Previous
Précedent
-
+
Choose the asset logo
Choisissez le logo de l'actif
-
+
Browse
Naviguer
-
+
Please choose the asset logo
S'il-vous-plaît choissisez le logo de l'actif
-
+
Configuration
Configuration
-
+
All configuration fields will be fetched using the contract address you provided.
Tous les champs de configuration vont être récupérés à partir de l'adresse du contrat que vous avez fournis.
-
+
Name
Nom
-
+
Enter the name
Entrez le nom
-
+
Coingecko ID
Coingecko ID
-
+
Enter the Coingecko ID
Entrer l'identifiant coingecko
-
+
Get the Coingecko ID
Récupérer l'identifiant coingecko
-
+
Active
Actif
-
-
+
Preview
Pré-visualisation
-
- WARNING: Application will restart immidiately to apply the changes!
- AVERTISSEMENT: l'application redémarrera immédiatement pour appliquer les modifications!
+
+ Preview Token Configuration
+
+ WARNING: Application will restart immediately to apply the changes!
+
+
+
+
Asset not found, please go back and make sure Contract Address is correct
Actif introuvable, veuillez revenir en arrière et vous assurer que l'adresse du contrat est correcte
-
+
Config Fields
Champs de configuration
-
+
Fetched Data
Données récupérées
-
+
Submit & Restart
Soumettre et redémarrer
@@ -1510,67 +1514,67 @@
Entrez un montant
-
+
Trading Fee
Frais d'échanges
-
+
Minimum Trading Amount
Frais d'échange minimum
-
+
Wallet %1 already exists
WALLETNAME
Le portefeuille %1 existe déjà
-
+
%1 balance is lower than the fees amount: %2 %3
La %1 balance est inférieur aux frais: %2 %3
-
+
Tradable (after fees) %1 balance is lower than minimum trade amount
Le solde négociable (après frais) %1 est inférieur au montant minimum de la transaction
-
+
Please fill the price field
Veuillez remplir le champ de prix
-
+
Please fill the volume field
-
-
+
+
Please wait for %1 to fully activate
-
-
+
+
%1 volume is lower than minimum trade amount
Le volume de %1 est inférieur au montant minimum de la transaction
-
-
+
+
%1 needs to be enabled in order to use %2
%1 doit être activé pour utiliser %2
-
-
+
+
%1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions
Le solde %1 doit être financé, un solde différent de zéro est requis pour payer les frais de transactions de %2
-
+
Unknown Error
Erreur inconnue
@@ -3413,252 +3417,263 @@ Please select a new order.
SettingModal
-
-
+
+
Cancel
Annuler
-
+
Settings
Réglages
-
+
Language
Langue
-
+
User Interface
Interface utilsateur
-
+
Security
Sécurité
-
+
General
Général
-
+
About & Version
À propos & version
-
+
Enable Desktop Notifications
Activer les notifications
-
+
Hide Poison Transactions in History
-
+
Maximum number of enabled coins
Nombre maximum d'actifs activés
-
+
Logs
Journaux
-
+
Open Folder
Ouvrir le dossier
-
+
ZHTLC sync date
-
+
use date sync
-
+
Sync Date
-
-
+
+
Reset wallet configuration
Réinitialiser la configuration du portefeuille
-
+
This will restart your wallet with default settings
Cela redémarrera votre portefeuille avec les paramètres par défaut
-
-
+
+
Confirm
Confirmer
-
+
Changing theme to %1
Changer le thème en %1
-
+
Disable 2FA?
-
+
Enter your wallet password to confirm
-
+
Type password
Tapez votre mot de passe
-
+
2FA status
-
+
2FA disabled successfully
-
-
+
+
Ok
Ok
-
+
Wrong password!
-
+
Wallet password is incorrect
-
+
Reuse static RPC password
-
+
Application Version
-
+
copied to clipboard
copié dans le presse-papier
-
+
Reset
Réinitialiser
-
+
Current Font
Police actuelle
-
+
Current font changed to %1.
La police actuelle est passée à %1.
-
+
Theme
Thème
-
+
Ask system's password before sending coins ? (2FA)
Demander le mot de passe du système avant d'envoyer des actifs ? (2FA)
-
+
Application version
Version de l'application
-
+
MM2 version
Version de MM2
-
+
MM2 Version
MM2 Version
-
+
MM2 Version copied to clipboard.
MM2 Version copiée dans le presse-papiers.
-
+
+
+ Peer ID
+
+
+
+
+ Peer ID copied to clipboard.
+
+
+
+
Qt version
Version de Qt
-
+
Qt Version
Qt Version
-
+
Qt Version copied to clipboard.
Version Qt copiée dans le presse-papiers.
-
+
Search Update
Rechercher une mise à jour
-
+
Logout
Se déconnecter
-
+
View seed and private keys
Afficher la phrase de récupération et les clefs privées
-
-
+
+
Show
Montrer
-
+
Setup Camouflage Password
Configurer le mot de passe de camouflage
-
+
Open
Ouvrir
-
+
Disclaimer and ToS
Clause de non-responsabilité et conditions d'utilisation
@@ -3893,21 +3908,19 @@ Please select a new order.
How long does each atomic swap take?
Combien de temps dure chaque échange atomique ?
-
-
- Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
- Les autres DEX ne vous permettent généralement d'échanger que des actifs basés sur un seul réseau de blockchain, d'utiliser des jetons proxy et de ne passer qu'une seule commande avec les mêmes fonds.
-
-Plusieurs facteurs déterminent le temps de traitement de chaque swap. Le temps de blocage des actifs échangés dépend de chaque réseau (Bitcoin étant généralement le plus lent). De plus, l'utilisateur peut personnaliser ses préférences de sécurité. Par exemple, (vous pouvez demander à %1 de considérer une transaction KMD comme finale après seulement 3 confirmations, ce qui raccourcit le temps d'échange par rapport à l'attente d'une <a href="https://komodoplatform.com/security-delayed-proof- of-work-dpow/">notarisation</a>.
-
Do I need to be online for the duration of the swap?
Dois-je être en ligne pendant toute la durée du swap ?
+
+
+ Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
+
+
- Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker.
+ Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline.
The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic.
@@ -4530,7 +4543,7 @@ This might take a few minutes...
atomic_dex::settings_page
-
+
An error has occurred.
@@ -4538,62 +4551,62 @@ This might take a few minutes...
atomic_dex::wallet_page
-
+
You do not have enough funds.
Vous n'avez pas assez de fonds.
-
+
%1 is not activated: click on the button to enable it or enable it manually
%1 n'est pas activé : cliquez sur le bouton pour l'activer ou l'activer manuellement
-
+
You need to have %1 to pay the gas for %2 transactions.
Vous devez avoir %1 activée pour payer les frais de transactions de %2.
-
+
Checksum verification failed for %1.
Échec de la vérification du checksum de contrôle pour %1.
-
+
Invalid checksum for %1. Click the button to convert to mixed case address.
-
+
Legacy address used for %1. Click the button to convert to a Cashaddress.
-
+
%1 address must be prefixed with 0x
L'adresse %1 doit être précédée de 0x
-
+
%1 address length is invalid, please use a valid address.
La longueur de l'adresse %1 n'est pas valide, veuillez utiliser une adresse valide.
-
+
%1 address is invalid.
L'adresse %1 n'est pas valide.
-
+
Invalid checksum.
Somme de contrôle invalide.
-
+
%1 address has invalid prefixes.
L'adresse %1 a des préfixes non valides.
-
+
Backend error: %1
Erreur de backend : %1
diff --git a/atomic_defi_design/assets/languages/atomic_defi_ru.ts b/atomic_defi_design/assets/languages/atomic_defi_ru.ts
index bca0ddeeae..b45eb47eba 100644
--- a/atomic_defi_design/assets/languages/atomic_defi_ru.ts
+++ b/atomic_defi_design/assets/languages/atomic_defi_ru.ts
@@ -58,148 +58,152 @@
AddCustomCoinModal
-
+
Choose the asset type
Выберите тип монеты
-
+
Cancel
Отменить
-
-
-
+
+
+
Next
Далее
-
+
Enter the contract address
Введите адрес контракта
-
+
Choose the asset ticker
Введите тикер монеты
-
+
Ticker
Тикер
-
+
Enter the ticker
Введите тикер
-
+
Get the contract address from
Получить адрес контракта от
-
+
Contract address
-
+
Get the contract address from
Получить адрес контракта от
-
-
-
-
+
+
+
+
Previous
Назад
-
+
Choose the asset logo
Загрузите логотип монеты
-
+
Browse
Выбрать
-
+
Please choose the asset logo
Выберите логотип монеты
-
+
Configuration
Конфигурация
-
+
All configuration fields will be fetched using the contract address you provided.
Все параметры конфигурации будут получены с помощью адреса контракта.
-
+
Name
Название
-
+
Enter the name
Введите название
-
+
Coingecko ID
Coingecko ID
-
+
Enter the Coingecko ID
Введите Coingecko ID
-
+
Get the Coingecko ID
Получить Coingecko ID
-
+
Active
Активно
-
-
+
Preview
Превью
-
- WARNING: Application will restart immidiately to apply the changes!
- ПРЕДУПРЕЖДЕНИЕ: Приложение будет немедленно перезапущено для применения изменений!
+
+ Preview Token Configuration
+
+ WARNING: Application will restart immediately to apply the changes!
+
+
+
+
Asset not found, please go back and make sure Contract Address is correct
Токен не найден, убедитесь, что адрес контракта указан верно
-
+
Config Fields
Параметры конфигурации
-
+
Fetched Data
Полученные данные
-
+
Submit & Restart
Отправить и перезапустить
@@ -1516,67 +1520,67 @@
Введите количество
-
+
Trading Fee
Торговая комиссия
-
+
Minimum Trading Amount
Минимальный объем сделки
-
+
Wallet %1 already exists
WALLETNAME
Кошелек %1 уже существует
-
+
%1 balance is lower than the fees amount: %2 %3
%1 баланс менее чем размер комиссий: %2 %3
-
+
Tradable (after fees) %1 balance is lower than minimum trade amount
Торгуемый (после комиссий) баланс %1 - меньше минимальной суммы сделки
-
+
Please fill the price field
Пожалуйста, укажите цену
-
+
Please fill the volume field
-
-
+
+
Please wait for %1 to fully activate
-
-
+
+
%1 volume is lower than minimum trade amount
Сумма %1 меньше минимальной суммы сделки
-
-
+
+
%1 needs to be enabled in order to use %2
%1 должен быть активным для использования %2
-
-
+
+
%1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions
нужно пополнить баланс %1 для оплаты газа %2 транзакций
-
+
Unknown Error
Неизвестная ошибка
@@ -3419,252 +3423,263 @@ Please select a new order.
SettingModal
-
-
+
+
Cancel
Отмена
-
+
Settings
Настройки
-
+
Language
Язык
-
+
User Interface
Интерфейс
-
+
Security
Приватность
-
+
General
Общие
-
+
About & Version
О программе
-
+
Enable Desktop Notifications
Включить уведомления для рабочего стола
-
+
Hide Poison Transactions in History
-
+
Maximum number of enabled coins
Макс. количество активированных монет
-
+
Logs
Логи
-
+
Open Folder
Открыть папку с логами
-
+
ZHTLC sync date
-
+
use date sync
-
+
Sync Date
-
-
+
+
Reset wallet configuration
Сбросить конфигурацию кошелька
-
+
This will restart your wallet with default settings
Эта опция перезапустит ваш кошелек с настройками по умолчанию
-
-
+
+
Confirm
Подтвердить
-
+
Changing theme to %1
Изменить тему на %1
-
+
Disable 2FA?
-
+
Enter your wallet password to confirm
-
+
Type password
Введите пароль
-
+
2FA status
-
+
2FA disabled successfully
-
-
+
+
Ok
Ок
-
+
Wrong password!
-
+
Wallet password is incorrect
-
+
Reuse static RPC password
-
+
Application Version
-
+
copied to clipboard
скопировано в буфер
-
+
Reset
Сбросить
-
+
Current Font
Текущий шрифт
-
+
Current font changed to %1.
Текущий шрифт изменен на %1.
-
+
Theme
Тема
-
+
Ask system's password before sending coins ? (2FA)
Спрашивать системный пароль перед отправкой монет? (2FA)
-
+
Application version
Версия приложения
-
+
MM2 version
Версия MM2
-
+
MM2 Version
Версия MM2
-
+
MM2 Version copied to clipboard.
Версия MM2 скопирована в буфер обмена.
-
+
+
+ Peer ID
+
+
+
+
+ Peer ID copied to clipboard.
+
+
+
+
Qt version
Версия Qt
-
+
Qt Version
Версия Qt
-
+
Qt Version copied to clipboard.
Версия Qt скопирована в буфер обмена.
-
+
Search Update
Проверить на обновления
-
+
Logout
Выход
-
+
View seed and private keys
Показать seed-фразу и приватные ключи
-
-
+
+
Show
Показать
-
+
Setup Camouflage Password
Установить камуфляжный пароль
-
+
Open
Установить
-
+
Disclaimer and ToS
Дисклеймер и Условия Использования
@@ -3899,19 +3914,19 @@ Please select a new order.
How long does each atomic swap take?
Сколько времени занимает каждый атомарный своп?
-
-
- Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
- Несколько факторов определяют время завершения каждого Атомарного Свопа. Время блока на каждой из торгуемых сетей (Bitcoin обычно самый медленный) В добавок каждый юзер может кастомизировать опции защиты. Например в пред-настройках Свопа, (вы можете установить %1 так чтобы протокол считал транзакцию KMD финальной как только она получит всего 3 подтверждения что уменьшает время Атомарного Свопа в сравнении с ожиданием <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">нотаризации</a>.
-
Do I need to be online for the duration of the swap?
Необходимо ли мне быть в сети во время свопа?
+
+
+ Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
+
+
- Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker.
+ Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline.
The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic.
@@ -4534,7 +4549,7 @@ This might take a few minutes...
atomic_dex::settings_page
-
+
An error has occurred.
@@ -4542,62 +4557,62 @@ This might take a few minutes...
atomic_dex::wallet_page
-
+
You do not have enough funds.
У вас не достаточно средств.
-
+
%1 is not activated: click on the button to enable it or enable it manually
%1 не активирован: нажмите на кнопку чтобы активировать или сделайте это вручную
-
+
You need to have %1 to pay the gas for %2 transactions.
Вам нужен %1 для оплаты газа за %2 транзакции.
-
+
Checksum verification failed for %1.
Checksum верфикация неуспешна для %1.
-
+
Invalid checksum for %1. Click the button to convert to mixed case address.
-
+
Legacy address used for %1. Click the button to convert to a Cashaddress.
-
+
%1 address must be prefixed with 0x
%1 адрес должен начинаться с 0x
-
+
%1 address length is invalid, please use a valid address.
%1 длина адреса не валидна, пожалуйста используйте валидный адрес.
-
+
%1 address is invalid.
некорректный адрес %1.
-
+
Invalid checksum.
Неверная чек-сумма.
-
+
%1 address has invalid prefixes.
у адреса %1 неверный префикс.
-
+
Backend error: %1
Ошибка бэкенда: %1
diff --git a/atomic_defi_design/assets/languages/atomic_defi_tr.ts b/atomic_defi_design/assets/languages/atomic_defi_tr.ts
index 6b3fca8014..ad83b47c82 100644
--- a/atomic_defi_design/assets/languages/atomic_defi_tr.ts
+++ b/atomic_defi_design/assets/languages/atomic_defi_tr.ts
@@ -58,148 +58,152 @@
AddCustomCoinModal
-
+
Choose the asset type
Varlık türünü seçin
-
+
Cancel
İptal
-
-
-
+
+
+
Next
İleri
-
+
Enter the contract address
Kontrat adresini girin
-
+
Choose the asset ticker
Varlık kodunu girin
-
+
Ticker
Varlık Kodu
-
+
Enter the ticker
Varlık kodunu girin
-
+
Get the contract address from
Kontrat adresini şuradan alın
-
+
Contract address
-
+
Get the contract address from
Kontrat adresini şuradan alın
-
-
-
-
+
+
+
+
Previous
Geri
-
+
Choose the asset logo
Varlık logosunu seçin
-
+
Browse
Göz at
-
+
Please choose the asset logo
Lütfen varlık logosunu seçin
-
+
Configuration
Konfigürasyon
-
+
All configuration fields will be fetched using the contract address you provided.
Tüm konfigürasyon bilgileri verdiğiniz kontrat adresinden edinilip doldurulacak.
-
+
Name
İsim
-
+
Enter the name
İsmi girin
-
+
Coingecko ID
Coingecko ID
-
+
Enter the Coingecko ID
Coingecko ID'sini girin
-
+
Get the Coingecko ID
Coingecko ID'si al
-
+
Active
Aktif
-
-
+
Preview
Görüntüle
-
- WARNING: Application will restart immidiately to apply the changes!
- DİKKAT: Program değişiklikleri uygulamak için yeniden başlatılacak!
+
+ Preview Token Configuration
+
+ WARNING: Application will restart immediately to apply the changes!
+
+
+
+
Asset not found, please go back and make sure Contract Address is correct
Varlık bulunamadı, lütfen geri dönün ve Kontrat Adresi'nin doğruluğundan emin olun
-
+
Config Fields
Konfig Alanları
-
+
Fetched Data
Çekilen Veri
-
+
Submit & Restart
Yolla ve Yeniden Başlat
@@ -1504,67 +1508,67 @@
Bir miktar gir
-
+
Trading Fee
Takas Ücreti
-
+
Minimum Trading Amount
Minimum Takas Hacmi
-
+
Wallet %1 already exists
WALLETNAME
%1 cüzdanı zaten mevcut
-
+
%1 balance is lower than the fees amount: %2 %3
%1 bakiye ücret tutarının altında: %2 %3
-
+
Tradable (after fees) %1 balance is lower than minimum trade amount
Takas edilebilir (ücretlerden sonra)%1 bakiyesi minimum işlem ücretinden düşük
-
+
Please fill the price field
Lütfen fiyat alanını doldurun
-
+
Please fill the volume field
-
-
+
+
Please wait for %1 to fully activate
-
-
+
+
%1 volume is lower than minimum trade amount
%1 hacmi, minimum işlem ücretinden düşük
-
-
+
+
%1 needs to be enabled in order to use %2
-
-
+
+
%1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions
-
+
Unknown Error
Bilinmeyen Hata
@@ -3407,252 +3411,263 @@ Please select a new order.
SettingModal
-
-
+
+
Cancel
İptal
-
+
Settings
Ayarlar
-
+
Language
Dil
-
+
User Interface
Kullanıcı Arayüzü
-
+
Security
Güvenlik
-
+
General
Genel
-
+
About & Version
-
+
Enable Desktop Notifications
Masaüstü Bildirimlerini Aktif Et
-
+
Hide Poison Transactions in History
-
+
Maximum number of enabled coins
Maksimum etkin koin sayısı
-
+
Logs
Günlük Kaydı
-
+
Open Folder
Klasörü Aç
-
+
ZHTLC sync date
-
+
use date sync
-
+
Sync Date
-
-
+
+
Reset wallet configuration
-
+
This will restart your wallet with default settings
-
-
+
+
Confirm
Onayla
-
+
Changing theme to %1
-
+
Disable 2FA?
-
+
Enter your wallet password to confirm
-
+
Type password
-
+
2FA status
-
+
2FA disabled successfully
-
-
+
+
Ok
Tamam
-
+
Wrong password!
-
+
Wallet password is incorrect
-
+
Reuse static RPC password
-
+
Application Version
-
+
copied to clipboard
-
+
Reset
Sıfırla
-
+
Current Font
Geçerli Yazı Tipi
-
+
Current font changed to %1.
-
+
Theme
Tema
-
+
Ask system's password before sending coins ? (2FA)
Para göndermeden önce sistem parolası sorulsun mu ? (2FA)
-
+
Application version
Uygulama sürümü
-
+
MM2 version
MM2 sürümü
-
+
MM2 Version
-
+
MM2 Version copied to clipboard.
-
+
+
+ Peer ID
+
+
+
+
+ Peer ID copied to clipboard.
+
+
+
+
Qt version
Qt sürümü
-
+
Qt Version
-
+
Qt Version copied to clipboard.
-
+
Search Update
Güncelleme Ara
-
+
Logout
Çıkış
-
+
View seed and private keys
Seed ve özel anahtarları görüntüle
-
-
+
+
Show
Göster
-
+
Setup Camouflage Password
Kamuflaj Parolasını Ayarla
-
+
Open
Aç
-
+
Disclaimer and ToS
Sorumluluk Reddi ve K.Ş.
@@ -3887,19 +3902,19 @@ Please select a new order.
How long does each atomic swap take?
Her bir atomik takas ne kadar sürer?
-
-
- Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
- Her takas için işlem süresini birkaç faktör belirler. İşlem gören varlıkların blok süresi her bir ağa bağlıdır (Bitcoin tipik olarak en yavaş olanıdır) Ek olarak, kullanıcı güvenlik tercihlerini özelleştirebilir. (Örneğin; %1 in KMD işlemini sadece 3 onayla gerçekleştirmesini seçerek takas süresini <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarizasyon</a> süresinden daha öncesine kısaltabilirsiniz.
-
Do I need to be online for the duration of the swap?
Takas süresi boyunca çevrimiçi olmam gerekir mi?
+
+
+ Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>.
+
+
- Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker.
+ Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline.
The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic.
@@ -4522,7 +4537,7 @@ This might take a few minutes...
atomic_dex::settings_page
-
+
An error has occurred.
@@ -4530,62 +4545,62 @@ This might take a few minutes...
atomic_dex::wallet_page
-
+
You do not have enough funds.
Bakiye yetersiz.
-
+
%1 is not activated: click on the button to enable it or enable it manually
%1 etkinleştirilmedi: etkinleştirmek için düğmeye tıklayın veya manuel olarak etkinleştirin
-
+
You need to have %1 to pay the gas for %2 transactions.
%2 işlemi için gaz ödemek üzere %1'e sahip olmanız gerekir.
-
+
Checksum verification failed for %1.
%1 için sağlama toplamı doğrulaması başarısız oldu.
-
+
Invalid checksum for %1. Click the button to convert to mixed case address.
-
+
Legacy address used for %1. Click the button to convert to a Cashaddress.
-
+
%1 address must be prefixed with 0x
%1 adresinin önüne 0x konulmalı
-
+
%1 address length is invalid, please use a valid address.
%1 adres uzunluğu geçersiz, lütfen geçerli bir adres kullanın.
-
+
%1 address is invalid.
-
+
Invalid checksum.
-
+
%1 address has invalid prefixes.
-
+
Backend error: %1
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0bbc1a0a12..f5d49ac68a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -113,9 +113,9 @@ add_executable(${PROJECT_NAME}_tests MACOSX_BUNDLE ${ICON}
##! API
tests/api/coingecko/coingecko.tests.cpp
tests/api/komodo_prices/komodo.prices.tests.cpp
- tests/api/mm2/mm2.api.format.address.tests.cpp
- tests/api/mm2/mm2.api.utxo.merge.params.tests.cpp
- tests/api/mm2/mm2.api.balance.infos.tests.cpp
+ tests/api/mm2/mm2.api.address_format.tests.cpp
+ tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp
+ tests/api/mm2/mm2.api.balance_infos.tests.cpp
tests/api/mm2/mm2.fraction.tests.cpp
tests/api/mm2/mm2.rpc2.trade_preimage.tests.cpp
diff --git a/src/app/app.cpp b/src/app/app.cpp
index e420b07183..8f7df9c613 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -530,9 +530,15 @@ namespace atomic_dex
{
SPDLOG_DEBUG("on_coin_fully_initialized_event");
#if !defined(_WIN32)
- for (auto&& ticker: evt.tickers) { m_portfolio_queue.push(strdup(ticker.c_str())); }
+ for (auto&& ticker: evt.tickers) {
+ SPDLOG_DEBUG("Adding {} to m_portfolio_queue", ticker);
+ m_portfolio_queue.push(strdup(ticker.c_str()));
+ }
#else
- for (auto&& ticker: evt.tickers) { m_portfolio_queue.push(_strdup(ticker.c_str())); }
+ for (auto&& ticker: evt.tickers) {
+ SPDLOG_DEBUG("Adding {} to m_portfolio_queue", ticker);
+ m_portfolio_queue.push(_strdup(ticker.c_str()));
+ }
#endif
}
}
@@ -557,6 +563,7 @@ namespace atomic_dex
QString application::get_balance(const QString& coin)
{
std::error_code ec;
+ SPDLOG_DEBUG("{} l{}", __FUNCTION__, __LINE__);
auto res = get_mm2().my_balance(coin.toStdString(), ec);
return QString::fromStdString(res);
}
@@ -567,6 +574,7 @@ namespace atomic_dex
system_manager_.get_system().set_status("enabling_coins");
}
+ // Function appears to be unused.
void application::refresh_orders_and_swaps()
{
auto& mm2 = get_mm2();
diff --git a/src/core/atomicdex/api/coingecko/coingecko.cpp b/src/core/atomicdex/api/coingecko/coingecko.cpp
index 673a9253cb..8a6138d9fa 100644
--- a/src/core/atomicdex/api/coingecko/coingecko.cpp
+++ b/src/core/atomicdex/api/coingecko/coingecko.cpp
@@ -103,7 +103,7 @@ namespace atomic_dex::coingecko::api
}
std::pair, t_coingecko_registry>
- from_enabled_coins(const std::vector& coins)
+ from_enabled_coins(const std::vector& coins)
{
std::vector out;
t_coingecko_registry registry;
diff --git a/src/core/atomicdex/api/coingecko/coingecko.hpp b/src/core/atomicdex/api/coingecko/coingecko.hpp
index 88625c0a10..578db408ce 100644
--- a/src/core/atomicdex/api/coingecko/coingecko.hpp
+++ b/src/core/atomicdex/api/coingecko/coingecko.hpp
@@ -63,8 +63,8 @@ namespace atomic_dex::coingecko::api
ENTT_API std::string to_coingecko_uri(market_infos_request&& request);
ENTT_API std::string to_coingecko_uri(market_chart_request&& request);
ENTT_API std::string to_coingecko_uri(market_chart_request_range&& request);
- using t_coins_registry = std::unordered_map;
- ENTT_API std::pair, t_coingecko_registry> from_enabled_coins(const std::vector& coins);
+ using t_coins_registry = std::unordered_map;
+ ENTT_API std::pair, t_coingecko_registry> from_enabled_coins(const std::vector& coins);
ENTT_API pplx::task async_market_infos(market_infos_request&& request);
ENTT_API pplx::task async_market_charts(market_chart_request&& request);
diff --git a/src/core/atomicdex/api/mm2/format.address.cpp b/src/core/atomicdex/api/mm2/address_format.cpp
similarity index 72%
rename from src/core/atomicdex/api/mm2/format.address.cpp
rename to src/core/atomicdex/api/mm2/address_format.cpp
index 58a47ba160..d4320ed7d7 100644
--- a/src/core/atomicdex/api/mm2/format.address.cpp
+++ b/src/core/atomicdex/api/mm2/address_format.cpp
@@ -18,14 +18,28 @@
#include
//! Project Headers
-#include "format.address.hpp"
+#include "atomicdex/api/mm2/address_format.hpp"
namespace atomic_dex::mm2
{
void
- to_json(nlohmann::json& j, const format_address& cfg)
+ to_json(nlohmann::json& j, const address_format_t& req)
{
- j["format"] = cfg.format;
- j["network"] = cfg.network;
+ j["format"] = req.format;
+ if (req.network.has_value())
+ {
+ j["network"] = req.network.value();
+ }
+ }
+
+ void
+ from_json(const nlohmann::json& j, address_format_t& resp)
+ {
+ resp.format = j.at("format").get();
+ if (j.contains("network"))
+ {
+ resp.network = j.at("network").get();
+ }
+
}
} // namespace atomic_dex::mm2
\ No newline at end of file
diff --git a/src/core/atomicdex/api/mm2/format.address.hpp b/src/core/atomicdex/api/mm2/address_format.hpp
similarity index 83%
rename from src/core/atomicdex/api/mm2/format.address.hpp
rename to src/core/atomicdex/api/mm2/address_format.hpp
index 9f2fae89e3..7b68961d12 100644
--- a/src/core/atomicdex/api/mm2/format.address.hpp
+++ b/src/core/atomicdex/api/mm2/address_format.hpp
@@ -21,11 +21,11 @@
namespace atomic_dex::mm2
{
- struct format_address
+ struct address_format_t
{
- std::string format;
- std::string network;
+ std::string format;
+ std::optional network{std::nullopt};
};
-
- void to_json(nlohmann::json& j, const format_address& cfg);
+ void to_json(nlohmann::json& j, const address_format_t& cfg);
+ void from_json(const nlohmann::json& j, address_format_t& cfg);
}
\ No newline at end of file
diff --git a/src/core/atomicdex/api/mm2/balance.infos.cpp b/src/core/atomicdex/api/mm2/balance_infos.cpp
similarity index 98%
rename from src/core/atomicdex/api/mm2/balance.infos.cpp
rename to src/core/atomicdex/api/mm2/balance_infos.cpp
index d71b8f1c1f..9140372b71 100644
--- a/src/core/atomicdex/api/mm2/balance.infos.cpp
+++ b/src/core/atomicdex/api/mm2/balance_infos.cpp
@@ -18,7 +18,7 @@
#include
// Project Headers
-#include "balance.infos.hpp"
+#include "balance_infos.hpp"
namespace atomic_dex::mm2
{
diff --git a/src/core/atomicdex/api/mm2/balance.infos.hpp b/src/core/atomicdex/api/mm2/balance_infos.hpp
similarity index 100%
rename from src/core/atomicdex/api/mm2/balance.infos.hpp
rename to src/core/atomicdex/api/mm2/balance_infos.hpp
diff --git a/src/core/atomicdex/api/mm2/generics.cpp b/src/core/atomicdex/api/mm2/generics.cpp
index 7883f60426..a8a0c0ddb4 100644
--- a/src/core/atomicdex/api/mm2/generics.cpp
+++ b/src/core/atomicdex/api/mm2/generics.cpp
@@ -27,7 +27,7 @@
#include "atomicdex/api/mm2/rpc_v1/rpc.recover_funds_of_swap.hpp"
#include "atomicdex/api/mm2/rpc_v1/rpc.sell.hpp"
#include "atomicdex/api/mm2/rpc_v1/rpc.validateaddress.hpp"
-#include "atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp"
+#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.hpp"
namespace atomic_dex::mm2
@@ -51,7 +51,6 @@ namespace atomic_dex::mm2
template void extract_rpc_json_answer(const nlohmann::json& j, min_volume_answer& answer);
template void extract_rpc_json_answer(const nlohmann::json& j, buy_answer& answer);
template void extract_rpc_json_answer(const nlohmann::json& j, sell_answer& answer);
- template void extract_rpc_json_answer(const nlohmann::json& j, best_orders_answer& answer);
template void extract_rpc_json_answer(const nlohmann::json& j, disable_coin_answer& answer);
template void extract_rpc_json_answer(const nlohmann::json& j, validate_address_answer& answer);
template void extract_rpc_json_answer(const nlohmann::json& j, convert_address_answer& answer);
diff --git a/src/core/atomicdex/api/mm2/mm2.client.cpp b/src/core/atomicdex/api/mm2/mm2.client.cpp
index 8e71490531..1ebd7f2c7b 100644
--- a/src/core/atomicdex/api/mm2/mm2.client.cpp
+++ b/src/core/atomicdex/api/mm2/mm2.client.cpp
@@ -26,8 +26,12 @@
#include "atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp"
+#include "atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp"
+#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp"
+#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp"
+#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp"
@@ -59,6 +63,7 @@ namespace
if (Rpc::is_v2)
{
json_req["mmrpc"] = "2.0";
+ json_req["id"] = 42;
json_req.push_back({"params", json_data});
}
else
@@ -72,19 +77,47 @@ namespace
template
Rpc process_rpc_answer(const web::http::http_response& answer)
{
- // SPDLOG_DEBUG("rpc answer: {}", TO_STD_STR(answer.extract_string(true).get()));
+ std::string body = TO_STD_STR(answer.extract_string(true).get());
+ if (body.size() > 1000)
+ {
+ SPDLOG_DEBUG("redacted rpc answer: {}", body.substr(0, 1000));
+ }
+ else
+ {
+ SPDLOG_DEBUG("rpc answer: {}", body);
+ }
+ SPDLOG_DEBUG("rpc answer: {}", body);
+ nlohmann::json json_answer;
Rpc rpc;
- auto json_answer = nlohmann::json::parse(TO_STD_STR(answer.extract_string(true).get()));
+ try
+ {
+ json_answer = nlohmann::json::parse(body);
+ // SPDLOG_DEBUG("rpc answer: {}", json_answer.dump(4));
+ }
+ catch (const nlohmann::json::parse_error& error)
+ {
+ SPDLOG_ERROR("rpc answer error: {}", error.what());
+ }
+
if (Rpc::is_v2)
{
- // SPDLOG_DEBUG("v2 rpc answer")
if (answer.status_code() == 200)
+ {
rpc.result = json_answer.at("result").get();
+ rpc.raw_result = json_answer.at("result").dump();
+ }
else
+ {
+ SPDLOG_DEBUG("rpc2 answer: error");
rpc.error = json_answer.get();
+ rpc.raw_result = json_answer.dump();
+ SPDLOG_DEBUG("rpc.raw_result: {}", rpc.raw_result);
+ }
}
else
+ {
rpc.result = json_answer.get();
+ }
return rpc;
}
} // namespace
@@ -160,13 +193,19 @@ namespace atomic_dex::mm2
using request_type = typename Rpc::expected_request_type;
process_rpc_async(request_type{}, on_rpc_processed);
}
- template void mm2_client::process_rpc_async(const std::function&);
+
+ // template void mm2_client::process_rpc_async(const std::function&);
+ template void mm2_client::process_rpc_async(const std::function&);
+ template void mm2_client::process_rpc_async(const std::function&);
template void mm2_client::process_rpc_async(const std::function&);
+ template void mm2_client::process_rpc_async(const std::function&);
+ template void mm2_client::process_rpc_async(const std::function&);
+ template void mm2_client::process_rpc_async(const std::function&);
+ template void mm2_client::process_rpc_async(const std::function&);
+ template void mm2_client::process_rpc_async(const std::function&);
template void mm2_client::process_rpc_async(const std::function&);
template void mm2_client::process_rpc_async(const std::function&);
template void mm2_client::process_rpc_async(const std::function&);
- template void mm2_client::process_rpc_async(const std::function&);
- template void mm2_client::process_rpc_async(const std::function&);
template
void mm2_client::process_rpc_async(typename Rpc::expected_request_type request, const std::function& on_rpc_processed)
@@ -184,6 +223,7 @@ namespace atomic_dex::mm2
}
catch (const std::exception& ex)
{
+ // SPDLOG_DEBUG("process_rpc_answer rpc.result: {}", rpc.raw_result);
SPDLOG_ERROR(ex.what());
}
});
diff --git a/src/core/atomicdex/api/mm2/mm2.cpp b/src/core/atomicdex/api/mm2/mm2.cpp
index 86e6f52125..0971464177 100644
--- a/src/core/atomicdex/api/mm2/mm2.cpp
+++ b/src/core/atomicdex/api/mm2/mm2.cpp
@@ -23,7 +23,7 @@
#include "atomicdex/api/mm2/rpc_v1/rpc.min_trading_vol.hpp"
#include "atomicdex/api/mm2/rpc_v1/rpc.recover_funds_of_swap.hpp"
#include "atomicdex/api/mm2/rpc_v1/rpc.validateaddress.hpp"
-#include "atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp"
+#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.hpp"
#include "atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.hpp"
@@ -584,7 +584,10 @@ namespace atomic_dex::mm2
if (is_protocol_v2)
{
request["mmrpc"] = "2.0";
+ request["id"] = 42;
}
+ // SPDLOG_INFO("template_request: {}", request.dump(4));
+
return request;
}
@@ -592,6 +595,34 @@ namespace atomic_dex::mm2
rpc_version()
{
nlohmann::json json_data = template_request("version");
+ // SPDLOG_DEBUG("version request {}", json_data.dump(4));
+ try
+ {
+ auto client = std::make_unique(FROM_STD_STR(atomic_dex::g_dex_rpc));
+ web::http::http_request request;
+ request.set_method(web::http::methods::POST);
+ request.set_body(json_data.dump());
+ web::http::http_response resp = client->request(request).get();
+ if (resp.status_code() == 200)
+ {
+ std::string body = TO_STD_STR(resp.extract_string(true).get());
+ nlohmann::json body_json = nlohmann::json::parse(body);
+ return body_json.at("result").get();
+ }
+
+ return "error occured during rpc_version";
+ }
+ catch (const web::http::http_exception& exception)
+ {
+ return "error occured during rpc_version";
+ }
+ return "";
+ }
+
+ std::string
+ peer_id()
+ {
+ nlohmann::json json_data = template_request("get_my_peer_id");
try
{
auto client = std::make_unique(FROM_STD_STR(atomic_dex::g_dex_rpc));
@@ -710,7 +741,6 @@ namespace atomic_dex::mm2
template mm2::withdraw_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::withdraw_status_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::my_orders_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
- template mm2::orderbook_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::trade_fee_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::max_taker_vol_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::min_volume_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
@@ -718,7 +748,6 @@ namespace atomic_dex::mm2
template mm2::active_swaps_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::show_priv_key_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::trade_preimage_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
- template mm2::best_orders_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::validate_address_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::convert_address_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
template mm2::recover_funds_of_swap_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command);
diff --git a/src/core/atomicdex/api/mm2/mm2.hpp b/src/core/atomicdex/api/mm2/mm2.hpp
index fd7c9de82e..2a0efe3c65 100644
--- a/src/core/atomicdex/api/mm2/mm2.hpp
+++ b/src/core/atomicdex/api/mm2/mm2.hpp
@@ -43,6 +43,7 @@ namespace atomic_dex::mm2
nlohmann::json basic_batch_answer(const web::http::http_response& resp);
std::string rpc_version();
+ std::string peer_id();
struct trade_fee_request
{
diff --git a/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp b/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp
index 6cc8742c1d..b4cbc7798e 100644
--- a/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp
+++ b/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp
@@ -55,7 +55,7 @@ namespace atomic_dex::mm2
std::string uuid;
std::string depth_percent;
bool is_mine;
- std::optional rel_coin{std::nullopt};
+ std::optional rel_coin;
std::string to_string() const noexcept;
};
diff --git a/src/core/atomicdex/api/mm2/paging_options.cpp b/src/core/atomicdex/api/mm2/paging_options.cpp
index 95943a77ec..2d785b004c 100644
--- a/src/core/atomicdex/api/mm2/paging_options.cpp
+++ b/src/core/atomicdex/api/mm2/paging_options.cpp
@@ -7,7 +7,7 @@
namespace atomic_dex::mm2
{
- void to_json(nlohmann::json& j, const paging_options& in)
+ void to_json(nlohmann::json& j, const paging_options_t& in)
{
if (in.from_id)
{
diff --git a/src/core/atomicdex/api/mm2/paging_options.hpp b/src/core/atomicdex/api/mm2/paging_options.hpp
index 4f48ec69db..851ce650f7 100644
--- a/src/core/atomicdex/api/mm2/paging_options.hpp
+++ b/src/core/atomicdex/api/mm2/paging_options.hpp
@@ -9,11 +9,11 @@
namespace atomic_dex::mm2
{
- struct paging_options
+ struct paging_options_t
{
std::optional from_id;
std::optional page_number;
};
- void to_json(nlohmann::json& j, const paging_options& in);
+ void to_json(nlohmann::json& j, const paging_options_t& in);
}
\ No newline at end of file
diff --git a/src/core/atomicdex/api/mm2/rpc.tx.history.hpp b/src/core/atomicdex/api/mm2/rpc.tx.history.hpp
index 900290bead..a761b2d954 100644
--- a/src/core/atomicdex/api/mm2/rpc.tx.history.hpp
+++ b/src/core/atomicdex/api/mm2/rpc.tx.history.hpp
@@ -12,9 +12,9 @@ namespace atomic_dex::mm2
{
struct tx_history_request
{
- std::string coin;
- std::size_t limit;
- std::optional paging_options;
+ std::string coin;
+ std::size_t limit;
+ std::optional paging_options;
};
void to_json(nlohmann::json& j, const tx_history_request& cfg);
diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp
index 6f264979f8..f08fb1bb6f 100644
--- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp
+++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp
@@ -41,9 +41,9 @@ namespace atomic_dex::mm2
{
j["swap_contract_address"] = cfg.swap_contract_address.value();
}
- if (cfg.fallback_swap_contract_address.has_value())
+ if (cfg.fallback_swap_contract.has_value())
{
- j["fallback_swap_contract_address"] = cfg.fallback_swap_contract_address.value();
+ j["fallback_swap_contract"] = cfg.fallback_swap_contract.value();
}
}
diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp
index 2bc27fed42..c3d545c57a 100644
--- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp
@@ -22,6 +22,7 @@
//! Project Headers
#include "atomicdex/config/electrum.cfg.hpp"
#include "atomicdex/constants/qt.coins.enums.hpp"
+#include "atomicdex/api/mm2/address_format.hpp"
namespace atomic_dex::mm2
{
@@ -33,8 +34,8 @@ namespace atomic_dex::mm2
bool is_testnet{false};
bool with_tx_history{true};
std::optional swap_contract_address{std::nullopt};
- std::optional fallback_swap_contract_address{std::nullopt};
- std::optional address_format;
+ std::optional fallback_swap_contract{std::nullopt};
+ std::optional address_format;
std::optional merge_params;
std::optional> bchd_urls;
std::optional allow_slp_unsafe_conf;
diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp
index aa3d069876..83ee67f33e 100644
--- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp
+++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp
@@ -37,7 +37,7 @@ namespace atomic_dex::mm2
j["gas_station_url"] = cfg.gas_station_url.value();
}
}
- case CoinType::Matic:
+ case CoinType::PLG20:
{
if (cfg.is_testnet)
{
@@ -57,13 +57,17 @@ namespace atomic_dex::mm2
{
j["gas_station_decimals"] = cfg.matic_gas_station_decimals.value();
}
+ if (cfg.mm2.has_value())
+ {
+ j["mm2"] = cfg.mm2.value();
+ }
}
default:
j["urls"] = cfg.urls;
j["swap_contract_address"] = cfg.swap_contract_address;
- if (cfg.fallback_swap_contract_address.has_value())
+ if (cfg.fallback_swap_contract.has_value())
{
- j["fallback_swap_contract"] = cfg.fallback_swap_contract_address.value();
+ j["fallback_swap_contract"] = cfg.fallback_swap_contract.value();
}
break;
}
diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp
index 5326da8f71..4f4bbafeb2 100644
--- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp
@@ -33,8 +33,9 @@ namespace atomic_dex::mm2
CoinType coin_type;
bool is_testnet{false};
const std::string swap_contract_address;
- std::optional fallback_swap_contract_address{std::nullopt};
+ std::optional fallback_swap_contract{std::nullopt};
std::optional matic_gas_station_decimals{9};
+ std::optional mm2{1};
std::optional gas_station_url{std::nullopt};
std::optional matic_gas_station_url{std::nullopt};
std::optional testnet_matic_gas_station_url{std::nullopt};
diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp
index 1da0cebe99..e59cd15d8e 100644
--- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp
@@ -4,7 +4,6 @@
#pragma once
#include "atomicdex/api/mm2/rpc.hpp"
-#include "atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp"
namespace atomic_dex::mm2
{
@@ -22,6 +21,7 @@ namespace atomic_dex::mm2
expected_request_type request;
std::optional result;
std::optional error;
+ std::string raw_result;
};
using my_tx_history_request_v1_rpc = my_tx_history_v1_rpc::expected_request_type;
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp
similarity index 77%
rename from src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.cpp
rename to src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp
index 2a10afb2c0..ba5dd40660 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.cpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp
@@ -23,23 +23,22 @@
//! Project Headers
#include "atomicdex/api/mm2/generics.hpp"
-#include "atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp"
+#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp"
//! Implementation RPC [best_orders]
namespace atomic_dex::mm2
{
void
- to_json(nlohmann::json& j, const best_orders_request& req)
+ to_json(nlohmann::json& j, const bestorders_request_rpc& req)
{
- SPDLOG_INFO("getting bestorders data...");
- j["params"]["coin"] = req.coin;
- j["params"]["action"] = req.action;
- j["params"]["request_by"]["type"] = "volume";
- j["params"]["request_by"]["value"] = req.volume;
+ j["coin"] = req.coin;
+ j["action"] = req.action;
+ j["request_by"]["type"] = "volume";
+ j["request_by"]["value"] = req.volume;
}
void
- from_json(const nlohmann::json& j, best_orders_answer_success& answer)
+ from_json(const nlohmann::json& j, bestorders_result_rpc& resp)
{
if (j.empty())
{
@@ -59,7 +58,7 @@ namespace atomic_dex::mm2
from_json(cur_order, contents);
if (uuid_visited.emplace(contents.uuid).second)
{
- answer.result.emplace_back(std::move(contents));
+ resp.result.emplace_back(std::move(contents));
}
else
{
@@ -69,11 +68,4 @@ namespace atomic_dex::mm2
}
}
}
-
- void
- from_json(const nlohmann::json& j, best_orders_answer& answer)
- {
- extract_rpc_json_answer(j, answer);
- }
-
} // namespace atomic_dex::mm2
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp
similarity index 56%
rename from src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp
rename to src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp
index b4626540d4..0c9be72572 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp
@@ -18,45 +18,48 @@
//! STD
#include
+#include
//! Deps
#include
//! Project Headers
+#include "atomicdex/api/mm2/rpc.hpp"
#include "atomicdex/api/mm2/orderbook.order.contents.hpp"
namespace atomic_dex::mm2
{
- struct best_orders_request
+ struct bestorders_rpc
{
- std::string coin;
- std::string volume;
- std::string action;
- };
+ static constexpr auto endpoint = "best_orders";
+ static constexpr bool is_v2 = true;
- void to_json(nlohmann::json& j, const best_orders_request& req);
+ struct expected_request_type
+ {
+ std::string coin;
+ std::string volume;
+ std::string action;
+ };
- struct best_orders_answer_success
- {
- std::vector result;
- };
- void from_json(const nlohmann::json& j, best_orders_answer_success& answer);
+ struct expected_result_type
+ {
+ std::vector result;
+ };
- struct best_orders_answer
- {
- std::optional result;
- std::optional error;
- std::string raw_result; ///< internal
- int rpc_result_code; ///< internal
+ using expected_error_type = rpc_basic_error_type;
+
+ expected_request_type request;
+ std::optional result;
+ std::optional error;
+ std::string raw_result;
};
- void from_json(const nlohmann::json& j, best_orders_answer& answer);
-} // namespace atomic_dex::mm2
+ using bestorders_request_rpc = bestorders_rpc::expected_request_type;
+ using bestorders_result_rpc = bestorders_rpc::expected_result_type;
+ using bestorders_error_rpc = bestorders_rpc::expected_error_type;
-namespace atomic_dex
-{
- using t_best_orders_request = mm2::best_orders_request;
- using t_best_orders_answer = mm2::best_orders_answer;
- using t_best_orders_answer_success = mm2::best_orders_answer_success;
-} // namespace atomic_dex
\ No newline at end of file
+ void to_json(nlohmann::json& j, const bestorders_request_rpc& req);
+ void from_json(const nlohmann::json& j, bestorders_result_rpc& answer);
+
+} // namespace atomic_dex::mm2
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp
index 0b0529952d..0727b2d1af 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp
@@ -1,6 +1,7 @@
#include
-#include "rpc2.enable_bch_with_tokens_rpc.hpp"
+#include "atomicdex/api/mm2/address_format.hpp"
+#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp"
namespace atomic_dex::mm2
{
@@ -32,26 +33,13 @@ namespace atomic_dex::mm2
{
j["servers"] = in.servers;
}
-
- void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::address_format_t& in)
- {
- j["format"] = in.format;
- j["network"] = in.network;
- }
-
+
void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::slp_token_request_t& in)
{
j["ticker"] = in.ticker;
if (in.required_confirmations)
j["required_confirmations"] = in.required_confirmations.value();
}
-
- void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::utxo_merge_params_t& in)
- {
- j["merge_at"] = in.merge_at;
- j["check_every"] = in.check_every;
- j["max_merge_at_once"] = in.max_merge_at_once;
- }
void from_json(const nlohmann::json& json, enable_bch_with_tokens_result_rpc& out)
{
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp
index dc74ce6b93..b9141b4933 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp
@@ -1,10 +1,28 @@
+/******************************************************************************
+ * Copyright © 2013-2024 The Komodo Platform Developers. *
+ * *
+ * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
+ * the top-level directory of this distribution for the individual copyright *
+ * holder information and the developer policies on copyright and licensing. *
+ * *
+ * Unless otherwise agreed in a custom licensing agreement, no part of the *
+ * Komodo Platform software, including this file may be copied, modified, *
+ * propagated or distributed except according to the terms contained in the *
+ * LICENSE file *
+ * *
+ * Removal or modification of this copyright notice is prohibited. *
+ * *
+ ******************************************************************************/
+
#pragma once
#include
-#include "atomicdex/api/mm2/rpc.hpp"
-#include "atomicdex/api/mm2/balance_info.hpp"
#include "atomicdex/config/electrum.cfg.hpp"
+#include "atomicdex/api/mm2/address_format.hpp"
+#include "atomicdex/api/mm2/balance_info.hpp"
+#include "atomicdex/api/mm2/rpc.hpp"
+#include "atomicdex/api/mm2/utxo_merge_params.hpp"
namespace atomic_dex::mm2
{
@@ -27,17 +45,6 @@ namespace atomic_dex::mm2
std::string ticker;
std::optional required_confirmations;
};
- struct address_format_t
- {
- std::string format;
- std::string network;
- };
- struct utxo_merge_params_t
- {
- int merge_at;
- int check_every;
- int max_merge_at_once;
- };
std::string ticker;
std::optional allow_slp_unsafe_conf{false};
@@ -77,6 +84,7 @@ namespace atomic_dex::mm2
expected_request_type request;
std::optional result;
std::optional error;
+ std::string raw_result;
};
using enable_bch_with_tokens_request_rpc = enable_bch_with_tokens_rpc::expected_request_type;
@@ -86,9 +94,8 @@ namespace atomic_dex::mm2
void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc& in);
void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::mode_t& in);
void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::mode_t::data& in);
- void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::address_format_t& in);
+ void to_json(nlohmann::json& j, const address_format_t& in);
void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::slp_token_request_t& in);
- void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::utxo_merge_params_t& in);
void from_json(const nlohmann::json& json, enable_bch_with_tokens_result_rpc& out);
void from_json(const nlohmann::json& json, enable_bch_with_tokens_result_rpc::derivation_method_t& out);
void from_json(const nlohmann::json& json, enable_bch_with_tokens_result_rpc::bch_address_infos_t& out);
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp
index 1d59962b05..953bb8f67d 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp
@@ -44,9 +44,10 @@ namespace atomic_dex::mm2
using expected_error_type = rpc_basic_error_type;
- expected_request_type request;
- std::optional result;
- std::optional error;
+ expected_request_type request;
+ std::optional result;
+ std::optional error;
+ std::string raw_result;
};
using enable_erc20_rpc_request = enable_erc20_rpc::expected_request_type;
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.cpp
index 6d1ab8916f..2a0bb73211 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.cpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.cpp
@@ -9,21 +9,16 @@ namespace atomic_dex::mm2
j["ticker"] = in.ticker;
j["nodes"] = in.nodes;
j["tx_history"] = in.tx_history;
+ j["get_balances"] = in.get_balances;
j["erc20_tokens_requests"] = in.erc20_tokens_requests;
if (in.required_confirmations.has_value())
j["required_confirmations"] = in.required_confirmations.value();
if (in.requires_notarization.has_value())
j["requires_notarization"] = in.requires_notarization.value();
+ j["swap_contract_address"] = in.swap_contract_address;
+ j["fallback_swap_contract"] = in.fallback_swap_contract;
- // Use this in mm2.service.cpp when constructing the request
- //
- // coin_config coin_info = get_coin_info(in.ticker);
- // coin_config.fallback_swap_contract_address
- // coin_config.swap_contract_address
- // coin_config.gas_station_url
- // coin_config.gas_station_decimals
-
- // SPDLOG_DEBUG("enable_erc20_with_tokens: {}", j.dump(4));
+ SPDLOG_DEBUG("enable_eth_with_tokens: {}", j.dump(4));
}
void to_json(nlohmann::json& j, const enable_eth_with_tokens_request_rpc::erc20_token_request_t& in)
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp
index 5561b2fa40..9205777d8d 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp
@@ -44,6 +44,7 @@ namespace atomic_dex::mm2
std::string swap_contract_address;
std::string fallback_swap_contract;
bool tx_history{true};
+ bool get_balances{true};
std::optional is_testnet{false};
std::optional gas_station_decimals;
std::optional required_confirmations;
@@ -69,8 +70,8 @@ namespace atomic_dex::mm2
};
std::size_t current_block;
- std::unordered_map eth_addresses_infos;
- std::unordered_map erc20_addresses_infos;
+ std::unordered_map eth_addresses_infos;
+ std::unordered_map erc20_addresses_infos;
};
using expected_error_type = rpc_basic_error_type;
@@ -78,6 +79,7 @@ namespace atomic_dex::mm2
expected_request_type request;
std::optional result;
std::optional error;
+ std::string raw_result;
};
using enable_eth_with_tokens_request_rpc = enable_eth_with_tokens_rpc::expected_request_type;
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp
index ce0d53d81d..6cabbe2f72 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp
@@ -51,6 +51,7 @@ namespace atomic_dex::mm2
expected_request_type request;
std::optional result;
std::optional error;
+ std::string raw_result;
};
using enable_slp_rpc_request = enable_slp_rpc::expected_request_type;
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp
index 90b0ef37ef..86d7525f1d 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp
@@ -48,6 +48,7 @@ namespace atomic_dex::mm2
expected_request_type request;
std::optional result;
std::optional error;
+ std::string raw_result;
};
using enable_tendermint_token_rpc_request = enable_tendermint_token_rpc::expected_request_type;
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp
index 22aed96a49..76876d0a89 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp
@@ -47,6 +47,7 @@ namespace atomic_dex::mm2
expected_request_type request;
std::optional result;
std::optional error;
+ std::string raw_result;
};
using enable_tendermint_with_assets_request_rpc = enable_tendermint_with_assets_rpc::expected_request_type;
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp
index 6872e9ffdb..98f15bc9f2 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp
@@ -43,6 +43,7 @@ namespace atomic_dex::mm2
expected_request_type request;
std::optional result;
std::optional error;
+ std::string raw_result;
};
using get_public_key_rpc_request = get_public_key_rpc::expected_request_type;
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.cpp
index 800ffb4cad..9b4a104837 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.cpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.cpp
@@ -1,8 +1,23 @@
-// komodo-wallet
-// Author(s): syl
+/******************************************************************************
+ * Copyright © 2013-2021 The Komodo Platform Developers. *
+ * *
+ * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
+ * the top-level directory of this distribution for the individual copyright *
+ * holder information and the developer policies on copyright and licensing. *
+ * *
+ * Unless otherwise agreed in a custom licensing agreement, no part of the *
+ * Komodo Platform software, including this file may be copied, modified, *
+ * propagated or distributed except according to the terms contained in the *
+ * LICENSE file *
+ * *
+ * Removal or modification of this copyright notice is prohibited. *
+ * *
+ ******************************************************************************/
+//! Deps
#include
+//! Project Headers
#include "atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp"
namespace atomic_dex::mm2
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp
index 72d4c811fb..fd7089ae59 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp
@@ -11,16 +11,16 @@
namespace atomic_dex::mm2
{
- struct my_tx_history_rpc
+ struct my_tx_history_v2_rpc
{
static constexpr auto endpoint = "my_tx_history";
static constexpr bool is_v2 = true;
struct expected_request_type
{
- std::string coin;
- int limit;
- paging_options paging_options;
+ std::string coin;
+ int limit;
+ paging_options_t paging_options;
};
struct expected_result_type
@@ -35,11 +35,12 @@ namespace atomic_dex::mm2
expected_request_type request;
std::optional result;
std::optional error;
+ std::string raw_result;
};
- using my_tx_history_request_rpc = my_tx_history_rpc::expected_request_type;
- using my_tx_history_result_rpc = my_tx_history_rpc::expected_result_type;
- using my_tx_history_error_rpc = my_tx_history_rpc::expected_error_type;
+ using my_tx_history_request_rpc = my_tx_history_v2_rpc::expected_request_type;
+ using my_tx_history_result_rpc = my_tx_history_v2_rpc::expected_result_type;
+ using my_tx_history_error_rpc = my_tx_history_v2_rpc::expected_error_type;
void to_json(nlohmann::json& j, const my_tx_history_request_rpc& in);
void from_json(const nlohmann::json& json, my_tx_history_result_rpc& out);
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp
index 1ada91bcad..f80fa1ec55 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp
@@ -16,6 +16,7 @@
//! Deps
#include
+#include
//! Project Headers
#include "atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp"
@@ -24,24 +25,48 @@
namespace atomic_dex::mm2
{
void
- from_json(const nlohmann::json& j, orderbook_answer& answer)
+ to_json(nlohmann::json& j, const orderbook_request_rpc& req)
{
- using namespace date;
- // SPDLOG_INFO("got orderbook data...");
+ j["base"] = req.base;
+ j["rel"] = req.rel;
+ }
- j.at("result").at("base").get_to(answer.base);
- j.at("result").at("rel").get_to(answer.rel);
- j.at("result").at("num_asks").get_to(answer.numasks);
- j.at("result").at("num_bids").get_to(answer.numbids);
- j.at("result").at("net_id").get_to(answer.netid);
- j.at("result").at("timestamp").get_to(answer.timestamp);
- j.at("result").at("bids").get_to(answer.bids);
- j.at("result").at("asks").get_to(answer.asks);
+ void
+ from_json(const nlohmann::json& j, orderbook_result_rpc& resp)
+ {
+ using namespace date;
+ // atomic_dex::utils::json_keys(j);
+ nlohmann::json k;
+ if (j.contains("result"))
+ {
+ // Not sure how why where it is being returned in this format
+ SPDLOG_DEBUG("orderbook_result_rpc: result");
+ j.at("result").at("rel").get_to(resp.rel);
+ j.at("result").at("num_asks").get_to(resp.numasks);
+ j.at("result").at("num_bids").get_to(resp.numbids);
+ j.at("result").at("net_id").get_to(resp.netid);
+ j.at("result").at("timestamp").get_to(resp.timestamp);
+ j.at("result").at("bids").get_to(resp.bids);
+ j.at("result").at("asks").get_to(resp.asks);
+ j.at("result").at("base").get_to(resp.base);
+ }
+ else
+ {
+ SPDLOG_DEBUG("orderbook_result_rpc: base");
+ j.at("base").get_to(resp.base);
+ j.at("rel").get_to(resp.rel);
+ j.at("num_asks").get_to(resp.numasks);
+ j.at("num_bids").get_to(resp.numbids);
+ j.at("net_id").get_to(resp.netid);
+ j.at("timestamp").get_to(resp.timestamp);
+ j.at("bids").get_to(resp.bids);
+ j.at("asks").get_to(resp.asks);
+ }
- answer.human_timestamp = atomic_dex::utils::to_human_date(answer.timestamp, "%Y-%m-%d %I:%M:%S");
+ resp.human_timestamp = atomic_dex::utils::to_human_date(resp.timestamp, "%Y-%m-%d %I:%M:%S");
t_float_50 result_asks_f(0);
- for (auto&& cur_asks: answer.asks) {
+ for (auto&& cur_asks: resp.asks) {
cur_asks.min_volume = cur_asks.base_min_volume;
cur_asks.min_volume_fraction_numer = cur_asks.base_min_volume_numer;
cur_asks.min_volume_fraction_denom = cur_asks.base_min_volume_denom;
@@ -59,10 +84,10 @@ namespace atomic_dex::mm2
cur_asks.total = atomic_dex::utils::adjust_precision(total_f.str());
result_asks_f = result_asks_f + safe_float(cur_asks.max_volume);
}
- answer.asks_total_volume = result_asks_f.str();
+ resp.asks_total_volume = result_asks_f.str();
t_float_50 result_bids_f(0);
- for (auto& cur_bids: answer.bids)
+ for (auto& cur_bids: resp.bids)
{
cur_bids.min_volume = cur_bids.base_min_volume;
cur_bids.min_volume_fraction_numer = cur_bids.base_min_volume_numer;
@@ -82,16 +107,16 @@ namespace atomic_dex::mm2
cur_bids.total = atomic_dex::utils::adjust_precision(total_f.str());
result_bids_f = result_bids_f + safe_float(cur_bids.max_volume);
}
- answer.bids_total_volume = result_bids_f.str();
+ resp.bids_total_volume = result_bids_f.str();
- for (auto&& cur_asks: answer.asks)
+ for (auto&& cur_asks: resp.asks)
{
t_float_50 percent_f = safe_float(cur_asks.max_volume) / result_asks_f;
cur_asks.depth_percent = atomic_dex::utils::adjust_precision(percent_f.str());
// SPDLOG_INFO("cur_asks: {}", cur_asks.to_string());
}
- for (auto&& cur_bids: answer.bids)
+ for (auto&& cur_bids: resp.bids)
{
t_float_50 percent_f = safe_float(cur_bids.max_volume) / result_bids_f;
cur_bids.depth_percent = atomic_dex::utils::adjust_precision(percent_f.str());
@@ -99,10 +124,4 @@ namespace atomic_dex::mm2
}
}
- void
- to_json(nlohmann::json& j, const orderbook_request& request)
- {
- j["params"]["base"] = request.base;
- j["params"]["rel"] = request.rel;
- }
} // namespace atomic_dex::mm2
diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp
index 4af01b8703..6b3a5bd3a2 100644
--- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp
+++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp
@@ -16,48 +16,56 @@
#pragma once
-//! Deps
-#include
+#include
+#include
-//! Project Headers
+#include //> nlohmann::json
+
+#include "atomicdex/api/mm2/rpc.hpp"
#include "atomicdex/api/mm2/orderbook.order.contents.hpp"
namespace atomic_dex::mm2
{
- struct orderbook_request
+ struct orderbook_rpc
{
- std::string base;
- std::string rel;
- };
+ static constexpr auto endpoint = "orderbook";
+ static constexpr bool is_v2 = true;
- void to_json(nlohmann::json& j, const orderbook_request& request);
+ struct expected_request_type
+ {
+ std::string base;
+ std::string rel;
+ };
- struct orderbook_answer
- {
- std::size_t askdepth{0};
- std::size_t biddepth{0};
- std::vector asks;
- std::vector bids;
- std::string base;
- std::string rel;
- std::size_t numasks;
- std::size_t numbids;
- std::size_t timestamp;
- std::size_t netid;
- std::string human_timestamp; //! Moment of the orderbook request human readeable
- std::string asks_total_volume;
- std::string bids_total_volume;
-
- //! Internal
- std::string raw_result;
- int rpc_result_code;
+ struct expected_result_type
+ {
+ std::size_t askdepth;
+ std::size_t biddepth;
+ std::vector asks;
+ std::vector bids;
+ std::string base;
+ std::string rel;
+ std::size_t numasks;
+ std::size_t numbids;
+ std::size_t timestamp;
+ std::size_t netid;
+ std::string human_timestamp; //! human readable orderbook request time
+ std::string asks_total_volume;
+ std::string bids_total_volume;
+ };
+
+ using expected_error_type = rpc_basic_error_type;
+
+ expected_request_type request;
+ std::optional result;
+ std::optional error;
+ std::string raw_result;
};
- void from_json(const nlohmann::json& j, orderbook_answer& answer);
-}
+ using orderbook_request_rpc = orderbook_rpc::expected_request_type;
+ using orderbook_result_rpc = orderbook_rpc::expected_result_type;
+ using orderbook_error_rpc = orderbook_rpc::expected_error_type;
-namespace atomic_dex
-{
- using t_orderbook_request = mm2::orderbook_request;
- using t_orderbook_answer = mm2::orderbook_answer;
-}
\ No newline at end of file
+ void to_json(nlohmann::json& j, const orderbook_request_rpc& req);
+ void from_json(const nlohmann::json& j, orderbook_result_rpc& resp);
+}
diff --git a/src/core/atomicdex/api/mm2/utxo.merge.params.cpp b/src/core/atomicdex/api/mm2/utxo_merge_params.cpp
similarity index 70%
rename from src/core/atomicdex/api/mm2/utxo.merge.params.cpp
rename to src/core/atomicdex/api/mm2/utxo_merge_params.cpp
index 9073ecef8f..2a5d29c474 100644
--- a/src/core/atomicdex/api/mm2/utxo.merge.params.cpp
+++ b/src/core/atomicdex/api/mm2/utxo_merge_params.cpp
@@ -16,14 +16,21 @@
#include
-#include "utxo.merge.params.hpp"
+#include "utxo_merge_params.hpp"
namespace atomic_dex::mm2
{
- void to_json(nlohmann::json& j, const utxo_merge_params& cfg)
+ void to_json(nlohmann::json& j, const utxo_merge_params_t& req)
{
- j["merge_at"] = cfg.merge_at;
- j["check_every"] = cfg.check_every;
- j["max_merge_at_once"] = cfg.max_merge_at_once;
+ j["merge_at"] = req.merge_at;
+ j["check_every"] = req.check_every;
+ j["max_merge_at_once"] = req.max_merge_at_once;
}
-}
\ No newline at end of file
+ void
+ from_json(const nlohmann::json& j, utxo_merge_params_t& resp)
+ {
+ resp.merge_at = j.at("merge_at").get();
+ resp.check_every = j.at("check_every").get();
+ resp.max_merge_at_once = j.at("max_merge_at_once").get();
+ }
+}
diff --git a/src/core/atomicdex/api/mm2/utxo.merge.params.hpp b/src/core/atomicdex/api/mm2/utxo_merge_params.hpp
similarity index 93%
rename from src/core/atomicdex/api/mm2/utxo.merge.params.hpp
rename to src/core/atomicdex/api/mm2/utxo_merge_params.hpp
index 93d05c6897..db30ee5008 100644
--- a/src/core/atomicdex/api/mm2/utxo.merge.params.hpp
+++ b/src/core/atomicdex/api/mm2/utxo_merge_params.hpp
@@ -20,12 +20,12 @@
namespace atomic_dex::mm2
{
- struct utxo_merge_params
+ struct utxo_merge_params_t
{
std::size_t merge_at;
std::size_t check_every;
std::size_t max_merge_at_once;
};
- void to_json(nlohmann::json& j, const utxo_merge_params& cfg);
+ void to_json(nlohmann::json& j, const utxo_merge_params_t& cfg);
}
\ No newline at end of file
diff --git a/src/core/atomicdex/config/coins.cfg.cpp b/src/core/atomicdex/config/coins.cfg.cpp
index d7148bb30c..1f846b5376 100644
--- a/src/core/atomicdex/config/coins.cfg.cpp
+++ b/src/core/atomicdex/config/coins.cfg.cpp
@@ -54,9 +54,13 @@ namespace
{
return CoinType::SLP;
}
+ if (coin_type == "PLG-20")
+ {
+ return CoinType::PLG20;
+ }
if (coin_type == "Matic")
{
- return CoinType::Matic;
+ return CoinType::PLG20;
}
if (coin_type == "Optimism")
{
@@ -147,7 +151,7 @@ namespace atomic_dex
}
void
- from_json(const nlohmann::json& j, coin_config& cfg)
+ from_json(const nlohmann::json& j, coin_config_t& cfg)
{
j.at("coin").get_to(cfg.ticker);
j.at("name").get_to(cfg.name);
@@ -180,13 +184,9 @@ namespace atomic_dex
cfg.other_types = std::set();
for (const auto& other_type: other_types) { cfg.other_types->emplace(get_coin_type_from_str(other_type)); }
}
- if (j.contains("utxo_merge"))
- {
- cfg.utxo_merge = j.at("utxo_merge");
- }
- if (j.contains("mm2_backup"))
+ if (j.contains("merge_utxos"))
{
- cfg.custom_backup = j.at("mm2_backup");
+ cfg.merge_utxos = j.at("merge_utxos");
}
if (j.contains("activation_status"))
{
@@ -245,19 +245,24 @@ namespace atomic_dex
{
j.at("explorer_tx_url").get_to(cfg.tx_uri);
}
+ if (j.contains("explorer_block_url"))
+ {
+ j.at("explorer_block_url").get_to(cfg.block_uri);
+ }
if (j.contains("explorer_address_url"))
{
- j.at("explorer_address_url").get_to(cfg.address_url);
+ j.at("explorer_address_url").get_to(cfg.address_uri);
}
// Swap contract addresses
if (j.contains("swap_contract_address"))
{
cfg.swap_contract_address = j["swap_contract_address"];
}
- if (j.contains("fallback_swap_contract_address"))
+ if (j.contains("fallback_swap_contract"))
{
- cfg.fallback_swap_contract_address = j["fallback_swap_contract_address"];
+ cfg.fallback_swap_contract = j["fallback_swap_contract"];
}
+
// Gas station urls
if (j.contains("gas_station_url"))
{
@@ -293,7 +298,7 @@ namespace atomic_dex
cfg.fees_ticker = cfg.is_testnet.value() ? "BNBT" : "BNB";
cfg.is_erc_family = true;
break;
- case CoinType::Matic:
+ case CoinType::PLG20:
cfg.has_parent_fees_ticker = true;
cfg.fees_ticker = cfg.is_testnet.value() ? "MATICTEST" : "MATIC";
cfg.is_erc_family = true;
@@ -400,7 +405,7 @@ namespace atomic_dex
}
void
- print_coins(std::vector coins)
+ print_coins(std::vector coins)
{
std::stringstream ss;
ss << "[";
diff --git a/src/core/atomicdex/config/coins.cfg.hpp b/src/core/atomicdex/config/coins.cfg.hpp
index ea8a455a6a..457b432e8e 100644
--- a/src/core/atomicdex/config/coins.cfg.hpp
+++ b/src/core/atomicdex/config/coins.cfg.hpp
@@ -22,7 +22,7 @@
#include
#include "atomicdex/api/mm2/mm2.constants.hpp"
-#include "atomicdex/api/mm2/utxo.merge.params.hpp"
+#include "atomicdex/api/mm2/utxo_merge_params.hpp"
#include "atomicdex/config/electrum.cfg.hpp"
#include "atomicdex/config/enable.cfg.hpp"
#include "atomicdex/constants/qt.coins.enums.hpp"
@@ -30,7 +30,7 @@
namespace atomic_dex
{
- struct coin_config
+ struct coin_config_t
{
std::optional erc_gas_stations{std::nullopt};
std::optional matic_gas_stations{std::nullopt};
@@ -43,6 +43,7 @@ namespace atomic_dex
std::string ticker;
std::string gui_ticker; ///< Ticker displayed in the gui
std::string name; ///< nice name
+ std::string fname; ///< nice name
std::string parent_coin;
std::string fees_ticker;
std::string type;
@@ -51,7 +52,8 @@ namespace atomic_dex
std::string livecoinwatch_id{"test-coin"};
std::string explorer_url;
std::string tx_uri{"tx/"};
- std::string address_url{"address/"};
+ std::string address_uri{"address/"};
+ std::string block_uri{"block/"};
std::string minimal_claim_amount{"0"};
CoinType coin_type;
nlohmann::json activation_status;
@@ -73,13 +75,17 @@ namespace atomic_dex
std::optional alias_ticker{std::nullopt};
std::optional allow_slp_unsafe_conf;
std::optional is_testnet{false}; ///< True if testnet (tBTC, tQTUM, QRC-20 on testnet, tETH)
- std::optional utxo_merge{false};
+ std::optional merge_utxos{false};
std::optional swap_contract_address{std::nullopt};
- std::optional fallback_swap_contract_address{std::nullopt};
+ std::optional fallback_swap_contract{std::nullopt};
std::optional gas_station_url{std::nullopt};
std::optional matic_gas_station_url{std::nullopt};
std::optional testnet_matic_gas_station_url{std::nullopt};
+ std::optional contract_address{std::nullopt};
+ std::optional derivation_path{std::nullopt};
+ std::optional decimals{std::nullopt};
std::optional matic_gas_station_decimals{std::nullopt};
+ std::optional chain_id{std::nullopt};
std::optional custom_backup;
std::optional> other_types;
std::optional electrum_urls;
@@ -90,10 +96,11 @@ namespace atomic_dex
std::optional bchd_urls;
};
- void from_json(const nlohmann::json& j, coin_config& cfg);
+ void from_json(const nlohmann::json& j, coin_config_t& cfg);
- void print_coins(std::vector coins);
+ void print_coins(std::vector coins);
bool is_wallet_only(std::string ticker);
bool is_default_coin(std::string ticker);
bool is_faucet_coin(std::string ticker);
+
} // namespace atomic_dex
\ No newline at end of file
diff --git a/src/core/atomicdex/config/raw.mm2.coins.cfg.hpp b/src/core/atomicdex/config/raw.mm2.coins.cfg.hpp
index 3f291ed49f..503a99828c 100644
--- a/src/core/atomicdex/config/raw.mm2.coins.cfg.hpp
+++ b/src/core/atomicdex/config/raw.mm2.coins.cfg.hpp
@@ -12,6 +12,7 @@
#include "atomicdex/api/mm2/mm2.constants.hpp"
#include "atomicdex/utilities/global.utilities.hpp"
#include "atomicdex/utilities/qt.utilities.hpp"
+#include "atomicdex/api/mm2/address_format.hpp"
#ifndef NLOHMANN_OPT_HELPER
# define NLOHMANN_OPT_HELPER
@@ -76,46 +77,42 @@ namespace atomic_dex
return get_optional(j, property.data());
}
- struct address_format
- {
- std::string format;
- std::optional network{std::nullopt};
- };
struct coin_element
{
- std::string coin;
- std::optional name{std::nullopt};
- std::optional fname{std::nullopt};
- std::optional etomic{std::nullopt};
- std::optional chain_id{std::nullopt};
- std::optional rpcport{std::nullopt};
- std::optional pubtype{std::nullopt};
- std::optional p2_shtype{std::nullopt};
- std::optional wiftype{std::nullopt};
- std::optional txfee{std::nullopt};
- std::optional confpath{std::nullopt};
- std::optional mm2{std::nullopt};
- std::optional required_confirmations{std::nullopt};
- std::optional asset{std::nullopt};
- std::optional txversion{std::nullopt};
- std::optional overwintered{std::nullopt};
- std::optional requires_notarization{std::nullopt};
- std::optional is_po_s{std::nullopt};
- std::optional segwit{std::nullopt};
- std::optional address_format{std::nullopt};
- std::optional estimate_fee_mode{std::nullopt};
- std::optional taddr{std::nullopt};
- std::optional decimals{std::nullopt};
- std::optional force_min_relay_fee{std::nullopt};
- std::optional p2_p{std::nullopt};
- std::optional magic{std::nullopt};
- std::optional n_spv{std::nullopt};
- std::optional version_group_id{std::nullopt};
- std::optional consensus_branch_id{std::nullopt};
- std::optional avg_blocktime{std::nullopt};
- std::optional dust{std::nullopt};
- nlohmann::json protocol;
+ using addr_fmt = mm2::address_format_t;
+ std::string coin;
+ std::optional name{std::nullopt};
+ std::optional fname{std::nullopt};
+ std::optional etomic{std::nullopt};
+ std::optional chain_id{std::nullopt};
+ std::optional rpcport{std::nullopt};
+ std::optional pubtype{std::nullopt};
+ std::optional p2_shtype{std::nullopt};
+ std::optional wiftype{std::nullopt};
+ std::optional txfee{std::nullopt};
+ std::optional confpath{std::nullopt};
+ std::optional mm2{std::nullopt};
+ std::optional required_confirmations{std::nullopt};
+ std::optional asset{std::nullopt};
+ std::optional txversion{std::nullopt};
+ std::optional overwintered{std::nullopt};
+ std::optional requires_notarization{std::nullopt};
+ std::optional is_po_s{std::nullopt};
+ std::optional segwit{std::nullopt};
+ std::optional address_format{std::nullopt};
+ std::optional estimate_fee_mode{std::nullopt};
+ std::optional taddr{std::nullopt};
+ std::optional decimals{std::nullopt};
+ std::optional force_min_relay_fee{std::nullopt};
+ std::optional p2_p{std::nullopt};
+ std::optional magic{std::nullopt};
+ std::optional n_spv{std::nullopt};
+ std::optional version_group_id{std::nullopt};
+ std::optional consensus_branch_id{std::nullopt};
+ std::optional avg_blocktime{std::nullopt};
+ std::optional dust{std::nullopt};
+ nlohmann::json protocol;
};
using coins = std::vector;
@@ -129,30 +126,9 @@ namespace atomic_dex
namespace atomic_dex
{
- void from_json(const json& j, atomic_dex::address_format& x);
- void to_json(json& j, const atomic_dex::address_format& x);
-
void from_json(const json& j, atomic_dex::coin_element& x);
void to_json(json& j, const atomic_dex::coin_element& x);
- inline void
- from_json(const json& j, atomic_dex::address_format& x)
- {
- x.format = j.at("format").get();
- x.network = atomic_dex::get_optional(j, "network");
- }
-
- inline void
- to_json(json& j, const atomic_dex::address_format& x)
- {
- j = json::object();
- j["format"] = x.format;
- if (x.network.has_value())
- {
- j["network"] = x.network.value();
- }
- }
-
inline void
from_json(const json& j, atomic_dex::coin_element& x)
{
@@ -175,7 +151,7 @@ namespace atomic_dex
x.requires_notarization = atomic_dex::get_optional(j, "requires_notarization");
x.is_po_s = atomic_dex::get_optional(j, "isPoS");
x.segwit = atomic_dex::get_optional(j, "segwit");
- x.address_format = atomic_dex::get_optional(j, "address_format");
+ x.address_format = atomic_dex::get_optional(j, "address_format");
x.estimate_fee_mode = atomic_dex::get_optional(j, "estimate_fee_mode");
x.taddr = atomic_dex::get_optional(j, "taddr");
x.decimals = atomic_dex::get_optional(j, "decimals");
diff --git a/src/core/atomicdex/constants/qt.coins.enums.hpp b/src/core/atomicdex/constants/qt.coins.enums.hpp
index a89c819a58..02832d2e16 100644
--- a/src/core/atomicdex/constants/qt.coins.enums.hpp
+++ b/src/core/atomicdex/constants/qt.coins.enums.hpp
@@ -37,7 +37,7 @@ namespace atomic_dex
UTXO = 3,
SmartChain = 4,
SLP = 5,
- Matic = 6,
+ PLG20 = 6,
Optimism = 7,
Arbitrum = 8,
AVX20 = 9,
diff --git a/src/core/atomicdex/events/events.hpp b/src/core/atomicdex/events/events.hpp
index b93f884706..8b468b8031 100644
--- a/src/core/atomicdex/events/events.hpp
+++ b/src/core/atomicdex/events/events.hpp
@@ -117,7 +117,7 @@ namespace atomic_dex
std::string ticker;
};
- struct orderbook_refresh
+ struct refresh_orderbook_model_data
{
std::string base;
std::string rel;
@@ -125,7 +125,7 @@ namespace atomic_dex
struct coin_cfg_parsed
{
- std::vector cfg;
+ std::vector