Skip to content

Commit

Permalink
Lower compare addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
jimobrien committed Jul 17, 2023
1 parent 615791b commit 7adaed6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-crews-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rabbitholegg/questdk": patch
---

lower compare addresses
5 changes: 5 additions & 0 deletions src/filter/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
decodeAbiParameters,
decodeFunctionData,
getAbiItem,
isAddress,
parseAbiParameters,
slice,
} from 'viem'
Expand Down Expand Up @@ -165,6 +166,10 @@ export function apply(

if (typeof filters[key] === 'object') {
if (!apply(context[key], filters[key])) return false
} else if (isAddress(context[key])) {
if (context[key].toLowerCase() !== filters[key].toLowerCase()) {
return false
}
} else if (context[key] !== filters[key]) {
return false
}
Expand Down

0 comments on commit 7adaed6

Please sign in to comment.