Skip to content

Commit

Permalink
IOS-7048 icp blockchain (#3607)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorov-d authored Aug 5, 2024
1 parent 34cd6f6 commit becb3d3
Show file tree
Hide file tree
Showing 15 changed files with 118 additions and 17 deletions.
13 changes: 11 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end
def blockchain_sdk_pods
# 'TangemWalletCore' dependency must be added via SPM

pod 'BlockchainSdk', :git => 'https://github.com/tangem/blockchain-sdk-swift.git', :tag => 'develop-646'
pod 'BlockchainSdk', :git => 'https://github.com/tangem/blockchain-sdk-swift.git', :tag => 'develop-648'
#pod 'BlockchainSdk', :path => '../blockchain-sdk-swift'

pod 'Solana.Swift', :git => 'https://github.com/tangem/Solana.Swift', :tag => '1.2.0-tangem10'
Expand Down Expand Up @@ -182,7 +182,7 @@ post_install do |installer|
"BlockchainSdk",
"https://github.com/tangem/wallet-core-binaries-ios.git",
"TangemWalletCoreBinariesWrapper",
{ :kind => "exactVersion", :version => "4.0.21-tangem6" }
{ :kind => "exactVersion", :version => "4.0.46-tangem1" }
)

# `SwiftProtobuf` SPM package for `BlockchainSdk` pod
Expand Down Expand Up @@ -212,6 +212,15 @@ post_install do |installer|
{ :kind => "exactVersion", :version => "0.2.1" }
)

# `IcpKit` SPM package for `BlockchainSdk` pod
add_spm_package_to_target(
installer.pods_project,
"BlockchainSdk",
"https://github.com/tangem/IcpKit.git",
"IcpKit",
{ :kind => "exactVersion", :version => "0.1.2-tangem3" }
)

# `SwiftProtobuf` SPM package for `BinanceChain` pod
add_spm_package_to_target(
installer.pods_project,
Expand Down
8 changes: 4 additions & 4 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ DEPENDENCIES:
- AmplitudeSwift (= 1.6.2)
- BinanceChain (from `https://github.com/tangem/swiftbinancechain.git`, tag `0.0.11`)
- BitcoinCore.swift (from `https://github.com/tangem/bitcoincore.git`, tag `0.0.20`)
- BlockchainSdk (from `https://github.com/tangem/blockchain-sdk-swift.git`, tag `develop-646`)
- BlockchainSdk (from `https://github.com/tangem/blockchain-sdk-swift.git`, tag `develop-648`)
- BlockiesSwift (~> 0.1.2)
- CombineExt (~> 1.8.0)
- Firebase/Analytics (= 10.29.0)
Expand Down Expand Up @@ -278,7 +278,7 @@ EXTERNAL SOURCES:
:tag: 0.0.20
BlockchainSdk:
:git: https://github.com/tangem/blockchain-sdk-swift.git
:tag: develop-646
:tag: develop-648
Solana.Swift:
:git: https://github.com/tangem/Solana.Swift
:tag: 1.2.0-tangem10
Expand All @@ -301,7 +301,7 @@ CHECKOUT OPTIONS:
:tag: 0.0.20
BlockchainSdk:
:git: https://github.com/tangem/blockchain-sdk-swift.git
:tag: develop-646
:tag: develop-648
Solana.Swift:
:git: https://github.com/tangem/Solana.Swift
:tag: 1.2.0-tangem10
Expand Down Expand Up @@ -354,6 +354,6 @@ SPEC CHECKSUMS:
TangemSdk: 4a188873f9dbed6340cca9ad6a010240af6df432
WalletConnectSwiftV2: 5ea47db4d86e39fc749b66a05a661af9e87b277d

PODFILE CHECKSUM: 20124c86a9af979e7248e892681ce144a7699c73
PODFILE CHECKSUM: cf385ecf6ba588891dd8586ffa9eba3e9e6594f1

COCOAPODS: 1.15.2
1 change: 1 addition & 0 deletions Tangem/App/Models/Config/SupportedBlockchains.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ struct SupportedBlockchains {
private func testableBlockchains() -> Set<Blockchain> {
[
.mantle(testnet: false),
.internetComputer(curve: .secp256k1),
]
}

Expand Down
3 changes: 2 additions & 1 deletion Tangem/App/Services/ExchangeService/MercuryoService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ private extension Blockchain {
.radiant,
.bittensor,
.joystream,
.koinos:
.koinos,
.internetComputer:
// Did you get a compilation error here? If so, check whether the network is supported at https://api.mercuryo.io/v1.6/lib/currencies
return nil
}
Expand Down
2 changes: 2 additions & 0 deletions Tangem/App/Services/ExchangeService/MoonPayService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ private extension Blockchain {
case .joystream: return nil
case .bittensor: return nil
case .koinos: return nil
case .internetComputer: return nil
// Did you get a compilation error here? If so, check whether the network is supported at https://api.moonpay.com/v3/currencies
}
}
Expand Down Expand Up @@ -452,6 +453,7 @@ private extension Blockchain {
case .joystream: return nil
case .bittensor: return nil
case .koinos: return nil
case .internetComputer: return nil
// Did you get a compilation error here? If so, check whether the network is supported at https://api.moonpay.com/v3/currencies
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ private extension CommonExpressTransactionBuilder {
.base,
.bittensor,
.joystream,
.koinos:
.koinos,
.internetComputer:
throw ExpressTransactionBuilderError.blockchainDonNotSupportedExtraId
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ struct CustomTokenContractAddressConverter {
.base,
.bittensor,
.joystream,
.koinos:
.koinos,
.internetComputer:
// Did you get a compilation error here? If so, check if the network supports multiple token contract address
// formats (as Hedera does, for example) and add the appropriate conversion logic here if needed
return originalAddress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ struct TokenInteractionAvailabilityProvider {
.base,
.bittensor,
.joystream,
.koinos:
.koinos,
.internetComputer:

// Checking that we have at least one valid (non-empty) address
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ struct SendTransactionParametersBuilder {
.base,
.bittensor,
.joystream,
.koinos:
.koinos,
.internetComputer:
return nil
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "internet-computer.fill.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "internet-computer.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
2 changes: 1 addition & 1 deletion TangemApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18025,7 +18025,7 @@
repositoryURL = "https://github.com/tangem/wallet-core-binaries-ios.git";
requirement = {
kind = exactVersion;
version = "4.0.21-tangem6";
version = "4.0.46-tangem1";
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
64 changes: 59 additions & 5 deletions TangemApp.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "677c13ecc7c20d526bb9de12e4b413262812314ac3723da7b55c550905150a6f",
"originHash" : "75f3574e9c9732ee5b0d472f0fe3908371662aa7d2ee0e95e4ce4e32c0500d12",
"pins" : [
{
"identity" : "anyasyncsequence",
Expand All @@ -10,6 +10,15 @@
"version" : "1.0.2"
}
},
{
"identity" : "base32",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Jarema/Base32.git",
"state" : {
"revision" : "7f723a2e55f1c76e7c79263aebf89dbfcd58e77d",
"version" : "0.10.2"
}
},
{
"identity" : "bigint",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -37,6 +46,15 @@
"version" : "1.8.1"
}
},
{
"identity" : "float16",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SusanDoggie/Float16.git",
"state" : {
"revision" : "936ae66adccf1c91bcaeeb9c0cddde78a13695c3",
"version" : "1.1.1"
}
},
{
"identity" : "grpc-swift",
"kind" : "remoteSourceControl",
Expand All @@ -55,6 +73,33 @@
"version" : "0.26.0-tangem3"
}
},
{
"identity" : "icpkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tangem/IcpKit.git",
"state" : {
"revision" : "02aad763a1ebb0847b1f0eaff755159b3a95707a",
"version" : "0.1.2-tangem3"
}
},
{
"identity" : "potentcodables",
"kind" : "remoteSourceControl",
"location" : "https://github.com/outfoxx/PotentCodables.git",
"state" : {
"revision" : "660e33e84e00b9bf07bd41dd99ff800600e435e7",
"version" : "3.5.0"
}
},
{
"identity" : "regex",
"kind" : "remoteSourceControl",
"location" : "https://github.com/sharplet/Regex.git",
"state" : {
"revision" : "76c2b73d4281d77fc3118391877efd1bf972f515",
"version" : "2.1.1"
}
},
{
"identity" : "scalecodec.swift",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -172,6 +217,15 @@
"version" : "2.4.2"
}
},
{
"identity" : "swift-numerics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-numerics",
"state" : {
"revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
"version" : "1.0.2"
}
},
{
"identity" : "swift-protobuf-binaries",
"kind" : "remoteSourceControl",
Expand All @@ -186,8 +240,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-system.git",
"state" : {
"revision" : "025bcb1165deab2e20d4eaba79967ce73013f496",
"version" : "1.2.1"
"revision" : "d2ba781702a1d8285419c15ee62fd734a9437ff5",
"version" : "1.3.2"
}
},
{
Expand All @@ -213,8 +267,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/tangem/wallet-core-binaries-ios.git",
"state" : {
"revision" : "b9906e7e5c56706f0fe1ad3545dbf02dcf195b34",
"version" : "4.0.21-tangem6"
"revision" : "67be5876186284e85a5f5f8757de209ba53d5729",
"version" : "4.0.46-tangem1"
}
},
{
Expand Down

0 comments on commit becb3d3

Please sign in to comment.