Skip to content

Commit d37ad4d

Browse files
committed
updated carthage
1 parent c4c5a7f commit d37ad4d

File tree

3 files changed

+34
-32
lines changed

3 files changed

+34
-32
lines changed

Cartfile.resolved

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github "attaswift/BigInt" "v5.3.0"
2+
github "attaswift/SipHash" "v1.2.2"
3+
github "daltoniam/Starscream" "4.0.4"
4+
github "krzyzanowskim/CryptoSwift" "1.5.0"

Sources/web3swift/Browser/BrowserViewController.swift

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,17 @@ open class BrowserViewController: UIViewController {
6363
}, for: "getRPCurl")
6464

6565
self.webView.bridge.register({ (parameters, completion) in
66-
let allAccounts = web3.browserFunctions.getAccounts()
67-
completion(.success(["accounts": allAccounts as Any]))
66+
Task {
67+
let allAccounts = await web3.browserFunctions.getAccounts()
68+
completion(.success(["accounts": allAccounts as Any]))
69+
}
6870
}, for: "eth_getAccounts")
6971

7072
self.webView.bridge.register({ (parameters, completion) in
71-
let coinbase = web3.browserFunctions.getCoinbase()
72-
completion(.success(["coinbase": coinbase as Any]))
73+
Task {
74+
let coinbase = await web3.browserFunctions.getCoinbase()
75+
completion(.success(["coinbase": coinbase as Any]))
76+
}
7377
}, for: "eth_coinbase")
7478

7579
self.webView.bridge.register({ (parameters, completion) in
@@ -97,21 +101,23 @@ open class BrowserViewController: UIViewController {
97101
}, for: "eth_sign")
98102

99103
self.webView.bridge.register({ (parameters, completion) in
100-
if parameters == nil {
101-
completion(.failure(Bridge.JSError(code: 0, description: "No parameters provided")))
102-
return
103-
}
104-
let transaction = parameters!["transaction"] as? [String: Any]
105-
if transaction == nil {
106-
completion(.failure(Bridge.JSError(code: 0, description: "Not enough parameters provided")))
107-
return
108-
}
109-
let result = web3.browserFunctions.signTransaction(transaction!)
110-
if result == nil {
111-
completion(.failure(Bridge.JSError(code: 0, description: "Data is invalid")))
112-
return
104+
Task {
105+
if parameters == nil {
106+
completion(.failure(Bridge.JSError(code: 0, description: "No parameters provided")))
107+
return
108+
}
109+
let transaction = parameters!["transaction"] as? [String: Any]
110+
if transaction == nil {
111+
completion(.failure(Bridge.JSError(code: 0, description: "Not enough parameters provided")))
112+
return
113+
}
114+
let result = await web3.browserFunctions.signTransaction(transaction!)
115+
if result == nil {
116+
completion(.failure(Bridge.JSError(code: 0, description: "Data is invalid")))
117+
return
118+
}
119+
completion(.success(["signedTransaction": result as Any]))
113120
}
114-
completion(.success(["signedTransaction": result as Any]))
115121
}, for: "eth_signTransaction")
116122
}
117123
}

web3swift.xcodeproj/project.pbxproj

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@
130130
3AA815EC2276E44100F5DB52 /* Promise+Web3+Eth+GetGasPrice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA815732276E44100F5DB52 /* Promise+Web3+Eth+GetGasPrice.swift */; };
131131
3AA815ED2276E44100F5DB52 /* Promise+Web3+Eth+GetBlockByHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA815742276E44100F5DB52 /* Promise+Web3+Eth+GetBlockByHash.swift */; };
132132
3AA815EE2276E44100F5DB52 /* Promise+Web3+Eth+GetTransactionDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA815752276E44100F5DB52 /* Promise+Web3+Eth+GetTransactionDetails.swift */; };
133-
3AA815EF2276E44100F5DB52 /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA815762276E44100F5DB52 /* Promise+HttpProvider.swift */; };
134133
3AA815F02276E44100F5DB52 /* Promise+Web3+Eth+SendTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA815772276E44100F5DB52 /* Promise+Web3+Eth+SendTransaction.swift */; };
135134
3AA815F12276E44100F5DB52 /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA815782276E44100F5DB52 /* Promise+Web3+Eth+GetBalance.swift */; };
136-
3AA815F22276E44100F5DB52 /* Promise+Batching.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA815792276E44100F5DB52 /* Promise+Batching.swift */; };
137135
3AA815F32276E44100F5DB52 /* Promise+Web3+Eth+GetTransactionReceipt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA8157A2276E44100F5DB52 /* Promise+Web3+Eth+GetTransactionReceipt.swift */; };
138136
3AA815F42276E44100F5DB52 /* Promise+Web3+Eth+EstimateGas.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA8157B2276E44100F5DB52 /* Promise+Web3+Eth+EstimateGas.swift */; };
139137
3AA815F52276E44100F5DB52 /* Promise+Web3+Eth+GetBlockByNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA8157C2276E44100F5DB52 /* Promise+Web3+Eth+GetBlockByNumber.swift */; };
@@ -353,10 +351,8 @@
353351
3AA815732276E44100F5DB52 /* Promise+Web3+Eth+GetGasPrice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetGasPrice.swift"; sourceTree = "<group>"; };
354352
3AA815742276E44100F5DB52 /* Promise+Web3+Eth+GetBlockByHash.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBlockByHash.swift"; sourceTree = "<group>"; };
355353
3AA815752276E44100F5DB52 /* Promise+Web3+Eth+GetTransactionDetails.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetTransactionDetails.swift"; sourceTree = "<group>"; };
356-
3AA815762276E44100F5DB52 /* Promise+HttpProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+HttpProvider.swift"; sourceTree = "<group>"; };
357354
3AA815772276E44100F5DB52 /* Promise+Web3+Eth+SendTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+SendTransaction.swift"; sourceTree = "<group>"; };
358355
3AA815782276E44100F5DB52 /* Promise+Web3+Eth+GetBalance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBalance.swift"; sourceTree = "<group>"; };
359-
3AA815792276E44100F5DB52 /* Promise+Batching.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Batching.swift"; sourceTree = "<group>"; };
360356
3AA8157A2276E44100F5DB52 /* Promise+Web3+Eth+GetTransactionReceipt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetTransactionReceipt.swift"; sourceTree = "<group>"; };
361357
3AA8157B2276E44100F5DB52 /* Promise+Web3+Eth+EstimateGas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+EstimateGas.swift"; sourceTree = "<group>"; };
362358
3AA8157C2276E44100F5DB52 /* Promise+Web3+Eth+GetBlockByNumber.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Web3+Eth+GetBlockByNumber.swift"; sourceTree = "<group>"; };
@@ -820,10 +816,8 @@
820816
3AA815732276E44100F5DB52 /* Promise+Web3+Eth+GetGasPrice.swift */,
821817
3AA815742276E44100F5DB52 /* Promise+Web3+Eth+GetBlockByHash.swift */,
822818
3AA815752276E44100F5DB52 /* Promise+Web3+Eth+GetTransactionDetails.swift */,
823-
3AA815762276E44100F5DB52 /* Promise+HttpProvider.swift */,
824819
3AA815772276E44100F5DB52 /* Promise+Web3+Eth+SendTransaction.swift */,
825820
3AA815782276E44100F5DB52 /* Promise+Web3+Eth+GetBalance.swift */,
826-
3AA815792276E44100F5DB52 /* Promise+Batching.swift */,
827821
3AA8157A2276E44100F5DB52 /* Promise+Web3+Eth+GetTransactionReceipt.swift */,
828822
3AA8157B2276E44100F5DB52 /* Promise+Web3+Eth+EstimateGas.swift */,
829823
3AA8157C2276E44100F5DB52 /* Promise+Web3+Eth+GetBlockByNumber.swift */,
@@ -1309,7 +1303,6 @@
13091303
3AA815DD2276E44100F5DB52 /* Web3+Options.swift in Sources */,
13101304
5C03EAB4274405D20052C66D /* EIP712.swift in Sources */,
13111305
3AA815A92276E44100F5DB52 /* ENSReverseRegistrar.swift in Sources */,
1312-
3AA815EF2276E44100F5DB52 /* Promise+HttpProvider.swift in Sources */,
13131306
3AA8163A2276E4AE00F5DB52 /* SECP256k1.swift in Sources */,
13141307
3AA8160D2276E44100F5DB52 /* Web3+ERC721.swift in Sources */,
13151308
3AA815DC2276E44100F5DB52 /* Web3+Structures.swift in Sources */,
@@ -1389,7 +1382,6 @@
13891382
3AA815FC2276E44100F5DB52 /* Promise+Web3+Personal+CreateAccount.swift in Sources */,
13901383
6049F414280616FC00DFE624 /* EthereumParameters.swift in Sources */,
13911384
3AA8160B2276E44100F5DB52 /* Web3+ERC165.swift in Sources */,
1392-
3AA815F22276E44100F5DB52 /* Promise+Batching.swift in Sources */,
13931385
6049F413280616FC00DFE624 /* EnvelopeFactory.swift in Sources */,
13941386
3AA815E62276E44100F5DB52 /* Base58.swift in Sources */,
13951387
3AA816002276E44100F5DB52 /* Web3+ERC888.swift in Sources */,
@@ -1614,7 +1606,7 @@
16141606
"FRAMEWORK_SEARCH_PATHS[sdk=macosx*]" = "$(SRCROOT)/Carthage/Build/Mac";
16151607
FRAMEWORK_VERSION = A;
16161608
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1617-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
1609+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
16181610
LD_RUNPATH_SEARCH_PATHS = (
16191611
"$(inherited)",
16201612
"@executable_path/../Frameworks",
@@ -1661,7 +1653,7 @@
16611653
"FRAMEWORK_SEARCH_PATHS[sdk=macosx*]" = "$(SRCROOT)/Carthage/Build/Mac";
16621654
FRAMEWORK_VERSION = A;
16631655
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1664-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
1656+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
16651657
LD_RUNPATH_SEARCH_PATHS = (
16661658
"$(inherited)",
16671659
"@executable_path/../Frameworks",
@@ -1706,7 +1698,7 @@
17061698
"FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = "$(SRCROOT)/Carthage/Build/iOS";
17071699
"FRAMEWORK_SEARCH_PATHS[sdk=macosx*]" = "$(SRCROOT)/Carthage/Build/Mac";
17081700
GCC_C_LANGUAGE_STANDARD = gnu11;
1709-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
1701+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
17101702
LD_RUNPATH_SEARCH_PATHS = (
17111703
"$(inherited)",
17121704
"$(PROJECT_DIR)/Carthage/Build/iOS",
@@ -1738,7 +1730,7 @@
17381730
"FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = "$(SRCROOT)/Carthage/Build/iOS";
17391731
"FRAMEWORK_SEARCH_PATHS[sdk=macosx*]" = "$(SRCROOT)/Carthage/Build/Mac";
17401732
GCC_C_LANGUAGE_STANDARD = gnu11;
1741-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
1733+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
17421734
LD_RUNPATH_SEARCH_PATHS = (
17431735
"$(inherited)",
17441736
"$(PROJECT_DIR)/Carthage/Build/iOS",
@@ -1780,7 +1772,7 @@
17801772
"$(SRCROOT)/Sources/secp256k1/include",
17811773
);
17821774
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1783-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
1775+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
17841776
LD_RUNPATH_SEARCH_PATHS = (
17851777
"$(inherited)",
17861778
"@executable_path/../Frameworks",
@@ -1816,7 +1808,7 @@
18161808
"$(SRCROOT)/Sources/secp256k1/include",
18171809
);
18181810
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1819-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
1811+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
18201812
LD_RUNPATH_SEARCH_PATHS = (
18211813
"$(inherited)",
18221814
"@executable_path/../Frameworks",

0 commit comments

Comments
 (0)