From 64c7ae11536e8648eac40b20f068fbf236cf7920 Mon Sep 17 00:00:00 2001 From: William Poulin Date: Thu, 21 Dec 2023 12:54:43 -0500 Subject: [PATCH] fix(gearbox): Fix lending token v3 liquidity and pricePerShare (#3162) --- src/apps/gearbox/ethereum/gearbox.lending-v3.token-fetcher.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/gearbox/ethereum/gearbox.lending-v3.token-fetcher.ts b/src/apps/gearbox/ethereum/gearbox.lending-v3.token-fetcher.ts index 928a45360..56f00dd03 100644 --- a/src/apps/gearbox/ethereum/gearbox.lending-v3.token-fetcher.ts +++ b/src/apps/gearbox/ethereum/gearbox.lending-v3.token-fetcher.ts @@ -70,10 +70,10 @@ export class EthereumGearboxLendingV3TokenFetcher extends AppTokenTemplatePositi return [{ address: await contract.read.asset(), network: this.network }]; } - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { + async getPricePerShare({ contract }: GetPricePerShareParams) { const amount = BigNumber.from((1e18).toString()).toString(); const ratioRaw = await contract.read.convertToAssets([BigInt(amount)]); - const ratio = Number(ratioRaw) / 10 ** appToken.decimals; + const ratio = Number(ratioRaw) / 10 ** 18; return [ratio]; } }