From e9aaea4a5a92d50271f4de2b4f87b374a0435303 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 12 Jul 2022 13:13:17 +0200 Subject: [PATCH] Fix intermittent test failure Test would fail with an error when transaction hash happens to start with 0b; it would then try to to parse the hash as a binary number. --- testmodule/testJsonRpcProvider.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testmodule/testJsonRpcProvider.nim b/testmodule/testJsonRpcProvider.nim index 872305f..f15b228 100644 --- a/testmodule/testJsonRpcProvider.nim +++ b/testmodule/testJsonRpcProvider.nim @@ -60,7 +60,8 @@ suite "JsonRpcProvider": let populated = await signer.populateTransaction(transaction) let txResp = await signer.sendTransaction(populated) - check txResp.hash.len == 32 and UInt256.fromHex(txResp.hash.toHex) > 0 + check txResp.hash.len == 32 + check UInt256.fromHex("0x" & txResp.hash.toHex) > 0 test "can wait for a transaction to be confirmed": let signer = provider.getSigner()