From 7e9261223330ac39dec980d015844e97d04893fc Mon Sep 17 00:00:00 2001 From: Cujowolf Date: Fri, 5 Jan 2024 09:46:22 -0600 Subject: [PATCH] Use correct asset settings for bulk grown stalk changes --- projects/subgraph-beanstalk/src/SiloHandler.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/subgraph-beanstalk/src/SiloHandler.ts b/projects/subgraph-beanstalk/src/SiloHandler.ts index 0816b83527..b25d49517e 100644 --- a/projects/subgraph-beanstalk/src/SiloHandler.ts +++ b/projects/subgraph-beanstalk/src/SiloHandler.ts @@ -935,9 +935,10 @@ export function handleUpdatedStalkPerBdvPerSeason(event: UpdatedStalkPerBdvPerSe for (let i = 0; i < beanstalkSilo.whitelistedTokens.length; i++) { let asset = loadSiloAsset(BEANSTALK, Address.fromString(beanstalkSilo.whitelistedTokens[i])); + let assetSettings = loadWhitelistTokenSetting(Address.fromString(beanstalkSilo.whitelistedTokens[i])); newGrownStalkAmount = newGrownStalkAmount.plus( - asset.depositedBDV.times(siloSettings.stalkEarnedPerSeason).div(BigInt.fromI32(1000000)) + asset.depositedBDV.times(assetSettings.stalkEarnedPerSeason).div(BigInt.fromI32(1000000)) ); } @@ -954,9 +955,10 @@ export function handleUpdatedStalkPerBdvPerSeason(event: UpdatedStalkPerBdvPerSe for (let i = 0; i < beanstalkSilo.whitelistedTokens.length; i++) { let asset = loadSiloAsset(account, Address.fromString(beanstalkSilo.whitelistedTokens[i])); + let assetSettings = loadWhitelistTokenSetting(Address.fromString(beanstalkSilo.whitelistedTokens[i])); newGrownStalkAmount = newGrownStalkAmount.plus( - asset.depositedBDV.times(siloSettings.stalkEarnedPerSeason).div(BigInt.fromI32(1000000)) + asset.depositedBDV.times(assetSettings.stalkEarnedPerSeason).div(BigInt.fromI32(1000000)) ); }