mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-02-22 07:29:49 -05:00
test signing offers w/ random arbitrator, taking trades w/ least used
This commit is contained in:
parent
33d2f1e238
commit
7d8f6ce98c
72
dist/protobuf/pb_pb.d.ts
vendored
72
dist/protobuf/pb_pb.d.ts
vendored
@ -3535,10 +3535,10 @@ export class PaymentAccountPayload extends jspb.Message {
|
||||
hasAmazonGiftCardAccountPayload(): boolean;
|
||||
clearAmazonGiftCardAccountPayload(): PaymentAccountPayload;
|
||||
|
||||
getCashByMailAccountPayload(): CashByMailAccountPayload | undefined;
|
||||
setCashByMailAccountPayload(value?: CashByMailAccountPayload): PaymentAccountPayload;
|
||||
hasCashByMailAccountPayload(): boolean;
|
||||
clearCashByMailAccountPayload(): PaymentAccountPayload;
|
||||
getPayByMailAccountPayload(): PayByMailAccountPayload | undefined;
|
||||
setPayByMailAccountPayload(value?: PayByMailAccountPayload): PaymentAccountPayload;
|
||||
hasPayByMailAccountPayload(): boolean;
|
||||
clearPayByMailAccountPayload(): PaymentAccountPayload;
|
||||
|
||||
getCapitualAccountPayload(): CapitualAccountPayload | undefined;
|
||||
setCapitualAccountPayload(value?: CapitualAccountPayload): PaymentAccountPayload;
|
||||
@ -3618,7 +3618,7 @@ export namespace PaymentAccountPayload {
|
||||
transferwiseAccountPayload?: TransferwiseAccountPayload.AsObject,
|
||||
australiaPayidPayload?: AustraliaPayidPayload.AsObject,
|
||||
amazonGiftCardAccountPayload?: AmazonGiftCardAccountPayload.AsObject,
|
||||
cashByMailAccountPayload?: CashByMailAccountPayload.AsObject,
|
||||
payByMailAccountPayload?: PayByMailAccountPayload.AsObject,
|
||||
capitualAccountPayload?: CapitualAccountPayload.AsObject,
|
||||
payseraAccountPayload?: PayseraAccountPayload.AsObject,
|
||||
paxumAccountPayload?: PaxumAccountPayload.AsObject,
|
||||
@ -3657,7 +3657,7 @@ export namespace PaymentAccountPayload {
|
||||
TRANSFERWISE_ACCOUNT_PAYLOAD = 29,
|
||||
AUSTRALIA_PAYID_PAYLOAD = 30,
|
||||
AMAZON_GIFT_CARD_ACCOUNT_PAYLOAD = 31,
|
||||
CASH_BY_MAIL_ACCOUNT_PAYLOAD = 32,
|
||||
PAY_BY_MAIL_ACCOUNT_PAYLOAD = 32,
|
||||
CAPITUAL_ACCOUNT_PAYLOAD = 33,
|
||||
PAYSERA_ACCOUNT_PAYLOAD = 34,
|
||||
PAXUM_ACCOUNT_PAYLOAD = 35,
|
||||
@ -4799,25 +4799,25 @@ export namespace PaytmAccountPayload {
|
||||
}
|
||||
}
|
||||
|
||||
export class CashByMailAccountPayload extends jspb.Message {
|
||||
export class PayByMailAccountPayload extends jspb.Message {
|
||||
getPostalAddress(): string;
|
||||
setPostalAddress(value: string): CashByMailAccountPayload;
|
||||
setPostalAddress(value: string): PayByMailAccountPayload;
|
||||
|
||||
getContact(): string;
|
||||
setContact(value: string): CashByMailAccountPayload;
|
||||
setContact(value: string): PayByMailAccountPayload;
|
||||
|
||||
getExtraInfo(): string;
|
||||
setExtraInfo(value: string): CashByMailAccountPayload;
|
||||
setExtraInfo(value: string): PayByMailAccountPayload;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CashByMailAccountPayload.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: CashByMailAccountPayload): CashByMailAccountPayload.AsObject;
|
||||
static serializeBinaryToWriter(message: CashByMailAccountPayload, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): CashByMailAccountPayload;
|
||||
static deserializeBinaryFromReader(message: CashByMailAccountPayload, reader: jspb.BinaryReader): CashByMailAccountPayload;
|
||||
toObject(includeInstance?: boolean): PayByMailAccountPayload.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PayByMailAccountPayload): PayByMailAccountPayload.AsObject;
|
||||
static serializeBinaryToWriter(message: PayByMailAccountPayload, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): PayByMailAccountPayload;
|
||||
static deserializeBinaryFromReader(message: PayByMailAccountPayload, reader: jspb.BinaryReader): PayByMailAccountPayload;
|
||||
}
|
||||
|
||||
export namespace CashByMailAccountPayload {
|
||||
export namespace PayByMailAccountPayload {
|
||||
export type AsObject = {
|
||||
postalAddress: string,
|
||||
contact: string,
|
||||
@ -6712,10 +6712,10 @@ export class PreferencesPayload extends jspb.Message {
|
||||
hasUserCountry(): boolean;
|
||||
clearUserCountry(): PreferencesPayload;
|
||||
|
||||
getFiatCurrenciesList(): Array<TradeCurrency>;
|
||||
setFiatCurrenciesList(value: Array<TradeCurrency>): PreferencesPayload;
|
||||
clearFiatCurrenciesList(): PreferencesPayload;
|
||||
addFiatCurrencies(value?: TradeCurrency, index?: number): TradeCurrency;
|
||||
getTraditionalCurrenciesList(): Array<TradeCurrency>;
|
||||
setTraditionalCurrenciesList(value: Array<TradeCurrency>): PreferencesPayload;
|
||||
clearTraditionalCurrenciesList(): PreferencesPayload;
|
||||
addTraditionalCurrencies(value?: TradeCurrency, index?: number): TradeCurrency;
|
||||
|
||||
getCryptoCurrenciesList(): Array<TradeCurrency>;
|
||||
setCryptoCurrenciesList(value: Array<TradeCurrency>): PreferencesPayload;
|
||||
@ -6921,7 +6921,7 @@ export namespace PreferencesPayload {
|
||||
export type AsObject = {
|
||||
userLanguage: string,
|
||||
userCountry?: Country.AsObject,
|
||||
fiatCurrenciesList: Array<TradeCurrency.AsObject>,
|
||||
traditionalCurrenciesList: Array<TradeCurrency.AsObject>,
|
||||
cryptoCurrenciesList: Array<TradeCurrency.AsObject>,
|
||||
blockChainExplorerMainNet?: BlockChainExplorer.AsObject,
|
||||
blockChainExplorerTestNet?: BlockChainExplorer.AsObject,
|
||||
@ -7291,10 +7291,10 @@ export class TradeCurrency extends jspb.Message {
|
||||
hasCryptoCurrency(): boolean;
|
||||
clearCryptoCurrency(): TradeCurrency;
|
||||
|
||||
getFiatCurrency(): FiatCurrency | undefined;
|
||||
setFiatCurrency(value?: FiatCurrency): TradeCurrency;
|
||||
hasFiatCurrency(): boolean;
|
||||
clearFiatCurrency(): TradeCurrency;
|
||||
getTraditionalCurrency(): TraditionalCurrency | undefined;
|
||||
setTraditionalCurrency(value?: TraditionalCurrency): TradeCurrency;
|
||||
hasTraditionalCurrency(): boolean;
|
||||
clearTraditionalCurrency(): TradeCurrency;
|
||||
|
||||
getMessageCase(): TradeCurrency.MessageCase;
|
||||
|
||||
@ -7311,13 +7311,13 @@ export namespace TradeCurrency {
|
||||
code: string,
|
||||
name: string,
|
||||
cryptoCurrency?: CryptoCurrency.AsObject,
|
||||
fiatCurrency?: FiatCurrency.AsObject,
|
||||
traditionalCurrency?: TraditionalCurrency.AsObject,
|
||||
}
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
CRYPTO_CURRENCY = 3,
|
||||
FIAT_CURRENCY = 4,
|
||||
TRADITIONAL_CURRENCY = 4,
|
||||
}
|
||||
}
|
||||
|
||||
@ -7339,21 +7339,21 @@ export namespace CryptoCurrency {
|
||||
}
|
||||
}
|
||||
|
||||
export class FiatCurrency extends jspb.Message {
|
||||
export class TraditionalCurrency extends jspb.Message {
|
||||
getCurrency(): Currency | undefined;
|
||||
setCurrency(value?: Currency): FiatCurrency;
|
||||
setCurrency(value?: Currency): TraditionalCurrency;
|
||||
hasCurrency(): boolean;
|
||||
clearCurrency(): FiatCurrency;
|
||||
clearCurrency(): TraditionalCurrency;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): FiatCurrency.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: FiatCurrency): FiatCurrency.AsObject;
|
||||
static serializeBinaryToWriter(message: FiatCurrency, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): FiatCurrency;
|
||||
static deserializeBinaryFromReader(message: FiatCurrency, reader: jspb.BinaryReader): FiatCurrency;
|
||||
toObject(includeInstance?: boolean): TraditionalCurrency.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: TraditionalCurrency): TraditionalCurrency.AsObject;
|
||||
static serializeBinaryToWriter(message: TraditionalCurrency, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): TraditionalCurrency;
|
||||
static deserializeBinaryFromReader(message: TraditionalCurrency, reader: jspb.BinaryReader): TraditionalCurrency;
|
||||
}
|
||||
|
||||
export namespace FiatCurrency {
|
||||
export namespace TraditionalCurrency {
|
||||
export type AsObject = {
|
||||
currency?: Currency.AsObject,
|
||||
}
|
||||
|
192
dist/protobuf/pb_pb.js
vendored
192
dist/protobuf/pb_pb.js
vendored
@ -45,7 +45,6 @@ goog.exportSymbol('proto.io.haveno.protobuffer.BuyerAsTakerTrade', null, global)
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.ByteArray', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.CapitualAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.CashAppAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.CashByMailAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.CashDepositAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.CelPayAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.ChaseQuickPayAccountPayload', null, global);
|
||||
@ -75,7 +74,6 @@ goog.exportSymbol('proto.io.haveno.protobuffer.EncryptedConnection', null, globa
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.EncryptedConnectionList', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.F2FAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.FasterPaymentsAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.FiatCurrency', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.Filter', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.GetDataResponse', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.GetInventoryRequest', null, global);
|
||||
@ -126,6 +124,7 @@ goog.exportSymbol('proto.io.haveno.protobuffer.OfferPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.OpenOffer', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.OpenOffer.State', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.PaxumAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.PayByMailAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.PaymentAccount', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.PaymentAccountFilter', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.PaymentAccountForm', null, global);
|
||||
@ -216,6 +215,7 @@ goog.exportSymbol('proto.io.haveno.protobuffer.TradeCurrency.MessageCase', null,
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.TradePeer', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.TradeStatistics3', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.TradeStatistics3Store', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.TraditionalCurrency', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.TransferwiseAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.TransferwiseUsdAccountPayload', null, global);
|
||||
goog.exportSymbol('proto.io.haveno.protobuffer.USPostalMoneyOrderAccountPayload', null, global);
|
||||
@ -2592,16 +2592,16 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload = function(opt_data) {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.io.haveno.protobuffer.CashByMailAccountPayload, jspb.Message);
|
||||
goog.inherits(proto.io.haveno.protobuffer.PayByMailAccountPayload, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.displayName = 'proto.io.haveno.protobuffer.CashByMailAccountPayload';
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.displayName = 'proto.io.haveno.protobuffer.PayByMailAccountPayload';
|
||||
}
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
@ -3894,16 +3894,16 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency = function(opt_data) {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.io.haveno.protobuffer.FiatCurrency, jspb.Message);
|
||||
goog.inherits(proto.io.haveno.protobuffer.TraditionalCurrency, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.displayName = 'proto.io.haveno.protobuffer.FiatCurrency';
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.displayName = 'proto.io.haveno.protobuffer.TraditionalCurrency';
|
||||
}
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
@ -30146,7 +30146,7 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.MessageCase = {
|
||||
TRANSFERWISE_ACCOUNT_PAYLOAD: 29,
|
||||
AUSTRALIA_PAYID_PAYLOAD: 30,
|
||||
AMAZON_GIFT_CARD_ACCOUNT_PAYLOAD: 31,
|
||||
CASH_BY_MAIL_ACCOUNT_PAYLOAD: 32,
|
||||
PAY_BY_MAIL_ACCOUNT_PAYLOAD: 32,
|
||||
CAPITUAL_ACCOUNT_PAYLOAD: 33,
|
||||
PAYSERA_ACCOUNT_PAYLOAD: 34,
|
||||
PAXUM_ACCOUNT_PAYLOAD: 35,
|
||||
@ -30225,7 +30225,7 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.toObject = function(includeIns
|
||||
transferwiseAccountPayload: (f = msg.getTransferwiseAccountPayload()) && proto.io.haveno.protobuffer.TransferwiseAccountPayload.toObject(includeInstance, f),
|
||||
australiaPayidPayload: (f = msg.getAustraliaPayidPayload()) && proto.io.haveno.protobuffer.AustraliaPayidPayload.toObject(includeInstance, f),
|
||||
amazonGiftCardAccountPayload: (f = msg.getAmazonGiftCardAccountPayload()) && proto.io.haveno.protobuffer.AmazonGiftCardAccountPayload.toObject(includeInstance, f),
|
||||
cashByMailAccountPayload: (f = msg.getCashByMailAccountPayload()) && proto.io.haveno.protobuffer.CashByMailAccountPayload.toObject(includeInstance, f),
|
||||
payByMailAccountPayload: (f = msg.getPayByMailAccountPayload()) && proto.io.haveno.protobuffer.PayByMailAccountPayload.toObject(includeInstance, f),
|
||||
capitualAccountPayload: (f = msg.getCapitualAccountPayload()) && proto.io.haveno.protobuffer.CapitualAccountPayload.toObject(includeInstance, f),
|
||||
payseraAccountPayload: (f = msg.getPayseraAccountPayload()) && proto.io.haveno.protobuffer.PayseraAccountPayload.toObject(includeInstance, f),
|
||||
paxumAccountPayload: (f = msg.getPaxumAccountPayload()) && proto.io.haveno.protobuffer.PaxumAccountPayload.toObject(includeInstance, f),
|
||||
@ -30423,9 +30423,9 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.deserializeBinaryFromReader =
|
||||
msg.setAmazonGiftCardAccountPayload(value);
|
||||
break;
|
||||
case 32:
|
||||
var value = new proto.io.haveno.protobuffer.CashByMailAccountPayload;
|
||||
reader.readMessage(value,proto.io.haveno.protobuffer.CashByMailAccountPayload.deserializeBinaryFromReader);
|
||||
msg.setCashByMailAccountPayload(value);
|
||||
var value = new proto.io.haveno.protobuffer.PayByMailAccountPayload;
|
||||
reader.readMessage(value,proto.io.haveno.protobuffer.PayByMailAccountPayload.deserializeBinaryFromReader);
|
||||
msg.setPayByMailAccountPayload(value);
|
||||
break;
|
||||
case 33:
|
||||
var value = new proto.io.haveno.protobuffer.CapitualAccountPayload;
|
||||
@ -30732,12 +30732,12 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.serializeBinaryToWriter = func
|
||||
proto.io.haveno.protobuffer.AmazonGiftCardAccountPayload.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = message.getCashByMailAccountPayload();
|
||||
f = message.getPayByMailAccountPayload();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
32,
|
||||
f,
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.serializeBinaryToWriter
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = message.getCapitualAccountPayload();
|
||||
@ -31875,20 +31875,20 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.hasAmazonGiftCardAcc
|
||||
|
||||
|
||||
/**
|
||||
* optional CashByMailAccountPayload cash_by_mail_account_payload = 32;
|
||||
* @return {?proto.io.haveno.protobuffer.CashByMailAccountPayload}
|
||||
* optional PayByMailAccountPayload pay_by_mail_account_payload = 32;
|
||||
* @return {?proto.io.haveno.protobuffer.PayByMailAccountPayload}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.getCashByMailAccountPayload = function() {
|
||||
return /** @type{?proto.io.haveno.protobuffer.CashByMailAccountPayload} */ (
|
||||
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.CashByMailAccountPayload, 32));
|
||||
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.getPayByMailAccountPayload = function() {
|
||||
return /** @type{?proto.io.haveno.protobuffer.PayByMailAccountPayload} */ (
|
||||
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.PayByMailAccountPayload, 32));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {?proto.io.haveno.protobuffer.CashByMailAccountPayload|undefined} value
|
||||
* @param {?proto.io.haveno.protobuffer.PayByMailAccountPayload|undefined} value
|
||||
* @return {!proto.io.haveno.protobuffer.PaymentAccountPayload} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.setCashByMailAccountPayload = function(value) {
|
||||
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.setPayByMailAccountPayload = function(value) {
|
||||
return jspb.Message.setOneofWrapperField(this, 32, proto.io.haveno.protobuffer.PaymentAccountPayload.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
@ -31897,8 +31897,8 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.setCashByMailAccount
|
||||
* Clears the message field making it undefined.
|
||||
* @return {!proto.io.haveno.protobuffer.PaymentAccountPayload} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.clearCashByMailAccountPayload = function() {
|
||||
return this.setCashByMailAccountPayload(undefined);
|
||||
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.clearPayByMailAccountPayload = function() {
|
||||
return this.setPayByMailAccountPayload(undefined);
|
||||
};
|
||||
|
||||
|
||||
@ -31906,7 +31906,7 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.clearCashByMailAccou
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.hasCashByMailAccountPayload = function() {
|
||||
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.hasPayByMailAccountPayload = function() {
|
||||
return jspb.Message.getField(this, 32) != null;
|
||||
};
|
||||
|
||||
@ -40415,8 +40415,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.io.haveno.protobuffer.CashByMailAccountPayload.toObject(opt_includeInstance, this);
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.io.haveno.protobuffer.PayByMailAccountPayload.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
@ -40425,11 +40425,11 @@ proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.toObject = functi
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.io.haveno.protobuffer.CashByMailAccountPayload} msg The msg instance to transform.
|
||||
* @param {!proto.io.haveno.protobuffer.PayByMailAccountPayload} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.toObject = function(includeInstance, msg) {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
postalAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
contact: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||
@ -40447,23 +40447,23 @@ proto.io.haveno.protobuffer.CashByMailAccountPayload.toObject = function(include
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.io.haveno.protobuffer.CashByMailAccountPayload}
|
||||
* @return {!proto.io.haveno.protobuffer.PayByMailAccountPayload}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.deserializeBinary = function(bytes) {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.io.haveno.protobuffer.CashByMailAccountPayload;
|
||||
return proto.io.haveno.protobuffer.CashByMailAccountPayload.deserializeBinaryFromReader(msg, reader);
|
||||
var msg = new proto.io.haveno.protobuffer.PayByMailAccountPayload;
|
||||
return proto.io.haveno.protobuffer.PayByMailAccountPayload.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.io.haveno.protobuffer.CashByMailAccountPayload} msg The message object to deserialize into.
|
||||
* @param {!proto.io.haveno.protobuffer.PayByMailAccountPayload} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.io.haveno.protobuffer.CashByMailAccountPayload}
|
||||
* @return {!proto.io.haveno.protobuffer.PayByMailAccountPayload}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.deserializeBinaryFromReader = function(msg, reader) {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
@ -40495,9 +40495,9 @@ proto.io.haveno.protobuffer.CashByMailAccountPayload.deserializeBinaryFromReader
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.serializeBinary = function() {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.serializeBinaryToWriter(this, writer);
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
@ -40505,11 +40505,11 @@ proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.serializeBinary =
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.io.haveno.protobuffer.CashByMailAccountPayload} message
|
||||
* @param {!proto.io.haveno.protobuffer.PayByMailAccountPayload} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.serializeBinaryToWriter = function(message, writer) {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getPostalAddress();
|
||||
if (f.length > 0) {
|
||||
@ -40539,16 +40539,16 @@ proto.io.haveno.protobuffer.CashByMailAccountPayload.serializeBinaryToWriter = f
|
||||
* optional string postal_address = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.getPostalAddress = function() {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.prototype.getPostalAddress = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.io.haveno.protobuffer.CashByMailAccountPayload} returns this
|
||||
* @return {!proto.io.haveno.protobuffer.PayByMailAccountPayload} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.setPostalAddress = function(value) {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.prototype.setPostalAddress = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
@ -40557,16 +40557,16 @@ proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.setPostalAddress
|
||||
* optional string contact = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.getContact = function() {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.prototype.getContact = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.io.haveno.protobuffer.CashByMailAccountPayload} returns this
|
||||
* @return {!proto.io.haveno.protobuffer.PayByMailAccountPayload} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.setContact = function(value) {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.prototype.setContact = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 2, value);
|
||||
};
|
||||
|
||||
@ -40575,16 +40575,16 @@ proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.setContact = func
|
||||
* optional string extra_info = 3;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.getExtraInfo = function() {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.prototype.getExtraInfo = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.io.haveno.protobuffer.CashByMailAccountPayload} returns this
|
||||
* @return {!proto.io.haveno.protobuffer.PayByMailAccountPayload} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.CashByMailAccountPayload.prototype.setExtraInfo = function(value) {
|
||||
proto.io.haveno.protobuffer.PayByMailAccountPayload.prototype.setExtraInfo = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 3, value);
|
||||
};
|
||||
|
||||
@ -54277,7 +54277,7 @@ proto.io.haveno.protobuffer.PreferencesPayload.toObject = function(includeInstan
|
||||
var f, obj = {
|
||||
userLanguage: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
userCountry: (f = msg.getUserCountry()) && proto.io.haveno.protobuffer.Country.toObject(includeInstance, f),
|
||||
fiatCurrenciesList: jspb.Message.toObjectList(msg.getFiatCurrenciesList(),
|
||||
traditionalCurrenciesList: jspb.Message.toObjectList(msg.getTraditionalCurrenciesList(),
|
||||
proto.io.haveno.protobuffer.TradeCurrency.toObject, includeInstance),
|
||||
cryptoCurrenciesList: jspb.Message.toObjectList(msg.getCryptoCurrenciesList(),
|
||||
proto.io.haveno.protobuffer.TradeCurrency.toObject, includeInstance),
|
||||
@ -54387,7 +54387,7 @@ proto.io.haveno.protobuffer.PreferencesPayload.deserializeBinaryFromReader = fun
|
||||
case 3:
|
||||
var value = new proto.io.haveno.protobuffer.TradeCurrency;
|
||||
reader.readMessage(value,proto.io.haveno.protobuffer.TradeCurrency.deserializeBinaryFromReader);
|
||||
msg.addFiatCurrencies(value);
|
||||
msg.addTraditionalCurrencies(value);
|
||||
break;
|
||||
case 4:
|
||||
var value = new proto.io.haveno.protobuffer.TradeCurrency;
|
||||
@ -54676,7 +54676,7 @@ proto.io.haveno.protobuffer.PreferencesPayload.serializeBinaryToWriter = functio
|
||||
proto.io.haveno.protobuffer.Country.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = message.getFiatCurrenciesList();
|
||||
f = message.getTraditionalCurrenciesList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedMessage(
|
||||
3,
|
||||
@ -55150,10 +55150,10 @@ proto.io.haveno.protobuffer.PreferencesPayload.prototype.hasUserCountry = functi
|
||||
|
||||
|
||||
/**
|
||||
* repeated TradeCurrency fiat_currencies = 3;
|
||||
* repeated TradeCurrency traditional_currencies = 3;
|
||||
* @return {!Array<!proto.io.haveno.protobuffer.TradeCurrency>}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.getFiatCurrenciesList = function() {
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.getTraditionalCurrenciesList = function() {
|
||||
return /** @type{!Array<!proto.io.haveno.protobuffer.TradeCurrency>} */ (
|
||||
jspb.Message.getRepeatedWrapperField(this, proto.io.haveno.protobuffer.TradeCurrency, 3));
|
||||
};
|
||||
@ -55163,7 +55163,7 @@ proto.io.haveno.protobuffer.PreferencesPayload.prototype.getFiatCurrenciesList =
|
||||
* @param {!Array<!proto.io.haveno.protobuffer.TradeCurrency>} value
|
||||
* @return {!proto.io.haveno.protobuffer.PreferencesPayload} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.setFiatCurrenciesList = function(value) {
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.setTraditionalCurrenciesList = function(value) {
|
||||
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
||||
};
|
||||
|
||||
@ -55173,7 +55173,7 @@ proto.io.haveno.protobuffer.PreferencesPayload.prototype.setFiatCurrenciesList =
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.io.haveno.protobuffer.TradeCurrency}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.addFiatCurrencies = function(opt_value, opt_index) {
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.addTraditionalCurrencies = function(opt_value, opt_index) {
|
||||
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.io.haveno.protobuffer.TradeCurrency, opt_index);
|
||||
};
|
||||
|
||||
@ -55182,8 +55182,8 @@ proto.io.haveno.protobuffer.PreferencesPayload.prototype.addFiatCurrencies = fun
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.io.haveno.protobuffer.PreferencesPayload} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.clearFiatCurrenciesList = function() {
|
||||
return this.setFiatCurrenciesList([]);
|
||||
proto.io.haveno.protobuffer.PreferencesPayload.prototype.clearTraditionalCurrenciesList = function() {
|
||||
return this.setTraditionalCurrenciesList([]);
|
||||
};
|
||||
|
||||
|
||||
@ -58782,7 +58782,7 @@ proto.io.haveno.protobuffer.TradeCurrency.oneofGroups_ = [[3,4]];
|
||||
proto.io.haveno.protobuffer.TradeCurrency.MessageCase = {
|
||||
MESSAGE_NOT_SET: 0,
|
||||
CRYPTO_CURRENCY: 3,
|
||||
FIAT_CURRENCY: 4
|
||||
TRADITIONAL_CURRENCY: 4
|
||||
};
|
||||
|
||||
/**
|
||||
@ -58826,7 +58826,7 @@ proto.io.haveno.protobuffer.TradeCurrency.toObject = function(includeInstance, m
|
||||
code: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||
cryptoCurrency: (f = msg.getCryptoCurrency()) && proto.io.haveno.protobuffer.CryptoCurrency.toObject(includeInstance, f),
|
||||
fiatCurrency: (f = msg.getFiatCurrency()) && proto.io.haveno.protobuffer.FiatCurrency.toObject(includeInstance, f)
|
||||
traditionalCurrency: (f = msg.getTraditionalCurrency()) && proto.io.haveno.protobuffer.TraditionalCurrency.toObject(includeInstance, f)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@ -58877,9 +58877,9 @@ proto.io.haveno.protobuffer.TradeCurrency.deserializeBinaryFromReader = function
|
||||
msg.setCryptoCurrency(value);
|
||||
break;
|
||||
case 4:
|
||||
var value = new proto.io.haveno.protobuffer.FiatCurrency;
|
||||
reader.readMessage(value,proto.io.haveno.protobuffer.FiatCurrency.deserializeBinaryFromReader);
|
||||
msg.setFiatCurrency(value);
|
||||
var value = new proto.io.haveno.protobuffer.TraditionalCurrency;
|
||||
reader.readMessage(value,proto.io.haveno.protobuffer.TraditionalCurrency.deserializeBinaryFromReader);
|
||||
msg.setTraditionalCurrency(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
@ -58932,12 +58932,12 @@ proto.io.haveno.protobuffer.TradeCurrency.serializeBinaryToWriter = function(mes
|
||||
proto.io.haveno.protobuffer.CryptoCurrency.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = message.getFiatCurrency();
|
||||
f = message.getTraditionalCurrency();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
4,
|
||||
f,
|
||||
proto.io.haveno.protobuffer.FiatCurrency.serializeBinaryToWriter
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
};
|
||||
@ -59017,20 +59017,20 @@ proto.io.haveno.protobuffer.TradeCurrency.prototype.hasCryptoCurrency = function
|
||||
|
||||
|
||||
/**
|
||||
* optional FiatCurrency fiat_currency = 4;
|
||||
* @return {?proto.io.haveno.protobuffer.FiatCurrency}
|
||||
* optional TraditionalCurrency traditional_currency = 4;
|
||||
* @return {?proto.io.haveno.protobuffer.TraditionalCurrency}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.TradeCurrency.prototype.getFiatCurrency = function() {
|
||||
return /** @type{?proto.io.haveno.protobuffer.FiatCurrency} */ (
|
||||
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.FiatCurrency, 4));
|
||||
proto.io.haveno.protobuffer.TradeCurrency.prototype.getTraditionalCurrency = function() {
|
||||
return /** @type{?proto.io.haveno.protobuffer.TraditionalCurrency} */ (
|
||||
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.TraditionalCurrency, 4));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {?proto.io.haveno.protobuffer.FiatCurrency|undefined} value
|
||||
* @param {?proto.io.haveno.protobuffer.TraditionalCurrency|undefined} value
|
||||
* @return {!proto.io.haveno.protobuffer.TradeCurrency} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.TradeCurrency.prototype.setFiatCurrency = function(value) {
|
||||
proto.io.haveno.protobuffer.TradeCurrency.prototype.setTraditionalCurrency = function(value) {
|
||||
return jspb.Message.setOneofWrapperField(this, 4, proto.io.haveno.protobuffer.TradeCurrency.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
@ -59039,8 +59039,8 @@ proto.io.haveno.protobuffer.TradeCurrency.prototype.setFiatCurrency = function(v
|
||||
* Clears the message field making it undefined.
|
||||
* @return {!proto.io.haveno.protobuffer.TradeCurrency} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.TradeCurrency.prototype.clearFiatCurrency = function() {
|
||||
return this.setFiatCurrency(undefined);
|
||||
proto.io.haveno.protobuffer.TradeCurrency.prototype.clearTraditionalCurrency = function() {
|
||||
return this.setTraditionalCurrency(undefined);
|
||||
};
|
||||
|
||||
|
||||
@ -59048,7 +59048,7 @@ proto.io.haveno.protobuffer.TradeCurrency.prototype.clearFiatCurrency = function
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.TradeCurrency.prototype.hasFiatCurrency = function() {
|
||||
proto.io.haveno.protobuffer.TradeCurrency.prototype.hasTraditionalCurrency = function() {
|
||||
return jspb.Message.getField(this, 4) != null;
|
||||
};
|
||||
|
||||
@ -59199,8 +59199,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.io.haveno.protobuffer.FiatCurrency.toObject(opt_includeInstance, this);
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.io.haveno.protobuffer.TraditionalCurrency.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
@ -59209,11 +59209,11 @@ proto.io.haveno.protobuffer.FiatCurrency.prototype.toObject = function(opt_inclu
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.io.haveno.protobuffer.FiatCurrency} msg The msg instance to transform.
|
||||
* @param {!proto.io.haveno.protobuffer.TraditionalCurrency} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.toObject = function(includeInstance, msg) {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
currency: (f = msg.getCurrency()) && proto.io.haveno.protobuffer.Currency.toObject(includeInstance, f)
|
||||
};
|
||||
@ -59229,23 +59229,23 @@ proto.io.haveno.protobuffer.FiatCurrency.toObject = function(includeInstance, ms
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.io.haveno.protobuffer.FiatCurrency}
|
||||
* @return {!proto.io.haveno.protobuffer.TraditionalCurrency}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.deserializeBinary = function(bytes) {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.io.haveno.protobuffer.FiatCurrency;
|
||||
return proto.io.haveno.protobuffer.FiatCurrency.deserializeBinaryFromReader(msg, reader);
|
||||
var msg = new proto.io.haveno.protobuffer.TraditionalCurrency;
|
||||
return proto.io.haveno.protobuffer.TraditionalCurrency.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.io.haveno.protobuffer.FiatCurrency} msg The message object to deserialize into.
|
||||
* @param {!proto.io.haveno.protobuffer.TraditionalCurrency} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.io.haveno.protobuffer.FiatCurrency}
|
||||
* @return {!proto.io.haveno.protobuffer.TraditionalCurrency}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.deserializeBinaryFromReader = function(msg, reader) {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
@ -59270,9 +59270,9 @@ proto.io.haveno.protobuffer.FiatCurrency.deserializeBinaryFromReader = function(
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.prototype.serializeBinary = function() {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.io.haveno.protobuffer.FiatCurrency.serializeBinaryToWriter(this, writer);
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
@ -59280,11 +59280,11 @@ proto.io.haveno.protobuffer.FiatCurrency.prototype.serializeBinary = function()
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.io.haveno.protobuffer.FiatCurrency} message
|
||||
* @param {!proto.io.haveno.protobuffer.TraditionalCurrency} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.serializeBinaryToWriter = function(message, writer) {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getCurrency();
|
||||
if (f != null) {
|
||||
@ -59301,7 +59301,7 @@ proto.io.haveno.protobuffer.FiatCurrency.serializeBinaryToWriter = function(mess
|
||||
* optional Currency currency = 1;
|
||||
* @return {?proto.io.haveno.protobuffer.Currency}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.prototype.getCurrency = function() {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.prototype.getCurrency = function() {
|
||||
return /** @type{?proto.io.haveno.protobuffer.Currency} */ (
|
||||
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.Currency, 1));
|
||||
};
|
||||
@ -59309,18 +59309,18 @@ proto.io.haveno.protobuffer.FiatCurrency.prototype.getCurrency = function() {
|
||||
|
||||
/**
|
||||
* @param {?proto.io.haveno.protobuffer.Currency|undefined} value
|
||||
* @return {!proto.io.haveno.protobuffer.FiatCurrency} returns this
|
||||
* @return {!proto.io.haveno.protobuffer.TraditionalCurrency} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.prototype.setCurrency = function(value) {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.prototype.setCurrency = function(value) {
|
||||
return jspb.Message.setWrapperField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the message field making it undefined.
|
||||
* @return {!proto.io.haveno.protobuffer.FiatCurrency} returns this
|
||||
* @return {!proto.io.haveno.protobuffer.TraditionalCurrency} returns this
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.prototype.clearCurrency = function() {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.prototype.clearCurrency = function() {
|
||||
return this.setCurrency(undefined);
|
||||
};
|
||||
|
||||
@ -59329,7 +59329,7 @@ proto.io.haveno.protobuffer.FiatCurrency.prototype.clearCurrency = function() {
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.io.haveno.protobuffer.FiatCurrency.prototype.hasCurrency = function() {
|
||||
proto.io.haveno.protobuffer.TraditionalCurrency.prototype.hasCurrency = function() {
|
||||
return jspb.Message.getField(this, 1) != null;
|
||||
};
|
||||
|
||||
|
@ -1755,26 +1755,29 @@ test("Selects arbitrators which are online, registered, and least used", async (
|
||||
await wait(TestConfig.trade.walletSyncPeriodMs * 2);
|
||||
|
||||
// get internal api addresses
|
||||
const arbitratorApiUrl = "localhost:" + TestConfig.ports.get(getPort(arbitrator.getUrl()))![1]; // TODO: havenod.getApiUrl()?
|
||||
const arbitrator1ApiUrl = "localhost:" + TestConfig.ports.get(getPort(arbitrator.getUrl()))![1]; // TODO: havenod.getApiUrl()?
|
||||
const arbitrator2ApiUrl = "localhost:" + TestConfig.ports.get(getPort(arbitrator2.getUrl()))![1];
|
||||
|
||||
let err = undefined;
|
||||
try {
|
||||
|
||||
// post 2 offers which use arbitrator2 since it's least used
|
||||
HavenoUtils.log(1, "Posting offers signed by arbitrator2");
|
||||
const offers: OfferInfo[] = [];
|
||||
for (let i = 0; i < 2; i++) {
|
||||
// post offers signed by each arbitrator randomly
|
||||
HavenoUtils.log(1, "Posting offers signed by both arbitrators randomly");
|
||||
let offer1: OfferInfo | undefined;
|
||||
let offer2: OfferInfo | undefined;
|
||||
while (true) {
|
||||
const offer = await makeOffer({maker: user1});
|
||||
assert.equal(offer.getArbitratorSigner(), arbitrator2ApiUrl);
|
||||
offers.push(offer);
|
||||
if (offer.getArbitratorSigner() === arbitrator1ApiUrl && !offer1) offer1 = offer;
|
||||
else if (offer.getArbitratorSigner() === arbitrator2ApiUrl && !offer2) offer2 = offer;
|
||||
else await user1.removeOffer(offer.getId());
|
||||
if (offer1 && offer2) break;
|
||||
}
|
||||
await wait(TestConfig.trade.walletSyncPeriodMs * 2);
|
||||
|
||||
// complete a trade which uses arbitrator2 since it's least used
|
||||
HavenoUtils.log(1, "Completing trade using arbitrator2");
|
||||
await executeTrade({maker: user1, taker: user2, arbitrator: arbitrator2, offerId: offers[0].getId(), makerPaymentAccountId: offers[0].getPaymentAccountId()});
|
||||
let trade = await user1.getTrade(offers[0].getId());
|
||||
await executeTrade({maker: user1, taker: user2, arbitrator: arbitrator2, offerId: offer1.getId(), makerPaymentAccountId: offer1.getPaymentAccountId(), testPayoutConfirmed: false});
|
||||
let trade = await user1.getTrade(offer1.getId());
|
||||
assert.equal(trade.getArbitratorNodeAddress(), arbitrator2ApiUrl);
|
||||
|
||||
// arbitrator2 goes offline without unregistering
|
||||
@ -1782,17 +1785,17 @@ test("Selects arbitrators which are online, registered, and least used", async (
|
||||
const arbitrator2AppName = arbitrator2.getAppName()
|
||||
await releaseHavenoProcess(arbitrator2);
|
||||
|
||||
// post offer which uses main arbitrator since least used is offline
|
||||
HavenoUtils.log(1, "Posting offer which uses main arbitrator since least used is offline");
|
||||
// post offer which uses main arbitrator since arbitrator2 is offline
|
||||
HavenoUtils.log(1, "Posting offer which uses main arbitrator since arbitrator2 is offline");
|
||||
let offer = await makeOffer({maker: user1});
|
||||
assert.equal(offer.getArbitratorSigner(), arbitratorApiUrl);
|
||||
assert.equal(offer.getArbitratorSigner(), arbitrator1ApiUrl);
|
||||
await user1.removeOffer(offer.getId());
|
||||
|
||||
// complete a trade which uses main arbitrator since signer/least used is offline
|
||||
HavenoUtils.log(1, "Completing trade using main arbitrator since signer/least used is offline");
|
||||
await executeTrade({maker: user1, taker: user2, offerId: offers[1].getId(), makerPaymentAccountId: offers[1].getPaymentAccountId()});
|
||||
trade = await user1.getTrade(offers[1].getId());
|
||||
assert.equal(trade.getArbitratorNodeAddress(), arbitratorApiUrl);
|
||||
// complete a trade which uses main arbitrator since arbitrator2 is offline
|
||||
HavenoUtils.log(1, "Completing trade using main arbitrator since arbitrator2 is offline");
|
||||
await executeTrade({maker: user1, taker: user2, offerId: offer2.getId(), makerPaymentAccountId: offer2.getPaymentAccountId(), testPayoutConfirmed: false});
|
||||
trade = await user1.getTrade(offer2.getId());
|
||||
assert.equal(trade.getArbitratorNodeAddress(), arbitrator1ApiUrl);
|
||||
|
||||
// start and unregister arbitrator2
|
||||
HavenoUtils.log(1, "Starting and unregistering arbitrator2");
|
||||
@ -1803,7 +1806,7 @@ test("Selects arbitrators which are online, registered, and least used", async (
|
||||
// cannot take offers signed by unregistered arbitrator
|
||||
HavenoUtils.log(1, "Taking offer signed by unregistered arbitrator");
|
||||
try {
|
||||
await executeTrade({maker: user1, taker: user2, offerId: offers[1].getId()});
|
||||
await executeTrade({maker: user1, taker: user2, offerId: offer2.getId()});
|
||||
throw new Error("Should have failed taking offer signed by unregistered arbitrator");
|
||||
} catch (e2) {
|
||||
assert (e2.message.indexOf("not found") > 0);
|
||||
@ -1811,18 +1814,18 @@ test("Selects arbitrators which are online, registered, and least used", async (
|
||||
|
||||
// TODO: offer is removed and unreserved or re-signed, ideally keeping the same id
|
||||
|
||||
// post offer which uses main arbitrator since least used is unregistered
|
||||
// post offer which uses main arbitrator since arbitrator2 is unregistered
|
||||
offer = await makeOffer({maker: user1});
|
||||
assert.equal(offer.getArbitratorSigner(), arbitratorApiUrl);
|
||||
assert.equal(offer.getArbitratorSigner(), arbitrator1ApiUrl);
|
||||
await wait(TestConfig.trade.walletSyncPeriodMs * 2);
|
||||
|
||||
// complete a trade which uses main arbitrator since least used is unregistered
|
||||
HavenoUtils.log(1, "Completing trade with main arbitrator since least used is unregistered");
|
||||
await executeTrade({maker: user1, taker: user2, offerId: offer.getId(), makerPaymentAccountId: offer.getPaymentAccountId()});
|
||||
HavenoUtils.log(1, "Done completing trade with main arbitrator since least used is unregistered");
|
||||
// complete a trade which uses main arbitrator since arbitrator2 is unregistered
|
||||
HavenoUtils.log(1, "Completing trade with main arbitrator since arbitrator2 is unregistered");
|
||||
await executeTrade({maker: user1, taker: user2, offerId: offer.getId(), makerPaymentAccountId: offer.getPaymentAccountId(), testPayoutConfirmed: false});
|
||||
HavenoUtils.log(1, "Done completing trade with main arbitrator since arbitrator2 is unregistered");
|
||||
trade = await user2.getTrade(offer.getId());
|
||||
HavenoUtils.log(1, "Done getting trade");
|
||||
assert.equal(trade.getArbitratorNodeAddress(), arbitratorApiUrl);
|
||||
assert.equal(trade.getArbitratorNodeAddress(), arbitrator1ApiUrl);
|
||||
|
||||
// release arbitrator2
|
||||
HavenoUtils.log(1, "Done getting trade");
|
||||
@ -1984,8 +1987,10 @@ async function executeTrade(ctx?: TradeContext): Promise<string> {
|
||||
} else {
|
||||
ctx.offer = getOffer(await ctx.maker!.getMyOffers(ctx.assetCode!, ctx.direction), ctx.offerId!);
|
||||
if (!ctx.offer) {
|
||||
const trade = await ctx.maker!.getTrade(ctx.offerId!);
|
||||
ctx.offer = trade.getOffer();
|
||||
try {
|
||||
const trade = await ctx.maker!.getTrade(ctx.offerId!);
|
||||
ctx.offer = trade.getOffer();
|
||||
} catch (err) { /* ignore */ }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user