Skip to content

Commit

Permalink
[ADHOC] handle address filtering in not equal case (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
sammccord authored Sep 25, 2024
2 parents 14d5f36 + 48f014d commit eb73e59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-seals-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@boostxyz/sdk": patch
---

fix address comparison for NOT_EQUAL case
6 changes: 6 additions & 0 deletions packages/sdk/src/Actions/EventAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,12 @@ export class EventAction extends DeployableTarget<
return fieldValue === criteria.filterData;

case FilterType.NOT_EQUAL:
if (criteria.fieldType === PrimitiveType.ADDRESS) {
return !isAddressEqual(
criteria.filterData,
`0x${fieldValue.slice(-40)}`,
);
}
return fieldValue !== criteria.filterData;

case FilterType.GREATER_THAN:
Expand Down

0 comments on commit eb73e59

Please sign in to comment.