From 28bdad2d0a1e90263b1b4d13cf88ca350e8a9048 Mon Sep 17 00:00:00 2001 From: thetroyharris Date: Tue, 12 Dec 2023 18:29:30 -0500 Subject: [PATCH] Small change to vault.ts --- src/mappings/vault.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mappings/vault.ts b/src/mappings/vault.ts index f85606a8..be51944f 100644 --- a/src/mappings/vault.ts +++ b/src/mappings/vault.ts @@ -478,12 +478,13 @@ export function handleSwapEvent(event: SwapEvent): void { // pool.swapEnabled = true; // } + let blockTimestamp = event.block.timestamp; if (isVariableWeightPool(pool)) { // Some pools' weights update over time so we need to update them after each swap - updatePoolWeights(poolId.toHexString(), event.block.timestamp); + updatePoolWeights(poolId.toHexString(), blockTimestamp); } 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); + updateAmpFactor(pool, blockTimestamp); } // If swapping on a pool with preminted BPT and the BPT itself is being swapped then this is equivalent to a mint/burn in a regular pool