rename splitOutput to reserveExactAmount

This commit is contained in:
woodser 2023-07-23 12:23:10 -04:00
parent ad8ac4091b
commit 1dc0a31555
2 changed files with 11 additions and 11 deletions

View file

@ -999,7 +999,7 @@ export default class HavenoClient {
* @param {number} marketPriceMarginPct - if using market price, % from market price to accept (optional, default 0%)
* @param {bigint} minAmount - minimum amount to trade (optional, default to fixed amount)
* @param {number} triggerPrice - price to remove offer (optional)
* @param {number} splitOutput - create a new output reserved for the offer, incurring an on-chain transaction and 10 confirmations before the offer goes live (default = false)
* @param {number} reserveExactAmount - reserve exact amount needed for offer, incurring on-chain transaction and 10 confirmations before the offer goes live (default = false)
* @return {OfferInfo} the posted offer
*/
async postOffer(direction: string,
@ -1010,7 +1010,7 @@ export default class HavenoClient {
price?: number,
marketPriceMarginPct?: number,
triggerPrice?: number,
splitOutput?: boolean,
reserveExactAmount?: boolean,
minAmount?: bigint): Promise<OfferInfo> {
try {
const request = new PostOfferRequest()
@ -1024,7 +1024,7 @@ export default class HavenoClient {
if (price) request.setPrice(price.toString());
if (marketPriceMarginPct) request.setMarketPriceMarginPct(marketPriceMarginPct);
if (triggerPrice) request.setTriggerPrice(triggerPrice.toString());
if (splitOutput) request.setSplitOutput(splitOutput);
if (reserveExactAmount) request.setReserveExactAmount(reserveExactAmount);
return (await this._offersClient.postOffer(request, {password: this._password})).getOffer()!;
} catch (e: any) {
throw new HavenoError(e.message, e.code);