Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use big number comparisons #2013

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading