From 6a06412b2d9f08c1909054b1d80c93405f22b267 Mon Sep 17 00:00:00 2001 From: Omar Khan Date: Tue, 30 Aug 2022 19:01:08 -0400 Subject: [PATCH] update wording on AMMDeposit & AMMWithdraw validation errors --- packages/xrpl/src/models/transactions/AMMDeposit.ts | 2 +- packages/xrpl/src/models/transactions/AMMWithdraw.ts | 2 +- packages/xrpl/test/models/AMMDeposit.ts | 4 ++-- packages/xrpl/test/models/AMMWithdraw.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/xrpl/src/models/transactions/AMMDeposit.ts b/packages/xrpl/src/models/transactions/AMMDeposit.ts index 086381e0..b28ca0ae 100644 --- a/packages/xrpl/src/models/transactions/AMMDeposit.ts +++ b/packages/xrpl/src/models/transactions/AMMDeposit.ts @@ -75,7 +75,7 @@ export function validateAMMDeposit(tx: Record): void { throw new ValidationError('AMMDeposit: must set Asset1In with EPrice') } else if (tx.LPToken == null && tx.Asset1In == null) { throw new ValidationError( - 'AMMDeposit: must set either or both LPToken with Asset1In', + 'AMMDeposit: must set at least LPToken or Asset1In', ) } diff --git a/packages/xrpl/src/models/transactions/AMMWithdraw.ts b/packages/xrpl/src/models/transactions/AMMWithdraw.ts index 1c777f78..9e222e04 100644 --- a/packages/xrpl/src/models/transactions/AMMWithdraw.ts +++ b/packages/xrpl/src/models/transactions/AMMWithdraw.ts @@ -77,7 +77,7 @@ export function validateAMMWithdraw(tx: Record): void { throw new ValidationError('AMMWithdraw: must set Asset1Out with EPrice') } else if (tx.LPToken == null && tx.Asset1Out == null) { throw new ValidationError( - 'AMMWithdraw: must set either or both LPToken with Asset1Out', + 'AMMWithdraw: must set at least LPToken or Asset1Out', ) } diff --git a/packages/xrpl/test/models/AMMDeposit.ts b/packages/xrpl/test/models/AMMDeposit.ts index d10eb64c..1d54ba25 100644 --- a/packages/xrpl/test/models/AMMDeposit.ts +++ b/packages/xrpl/test/models/AMMDeposit.ts @@ -69,11 +69,11 @@ describe('AMMDeposit', function () { ) }) - it(`throws w/ must set either or both LPToken with Asset1In`, function () { + it(`throws w/ must set at least LPToken or Asset1In`, function () { assert.throws( () => validate(deposit), ValidationError, - 'AMMDeposit: must set either or both LPToken with Asset1In', + 'AMMDeposit: must set at least LPToken or Asset1In', ) }) diff --git a/packages/xrpl/test/models/AMMWithdraw.ts b/packages/xrpl/test/models/AMMWithdraw.ts index a2fc2d9f..68fdd314 100644 --- a/packages/xrpl/test/models/AMMWithdraw.ts +++ b/packages/xrpl/test/models/AMMWithdraw.ts @@ -69,11 +69,11 @@ describe('AMMWithdraw', function () { ) }) - it(`throws w/ must set either or both LPToken with Asset1Out`, function () { + it(`throws w/ must set at least LPToken or Asset1Out`, function () { assert.throws( () => validate(withdraw), ValidationError, - 'AMMWithdraw: must set either or both LPToken with Asset1Out', + 'AMMWithdraw: must set at least LPToken or Asset1Out', ) })