Skip to content

Commit 2588e6a

Browse files
chore: removed String.self type from if statement parsing API responses
1 parent 93e8d52 commit 2588e6a

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
@@ -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 }

0 commit comments

Comments
 (0)