Skip to content

Commit

Permalink
Fix premature return bug in deployment delta tracking loop (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgewecke committed May 25, 2024
1 parent 7ed0589 commit cdd0f46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/gasData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ export class GasData {
this._calculateDeltas(prevMethod, currentMethod);
});

for (const currentDeployment of this.deployments) {
this.deployments.forEach((currentDeployment) => {
const prevDeployment = previousData.deployments.find((d)=> d.name === currentDeployment.name);

if (!prevDeployment) return;

this._calculateDeltas(prevDeployment, currentDeployment);
}
})
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/integration/options.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe("Options G (Arbitrum with live pricing & `reportPureAndViewMethods`)",
assert.isDefined(options.gasPrice);
assert.isDefined(options.baseFeePerByte);
assert.isBelow(options.gasPrice!, 1);
assert.isAbove(options.baseFeePerByte!, 0);
assert(options.baseFeePerByte! >= 0); // This is sometimes 0 ?

assert.isDefined(options.tokenPrice);
assert.isAbove(parseFloat(options.tokenPrice!), 1000); // Eth-ish
Expand Down

0 comments on commit cdd0f46

Please sign in to comment.