mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-28 08:05:51 +00:00
update wording on AMMDeposit & AMMWithdraw validation errors
This commit is contained in:
@@ -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',
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
@@ -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',
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user