Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix(gearbox): Fix lending token v3 liquidity and pricePerShare (#3162)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoulin authored Dec 21, 2023
1 parent f85929b commit 64c7ae1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apps/gearbox/ethereum/gearbox.lending-v3.token-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ export class EthereumGearboxLendingV3TokenFetcher extends AppTokenTemplatePositi
return [{ address: await contract.read.asset(), network: this.network }];
}

async getPricePerShare({ appToken, contract }: GetPricePerShareParams<GearboxLendingTokenV3>) {
async getPricePerShare({ contract }: GetPricePerShareParams<GearboxLendingTokenV3>) {
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];
}
}

0 comments on commit 64c7ae1

Please sign in to comment.