Skip to content

Commit

Permalink
fix: silly mispelling
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasDeco committed May 2, 2024
1 parent 46efb04 commit ee31bf0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/client/rpc/market-clients/ammMarkets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ export class FutarchyAmmMarketsRPCClient implements FutarchyAmmMarketsClient {
validateAddLiquidity(
ammMarket: AmmMarket,
quoteAmount: number,
maxBasAmount: number
maxBaseAmount: number
): LiquidityAddError | null {
const quoteAmountArg = new BN(
quoteAmount *
new BN(10).pow(new BN(ammMarket.quoteToken.decimals)).toNumber()
);
const baseAmountArg = new BN(
maxBasAmount *
maxBaseAmount *
new BN(10).pow(new BN(ammMarket.baseToken.decimals)).toNumber()
);
// base passed in should be ammBaseAmount honestly...
Expand All @@ -107,14 +107,14 @@ export class FutarchyAmmMarketsRPCClient implements FutarchyAmmMarketsClient {
async addLiquidity(
ammMarket: AmmMarket,
quoteAmount: number,
maxBasAmount: number
maxBaseAmount: number
): Promise<string[] | LiquidityAddError> {
if (!this.transactionSender) return [];

const validationError = this.validateAddLiquidity(
ammMarket,
quoteAmount,
maxBasAmount
maxBaseAmount
);
if (validationError) {
return validationError;
Expand All @@ -131,7 +131,7 @@ export class FutarchyAmmMarketsRPCClient implements FutarchyAmmMarketsClient {
.div(ammMarket.quoteAmount);

const baseAmountArg = new BN(
maxBasAmount *
maxBaseAmount *
new BN(10).pow(new BN(ammMarket.baseToken.decimals)).toNumber()
);

Expand Down Expand Up @@ -167,9 +167,9 @@ export class FutarchyAmmMarketsRPCClient implements FutarchyAmmMarketsClient {
return simulation;
}

async removeLiquidity(ammMarket: AmmMarket, lpTokensToBurn: number) {
const minBaseAmount = 23;
const minQuoteAmount = 20;
async removeLiquidity(ammMarket: AmmMarket, lpTokensToBurn: BN) {
const minBaseAmount = new BN(0);
const minQuoteAmount = new BN(0);
const ix = this.ammClient.removeLiquidityIx(
ammMarket.publicKey,
ammMarket.baseMint,
Expand Down

0 comments on commit ee31bf0

Please sign in to comment.