Skip to content

Commit 56fc498

Browse files
chore: Update Sources/Web3Core/EthereumNetwork/Request/APIRequest+Methods.swift
1 parent d4f6678 commit 56fc498

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ extension APIRequest {
105105
return APIResponse(id: 2, result: result)
106106
}
107107

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.
110110
if let LiteralType = Result.self as? LiteralInitiableFromString.Type {
111111
guard let responseAsString = try? JSONDecoder().decode(APIResponse<String>.self, from: data) else { throw Web3Error.dataError }
112112
guard let literalValue = LiteralType.init(from: responseAsString.result) else { throw Web3Error.dataError }

0 commit comments

Comments
 (0)