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

fix(gearbox): Fix lending token v3 liquidity and pricePerShare #3162

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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];
}
}
Loading