Skip to content

Commit

Permalink
Last lint fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
thetroyharris committed Dec 11, 2023
1 parent e224fc0 commit 1492a94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
12 changes: 4 additions & 8 deletions src/mappings/helpers/weighted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ class GradualValueChange {
private calculateValueChangeProgress(startTimestamp: BigInt, endTimestamp: BigInt, blockTimestamp: BigInt): BigInt {
if (blockTimestamp.ge(endTimestamp)) {
return ONE;
}
else if (blockTimestamp.le(startTimestamp)) {
} else if (blockTimestamp.le(startTimestamp)) {
return ZERO;
}
else {
} else {
let totalSeconds: BigInt = endTimestamp.minus(startTimestamp);
let secondsElapsed: BigInt = blockTimestamp.minus(startTimestamp);
return secondsElapsed.div(totalSeconds);
Expand All @@ -25,8 +23,7 @@ class GradualValueChange {
if (startValue.gt(endValue)) {
let delta: BigInt = pctProgress.times(startValue.minus(endValue));
return startValue.minus(delta);
}
else {
} else {
let delta: BigInt = pctProgress.times(endValue.minus(startValue));
return startValue.plus(delta);
}
Expand Down Expand Up @@ -64,8 +61,7 @@ export function updatePoolWeights(poolId: string, blockTimestamp: BigInt): void
let latestWeightUpdateId = pool.latestWeightUpdate;
if (latestWeightUpdateId === null) {
return;
}
else {
} else {
// Load in the last GradualWeightUpdateScheduled event information
let latestUpdate = GradualWeightUpdate.load(latestWeightUpdateId) as GradualWeightUpdate;

Expand Down
1 change: 0 additions & 1 deletion src/mappings/vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ export function handleSwapEvent(event: SwapEvent): void {
if (isVariableWeightPool(pool)) {
// Some pools' weights update over time so we need to update them after each swap
updatePoolWeights(poolId.toHexString(), event.block.timestamp);

} else if (isStableLikePool(pool)) {
// Stablelike pools' amplification factors update over time so we need to update them after each swap
updateAmpFactor(pool, event.block.timestamp);
Expand Down

0 comments on commit 1492a94

Please sign in to comment.