diff --git a/packages/sdk/src/pool/omni/OmniPool.ts b/packages/sdk/src/pool/omni/OmniPool.ts index 5044acbc..55a71992 100644 --- a/packages/sdk/src/pool/omni/OmniPool.ts +++ b/packages/sdk/src/pool/omni/OmniPool.ts @@ -28,6 +28,8 @@ export type OmniPoolPair = PoolPair & { export type OmniPoolToken = PoolToken & { hubReserves: BigNumber; shares: BigNumber; + cap: BigNumber; + protocolShares: BigNumber; }; export type OmniPoolFees = PoolFees & { diff --git a/packages/sdk/src/pool/omni/OmniPoolClient.ts b/packages/sdk/src/pool/omni/OmniPoolClient.ts index 0617e701..77e8dc2f 100644 --- a/packages/sdk/src/pool/omni/OmniPoolClient.ts +++ b/packages/sdk/src/pool/omni/OmniPoolClient.ts @@ -40,8 +40,13 @@ export class OmniPoolClient extends PoolClient { }, state, ]) => { - const { hubReserve, shares, tradable }: PalletOmnipoolAssetState = - state.unwrap(); + const { + hubReserve, + shares, + tradable, + cap, + protocolShares, + }: PalletOmnipoolAssetState = state.unwrap(); const balance = await this.getBalance(poolAddress, id.toString()); return { id: id.toString(), @@ -49,6 +54,8 @@ export class OmniPoolClient extends PoolClient { shares: bnum(shares.toString()), tradeable: tradable.bits.toNumber(), balance: balance.toString(), + cap: bnum(cap.toString()), + protocolShares: bnum(protocolShares.toString()), } as OmniPoolToken; } ); @@ -118,11 +125,13 @@ export class OmniPoolClient extends PoolClient { token: PoolToken, tokenState: PalletOmnipoolAssetState ) { - const { hubReserve, shares, tradable } = tokenState; + const { hubReserve, shares, tradable, cap, protocolShares } = tokenState; return { ...token, hubReserves: bnum(hubReserve.toString()), shares: bnum(shares.toString()), + cap: bnum(cap.toString()), + protocolShares: bnum(protocolShares.toString()), tradeable: tradable.bits.toNumber(), } as OmniPoolToken; }