mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
fix: request model fields related to AMM (#2473)
* fix AuthAccount model * fix AuctionSlot.Price field to be IssuedCurrencyAmount * fix AMMBid BidMin & BidMan to IssuedCurrencyAmount * update HISTORY
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xrpl-announce) for release announcements. We recommend that xrpl.js (ripple-lib) users stay up-to-date with the latest stable release.
|
||||
## Unreleased
|
||||
|
||||
## Fixed
|
||||
* Fix request model fields related to AMM
|
||||
|
||||
## 2.11.0 (2023-08-24)
|
||||
|
||||
### Added
|
||||
|
||||
@@ -145,6 +145,6 @@ export interface NFToken {
|
||||
|
||||
export interface AuthAccount {
|
||||
AuthAccount: {
|
||||
account: string
|
||||
Account: string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AuthAccount, Currency } from '../common'
|
||||
import { AuthAccount, Currency, IssuedCurrencyAmount } from '../common'
|
||||
|
||||
import BaseLedgerEntry from './BaseLedgerEntry'
|
||||
|
||||
@@ -53,7 +53,7 @@ export default interface AMM extends BaseLedgerEntry {
|
||||
/**
|
||||
* The amount the auction owner paid to win this slot, in LP Tokens.
|
||||
*/
|
||||
Price: Currency
|
||||
Price: IssuedCurrencyAmount
|
||||
}
|
||||
/**
|
||||
* The total outstanding balance of liquidity provider tokens from this AMM instance.
|
||||
|
||||
@@ -98,7 +98,7 @@ export interface AMMInfoResponse extends BaseResponse {
|
||||
* The amount, in LP Tokens, that the auction slot holder paid to win the auction slot.
|
||||
* This affects the price to outbid the current slot holder.
|
||||
*/
|
||||
price: Amount
|
||||
price: IssuedCurrencyAmount
|
||||
|
||||
/**
|
||||
* The current 72-minute time interval this auction slot is in, from 0 to 19.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable complexity -- required for validateAMMBid */
|
||||
import { ValidationError } from '../../errors'
|
||||
import { Amount, AuthAccount, Currency } from '../common'
|
||||
import { AuthAccount, Currency, IssuedCurrencyAmount } from '../common'
|
||||
|
||||
import {
|
||||
BaseTransaction,
|
||||
@@ -33,18 +33,18 @@ export interface AMMBid extends BaseTransaction {
|
||||
Asset2: Currency
|
||||
|
||||
/**
|
||||
* Pay at least this amount for the slot.
|
||||
* Pay at least this LPToken amount for the slot.
|
||||
* Setting this value higher makes it harder for others to outbid you.
|
||||
* If omitted, pay the minimum necessary to win the bid.
|
||||
*/
|
||||
BidMin?: Amount
|
||||
BidMin?: IssuedCurrencyAmount
|
||||
|
||||
/**
|
||||
* Pay at most this amount for the slot.
|
||||
* Pay at most this LPToken amount for the slot.
|
||||
* If the cost to win the bid is higher than this amount, the transaction fails.
|
||||
* If omitted, pay as much as necessary to win the bid.
|
||||
*/
|
||||
BidMax?: Amount
|
||||
BidMax?: IssuedCurrencyAmount
|
||||
|
||||
/**
|
||||
* A list of up to 4 additional accounts that you allow to trade at the discounted fee.
|
||||
|
||||
@@ -22,8 +22,16 @@ describe('AMMBid', function () {
|
||||
currency: 'ETH',
|
||||
issuer: 'rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd',
|
||||
},
|
||||
BidMin: '5',
|
||||
BidMax: '10',
|
||||
BidMin: {
|
||||
currency: '039C99CD9AB0B70B32ECDA51EAAE471625608EA2',
|
||||
issuer: 'rE54zDvgnghAoPopCgvtiqWNq3dU5y836S',
|
||||
value: '50',
|
||||
},
|
||||
BidMax: {
|
||||
currency: '039C99CD9AB0B70B32ECDA51EAAE471625608EA2',
|
||||
issuer: 'rE54zDvgnghAoPopCgvtiqWNq3dU5y836S',
|
||||
value: '100',
|
||||
},
|
||||
AuthAccounts: [
|
||||
{
|
||||
AuthAccount: {
|
||||
|
||||
Reference in New Issue
Block a user