File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Sources/Web3Core/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 @@ -105,8 +105,8 @@ extension APIRequest {
105
105
return APIResponse ( id: 2 , result: result)
106
106
}
107
107
108
- /// This bit of code is purposed to work with literal types that come in ``Response`` in hexString type .
109
- /// Currently it's just `Data` and any kind of Integers `(U)Int`, `Big(U)Int`.
108
+ /// Checks if `Result` type can be initialized from HEX-encoded bytes .
109
+ /// If it can - we attempt initializing a value of `Result` type.
110
110
if let LiteralType = Result . self as? LiteralInitiableFromString . Type {
111
111
guard let responseAsString = try ? JSONDecoder ( ) . decode ( APIResponse< String> . self , from: data) else { throw Web3Error . dataError }
112
112
guard let literalValue = LiteralType . init ( from: responseAsString. result) else { throw Web3Error . dataError }
You can’t perform that action at this time.
0 commit comments