From e94c2f7c15f23f8b79eba923e3cba843cb338cb4 Mon Sep 17 00:00:00 2001 From: kdeme Date: Wed, 19 Jun 2019 21:10:01 +0200 Subject: [PATCH] Fix fromJson checks for uint256 --- nimbus/rpc/hexstrings.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimbus/rpc/hexstrings.nim b/nimbus/rpc/hexstrings.nim index 882b4d1e4..44bf39111 100644 --- a/nimbus/rpc/hexstrings.nim +++ b/nimbus/rpc/hexstrings.nim @@ -264,7 +264,7 @@ proc fromJson*(n: JsonNode, argName: string, result: var Identifier) = proc fromJson*(n: JsonNode, argName: string, result: var UInt256) = n.kind.expect(JString, argName) let hexStr = n.getStr() - if hexStr.len <= 66 and hexStr.isValidHexData: + if not (hexStr.len <= 66 and hexStr.isValidHexQuantity): raise newException(ValueError, invalidMsg(argName) & " as a UInt256 \"" & hexStr & "\"") result = readUintBE[256](hexToPaddedByteArray[32](hexStr))