Skip to content

Commit c2483fa

Browse files
committed
fix swap fee at registration
1 parent d36335c commit c2483fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subgraphs/v3-vault/src/mappings/vault.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,8 @@ export function handleWrap(event: Wrap): void {
607607
export function handleSwapFeePercentageChanged(
608608
event: SwapFeePercentageChanged
609609
): void {
610-
let pool = Pool.load(event.params.pool) as Pool;
610+
let pool = Pool.load(event.params.pool);
611+
if (!pool) return; // Pool has not been registered yet
611612
pool.swapFee = scaleDown(event.params.swapFeePercentage, 18);
612613
pool.save();
613614
}

0 commit comments

Comments
 (0)