diff --git a/.github/workflows/deploy_appstore.yml b/.github/workflows/deploy_appstore.yml
index b5062e0172..49f913919b 100644
--- a/.github/workflows/deploy_appstore.yml
+++ b/.github/workflows/deploy_appstore.yml
@@ -73,3 +73,4 @@ jobs:
XCCONFIG_PROD_OPEN_SEA_API_KEY: ${{ secrets.XCCONFIG_PROD_OPEN_SEA_API_KEY }}
XCCONFIG_PROD_TRONGRID_API_KEY: ${{ secrets.XCCONFIG_PROD_TRONGRID_API_KEY }}
XCCONFIG_PROD_UNSTOPPABLE_DOMAINS_API_KEY: ${{ secrets.XCCONFIG_PROD_UNSTOPPABLE_DOMAINS_API_KEY }}
+ XCCONFIG_PROD_ONE_INCH_API_KEY: ${{ secrets.XCCONFIG_PROD_ONE_INCH_API_KEY }}
diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml
index 6bb55e450d..0e50ae8998 100644
--- a/.github/workflows/deploy_dev.yml
+++ b/.github/workflows/deploy_dev.yml
@@ -74,3 +74,4 @@ jobs:
XCCONFIG_DEV_OPEN_SEA_API_KEY: ${{ secrets.XCCONFIG_DEV_OPEN_SEA_API_KEY }}
XCCONFIG_DEV_TRONGRID_API_KEY: ${{ secrets.XCCONFIG_DEV_TRONGRID_API_KEY }}
XCCONFIG_DEV_UNSTOPPABLE_DOMAINS_API_KEY: ${{ secrets.XCCONFIG_DEV_UNSTOPPABLE_DOMAINS_API_KEY }}
+ XCCONFIG_DEV_ONE_INCH_API_KEY: ${{ secrets.XCCONFIG_DEV_ONE_INCH_API_KEY }}
diff --git a/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj b/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj
index 09dc3b1239..299065dfeb 100644
--- a/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj
+++ b/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj
@@ -11254,7 +11254,7 @@
repositoryURL = "https://github.com/horizontalsystems/OneInchKit.Swift";
requirement = {
kind = exactVersion;
- version = 2.0.1;
+ version = 2.1.1;
};
};
D3604E6428F02D9A0066C366 /* XCRemoteSwiftPackageReference "BitcoinKit.Swift" */ = {
diff --git a/UnstoppableWallet/UnstoppableWallet/Configuration/Development.template.xcconfig b/UnstoppableWallet/UnstoppableWallet/Configuration/Development.template.xcconfig
index 47efb59f52..d9c8238510 100644
--- a/UnstoppableWallet/UnstoppableWallet/Configuration/Development.template.xcconfig
+++ b/UnstoppableWallet/UnstoppableWallet/Configuration/Development.template.xcconfig
@@ -18,5 +18,6 @@ shared_cloud_container_id = iCloud.io.horizontalsystems.bank-wallet.shared.dev
private_cloud_container_id = iCloud.io.horizontalsystems.bank-wallet.dev
open_sea_api_key =
unstoppable_domains_api_key =
+one_inch_api_key =
default_words =
diff --git a/UnstoppableWallet/UnstoppableWallet/Configuration/Production.template.xcconfig b/UnstoppableWallet/UnstoppableWallet/Configuration/Production.template.xcconfig
index 155be341f9..576878fb05 100644
--- a/UnstoppableWallet/UnstoppableWallet/Configuration/Production.template.xcconfig
+++ b/UnstoppableWallet/UnstoppableWallet/Configuration/Production.template.xcconfig
@@ -17,4 +17,5 @@ wallet_connect_v2_project_key =
shared_cloud_container_id = iCloud.io.horizontalsystems.bank-wallet.shared
private_cloud_container_id = iCloud.io.horizontalsystems.bank-wallet
open_sea_api_key =
-unstoppable_domains_api_key =
\ No newline at end of file
+unstoppable_domains_api_key =
+one_inch_api_key =
diff --git a/UnstoppableWallet/UnstoppableWallet/Core/Providers/AppConfig.swift b/UnstoppableWallet/UnstoppableWallet/Core/Providers/AppConfig.swift
index 84adc69ca9..c0aada1326 100644
--- a/UnstoppableWallet/UnstoppableWallet/Core/Providers/AppConfig.swift
+++ b/UnstoppableWallet/UnstoppableWallet/Core/Providers/AppConfig.swift
@@ -129,6 +129,10 @@ struct AppConfig {
(Bundle.main.object(forInfoDictionaryKey: "UnstoppableDomainsApiKey") as? String).flatMap { $0.isEmpty ? nil : $0 }
}
+ static var oneInchApiKey: String? {
+ (Bundle.main.object(forInfoDictionaryKey: "oneInchApiKey") as? String).flatMap { $0.isEmpty ? nil : $0 }
+ }
+
static var defaultWords: String {
Bundle.main.object(forInfoDictionaryKey: "DefaultWords") as? String ?? ""
}
diff --git a/UnstoppableWallet/UnstoppableWallet/Info.plist b/UnstoppableWallet/UnstoppableWallet/Info.plist
index 2a2711f369..6a3360b420 100644
--- a/UnstoppableWallet/UnstoppableWallet/Info.plist
+++ b/UnstoppableWallet/UnstoppableWallet/Info.plist
@@ -143,5 +143,7 @@
${open_sea_api_key}
UnstoppableDomainsApiKey
${unstoppable_domains_api_key}
+ oneInchApiKey
+ ${one_inch_api_key}
diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Swap/Adapters/OneInch/OneInchModule.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Swap/Adapters/OneInch/OneInchModule.swift
index 036c425adc..afd931ae0a 100644
--- a/UnstoppableWallet/UnstoppableWallet/Modules/Swap/Adapters/OneInch/OneInchModule.swift
+++ b/UnstoppableWallet/UnstoppableWallet/Modules/Swap/Adapters/OneInch/OneInchModule.swift
@@ -13,7 +13,8 @@ class OneInchModule {
return nil
}
- guard let swapKit = try? OneInchKit.Kit.instance(evmKit: evmKit) else {
+ guard let apiKey = AppConfig.oneInchApiKey,
+ let swapKit = try? OneInchKit.Kit.instance(evmKit: evmKit, apiKey: apiKey) else {
return nil
}
diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/SwapConfirmation/SwapConfirmationModule.swift b/UnstoppableWallet/UnstoppableWallet/Modules/SwapConfirmation/SwapConfirmationModule.swift
index 1e7b7f845d..ff283c9236 100644
--- a/UnstoppableWallet/UnstoppableWallet/Modules/SwapConfirmation/SwapConfirmationModule.swift
+++ b/UnstoppableWallet/UnstoppableWallet/Modules/SwapConfirmation/SwapConfirmationModule.swift
@@ -38,7 +38,8 @@ struct SwapConfirmationModule {
}
let evmKit = evmKitWrapper.evmKit
- guard let swapKit = try? OneInchKit.Kit.instance(evmKit: evmKit) else {
+ guard let apiKey = AppConfig.oneInchApiKey,
+ let swapKit = try? OneInchKit.Kit.instance(evmKit: evmKit, apiKey: apiKey) else {
return nil
}
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index b4af76914c..5a3bf55ff6 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -30,6 +30,7 @@ XCCONFIG_DEV_WALLET_CONNECT_V2_PROJECT_KEY = ENV["XCCONFIG_DEV_WALLET_CONNECT_V2
XCCONFIG_DEV_OPEN_SEA_API_KEY = ENV["XCCONFIG_DEV_OPEN_SEA_API_KEY"]
XCCONFIG_DEV_TRONGRID_API_KEY = ENV["XCCONFIG_DEV_TRONGRID_API_KEY"]
XCCONFIG_DEV_UNSTOPPABLE_DOMAINS_API_KEY = ENV["XCCONFIG_DEV_UNSTOPPABLE_DOMAINS_API_KEY"]
+XCCONFIG_DEV_ONE_INCH_API_KEY = ENV["XCCONFIG_DEV_ONE_INCH_API_KEY"]
XCCONFIG_PROD_INFURA_PROJECT_ID = ENV["XCCONFIG_PROD_INFURA_PROJECT_ID"]
XCCONFIG_PROD_INFURA_PROJECT_SECRET = ENV["XCCONFIG_PROD_INFURA_PROJECT_SECRET"]
@@ -48,6 +49,7 @@ XCCONFIG_PROD_WALLET_CONNECT_V2_PROJECT_KEY = ENV["XCCONFIG_PROD_WALLET_CONNECT_
XCCONFIG_PROD_OPEN_SEA_API_KEY = ENV["XCCONFIG_PROD_OPEN_SEA_API_KEY"]
XCCONFIG_PROD_TRONGRID_API_KEY = ENV["XCCONFIG_PROD_TRONGRID_API_KEY"]
XCCONFIG_PROD_UNSTOPPABLE_DOMAINS_API_KEY = ENV["XCCONFIG_PROD_UNSTOPPABLE_DOMAINS_API_KEY"]
+XCCONFIG_PROD_ONE_INCH_API_KEY = ENV["XCCONFIG_PROD_ONE_INCH_API_KEY"]
def delete_temp_keychain(name)
delete_keychain(
@@ -123,6 +125,7 @@ def apply_dev_xcconfig
update_dev_xcconfig('open_sea_api_key', XCCONFIG_DEV_OPEN_SEA_API_KEY)
update_dev_xcconfig('trongrid_api_key', XCCONFIG_DEV_TRONGRID_API_KEY)
update_dev_xcconfig('unstoppable_domains_api_key', XCCONFIG_DEV_UNSTOPPABLE_DOMAINS_API_KEY)
+ update_dev_xcconfig('one_inch_api_key', XCCONFIG_DEV_ONE_INCH_API_KEY)
end
def apply_prod_xcconfig
@@ -143,6 +146,7 @@ def apply_prod_xcconfig
update_prod_xcconfig('open_sea_api_key', XCCONFIG_PROD_OPEN_SEA_API_KEY)
update_prod_xcconfig('trongrid_api_key', XCCONFIG_PROD_TRONGRID_API_KEY)
update_prod_xcconfig('unstoppable_domains_api_key', XCCONFIG_PROD_UNSTOPPABLE_DOMAINS_API_KEY)
+ update_prod_xcconfig('one_inch_api_key', XCCONFIG_PROD_ONE_INCH_API_KEY)
end
def force_update_devices(type, username)