Skip to content
Merged
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
4 changes: 2 additions & 2 deletions MobileWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4133,7 +4133,7 @@
CODE_SIGN_ENTITLEMENTS = MobileWallet/Tari.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 9;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be automatic increment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't update this so it was done automatically. The CI will probably override it too

DEVELOPMENT_TEAM = 8XGMD9X2H2;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -4168,7 +4168,7 @@
CODE_SIGN_ENTITLEMENTS = MobileWallet/Tari.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = 8XGMD9X2H2;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand Down
8 changes: 5 additions & 3 deletions MobileWallet/Screens/Home/Home/Scenes/Home.swift
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,12 @@ private extension Home {
}
.foregroundStyle(.whiteMain.opacity(0.5))

TariButton("Buy XTM", style: .green, size: .large) {
router.isSwapPresented = true
if exolix.isFeatureSupported {
TariButton("Buy XTM", style: .green, size: .large) {
router.isSwapPresented = true
}
.padding(.top)
}
.padding(.top)
}
.padding(.top, 50)
.padding(20)
Expand Down
2 changes: 2 additions & 0 deletions MobileWallet/Services/Exolix/Exolix.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ final class Exolix {
private var isMonitoringTransactions = false
var monitoredTransactions: Set<String> = []
var latestTransactions = [String: ExolixTransactionResponse]()

let isFeatureSupported = false
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better flexibility during development and testing, consider using a compilation directive to control this feature flag. Hardcoding it to false requires a code change every time you want to enable it for a debug or test build.

A better approach would be to use the DEBUG flag, which is automatically defined by Xcode for debug builds. This would keep the feature enabled for developers and testers, but disabled in release builds. You can implement this cleanly using an immediately-executed closure.

    let isFeatureSupported: Bool = {
        #if DEBUG
            return true
        #else
            return false
        #endif
    }()


init() {
self.apiKey = AppSecret.load()?.exolixApiKey
Expand Down