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

Commit

Permalink
fix(aura): Optimize RPC calls
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoulin committed Oct 12, 2023
1 parent 6554117 commit dce4f14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/apps/aura/common/aura.deposit.token-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { AuraContractFactory, AuraDepositToken } from '../contracts';

type AuraDepositTokenDefinition = {
address: string;
underlyingTokenAddress: string;
poolIndex: number;
booster: string;
};
Expand Down Expand Up @@ -54,6 +55,7 @@ export abstract class AuraDepositTokenFetcher extends AppTokenTemplatePositionFe
const poolInfo = await multicall.wrap(boosterContract).poolInfo(poolIndex);
return {
address: poolInfo.token.toLowerCase(),
underlyingTokenAddress: poolInfo.lptoken.toLowerCase(),
poolIndex,
booster,
};
Expand All @@ -72,9 +74,7 @@ export abstract class AuraDepositTokenFetcher extends AppTokenTemplatePositionFe
async getUnderlyingTokenDefinitions({
definition,
}: GetUnderlyingTokensParams<AuraDepositToken, AuraDepositTokenDefinition>) {
const boosterContract = this.contractFactory.auraBooster({ address: definition.booster, network: this.network });
const poolInfo = await boosterContract.poolInfo(definition.poolIndex);
return [{ address: poolInfo.lptoken, network: this.network }];
return [{ address: definition.underlyingTokenAddress, network: this.network }];
}

async getPricePerShare() {
Expand Down

0 comments on commit dce4f14

Please sign in to comment.