Skip to content

Commit

Permalink
return big number
Browse files Browse the repository at this point in the history
  • Loading branch information
vkulinich-cl committed Nov 27, 2024
1 parent 833e0f8 commit 9962e50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions packages/sdk/src/pool/omni/OmniPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export type OmniPoolPair = PoolPair & {
};

export type OmniPoolToken = PoolToken & {
hubReserves: string;
shares: string;
hubReserves: BigNumber;
shares: BigNumber;
cap: string;
protocolShares: string;
};
Expand Down Expand Up @@ -103,10 +103,10 @@ export class OmniPool implements Pool {
return {
assetIn: tokenIn,
assetOut: tokenOut,
hubReservesIn: bnum(tokenInMeta.hubReserves),
hubReservesOut: bnum(tokenOutMeta.hubReserves),
sharesIn: bnum(tokenInMeta.shares),
sharesOut: bnum(tokenOutMeta.shares),
hubReservesIn: tokenInMeta.hubReserves,
hubReservesOut: tokenOutMeta.hubReserves,
sharesIn: tokenInMeta.shares,
sharesOut: tokenOutMeta.shares,
decimalsIn: tokenInMeta.decimals,
decimalsOut: tokenOutMeta.decimals,
balanceIn: balanceIn,
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk/src/pool/omni/OmniPoolClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export class OmniPoolClient extends PoolClient {
const balance = await this.getBalance(poolAddress, id.toString());
return {
id: id.toString(),
hubReserves: hubReserve.toString(),
shares: shares.toString(),
hubReserves: bnum(hubReserve.toString()),
shares: bnum(shares.toString()),
tradeable: tradable.bits.toNumber(),
balance: balance.toString(),
cap: cap.toString(),
Expand Down Expand Up @@ -128,8 +128,8 @@ export class OmniPoolClient extends PoolClient {
const { hubReserve, shares, tradable } = tokenState;
return {
...token,
hubReserves: hubReserve.toString(),
shares: shares.toString(),
hubReserves: bnum(hubReserve.toString()),
shares: bnum(shares.toString()),
tradeable: tradable.bits.toNumber(),
} as OmniPoolToken;
}
Expand Down

0 comments on commit 9962e50

Please sign in to comment.