Skip to content

Commit

Permalink
Fix boost import
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Oct 11, 2024
1 parent af6d05f commit b580f4c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/protocol/beefy/connector/boost-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,14 @@ export function beefyBoostsFromGitHistory$(chain: Chain, allChainVaults: BeefyVa
logger.error({ msg: "Could not find vault for boost", data: { boostId: boost.id, vaultId: normalizeVaultId(boost.poolId) } });
return Rx.EMPTY;
}
return Rx.of(rawBoostToBeefyBoost(chain, boost, vault, eolDate));

try {
return Rx.of(rawBoostToBeefyBoost(chain, boost, vault, eolDate));
} catch (error) {
logger.error({ msg: "Could not map raw boost to expected format", data: { rawVault: boost }, error });
logger.debug(error);
return Rx.EMPTY;
}
}),

Rx.tap({
Expand Down
7 changes: 6 additions & 1 deletion src/protocol/beefy/connector/vault-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ export function beefyVaultsFromGitHistory$(chain: Chain): Rx.Observable<BeefyVau
for (const vault of vaults) {
// ignore those without earned token address
if (!vault.earnedTokenAddress) {
logger.error({ msg: "Could not find vault earned token address for vault", data: { vaultId: vault.id } });
const msg = { msg: "Could not find vault earned token address for vault", data: { vaultId: vault.id } };
if (vault?.id?.endsWith("-rp") || vault?.id === "bifi-pool") {
logger.debug(msg);
} else {
logger.error(msg);
}
logger.trace(vault);
continue;
}
Expand Down

0 comments on commit b580f4c

Please sign in to comment.