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 {
3333 throw Web3Error . serverError ( code: response. statusCode)
3434 }
3535 }
36-
36+
3737 /// This bit of code is purposed to work with literal types that comes in ``Response`` in hexString type.
3838 /// 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 {
4040 guard let LiteralType = Result . self as? LiteralInitiableFromString . Type else { throw Web3Error . typeError }
4141 guard let responseAsString = try ? JSONDecoder ( ) . decode ( APIResponse< String> . self , from: data) else { throw Web3Error . dataError }
4242 guard let literalValue = LiteralType . init ( from: responseAsString. result) else { throw Web3Error . dataError }
You can’t perform that action at this time.
0 commit comments