Skip to content

Commit ac40c67

Browse files
committed
fix: disable swaps for IOS
1 parent 419c13a commit ac40c67

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

mobile/scripts/buildNimStatusClient.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ else
1919
fi
2020

2121
if [[ "$OS" == "ios" ]]; then
22-
PLATFORM_SPECIFIC=(--app:staticlib -d:ios --os:ios)
22+
PLATFORM_SPECIFIC=(--app:staticlib -d:ios --os:ios -d:swap_disabled)
2323
else
2424
PLATFORM_SPECIFIC=(--app:lib --os:android -d:android -d:androidNDK -d:chronicles_sinks=textlines[logcat],textlines[nocolors,dynamic],textlines[file,nocolors] \
2525
--passL="-L$LIB_DIR" --passL="-lstatus" --passL="-lStatusQ$LIB_SUFFIX" --passL="-lDOtherSide$LIB_SUFFIX" --passL="-lqrcodegen" --passL="-lqzxing" --passL="-lssl_3" --passL="-lcrypto_3" -d:taskpool)

src/app/global/feature_flags.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ macro featureFlag(name: string, defaultValue: bool, buildFlag: static bool = fal
1616
return quote do:
1717
let `flagName`* = getEnv("FLAG_" & `name`.toUpper, boolToEnv(`defaultValue`)) != "0"
1818

19-
const DEFAULT_FLAG_SWAP_ENABLED = true
19+
const DEFAULT_FLAG_SWAP_ENABLED = when defined(swap_disabled): false else: true
2020
const DEFAULT_FLAG_SEND_VIA_PERSONAL_CHAT_ENABLED = true
2121
const DEFAULT_FLAG_PAYMENT_REQUEST_ENABLED = true
2222
const DEFAULT_FLAG_SIMPLE_SEND_ENABLED = true

ui/app/AppLayouts/Market/MarketLayout.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ StatusSectionLayout {
2828
required property var fnFormatCurrencyAmount
2929
/** required property holds the current page set from the backend **/
3030
required property int currentPage
31+
/** property to enable/disable swap button **/
32+
property bool swapEnabled: true
3133

3234
/** signal to request the launch of Swap Modal **/
3335
signal requestLaunchSwap()
@@ -68,6 +70,7 @@ StatusSectionLayout {
6870
Item { Layout.fillWidth: true }
6971
StatusButton {
7072
objectName: "swapButton"
73+
visible: root.swapEnabled
7174
text: qsTr("Swap")
7275
icon.name: "swap"
7376
type: StatusBaseButton.Type.Primary

ui/app/mainui/AppMain.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,6 +2218,7 @@ Item {
22182218
tokensModel: appMain.marketStore.marketLeaderboardModel
22192219
totalTokensCount: appMain.marketStore.totalLeaderboardCount
22202220
loading: appMain.marketStore.marketLeaderboardLoading
2221+
swapEnabled: featureFlagsStore.swapEnabled
22212222
currencySymbol: {
22222223
const symbol = SQUtils.ModelUtils.getByKey(
22232224
appMain.currencyStore.currenciesModel,

0 commit comments

Comments
 (0)