Skip to content

Commit 4d655bd

Browse files
PR Fixups
1 parent d586654 commit 4d655bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ extension APIRequest {
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`.
3939
if Result.self == Data.self || Result.self == UInt.self || Result.self == Int.self || Result.self == BigInt.self || Result.self == BigUInt.self {
40-
guard let Literal = Result.self as? LiteralInitiableFromString.Type else { throw Web3Error.typeError }
40+
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 }
42-
guard let literalValue = Literal.init(from: responseAsString.result) else { throw Web3Error.dataError }
42+
guard let literalValue = LiteralType.init(from: responseAsString.result) else { throw Web3Error.dataError }
4343
/// `Literal` conforming `LiteralInitiableFromString`, that conforming to an `APIResponseType` type, so it's never fails.
4444
guard let result = literalValue as? Result else { throw Web3Error.typeError }
4545
return APIResponse(id: responseAsString.id, jsonrpc: responseAsString.jsonrpc, result: result)

0 commit comments

Comments
 (0)