Skip to content

Commit

Permalink
disable orderbooks in privacy mode
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Aug 19, 2024
1 parent cc205b1 commit 1b415db
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ MultipageModal
{
Layout.fillWidth: true
title: qsTr("Swap ID")
text_value: !details ? "" : details.order_id
text: !details ? "" : details.order_id
label.font.pixelSize: 13
visible: text_value !== ''
visible: text !== ''
copy: true
privacy: true
onCopyNotificationTitle: qsTr("Swap ID")
Expand All @@ -178,11 +178,11 @@ MultipageModal
{
Layout.fillWidth: true
title: !details ? "" : details.is_maker ? qsTr("Maker Payment Sent Transaction ID") : qsTr("Maker Payment Spent Transaction ID")
text_value: !details ? "" : details.maker_payment_id
text: !details ? "" : details.maker_payment_id
label.font.pixelSize: 12
visible: text_value !== ''
visible: text !== ''
copy: true
linkURL: text_value !== '' ? General.getTxExplorerURL(details.is_maker ? details.base_coin : details.rel_coin, details.maker_payment_id) : ''
linkURL: text !== '' ? General.getTxExplorerURL(details.is_maker ? details.base_coin : details.rel_coin, details.maker_payment_id) : ''
privacy: true
onCopyNotificationTitle: qsTr("Maker Payment TXID")
}
Expand All @@ -192,13 +192,13 @@ MultipageModal
{
Layout.fillWidth: true
title: !details ? "" : details.is_maker ? qsTr("Taker Payment Spent Transaction ID") : qsTr("Taker Payment Sent Transaction ID")
text_value: !details ? "" : details.taker_payment_id
text: !details ? "" : details.taker_payment_id
label.font.pixelSize: 12
visible: text_value !== ''
visible: text !== ''
copy: true
privacy: true
onCopyNotificationTitle: qsTr("Taker Payment TXID")
linkURL: text_value !== '' ? General.getTxExplorerURL(details.is_maker ? details.rel_coin : details.base_coin, details.taker_payment_id) : ''
linkURL: text !== '' ? General.getTxExplorerURL(details.is_maker ? details.rel_coin : details.base_coin, details.taker_payment_id) : ''
}

// Error ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions atomic_defi_design/Dex/Wallet/TransactionDetailsModal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ MultipageModal
TextEditWithTitle
{
title: qsTr("Amount")
text_value: !details ? "" : General.formatCrypto(!details.am_i_sender, details.amount, api_wallet_page.ticker, details.amount_fiat, API.app.settings_pg.current_currency)
text: !details ? "" : General.formatCrypto(!details.am_i_sender, details.amount, api_wallet_page.ticker, details.amount_fiat, API.app.settings_pg.current_currency)
value_color: !details ? "white" : details.am_i_sender ? Dex.CurrentTheme.warningColor : Dex.CurrentTheme.okColor
privacy: true
label.font.pixelSize: 13
Expand All @@ -90,7 +90,7 @@ MultipageModal
TextEditWithTitle
{
title: qsTr("Fees")
text_value: !details ? "" : General.formatCrypto(parseFloat(details.fees) < 0, Math.abs(parseFloat(details.fees)), current_ticker_infos.fee_ticker, details.fees_amount_fiat, API.app.settings_pg.current_currency)
text: !details ? "" : General.formatCrypto(parseFloat(details.fees) < 0, Math.abs(parseFloat(details.fees)), current_ticker_infos.fee_ticker, details.fees_amount_fiat, API.app.settings_pg.current_currency)
value_color: !details ? "white" : parseFloat(details.fees) > 0 ? Dex.CurrentTheme.warningColor : Dex.CurrentTheme.okColor
privacy: true
label.font.pixelSize: 13
Expand Down

0 comments on commit 1b415db

Please sign in to comment.