Skip to content

Commit

Permalink
fix: use big number comparisons
Browse files Browse the repository at this point in the history
Signed-off-by: bennett <[email protected]>
  • Loading branch information
bmzig committed Jan 24, 2025
1 parent a675ee0 commit 54d75b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/dataworker/Dataworker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ export class Dataworker {
const unexecutedLeaves = leavesForChain.filter((leaf) => {
const executedLeaf = slowFillsForChain.find(
(event) =>
event.originChainId === leaf.relayData.originChainId && event.depositId === leaf.relayData.depositId
event.originChainId === leaf.relayData.originChainId && event.depositId.eq(leaf.relayData.depositId)
);

// Only return true if no leaf was found in the list of executed leaves.
Expand Down Expand Up @@ -1196,7 +1196,7 @@ export class Dataworker {
const fill = _.findLast(sortedFills, (fill) => {
if (
!(
fill.depositId === relayData.depositId &&
fill.depositId.eq(relayData.depositId) &&
fill.originChainId === relayData.originChainId &&
sdkUtils.getRelayDataHash(fill, chainId) === sdkUtils.getRelayDataHash(relayData, slowFillChainId)
)
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/validateRunningBalances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export async function runScript(_logger: winston.Logger, baseSigner: Signer): Pr
.filter(
(f) =>
f.blockNumber <= bundleEndBlockForChain.toNumber() &&
f.depositId === slowFillForChain.relayData.depositId
f.depositId.eq(slowFillForChain.relayData.depositId)
);

const lastFill = sortEventsDescending(fillsForSameDeposit)[0];
Expand Down

0 comments on commit 54d75b9

Please sign in to comment.