Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
fix(chain-adapters): field name in osmosis lp remove transaction (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
pastaghost committed Feb 24, 2023
1 parent 59eea88 commit 6b32018
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export class ChainAdapter extends CosmosSdkBaseAdapter<KnownChainIds.OsmosisMain
tx: BuildLPRemoveTxInput<KnownChainIds.OsmosisMainnet>,
): Promise<{ txToSign: OsmosisSignTx }> {
try {
const { wallet, accountNumber, poolId, shareOutAmount, tokenOutMins } = tx
const { wallet, accountNumber, poolId, shareInAmount, tokenOutMins } = tx

const from = await this.getAddress({ accountNumber, wallet })
const account = await this.getAccount(from)
Expand All @@ -311,7 +311,7 @@ export class ChainAdapter extends CosmosSdkBaseAdapter<KnownChainIds.OsmosisMain
value: {
sender: from,
pool_id: poolId,
share_out_amount: shareOutAmount,
share_in_amount: shareInAmount,
token_out_mins: tokenOutMins,
},
}
Expand Down
3 changes: 2 additions & 1 deletion packages/chain-adapters/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,16 @@ export type BuildDepositTxInput<T extends ChainId> = Omit<BuildSendTxInput<T>, '

type BuildLPTxInput<T extends ChainId> = Omit<BuildSendTxInput<T>, 'to' | 'value'> & {
poolId: string
shareOutAmount: string
}

export type BuildLPAddTxInput<T extends ChainId> = BuildLPTxInput<T> & {
tokenInMaxs: [{ denom: string; amount: string }, { denom: string; amount: string }]
shareOutAmount: string
}

export type BuildLPRemoveTxInput<T extends ChainId> = BuildLPTxInput<T> & {
tokenOutMins: [{ denom: string; amount: string }, { denom: string; amount: string }]
shareInAmount: string
}

export type SignTxInput<TxType> = {
Expand Down

0 comments on commit 6b32018

Please sign in to comment.