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

Commit

Permalink
Merge branch 'main' into add-ilks-rate-to-maker-vault-debt-balances
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoulin authored Dec 21, 2023
2 parents e69980d + cc3053f commit 0d0ed81
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

[1]: https://www.npmjs.com/package/@zapper-fi/studio?activeTab=versions

## [0.574.2](https://github.com/Zapper-fi/studio/compare/v0.574.1...v0.574.2) (2023-12-21)


### Bug Fixes

* **gearbox:** Fix lending token v3 liquidity and pricePerShare ([#3162](https://github.com/Zapper-fi/studio/issues/3162)) ([64c7ae1](https://github.com/Zapper-fi/studio/commit/64c7ae11536e8648eac40b20f068fbf236cf7920))

## [0.574.1](https://github.com/Zapper-fi/studio/compare/v0.574.0...v0.574.1) (2023-12-19)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zapper-fi/studio",
"version": "0.574.1",
"version": "0.574.2",
"description": "Community build apps for Zapper.fi",
"license": "MIT",
"main": "./index.js",
Expand Down
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 0d0ed81

Please sign in to comment.