Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/global/feature_flags.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ macro featureFlag(name: string, defaultValue: bool, buildFlag: static bool = fal
return quote do:
let `flagName`* = getEnv("FLAG_" & `name`.toUpper, boolToEnv(`defaultValue`)) != "0"

const DEFAULT_FLAG_SWAP_ENABLED = true
const DEFAULT_FLAG_SWAP_ENABLED = when defined(swap_disabled): false else: true
const DEFAULT_FLAG_SEND_VIA_PERSONAL_CHAT_ENABLED = true
const DEFAULT_FLAG_PAYMENT_REQUEST_ENABLED = true
const DEFAULT_FLAG_SIMPLE_SEND_ENABLED = true
Expand Down
3 changes: 3 additions & 0 deletions ui/app/AppLayouts/Market/MarketLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ StatusSectionLayout {
required property var fnFormatCurrencyAmount
/** required property holds the current page set from the backend **/
required property int currentPage
/** property to enable/disable swap button **/
property bool swapEnabled: true

/** signal to request the launch of Swap Modal **/
signal requestLaunchSwap()
Expand Down Expand Up @@ -68,6 +70,7 @@ StatusSectionLayout {
Item { Layout.fillWidth: true }
StatusButton {
objectName: "swapButton"
visible: root.swapEnabled
text: qsTr("Swap")
icon.name: "swap"
type: StatusBaseButton.Type.Primary
Expand Down
1 change: 1 addition & 0 deletions ui/app/mainui/AppMain.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2218,6 +2218,7 @@ Item {
tokensModel: appMain.marketStore.marketLeaderboardModel
totalTokensCount: appMain.marketStore.totalLeaderboardCount
loading: appMain.marketStore.marketLeaderboardLoading
swapEnabled: featureFlagsStore.swapEnabled
currencySymbol: {
const symbol = SQUtils.ModelUtils.getByKey(
appMain.currencyStore.currenciesModel,
Expand Down