diff --git a/litewallet.xcodeproj/project.pbxproj b/litewallet.xcodeproj/project.pbxproj index 1f03d9d2..4198fee9 100644 --- a/litewallet.xcodeproj/project.pbxproj +++ b/litewallet.xcodeproj/project.pbxproj @@ -58,7 +58,6 @@ 24313CA523824F5800A83F69 /* Buy.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 24313C9823824F5800A83F69 /* Buy.storyboard */; }; 24313CAA23824F9800A83F69 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 24313CA823824F9800A83F69 /* Main.storyboard */; }; 24393B5C23C259400075218D /* Phrase.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 24393B5B23C259400075218D /* Phrase.storyboard */; }; - 24470E2123A5DA9700ADDA27 /* APIManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24470E2023A5DA9700ADDA27 /* APIManagerTests.swift */; }; 24470E2323A5DB7D00ADDA27 /* WalletManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24470E2223A5DB7D00ADDA27 /* WalletManagerTests.swift */; }; 24470E2A23A5F33000ADDA27 /* BRReplicatedKVStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24470E2923A5F33000ADDA27 /* BRReplicatedKVStoreTests.swift */; }; 24470E2C23A5F43B00ADDA27 /* DefaultFiatCurrencyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24470E2B23A5F43B00ADDA27 /* DefaultFiatCurrencyTests.swift */; }; @@ -240,7 +239,6 @@ C30029EB25D019BC00F08C2B /* CopyButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C30029EA25D019BC00F08C2B /* CopyButtonView.swift */; }; C3019EE32B8FEFED00FAF648 /* AssociatedObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3019EE22B8FEFED00FAF648 /* AssociatedObject.swift */; }; C30808A52D0A23530063E793 /* AppsFlyerLib-Static in Frameworks */ = {isa = PBXBuildFile; productRef = C30808A42D0A23530063E793 /* AppsFlyerLib-Static */; }; - C30808A72D0B70160063E793 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C30808A62D0B70160063E793 /* GoogleService-Info.plist */; settings = {ASSET_TAGS = ("initial-resources", ); }; }; C316CF49261887FC00E4C09B /* UIApplication+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C316CF48261887FC00E4C09B /* UIApplication+Extension.swift */; }; C31891C326733FD400ECE25C /* TabBarViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31891C226733FD400ECE25C /* TabBarViewControllerTests.swift */; }; C32142EA25C97CD900BECCD0 /* TransactionCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32142E925C97CD900BECCD0 /* TransactionCellView.swift */; }; @@ -277,7 +275,9 @@ C353582B2D11D9B500395C45 /* RemoteConfigHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C353582A2D11D9B500395C45 /* RemoteConfigHelper.swift */; }; C353582D2D11DA4900395C45 /* FirebaseRemoteConfig in Frameworks */ = {isa = PBXBuildFile; productRef = C353582C2D11DA4900395C45 /* FirebaseRemoteConfig */; }; C353582F2D11DA4900395C45 /* FirebaseRemoteConfigSwift in Frameworks */ = {isa = PBXBuildFile; productRef = C353582E2D11DA4900395C45 /* FirebaseRemoteConfigSwift */; }; - C35358312D11DE1500395C45 /* remote-config-defaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = C35358302D11DE1500395C45 /* remote-config-defaults.plist */; settings = {ASSET_TAGS = ("initial-resources", ); }; }; + C35358332D11E7D100395C45 /* APITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C35358322D11E7D100395C45 /* APITests.swift */; }; + C35358372D11EB0600395C45 /* remote-config-defaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = C35358362D11EB0600395C45 /* remote-config-defaults.plist */; settings = {ASSET_TAGS = ("initial-resources", ); }; }; + C35358392D11EB2F00395C45 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C35358382D11EB2F00395C45 /* GoogleService-Info.plist */; settings = {ASSET_TAGS = ("initial-resources", ); }; }; C3543A27264AFE490005D17A /* LocaleChangeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3543A26264AFE490005D17A /* LocaleChangeView.swift */; }; C3543A29264AFE720005D17A /* LocaleChangeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3543A28264AFE720005D17A /* LocaleChangeViewModel.swift */; }; C35ABD232574070A002BB9BB /* PartnersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C35ABD222574070A002BB9BB /* PartnersView.swift */; }; @@ -735,7 +735,6 @@ 24375314238AE09700E1B2AE /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = pt; path = pt.lproj/BIP39Words.plist; sourceTree = ""; }; 24375315238AE09900E1B2AE /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = ru; path = ru.lproj/BIP39Words.plist; sourceTree = ""; }; 24393B5B23C259400075218D /* Phrase.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Phrase.storyboard; sourceTree = ""; }; - 24470E2023A5DA9700ADDA27 /* APIManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIManagerTests.swift; sourceTree = ""; }; 24470E2223A5DB7D00ADDA27 /* WalletManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalletManagerTests.swift; sourceTree = ""; }; 24470E2923A5F33000ADDA27 /* BRReplicatedKVStoreTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BRReplicatedKVStoreTests.swift; sourceTree = ""; }; 24470E2B23A5F43B00ADDA27 /* DefaultFiatCurrencyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultFiatCurrencyTests.swift; sourceTree = ""; }; @@ -1393,7 +1392,6 @@ C30029E125D0185500F08C2B /* StandardDividerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StandardDividerView.swift; sourceTree = ""; }; C30029EA25D019BC00F08C2B /* CopyButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyButtonView.swift; sourceTree = ""; }; C3019EE22B8FEFED00FAF648 /* AssociatedObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AssociatedObject.swift; sourceTree = ""; }; - C30808A62D0B70160063E793 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; C31045602CDBB94600C11FDE /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; C316CF48261887FC00E4C09B /* UIApplication+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Extension.swift"; sourceTree = ""; }; C31891C226733FD400ECE25C /* TabBarViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarViewControllerTests.swift; sourceTree = ""; }; @@ -1433,7 +1431,9 @@ C350788A27DCAAA100A50819 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = uk; path = uk.lproj/BIP39Words.plist; sourceTree = ""; }; C350788B27DCB10700A50819 /* TextView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TextView+Extension.swift"; sourceTree = ""; }; C353582A2D11D9B500395C45 /* RemoteConfigHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteConfigHelper.swift; sourceTree = ""; }; - C35358302D11DE1500395C45 /* remote-config-defaults.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "remote-config-defaults.plist"; sourceTree = ""; }; + C35358322D11E7D100395C45 /* APITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APITests.swift; sourceTree = ""; }; + C35358362D11EB0600395C45 /* remote-config-defaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "remote-config-defaults.plist"; sourceTree = ""; }; + C35358382D11EB2F00395C45 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; C3543A26264AFE490005D17A /* LocaleChangeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocaleChangeView.swift; sourceTree = ""; }; C3543A28264AFE720005D17A /* LocaleChangeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocaleChangeViewModel.swift; sourceTree = ""; }; C35ABD222574070A002BB9BB /* PartnersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnersView.swift; sourceTree = ""; }; @@ -2093,6 +2093,7 @@ 2465873723A5AAD100A32E9E /* litewalletTests */ = { isa = PBXGroup; children = ( + C35358322D11E7D100395C45 /* APITests.swift */, C3E587AD2CFC7C69000592D8 /* Seed Word Tests */, 584E24FF2951DA97005E0E8B /* Language Selection Tests */, C3EFA9A42651A7C4005C59B5 /* Lock Screen Tests */, @@ -2100,7 +2101,6 @@ 24470E3923A5FF5700ADDA27 /* TestHelpers.swift */, 24470E4323A6088700ADDA27 /* Class Tests */, 24470E2823A5F2C000ADDA27 /* Legacy BRTests */, - 24470E2023A5DA9700ADDA27 /* APIManagerTests.swift */, 24470E2223A5DB7D00ADDA27 /* WalletManagerTests.swift */, 2465873A23A5AAD100A32E9E /* Info.plist */, ); @@ -2992,9 +2992,9 @@ isa = PBXGroup; children = ( C7FD407E2C48FAF60010C0E6 /* partner-keys.plist */, - C30808A62D0B70160063E793 /* GoogleService-Info.plist */, + C35358382D11EB2F00395C45 /* GoogleService-Info.plist */, + C35358362D11EB0600395C45 /* remote-config-defaults.plist */, C37D51562CFBB5DB003E206E /* Debug-GoogleService-Info.plist */, - C35358302D11DE1500395C45 /* remote-config-defaults.plist */, ); name = LaunchDataResources; sourceTree = ""; @@ -3761,8 +3761,8 @@ files = ( C3423C492B796D820051BD6D /* Ko.mp3 in Resources */, 75A2A79E1DA5934300A983D8 /* LaunchScreen.storyboard in Resources */, + C35358392D11EB2F00395C45 /* GoogleService-Info.plist in Resources */, C33685092BECE8B10069CBC7 /* PrivacyInfo.xcprivacy in Resources */, - C35358312D11DE1500395C45 /* remote-config-defaults.plist in Resources */, C3423C3F2B796D820051BD6D /* Pt.mp3 in Resources */, 24D5F23822599C0B00225462 /* BarlowSemiCondensed-Italic.ttf in Resources */, 24D5F25922599C0B00225462 /* BarlowSemiCondensed-Medium.ttf in Resources */, @@ -3797,11 +3797,11 @@ 24B523AD238A53DC0030594D /* BIP39Words.plist in Resources */, 24313CAA23824F9800A83F69 /* Main.storyboard in Resources */, 24D5F25F22599C0B00225462 /* BarlowSemiCondensed-Regular.ttf in Resources */, + C35358372D11EB0600395C45 /* remote-config-defaults.plist in Resources */, C3423C402B796D820051BD6D /* De.mp3 in Resources */, 24DFCE6823B89CDE001F17F8 /* Settings.storyboard in Resources */, C37D51572CFBB5DB003E206E /* Debug-GoogleService-Info.plist in Resources */, 24393B5C23C259400075218D /* Phrase.storyboard in Resources */, - C30808A72D0B70160063E793 /* GoogleService-Info.plist in Resources */, C3423C422B796D820051BD6D /* coinflip.aiff in Resources */, 75A2A79B1DA5934300A983D8 /* Assets.xcassets in Resources */, ); @@ -3914,8 +3914,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + C35358332D11E7D100395C45 /* APITests.swift in Sources */, 24470E4223A6007200ADDA27 /* WalletInfoTest.swift in Sources */, - 24470E2123A5DA9700ADDA27 /* APIManagerTests.swift in Sources */, 24470E3423A5F5E600ADDA27 /* PaymentRequestTests.swift in Sources */, 584E25012951DAAA005E0E8B /* LanguageSelectionTests.swift in Sources */, 24470E2E23A5F4FF00ADDA27 /* BRCoderTests.swift in Sources */, @@ -4538,7 +4538,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = litewallet/litewallet.entitlements; - CURRENT_PROJECT_VERSION = 241211.0; + CURRENT_PROJECT_VERSION = 241217.1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES; @@ -4896,7 +4896,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = litewallet/litewallet.entitlements; - CURRENT_PROJECT_VERSION = 241211.0; + CURRENT_PROJECT_VERSION = 241217.1; DEVELOPMENT_TEAM = ZV7987N2ZC; EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -5038,7 +5038,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = litewallet/litewallet.entitlements; - CURRENT_PROJECT_VERSION = 241211.0; + CURRENT_PROJECT_VERSION = 241217.1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = NO; diff --git a/litewallet/BRAPIClient+Wallet.swift b/litewallet/BRAPIClient+Wallet.swift index 24b08f25..94d8071e 100644 --- a/litewallet/BRAPIClient+Wallet.swift +++ b/litewallet/BRAPIClient+Wallet.swift @@ -12,6 +12,7 @@ extension BRAPIClient { func exchangeRates(isFallback: Bool = false, _ handler: @escaping (_ rates: [Rate], _ error: String?) -> Void) { let request = isFallback ? URLRequest(url: URL(string: APIServer().devBaseUrl + "v1/rates")!) : URLRequest(url: URL(string: APIServer().baseUrl + "v1/rates")!) + dataTaskWithRequest(request) { data, _, error in if error == nil, let data = data, let parsedData = try? JSONSerialization.jsonObject(with: data, options: .allowFragments) diff --git a/litewallet/Constants/Constants+Events.swift b/litewallet/Constants/Constants+Events.swift index 59459b0b..2bf985b1 100644 --- a/litewallet/Constants/Constants+Events.swift +++ b/litewallet/Constants/Constants+Events.swift @@ -17,7 +17,6 @@ struct APIServer { init() { baseUrl = appDelegate.remoteConfigurationHelper? .getString(key: RemoteConfigKeys.KEY_PROD_API_BASEURL.rawValue) ?? "" - devBaseUrl = appDelegate.remoteConfigurationHelper? .getString(key: RemoteConfigKeys.KEY_DEV_API_BASEURL.rawValue) ?? "" } diff --git a/litewallet/Environment.swift b/litewallet/Environment.swift index d14d16f3..159911f9 100644 --- a/litewallet/Environment.swift +++ b/litewallet/Environment.swift @@ -144,23 +144,3 @@ struct E { return UIScreen.main.bounds.size.height } } - -/// Remote Config -enum EnvironmentRemoteConfigKey: String, Equatable { - case k20241212_API_1 - case k20241212_API_2 - - var key: String { - switch self { - case .k20241212_API_1: return "key_api_baseurl_dev_new_enabled" - case .k20241212_API_2: return "key_api_baseurl_prod_new_enabled" - } - } - -// var type: Any { -// switch self { -// case .k20241212_API_1: return Bool -// case .k20241212_API_2: return bool -// } -// } -} diff --git a/litewallet/RemoteConfigHelper.swift b/litewallet/RemoteConfigHelper.swift index ab69d097..c8815bd3 100644 --- a/litewallet/RemoteConfigHelper.swift +++ b/litewallet/RemoteConfigHelper.swift @@ -49,8 +49,6 @@ class RemoteConfigHelper: NSObject { return } - print("::: Updated keys: \(configUpdate.updatedKeys)") - self.fetchAndActivateRemoteConfig() } }