Skip to content

Commit 203de6d

Browse files
committed
Fix warnings
1 parent d87eb68 commit 203de6d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ethers/providers/jsonrpc/json.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ func `%`*[T: object or ref object](obj: T): JsonNode =
397397

398398
T.expectEmptyPragma(serialize, "Cannot specify 'key' or 'ignore' on object defition")
399399

400-
const serializeAllFields = T.hasCustomPragma(serialize)
400+
const serializeAllFields {.used.} = T.hasCustomPragma(serialize)
401401

402402
for name, value in o.fieldPairs:
403403
# TODO: move to %

testmodule/providers/jsonrpc/testConversions.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ suite "JSON Conversions":
135135

136136
without tx =? PastTransaction.fromJson(json):
137137
fail
138-
check tx.blockHash == BlockHash(array[32, byte].fromHex("0x595bffbe897e025ea2df3213c4cc52c3f3d69bc04b49011d558f1b0e70038922"))
138+
check tx.blockHash == array[32, byte].fromHex("0x595bffbe897e025ea2df3213c4cc52c3f3d69bc04b49011d558f1b0e70038922")
139139
check tx.blockNumber == 0x22e.u256
140140
check tx.`from` == Address.init("0xe00b677c29ff8d8fe6068530e2bc36158c54dd34").get
141141
check tx.gas == 0x4d4bb.u256
@@ -154,7 +154,7 @@ suite "JSON Conversions":
154154

155155
test "PastTransaction serializes correctly":
156156
let tx = PastTransaction(
157-
blockHash: BlockHash(array[32, byte].fromHex("0x595bffbe897e025ea2df3213c4cc52c3f3d69bc04b49011d558f1b0e70038922")),
157+
blockHash: array[32, byte].fromHex("0x595bffbe897e025ea2df3213c4cc52c3f3d69bc04b49011d558f1b0e70038922"),
158158
blockNumber: 0x22e.u256,
159159
`from`: Address.init("0xe00b677c29ff8d8fe6068530e2bc36158c54dd34").get,
160160
gas: 0x4d4bb.u256,

0 commit comments

Comments
 (0)