Skip to content

Commit cdd0f46

Browse files
authored
Fix premature return bug in deployment delta tracking loop (#235)
1 parent 7ed0589 commit cdd0f46

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib/gasData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ export class GasData {
120120
this._calculateDeltas(prevMethod, currentMethod);
121121
});
122122

123-
for (const currentDeployment of this.deployments) {
123+
this.deployments.forEach((currentDeployment) => {
124124
const prevDeployment = previousData.deployments.find((d)=> d.name === currentDeployment.name);
125125

126126
if (!prevDeployment) return;
127127

128128
this._calculateDeltas(prevDeployment, currentDeployment);
129-
}
129+
})
130130
}
131131

132132
/**

test/integration/options.g.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe("Options G (Arbitrum with live pricing & `reportPureAndViewMethods`)",
5353
assert.isDefined(options.gasPrice);
5454
assert.isDefined(options.baseFeePerByte);
5555
assert.isBelow(options.gasPrice!, 1);
56-
assert.isAbove(options.baseFeePerByte!, 0);
56+
assert(options.baseFeePerByte! >= 0); // This is sometimes 0 ?
5757

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

0 commit comments

Comments
 (0)