File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Sources/Core/EthereumNetwork/Request Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ extension APIRequest {
33
33
throw Web3Error . serverError ( code: response. statusCode)
34
34
}
35
35
}
36
-
36
+
37
37
/// This bit of code is purposed to work with literal types that comes in ``Response`` in hexString type.
38
38
/// Currently it's just `Data` and any kind of Integers `(U)Int`, `Big(U)Int`.
39
- if Result . self == Data . self || Result . self == UInt . self || Result . self == Int . self || Result . self == BigInt . self || Result . self == BigUInt . self || Result . self == String . self {
39
+ if Result . self == Data . self || Result . self == UInt . self || Result . self == Int . self || Result . self == BigInt . self || Result . self == BigUInt . self {
40
40
guard let LiteralType = Result . self as? LiteralInitiableFromString . Type else { throw Web3Error . typeError }
41
41
guard let responseAsString = try ? JSONDecoder ( ) . decode ( APIResponse< String> . self , from: data) else { throw Web3Error . dataError }
42
42
guard let literalValue = LiteralType . init ( from: responseAsString. result) else { throw Web3Error . dataError }
You can’t perform that action at this time.
0 commit comments