mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-08-01 19:16:20 -04:00
support and test splitting output for offer
This commit is contained in:
parent
055f2dd5d2
commit
3cfb83d252
15 changed files with 200 additions and 69 deletions
4
dist/protobuf/grpc_pb.d.ts
vendored
4
dist/protobuf/grpc_pb.d.ts
vendored
|
@ -1499,6 +1499,9 @@ export class PostOfferRequest extends jspb.Message {
|
|||
getTriggerPrice(): string;
|
||||
setTriggerPrice(value: string): PostOfferRequest;
|
||||
|
||||
getSplitOutput(): boolean;
|
||||
setSplitOutput(value: boolean): PostOfferRequest;
|
||||
|
||||
getPaymentAccountId(): string;
|
||||
setPaymentAccountId(value: string): PostOfferRequest;
|
||||
|
||||
|
@ -1521,6 +1524,7 @@ export namespace PostOfferRequest {
|
|||
minAmount: string,
|
||||
buyerSecurityDepositPct: number,
|
||||
triggerPrice: string,
|
||||
splitOutput: boolean,
|
||||
paymentAccountId: string,
|
||||
}
|
||||
}
|
||||
|
|
40
dist/protobuf/grpc_pb.js
vendored
40
dist/protobuf/grpc_pb.js
vendored
|
@ -14510,7 +14510,8 @@ proto.io.haveno.protobuffer.PostOfferRequest.toObject = function(includeInstance
|
|||
minAmount: jspb.Message.getFieldWithDefault(msg, 7, "0"),
|
||||
buyerSecurityDepositPct: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0),
|
||||
triggerPrice: jspb.Message.getFieldWithDefault(msg, 9, ""),
|
||||
paymentAccountId: jspb.Message.getFieldWithDefault(msg, 10, "")
|
||||
splitOutput: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
|
||||
paymentAccountId: jspb.Message.getFieldWithDefault(msg, 11, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
|
@ -14584,6 +14585,10 @@ proto.io.haveno.protobuffer.PostOfferRequest.deserializeBinaryFromReader = funct
|
|||
msg.setTriggerPrice(value);
|
||||
break;
|
||||
case 10:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setSplitOutput(value);
|
||||
break;
|
||||
case 11:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setPaymentAccountId(value);
|
||||
break;
|
||||
|
@ -14679,10 +14684,17 @@ proto.io.haveno.protobuffer.PostOfferRequest.serializeBinaryToWriter = function(
|
|||
f
|
||||
);
|
||||
}
|
||||
f = message.getSplitOutput();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
10,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getPaymentAccountId();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
10,
|
||||
11,
|
||||
f
|
||||
);
|
||||
}
|
||||
|
@ -14852,11 +14864,29 @@ proto.io.haveno.protobuffer.PostOfferRequest.prototype.setTriggerPrice = functio
|
|||
|
||||
|
||||
/**
|
||||
* optional string payment_account_id = 10;
|
||||
* optional bool split_output = 10;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PostOfferRequest.prototype.getSplitOutput = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.io.haveno.protobuffer.PostOfferRequest} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PostOfferRequest.prototype.setSplitOutput = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 10, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string payment_account_id = 11;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PostOfferRequest.prototype.getPaymentAccountId = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
|
||||
};
|
||||
|
||||
|
||||
|
@ -14865,7 +14895,7 @@ proto.io.haveno.protobuffer.PostOfferRequest.prototype.getPaymentAccountId = fun
|
|||
* @return {!proto.io.haveno.protobuffer.PostOfferRequest} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PostOfferRequest.prototype.setPaymentAccountId = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 10, value);
|
||||
return jspb.Message.setProto3StringField(this, 11, value);
|
||||
};
|
||||
|
||||
|
||||
|
|
24
dist/protobuf/pb_pb.d.ts
vendored
24
dist/protobuf/pb_pb.d.ts
vendored
|
@ -5688,12 +5688,10 @@ export namespace XmrAddressEntry {
|
|||
export enum Context {
|
||||
PB_ERROR = 0,
|
||||
ARBITRATOR = 1,
|
||||
AVAILABLE = 2,
|
||||
OFFER_FUNDING = 3,
|
||||
RESERVED_FOR_TRADE = 4,
|
||||
MULTI_SIG = 5,
|
||||
TRADE_PAYOUT = 6,
|
||||
BASE_ADDRESS = 7,
|
||||
BASE_ADDRESS = 2,
|
||||
AVAILABLE = 3,
|
||||
OFFER_FUNDING = 4,
|
||||
TRADE_PAYOUT = 5,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5877,8 +5875,8 @@ export class OpenOffer extends jspb.Message {
|
|||
getTriggerPrice(): number;
|
||||
setTriggerPrice(value: number): OpenOffer;
|
||||
|
||||
getAutoSplit(): boolean;
|
||||
setAutoSplit(value: boolean): OpenOffer;
|
||||
getSplitOutput(): boolean;
|
||||
setSplitOutput(value: boolean): OpenOffer;
|
||||
|
||||
getScheduledTxHashesList(): Array<string>;
|
||||
setScheduledTxHashesList(value: Array<string>): OpenOffer;
|
||||
|
@ -5888,6 +5886,9 @@ export class OpenOffer extends jspb.Message {
|
|||
getScheduledAmount(): string;
|
||||
setScheduledAmount(value: string): OpenOffer;
|
||||
|
||||
getSplitOutputTxHash(): string;
|
||||
setSplitOutputTxHash(value: string): OpenOffer;
|
||||
|
||||
getReserveTxHash(): string;
|
||||
setReserveTxHash(value: string): OpenOffer;
|
||||
|
||||
|
@ -5910,9 +5911,10 @@ export namespace OpenOffer {
|
|||
offer?: Offer.AsObject,
|
||||
state: OpenOffer.State,
|
||||
triggerPrice: number,
|
||||
autoSplit: boolean,
|
||||
splitOutput: boolean,
|
||||
scheduledTxHashesList: Array<string>,
|
||||
scheduledAmount: string,
|
||||
splitOutputTxHash: string,
|
||||
reserveTxHash: string,
|
||||
reserveTxHex: string,
|
||||
reserveTxKey: string,
|
||||
|
@ -6935,6 +6937,9 @@ export class PreferencesPayload extends jspb.Message {
|
|||
getSellScreenCryptoCurrencyCode(): string;
|
||||
setSellScreenCryptoCurrencyCode(value: string): PreferencesPayload;
|
||||
|
||||
getSplitOfferOutput(): boolean;
|
||||
setSplitOfferOutput(value: boolean): PreferencesPayload;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PreferencesPayload.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PreferencesPayload): PreferencesPayload.AsObject;
|
||||
|
@ -7006,6 +7011,7 @@ export namespace PreferencesPayload {
|
|||
clearDataAfterDays: number,
|
||||
buyScreenCryptoCurrencyCode: string,
|
||||
sellScreenCryptoCurrencyCode: string,
|
||||
splitOfferOutput: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
118
dist/protobuf/pb_pb.js
vendored
118
dist/protobuf/pb_pb.js
vendored
|
@ -46880,12 +46880,10 @@ proto.io.haveno.protobuffer.XmrAddressEntry.serializeBinaryToWriter = function(m
|
|||
proto.io.haveno.protobuffer.XmrAddressEntry.Context = {
|
||||
PB_ERROR: 0,
|
||||
ARBITRATOR: 1,
|
||||
AVAILABLE: 2,
|
||||
OFFER_FUNDING: 3,
|
||||
RESERVED_FOR_TRADE: 4,
|
||||
MULTI_SIG: 5,
|
||||
TRADE_PAYOUT: 6,
|
||||
BASE_ADDRESS: 7
|
||||
BASE_ADDRESS: 2,
|
||||
AVAILABLE: 3,
|
||||
OFFER_FUNDING: 4,
|
||||
TRADE_PAYOUT: 5
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -48270,12 +48268,13 @@ proto.io.haveno.protobuffer.OpenOffer.toObject = function(includeInstance, msg)
|
|||
offer: (f = msg.getOffer()) && proto.io.haveno.protobuffer.Offer.toObject(includeInstance, f),
|
||||
state: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
||||
triggerPrice: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
||||
autoSplit: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
|
||||
splitOutput: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
|
||||
scheduledTxHashesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f,
|
||||
scheduledAmount: jspb.Message.getFieldWithDefault(msg, 6, ""),
|
||||
reserveTxHash: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
||||
reserveTxHex: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
||||
reserveTxKey: jspb.Message.getFieldWithDefault(msg, 9, "")
|
||||
splitOutputTxHash: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
||||
reserveTxHash: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
||||
reserveTxHex: jspb.Message.getFieldWithDefault(msg, 9, ""),
|
||||
reserveTxKey: jspb.Message.getFieldWithDefault(msg, 10, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
|
@ -48327,7 +48326,7 @@ proto.io.haveno.protobuffer.OpenOffer.deserializeBinaryFromReader = function(msg
|
|||
break;
|
||||
case 4:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setAutoSplit(value);
|
||||
msg.setSplitOutput(value);
|
||||
break;
|
||||
case 5:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
|
@ -48339,13 +48338,17 @@ proto.io.haveno.protobuffer.OpenOffer.deserializeBinaryFromReader = function(msg
|
|||
break;
|
||||
case 7:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setReserveTxHash(value);
|
||||
msg.setSplitOutputTxHash(value);
|
||||
break;
|
||||
case 8:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setReserveTxHex(value);
|
||||
msg.setReserveTxHash(value);
|
||||
break;
|
||||
case 9:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setReserveTxHex(value);
|
||||
break;
|
||||
case 10:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setReserveTxKey(value);
|
||||
break;
|
||||
|
@ -48400,7 +48403,7 @@ proto.io.haveno.protobuffer.OpenOffer.serializeBinaryToWriter = function(message
|
|||
f
|
||||
);
|
||||
}
|
||||
f = message.getAutoSplit();
|
||||
f = message.getSplitOutput();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
4,
|
||||
|
@ -48421,27 +48424,34 @@ proto.io.haveno.protobuffer.OpenOffer.serializeBinaryToWriter = function(message
|
|||
f
|
||||
);
|
||||
}
|
||||
f = message.getReserveTxHash();
|
||||
f = message.getSplitOutputTxHash();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
7,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getReserveTxHex();
|
||||
f = message.getReserveTxHash();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
8,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getReserveTxKey();
|
||||
f = message.getReserveTxHex();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
9,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getReserveTxKey();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
10,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -48532,10 +48542,10 @@ proto.io.haveno.protobuffer.OpenOffer.prototype.setTriggerPrice = function(value
|
|||
|
||||
|
||||
/**
|
||||
* optional bool auto_split = 4;
|
||||
* optional bool split_output = 4;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.getAutoSplit = function() {
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.getSplitOutput = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
|
||||
};
|
||||
|
||||
|
@ -48544,7 +48554,7 @@ proto.io.haveno.protobuffer.OpenOffer.prototype.getAutoSplit = function() {
|
|||
* @param {boolean} value
|
||||
* @return {!proto.io.haveno.protobuffer.OpenOffer} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.setAutoSplit = function(value) {
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.setSplitOutput = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 4, value);
|
||||
};
|
||||
|
||||
|
@ -48605,10 +48615,10 @@ proto.io.haveno.protobuffer.OpenOffer.prototype.setScheduledAmount = function(va
|
|||
|
||||
|
||||
/**
|
||||
* optional string reserve_tx_hash = 7;
|
||||
* optional string split_output_tx_hash = 7;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveTxHash = function() {
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.getSplitOutputTxHash = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
|
||||
};
|
||||
|
||||
|
@ -48617,16 +48627,16 @@ proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveTxHash = function() {
|
|||
* @param {string} value
|
||||
* @return {!proto.io.haveno.protobuffer.OpenOffer} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.setReserveTxHash = function(value) {
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.setSplitOutputTxHash = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 7, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string reserve_tx_hex = 8;
|
||||
* optional string reserve_tx_hash = 8;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveTxHex = function() {
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveTxHash = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
|
||||
};
|
||||
|
||||
|
@ -48635,16 +48645,16 @@ proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveTxHex = function() {
|
|||
* @param {string} value
|
||||
* @return {!proto.io.haveno.protobuffer.OpenOffer} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.setReserveTxHex = function(value) {
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.setReserveTxHash = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 8, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string reserve_tx_key = 9;
|
||||
* optional string reserve_tx_hex = 9;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveTxKey = function() {
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveTxHex = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
|
||||
};
|
||||
|
||||
|
@ -48653,11 +48663,29 @@ proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveTxKey = function() {
|
|||
* @param {string} value
|
||||
* @return {!proto.io.haveno.protobuffer.OpenOffer} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.setReserveTxKey = function(value) {
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.setReserveTxHex = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 9, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string reserve_tx_key = 10;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveTxKey = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.io.haveno.protobuffer.OpenOffer} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.OpenOffer.prototype.setReserveTxKey = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 10, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Oneof group definitions for this message. Each group defines the field
|
||||
|
@ -54543,7 +54571,8 @@ proto.io.haveno.protobuffer.PreferencesPayload.toObject = function(includeInstan
|
|||
moneroNodeSettings: (f = msg.getMoneroNodeSettings()) && proto.io.haveno.protobuffer.MoneroNodeSettings.toObject(includeInstance, f),
|
||||
clearDataAfterDays: jspb.Message.getFieldWithDefault(msg, 59, 0),
|
||||
buyScreenCryptoCurrencyCode: jspb.Message.getFieldWithDefault(msg, 60, ""),
|
||||
sellScreenCryptoCurrencyCode: jspb.Message.getFieldWithDefault(msg, 61, "")
|
||||
sellScreenCryptoCurrencyCode: jspb.Message.getFieldWithDefault(msg, 61, ""),
|
||||
splitOfferOutput: jspb.Message.getBooleanFieldWithDefault(msg, 62, false)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
|
@ -54837,6 +54866,10 @@ proto.io.haveno.protobuffer.PreferencesPayload.deserializeBinaryFromReader = fun
|
|||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setSellScreenCryptoCurrencyCode(value);
|
||||
break;
|
||||
case 62:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setSplitOfferOutput(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
|
@ -55296,6 +55329,13 @@ proto.io.haveno.protobuffer.PreferencesPayload.serializeBinaryToWriter = functio
|
|||
f
|
||||
);
|
||||
}
|
||||
f = message.getSplitOfferOutput();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
62,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -56617,6 +56657,24 @@ proto.io.haveno.protobuffer.PreferencesPayload.prototype.setSellScreenCryptoCurr
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool split_offer_output = 62;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.getSplitOfferOutput = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 62, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.io.haveno.protobuffer.PreferencesPayload} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.setSplitOfferOutput = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 62, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue