diff --git a/atomic_defi_design/Dex/Components/DexLabel.qml b/atomic_defi_design/Dex/Components/DexLabel.qml
index ef6694978d..77d8bc4d00 100644
--- a/atomic_defi_design/Dex/Components/DexLabel.qml
+++ b/atomic_defi_design/Dex/Components/DexLabel.qml
@@ -20,13 +20,10 @@ Text
}
}
+ text: privacy && Dex.General.privacy_mode ? Dex.General.privacy_text : text_value
font: monospace ? Dex.DexTypo.monoSmall : Dex.DexTypo.body2
-
color: enabled ? Dex.CurrentTheme.foregroundColor : Dex.CurrentTheme.textDisabledColor
-
- text: privacy && Dex.General.privacy_mode ? Dex.General.privacy_text : text_value
wrapMode: Text.WordWrap
-
onLinkActivated: Qt.openUrlExternally(link)
linkColor: color
}
diff --git a/atomic_defi_design/Dex/Components/PairItemBadge.qml b/atomic_defi_design/Dex/Components/PairItemBadge.qml
index ceeaa3c0b0..5ceab63666 100644
--- a/atomic_defi_design/Dex/Components/PairItemBadge.qml
+++ b/atomic_defi_design/Dex/Components/PairItemBadge.qml
@@ -30,7 +30,8 @@ DexRectangle
Layout.leftMargin: 10
Layout.rightMargin: 20
- Dex.Text{
+ DexLabel
+ {
anchors.bottom: parent.top
anchors.bottomMargin: 5
anchors.horizontalCenter: parent.horizontalCenter
@@ -46,6 +47,7 @@ DexRectangle
Layout.leftMargin: 20
Layout.rightMargin: 20
+ // Coin Icon
Dex.Image
{
id: icon
@@ -58,49 +60,46 @@ DexRectangle
Layout.topMargin: 0
Layout.bottomMargin: 0
}
+
+ //
ColumnLayout
{
spacing: 2
Layout.alignment: Qt.AlignVCenter
- Dex.Text
+ DexLabel
{
Layout.preferredWidth: parent.width - 15
-
text_value: `${ticker} ${fullname}`
- font.pixelSize: Style.textSizeSmall3
+ font: Dex.DexTypo.body2
elide: Text.ElideRight
wrapMode: Text.NoWrap
}
- Dex.Text
+ DexLabel
{
id: middle_line
-
property string coin_value: amount
- text: coin_value
+ text_value: coin_value
Layout.fillWidth: true
elide: Text.ElideRight
- color: Dex.CurrentTheme.foregroundColor
- font: DexTypo.body2
wrapMode: Label.NoWrap
- ToolTip.text: coin_value
- Component.onCompleted: font.pixelSize = 11.5
+ font: DexTypo.body3
+ ToolTip.text: text_value
+ privacy: true
}
- Dex.Text
+ DexLabel
{
id: bottom_line
-
property string fiat_value: General.getFiatText(amount, ticker)
- text: fiat_value
+ text_value: fiat_value
Layout.fillWidth: true
elide: Text.ElideRight
- color: Dex.CurrentTheme.foregroundColor
- font: DexTypo.body2
+ font: DexTypo.body3
wrapMode: Label.NoWrap
- ToolTip.text: fiat_value
- Component.onCompleted: font.pixelSize = 11.5
+ ToolTip.text: text_value
+ privacy: true
}
}
}
diff --git a/atomic_defi_design/Dex/Constants/General.qml b/atomic_defi_design/Dex/Constants/General.qml
index 8f626296f7..251c19456d 100644
--- a/atomic_defi_design/Dex/Constants/General.qml
+++ b/atomic_defi_design/Dex/Constants/General.qml
@@ -419,6 +419,14 @@ QtObject {
}
function getFeesDetail(fees) {
+ if (privacy_mode) {
+ return [
+ {"label": privacy_text},
+ {"label": privacy_text},
+ {"label": privacy_text},
+ {"label": privacy_text}
+ ]
+ }
return [
{"label": qsTr("Taker tx fee: "), "fee": fees.base_transaction_fees, "ticker": fees.base_transaction_fees_ticker},
{"label": qsTr("Dex tx fee: "), "fee": fees.fee_to_send_taker_fee, "ticker": fees.fee_to_send_taker_fee_ticker},
@@ -435,6 +443,10 @@ QtObject {
}
function getSimpleFromPlaceholder(selectedTicker, selectedOrder, sell_ticker_balance) {
+ if (privacy_mode)
+ {
+ return "0"
+ }
if (sell_ticker_balance == 0)
{
return qsTr("%1 balance is zero").arg(selectedTicker)
@@ -489,6 +501,7 @@ QtObject {
}
function getTxExplorerURL(ticker, txid, add_0x=true) {
+ if (privacy_mode) return ''
if(txid !== '') {
const coin_info = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker)
const txid_prefix = (add_0x && coin_info.is_erc_family) ? '0x' : ''
@@ -497,6 +510,7 @@ QtObject {
}
function getAddressExplorerURL(ticker, address) {
+ if (privacy_mode) return ''
if(address !== '') {
const coin_info = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker)
return coin_info.explorer_url + addressTxUri(coin_info) + address
@@ -505,12 +519,14 @@ QtObject {
}
function viewTxAtExplorer(ticker, txid, add_0x=true) {
+ if (privacy_mode) return ''
if(txid !== '') {
Qt.openUrlExternally(getTxExplorerURL(ticker, txid, add_0x))
}
}
function viewAddressAtExplorer(ticker, address) {
+ if (privacy_mode) return ''
if(address !== '') {
Qt.openUrlExternally(getAddressExplorerURL(ticker, address))
}
@@ -555,6 +571,7 @@ QtObject {
}
function convertUsd(v) {
+ if (privacy_mode) return ''
let rate = API.app.get_rate_conversion("USD", API.app.settings_pg.current_currency)
let value = parseFloat(v) / parseFloat(rate)
@@ -566,6 +583,7 @@ QtObject {
}
function formatFiat(received, amount, fiat, precision=2) {
+ if (privacy_mode) return ''
if (precision == 2 && fiat == "BTC") {
precision = 8
}
@@ -575,6 +593,7 @@ QtObject {
}
function formatPercent(value, show_prefix=true) {
+ if (privacy_mode) return ''
let prefix = ''
if(value > 0) prefix = '+ '
else if(value < 0) {
@@ -619,6 +638,7 @@ QtObject {
}
function formatCrypto(received, amount, ticker, fiat_amount, fiat, precision, trail_zeros) {
+ if (privacy_mode) return ''
return diffPrefix(received) + ticker + " " + formatDouble(amount, precision, trail_zeros) + (fiat_amount ? " (" + formatFiat("", fiat_amount, fiat) + ")" : "")
}
@@ -777,15 +797,10 @@ QtObject {
}
function feeText(trade_info, base_ticker, has_info_icon=true, has_limited_space=false) {
-
-
if(!trade_info || !trade_info.trading_fee) return ""
-
const tx_fee = txFeeText(trade_info, base_ticker, has_info_icon, has_limited_space)
const trading_fee = tradingFeeText(trade_info, base_ticker, has_info_icon)
const minimum_amount = minimumtradingFeeText(trade_info, base_ticker, has_info_icon)
-
-
return tx_fee + "\n" + trading_fee +"
"+minimum_amount
}
@@ -804,13 +819,9 @@ QtObject {
}
function txFeeText(trade_info, base_ticker, has_info_icon=true, has_limited_space=false) {
-
if(!trade_info || !trade_info.trading_fee) return ""
-
const has_parent_coin_fees = hasParentCoinFees(trade_info)
-
var info = qsTr('%1 Transaction Fee'.arg(trade_info.base_transaction_fees_ticker))+': '+ trade_info.base_transaction_fees + " (%1)".arg(getFiatText(trade_info.base_transaction_fees, trade_info.base_transaction_fees_ticker, has_info_icon))
-
if (has_parent_coin_fees) {
info = info+"
"+qsTr('%1 Transaction Fee'.arg(trade_info.rel_transaction_fees_ticker))+': '+ trade_info.rel_transaction_fees + " (%1)".arg(getFiatText(trade_info.rel_transaction_fees, trade_info.rel_transaction_fees_ticker, has_info_icon))
}
diff --git a/atomic_defi_design/Dex/Exchange/ProView/DexComboBoxLine.qml b/atomic_defi_design/Dex/Exchange/ProView/DexComboBoxLine.qml
index 0d8269efb9..0e83f5af8d 100644
--- a/atomic_defi_design/Dex/Exchange/ProView/DexComboBoxLine.qml
+++ b/atomic_defi_design/Dex/Exchange/ProView/DexComboBoxLine.qml
@@ -87,9 +87,9 @@ RowLayout
Dex.Text
{
id: middle_line
-
property string coin_value: !details ? "" : details.balance
- text: coin_value
+ text_value: coin_value
+ privacy: true
Layout.fillWidth: true
elide: Text.ElideRight
color: Dex.CurrentTheme.foregroundColor
@@ -105,13 +105,14 @@ RowLayout
property string fiat_value: !details ? "" :
General.formatFiat("", details.main_currency_balance, API.app.settings_pg.current_currency)
- text: fiat_value
+ text_value: fiat_value
Layout.fillWidth: true
elide: Text.ElideRight
color: Dex.CurrentTheme.foregroundColor
font: DexTypo.body2
wrapMode: Label.NoWrap
ToolTip.text: fiat_value
+ privacy: true
Component.onCompleted: font.pixelSize = 11
}
}
diff --git a/atomic_defi_design/Dex/Exchange/ProView/PlaceOrderForm/OrderForm.qml b/atomic_defi_design/Dex/Exchange/ProView/PlaceOrderForm/OrderForm.qml
index 1cc7440e66..5ad87b5310 100644
--- a/atomic_defi_design/Dex/Exchange/ProView/PlaceOrderForm/OrderForm.qml
+++ b/atomic_defi_design/Dex/Exchange/ProView/PlaceOrderForm/OrderForm.qml
@@ -174,6 +174,7 @@ ColumnLayout
setVolume(text)
reset_fees_state()
}
+ enabled: !General.privacy_mode
}
OrderFormSubfield
@@ -204,9 +205,9 @@ ColumnLayout
left_label: "25%"
middle_label: "50%"
right_label: qsTr("Max")
- left_tooltip_text: qsTr("Swap 25% of your tradable balance.")
- middle_tooltip_text: qsTr("Swap 50% of your tradable balance.")
- right_tooltip_text: qsTr("Swap 100% of your tradable balance.")
+ left_tooltip_text: General.privacy_mode ? qsTr("Diasble privacy mode to trade") : qsTr("Swap 25% of your tradable balance.")
+ middle_tooltip_text: General.privacy_mode ? qsTr("Diasble privacy mode to trade") : qsTr("Swap 50% of your tradable balance.")
+ right_tooltip_text: General.privacy_mode ? qsTr("Diasble privacy mode to trade") : qsTr("Swap 100% of your tradable balance.")
}
}
@@ -419,6 +420,7 @@ ColumnLayout
radius: 16
text: API.app.trading_pg.maker_mode ? qsTr("CREATE MAKER SWAP") : qsTr("START TAKER SWAP")
font.weight: Font.Medium
+ enabled: !General.privacy_mode
}
}
}
\ No newline at end of file
diff --git a/atomic_defi_design/Dex/Exchange/ProView/TradingInfo/OrderLine.qml b/atomic_defi_design/Dex/Exchange/ProView/TradingInfo/OrderLine.qml
index 87d5456f62..91eb121226 100644
--- a/atomic_defi_design/Dex/Exchange/ProView/TradingInfo/OrderLine.qml
+++ b/atomic_defi_design/Dex/Exchange/ProView/TradingInfo/OrderLine.qml
@@ -49,7 +49,7 @@ FloatingBackground
Layout.preferredWidth: 24
Layout.alignment: Qt.AlignCenter
- DefaultText
+ DexLabel
{
id: statusText
anchors.centerIn: parent
@@ -86,34 +86,34 @@ FloatingBackground
clip: true
- DefaultText
+ DexLabel
{
id: baseAmountLabel
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 12
- text:
+ text_value:
{
- if (!details) return
+ if (!details) return
BigNumber.config({ DECIMAL_PLACES: 6 })
return new BigNumber(details.base_amount).toString(10)
}
- privacy: is_placed_order
+ privacy: true
elide: Text.ElideRight
maximumLineCount: 1
}
- DefaultText
+ DexLabel
{
anchors.left: baseAmountLabel.right
anchors.leftMargin: 3
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 12
- text: !details ? "" : "(%1 %2)".arg(details.base_amount_current_currency).arg(API.app.settings_pg.current_fiat_sign)
- privacy: is_placed_order
+ text_value: !details ? "" : "(%1 %2)".arg(details.base_amount_current_currency).arg(API.app.settings_pg.current_fiat_sign)
+ privacy: true
elide: Text.ElideRight
maximumLineCount: 1
}
@@ -128,14 +128,14 @@ FloatingBackground
iconSize: 18
}
- DefaultText
+ DexLabel
{
anchors.right: relAmountInCurrCurrency.left
anchors.rightMargin: 3
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 12
- text:
+ text_value:
{
if (!details) return
@@ -143,12 +143,12 @@ FloatingBackground
return new BigNumber(details.rel_amount).toString(10)
}
- privacy: is_placed_order
+ privacy: true
elide: Text.ElideRight
maximumLineCount: 1
}
- DefaultText
+ DexLabel
{
id: relAmountInCurrCurrency
@@ -156,8 +156,8 @@ FloatingBackground
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 12
- text: !details ? "" : "(%1 %2)".arg(details.rel_amount_current_currency).arg(API.app.settings_pg.current_fiat_sign)
- privacy: is_placed_order
+ text_value: !details ? "" : "(%1 %2)".arg(details.rel_amount_current_currency).arg(API.app.settings_pg.current_fiat_sign)
+ privacy: true
elide: Text.ElideRight
maximumLineCount: 1
}
@@ -181,7 +181,7 @@ FloatingBackground
source: General.coinIcon(!details ? atomic_app_primary_coin : details.base_coin ?? atomic_app_primary_coin)
}
- DefaultText
+ DexLabel
{
anchors.left: baseIcon.right
anchors.leftMargin: 2
@@ -189,13 +189,13 @@ FloatingBackground
font.weight: Font.Bold
font.pixelSize: 12
- text: !details ? "" : details.base_coin
- privacy: is_placed_order
+ text_value: !details ? "" : details.base_coin
+ privacy: true
elide: Text.ElideRight
maximumLineCount: 1
}
- DefaultText
+ DexLabel
{
visible: clickable
@@ -209,7 +209,7 @@ FloatingBackground
color: Dex.CurrentTheme.foregroundColor2
}
- DefaultText
+ DexLabel
{
anchors.right: relCoin.left
anchors.rightMargin: 2
@@ -217,8 +217,8 @@ FloatingBackground
font.weight: Font.Bold
font.pixelSize: 12
- text: !details ? "" : details.rel_coin
- privacy: is_placed_order
+ text_value: !details ? "" : details.rel_coin
+ privacy: true
elide: Text.ElideRight
maximumLineCount: 1
}
@@ -244,7 +244,7 @@ FloatingBackground
Layout.preferredWidth: 24
Layout.alignment: Qt.AlignCenter
- DefaultText
+ DexLabel
{
anchors.centerIn: parent
@@ -255,7 +255,7 @@ FloatingBackground
DefaultTooltip
{
- contentItem: DefaultText
+ contentItem: DexLabel
{
text_value: qsTr("Funds are recoverable")
font.pixelSize: Style.textSizeSmall4
diff --git a/atomic_defi_design/Dex/Exchange/ProView/TradingInfo/OrdersPage.qml b/atomic_defi_design/Dex/Exchange/ProView/TradingInfo/OrdersPage.qml
index 3629b41dae..ab0e0968f7 100644
--- a/atomic_defi_design/Dex/Exchange/ProView/TradingInfo/OrdersPage.qml
+++ b/atomic_defi_design/Dex/Exchange/ProView/TradingInfo/OrdersPage.qml
@@ -132,6 +132,7 @@ Item {
radius: 7
label.font: DexTypo.body2
text: qsTr("Export CSV")
+ enabled: list_model.length > 0 && ! General.privacy_mode
onClicked:
{
export_csv_dialog.folder = General.os_file_prefix + API.app.settings_pg.get_export_folder()
@@ -142,10 +143,10 @@ Item {
DefaultButton
{
visible: !root.is_history && list_model.length > 0
- enabled: list_model.length > 0
Layout.preferredHeight: 29
radius: 7
label.font: DexTypo.body2
+ enabled: list_model.length > 0 && ! General.privacy_mode
text: qsTr("Cancel All")
iconSource: Qaterial.Icons.close
onClicked: API.app.trading_pg.orders.cancel_order(list_model_proxy.get_filtered_ids())
diff --git a/atomic_defi_design/Dex/Exchange/Trade/OrderBook/ListDelegate.qml b/atomic_defi_design/Dex/Exchange/Trade/OrderBook/ListDelegate.qml
index 03819d17fe..8667ff4694 100644
--- a/atomic_defi_design/Dex/Exchange/Trade/OrderBook/ListDelegate.qml
+++ b/atomic_defi_design/Dex/Exchange/Trade/OrderBook/ListDelegate.qml
@@ -45,6 +45,10 @@ Item
{
if (mouse_area.containsMouse)
{
+ if (General.privacy_mode)
+ {
+ return qsTr("Orderbook is disabled in privacy mode")
+ }
if (API.app.trading_pg.maker_mode)
{
return qsTr("Orderbook is disabled while creating maker orders")
@@ -109,6 +113,7 @@ Item
// Populate form with selected order
onClicked:
{
+ if (General.privacy_mode) return
if (is_mine) return
if (API.app.trading_pg.maker_mode) return
diff --git a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/List.qml b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/List.qml
index c9ea3a02df..c900b3ca17 100644
--- a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/List.qml
+++ b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/List.qml
@@ -27,8 +27,6 @@ DexListView
delegate: ClipRRect
{
property var details: model
- readonly property bool is_placed_order: !details ? false :
- details.order_id !== ''
property bool expanded: order_list_view.currentIndex === index
@@ -78,7 +76,7 @@ DexListView
height: width
anchors.centerIn: parent
running: !isSwapDone(details.order_status) && Qt.platform.os != "osx"
- DefaultText
+ DexLabel
{
anchors.centerIn: parent
font.pixelSize: getStatusFontSize(details.order_status)
@@ -105,13 +103,13 @@ DexListView
anchors.verticalCenter: parent.verticalCenter
}
- DefaultText
+ DexLabel
{
id: base_amount
text_value: !details ? "" :
General.formatCrypto("", details.base_amount, details.base_coin).replace(" ","
")
font: rel_amount.font
- privacy: is_placed_order
+ privacy: true
anchors.verticalCenter: parent.verticalCenter
}
}
@@ -150,7 +148,7 @@ DexListView
height: width
anchors.verticalCenter: parent.verticalCenter
}
- DefaultText
+ DexLabel
{
id: rel_amount
text_value: !details ? "" :
@@ -162,7 +160,7 @@ DexListView
weight: Font.Normal
})
anchors.verticalCenter: parent.verticalCenter
- privacy: is_placed_order
+ privacy: true
}
}
@@ -194,8 +192,9 @@ DexListView
Layout.fillWidth: true
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
- text: !details ? "" :
+ text_value: !details ? "" :
General.formatCrypto("", details.base_amount, details.base_coin)
+ privacy: true
}
DexLabel
{
@@ -203,8 +202,9 @@ DexListView
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
horizontalAlignment: Text.AlignRight
- text: !details ? "" :
+ text_value: !details ? "" :
General.formatCrypto("", details.rel_amount, details.rel_coin)
+ privacy: true
}
}
@@ -215,20 +215,22 @@ DexListView
anchors.horizontalCenter: parent.horizontalCenter
height: 20
opacity: .6
- DefaultText
+ DexLabel
{
Layout.fillWidth: true
- Layout.fillHeight: true
+ Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
- text: "%1 %2".arg(API.app.settings_pg.current_currency).arg(details.base_amount_current_currency)
+ text_value: "%1 %2".arg(API.app.settings_pg.current_currency).arg(details.base_amount_current_currency)
+ privacy: true
}
- DefaultText
+ DexLabel
{
Layout.fillWidth: true
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
horizontalAlignment: Text.AlignRight
- text: "%1 %2".arg(API.app.settings_pg.current_currency).arg(details.rel_amount_current_currency)
+ text_value: "%1 %2".arg(API.app.settings_pg.current_currency).arg(details.rel_amount_current_currency)
+ privacy: true
}
}
@@ -244,7 +246,8 @@ DexListView
Layout.fillWidth: true
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
- text: !details ? "" : details.date?? ""
+ text_value: !details ? "" : details.date?? ""
+ privacy: true
}
Item
{
@@ -283,7 +286,7 @@ DexListView
contentItem: ColumnLayout
{
- DefaultText {
+ DexLabel {
text_value: qsTr("Funds are recoverable")
font.pixelSize: Constants.Style.textSizeSmall4
}
diff --git a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/SubCoinSelector.qml b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/SubCoinSelector.qml
index bf1938c322..852291ca5f 100644
--- a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/SubCoinSelector.qml
+++ b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/SubCoinSelector.qml
@@ -174,6 +174,7 @@ DexListView
text_value: model.balance.replace(" ","")
font.pixelSize: 14
wrapMode: Text.NoWrap
+ privacy: true
}
DexLabel
@@ -184,6 +185,7 @@ DexListView
text_value: "%1".arg(General.getFiatText(model.balance, model.ticker, false))
font.pixelSize: 14
wrapMode: Text.NoWrap
+ privacy: true
}
}
}
diff --git a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml
index 6a92ed7e0e..0eccd7fdbb 100644
--- a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml
+++ b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml
@@ -160,7 +160,7 @@ ClipRRect // Trade Card
opacity: .85
}
- DefaultText // Description
+ DexLabel // Description
{
anchors.topMargin: 10
font.pixelSize: Constants.Style.textSizeSmall4
@@ -231,7 +231,7 @@ ClipRRect // Trade Card
radius: 20
visible: !coinSelectorSimplified.visible && has_coins_with_balance
- DefaultText // From Text
+ DexLabel // From Text
{
id: _fromTitle
anchors.top: parent.top
@@ -242,7 +242,7 @@ ClipRRect // Trade Card
font.pixelSize: Constants.Style.textSizeSmall4
}
- Text // Tradable Balance
+ DexLabel // Tradable Balance
{
readonly property int _maxWidth: 140
@@ -252,10 +252,11 @@ ClipRRect // Trade Card
anchors.verticalCenter: _fromTitle.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 17
- text: qsTr("%1").arg(max_trade_volume) // This is slow to appear
+ text_value: qsTr("%1").arg(max_trade_volume) // This is slow to appear
font.pixelSize: Constants.Style.textSizeSmall2
elide: Text.ElideRight
color: DexTheme.foregroundColorLightColor1
+ privacy: true
DefaultImage
{
@@ -282,6 +283,10 @@ ClipRRect // Trade Card
visible: parent.containsMouse
text:
{
+ if (General.privacy_mode)
+ {
+ return qsTr("Balance: ") + qsTr("****")
+ }
let balance = Constants.API.app.portfolio_pg.portfolio_mdl.coin_balance(selectedTicker);
return qsTr("Balance: ") + Constants.API.app.portfolio_pg.portfolio_mdl.coin_balance(selectedTicker) + ' (' + parent.parent.text + ' tradable)'
}
@@ -300,7 +305,7 @@ ClipRRect // Trade Card
AmountField // Amount
{
id: _fromValue
- enabled: sell_ticker_balance == 0 ? false : waiting_for_sell_coin_info ? false : true
+ enabled: sell_ticker_balance == 0 ? false : waiting_for_sell_coin_info ? false : General.privacy_mode ? false : true
anchors.bottom: parent.bottom
anchors.bottomMargin: 19
anchors.left: parent.left
@@ -329,7 +334,7 @@ ClipRRect // Trade Card
Component.onCompleted: text = ""
}
- Text // Amount In Fiat
+ DexLabel // Amount In Fiat
{
enabled: _fromValue.text
visible: enabled
@@ -340,7 +345,8 @@ ClipRRect // Trade Card
font.pixelSize: Constants.Style.textSizeSmall1
color: DexTheme.foregroundColor
opacity: .9
- text: enabled ? Constants.General.getFiatText(_fromValue.text, selectedTicker) : ""
+ text_value: enabled ? Constants.General.getFiatText(_fromValue.text, selectedTicker) : ""
+ privacy: true
}
Rectangle // Select ticker button
@@ -387,7 +393,7 @@ ClipRRect // Trade Card
source: Constants.General.coinIcon(selectedTicker)
}
- DefaultText
+ DexLabel
{
id: _selectedTickerText
@@ -403,7 +409,7 @@ ClipRRect // Trade Card
wrapMode: Text.NoWrap
- DefaultText
+ DexLabel
{
id: _selectedTickerTypeText
@@ -432,16 +438,13 @@ ClipRRect // Trade Card
ClickableText // MAX Button
{
id: _maxClickableLabel
-
anchors.right: _selectTickerBut.left
anchors.rightMargin: 10
anchors.verticalCenter: _selectTickerBut.verticalCenter
-
visible: selectedTicker !== ""
-
text: qsTr("MAX")
color: Dex.CurrentTheme.foregroundColor2
-
+ enabled: !General.privacy_mode
onClicked: _fromValue.text = max_trade_volume
}
@@ -464,7 +467,7 @@ ClipRRect // Trade Card
&& !coinSelectorSimplified.visible
&& has_coins_with_balance
- DefaultText
+ DexLabel
{
anchors.fill: parent
anchors.leftMargin: 17
@@ -487,7 +490,7 @@ ClipRRect // Trade Card
background: Rectangle { color: swap_from_card.color}
}
- DefaultText // Amount In Fiat
+ DexLabel // Amount In Fiat
{
enabled: parseFloat(_toValue.text) > 0 && _toValue.text != ""
anchors.top: _toValue.bottom
@@ -533,7 +536,7 @@ ClipRRect // Trade Card
}
// When no order is currently selected.
- DefaultText
+ DexLabel
{
id: _bestOrderNoTickerText
@@ -567,7 +570,7 @@ ClipRRect // Trade Card
}
// Ticker (When a best order is currently selected)
- DefaultText
+ DexLabel
{
id: _bestOrderTickerText
@@ -584,7 +587,7 @@ ClipRRect // Trade Card
font.pixelSize: Constants.Style.textSizeSmall2
wrapMode: Text.NoWrap
- DefaultText
+ DexLabel
{
id: _bestOrderTickerTypeText
@@ -623,14 +626,14 @@ ClipRRect // Trade Card
&& !coinSelectorSimplified.visible
&& has_coins_with_balance
- DefaultText
+ DexLabel
{
Layout.rightMargin: 120
font.pixelSize: Constants.Style.textSizeSmall3
text: qsTr("Price")
}
- DefaultText
+ DexLabel
{
Layout.alignment: Qt.AlignRight
font.pixelSize: Constants.Style.textSizeSmall3
@@ -714,7 +717,10 @@ ClipRRect // Trade Card
function getAlert()
{
- console.log("_fromValue.text: " + _fromValue.text)
+ if (Constants.General.privacy_mode)
+ {
+ return qsTr("Disable privacy mode to trade.")
+ }
var right_ticker = Constants.API.app.trading_pg.market_pairs_mdl.right_selected_coin
var base_ticker = Constants.API.app.trading_pg.market_pairs_mdl.base_selected_coin
var rel_ticker = Constants.API.app.trading_pg.market_pairs_mdl.rel_selected_coin
@@ -932,7 +938,7 @@ ClipRRect // Trade Card
anchors.fill: parent
}
- DefaultText
+ DexLabel
{
anchors.centerIn: parent
text: qsTr("Calculating fee estimate... ")
@@ -959,7 +965,7 @@ ClipRRect // Trade Card
Component.onCompleted: _feesCard.height += 10
Component.onDestruction: _feesCard.height -= 10
- DefaultText
+ DexLabel
{
Layout.alignment: Qt.AlignLeft
Layout.leftMargin: 10
@@ -967,7 +973,7 @@ ClipRRect // Trade Card
font.pixelSize: Constants.Style.textSizeSmall3
}
- DefaultText
+ DexLabel
{
Layout.alignment: Qt.AlignRight
Layout.rightMargin: 10
diff --git a/src/core/atomicdex/services/kdf/kdf.service.cpp b/src/core/atomicdex/services/kdf/kdf.service.cpp
index 6c7e654afb..71469bd2e3 100644
--- a/src/core/atomicdex/services/kdf/kdf.service.cpp
+++ b/src/core/atomicdex/services/kdf/kdf.service.cpp
@@ -2228,13 +2228,13 @@ namespace atomic_dex
.rpc_password = std::move(rpcpass) == "" ? std::move(atomic_dex::gen_random_password()) : std::move(rpcpass)
};
- auto dbdir = std::filesystem::path(cfg.dbdir);
- auto old_dbdir = std::filesystem::path(utils::get_atomic_dex_data_folder() / "mm2" / "DB");
- if (not std::filesystem::exists(dbdir))
+ auto dbdir_parent = std::filesystem::path(utils::get_atomic_dex_data_folder() / "kdf");
+ auto old_dbdir_parent = std::filesystem::path(utils::get_atomic_dex_data_folder() / "mm2");
+ if (not std::filesystem::exists(dbdir_parent))
{
- if (std::filesystem::exists(old_dbdir))
+ if (std::filesystem::exists(old_dbdir_parent))
{
- std::filesystem::rename(old_dbdir, dbdir);
+ std::filesystem::rename(old_dbdir_parent, dbdir_parent);
}
}