Skip to content

Commit 1fc6cd6

Browse files
committed
fix: init Web3HttpProvider without chain id
1 parent cdfb984 commit 1fc6cd6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Sources/Web3Core/EthereumNetwork/Request/APIRequest+ComputedProperties.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
extension APIRequest {
11-
var method: REST {
11+
public var method: REST {
1212
.POST
1313
}
1414

Sources/Web3Core/EthereumNetwork/Request/APIRequest+UtilityTypes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public struct APIResponse<Result>: Decodable where Result: APIResultType {
1414
public var result: Result
1515
}
1616

17-
enum REST: String {
17+
public enum REST: String {
1818
case POST
1919
case GET
2020
}

Sources/web3swift/Web3/Web3+HttpProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class Web3HttpProvider: Web3Provider {
3636
var urlRequest = URLRequest(url: url, cachePolicy: .reloadIgnoringCacheData)
3737
urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type")
3838
urlRequest.setValue("application/json", forHTTPHeaderField: "Accept")
39-
urlRequest.httpMethod = APIRequest.getNetwork.call
39+
urlRequest.httpMethod = APIRequest.getNetwork.method.rawValue
4040
urlRequest.httpBody = APIRequest.getNetwork.encodedBody
4141
let response: APIResponse<UInt> = try await APIRequest.send(uRLRequest: urlRequest, with: session)
4242
self.network = Networks.fromInt(response.result)

0 commit comments

Comments
 (0)