Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
markspanbroek committed Feb 5, 2024
1 parent 38e24e1 commit 292e8af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ethers/providers/jsonrpc/json.nim
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ func `%`*[T: object or ref object](obj: T): JsonNode =

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

const serializeAllFields = T.hasCustomPragma(serialize)
const serializeAllFields {.used.} = T.hasCustomPragma(serialize)

for name, value in o.fieldPairs:
# TODO: move to %
Expand Down
4 changes: 2 additions & 2 deletions testmodule/providers/jsonrpc/testConversions.nim
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ suite "JSON Conversions":

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

test "PastTransaction serializes correctly":
let tx = PastTransaction(
blockHash: BlockHash(array[32, byte].fromHex("0x595bffbe897e025ea2df3213c4cc52c3f3d69bc04b49011d558f1b0e70038922")),
blockHash: array[32, byte].fromHex("0x595bffbe897e025ea2df3213c4cc52c3f3d69bc04b49011d558f1b0e70038922"),
blockNumber: 0x22e.u256,
`from`: Address.init("0xe00b677c29ff8d8fe6068530e2bc36158c54dd34").get,
gas: 0x4d4bb.u256,
Expand Down

0 comments on commit 292e8af

Please sign in to comment.