update wording on AMMDeposit & AMMWithdraw validation errors

This commit is contained in:
Omar Khan
2022-08-30 19:01:08 -04:00
parent e9778ebcdb
commit 6a06412b2d
4 changed files with 6 additions and 6 deletions

View File

@@ -75,7 +75,7 @@ export function validateAMMDeposit(tx: Record<string, unknown>): 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',
)
}

View File

@@ -77,7 +77,7 @@ export function validateAMMWithdraw(tx: Record<string, unknown>): 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',
)
}

View File

@@ -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',
)
})

View File

@@ -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',
)
})