From 854091b60753f2345f493ac348464ddec169cd30 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Mon, 16 Dec 2024 10:57:52 -0300 Subject: [PATCH] fix: allow null from getOrCreate because BIFI is ignored --- subgraphs/isolated-pools/src/operations/getOrCreate.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subgraphs/isolated-pools/src/operations/getOrCreate.ts b/subgraphs/isolated-pools/src/operations/getOrCreate.ts index 6522216b..fb8eb455 100644 --- a/subgraphs/isolated-pools/src/operations/getOrCreate.ts +++ b/subgraphs/isolated-pools/src/operations/getOrCreate.ts @@ -30,16 +30,17 @@ import { } from './create'; import { getMarketPosition, getMarket } from './get'; +// BIFI was delisted before it was listed. Creation ignores this market. export const getOrCreateMarket = ( vTokenAddress: Address, comptrollerAddress: Address, blockNumber: BigInt, -): Market => { +): Market | null => { let market = getMarket(vTokenAddress); if (!market) { market = createMarket(vTokenAddress, comptrollerAddress, blockNumber); } - return market as Market; + return market; }; export const getOrCreatePool = (comptroller: Address): Pool => {