Skip to content

Commit

Permalink
fix: resolves #2718
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Sep 16, 2024
1 parent f6bd55e commit 2fa3d00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/unlucky-crews-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Fixed zeroish log filter argument parsing.
4 changes: 2 additions & 2 deletions src/utils/abi/parseEventLogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function includesArgs(parameters: {

if (Array.isArray(args) && Array.isArray(matchArgs)) {
return matchArgs.every((value, index) => {
if (!value) return true
if (value === null) return true
const input = inputs[index]
if (!input) return false
const value_ = Array.isArray(value) ? value : [value]
Expand All @@ -208,7 +208,7 @@ function includesArgs(parameters: {
!Array.isArray(matchArgs)
)
return Object.entries(matchArgs).every(([key, value]) => {
if (!value) return true
if (value === null) return true
const input = inputs.find((input) => input.name === key)
if (!input) return false
const value_ = Array.isArray(value) ? value : [value]
Expand Down

0 comments on commit 2fa3d00

Please sign in to comment.