Skip to content

Commit

Permalink
fix: fixed wrong function implementation in poolClient
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsc0x committed Oct 16, 2024
1 parent dd4eb51 commit 2164632
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/clients/poolClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ export class PoolClient extends AptosContractWrapperBaseClass {
return resp;
}

public async getReserveEmodeCategory(
public async getReserveConfigurationData(
asset: AccountAddress,
): Promise<ReserveEmodeCategory> {
const [
Expand All @@ -770,7 +770,7 @@ export class PoolClient extends AptosContractWrapperBaseClass {
isActive,
isFrozen,
] = await this.callViewMethod(
this.poolContract.GetReserveEModeCategoryFuncAddr,
this.poolContract.GetReserveConfigurationDataFuncAddr,
[asset],
);
return {
Expand All @@ -786,6 +786,14 @@ export class PoolClient extends AptosContractWrapperBaseClass {
};
}

public async getReserveEmodeCategory(asset: AccountAddress): Promise<number> {
const [emodeCategory] = await this.callViewMethod(
this.poolContract.GetReserveEModeCategoryFuncAddr,
[asset],
);
return emodeCategory as number;
}

public async getReserveCaps(asset: AccountAddress): Promise<{
borrowCap: bigint;
supplyCap: bigint;
Expand Down

0 comments on commit 2164632

Please sign in to comment.