mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-01-27 06:47:06 -05:00
test cashapp, paypal, venmo
This commit is contained in:
parent
08305f049c
commit
f41f316606
54
dist/protobuf/pb_pb.d.ts
vendored
54
dist/protobuf/pb_pb.d.ts
vendored
@ -3641,6 +3641,11 @@ export class PaymentAccountPayload extends jspb.Message {
|
|||||||
hasCashAtAtmAccountPayload(): boolean;
|
hasCashAtAtmAccountPayload(): boolean;
|
||||||
clearCashAtAtmAccountPayload(): PaymentAccountPayload;
|
clearCashAtAtmAccountPayload(): PaymentAccountPayload;
|
||||||
|
|
||||||
|
getPaypalAccountPayload(): PayPalAccountPayload | undefined;
|
||||||
|
setPaypalAccountPayload(value?: PayPalAccountPayload): PaymentAccountPayload;
|
||||||
|
hasPaypalAccountPayload(): boolean;
|
||||||
|
clearPaypalAccountPayload(): PaymentAccountPayload;
|
||||||
|
|
||||||
getMessageCase(): PaymentAccountPayload.MessageCase;
|
getMessageCase(): PaymentAccountPayload.MessageCase;
|
||||||
|
|
||||||
serializeBinary(): Uint8Array;
|
serializeBinary(): Uint8Array;
|
||||||
@ -3693,6 +3698,7 @@ export namespace PaymentAccountPayload {
|
|||||||
moneseAccountPayload?: MoneseAccountPayload.AsObject,
|
moneseAccountPayload?: MoneseAccountPayload.AsObject,
|
||||||
verseAccountPayload?: VerseAccountPayload.AsObject,
|
verseAccountPayload?: VerseAccountPayload.AsObject,
|
||||||
cashAtAtmAccountPayload?: CashAtAtmAccountPayload.AsObject,
|
cashAtAtmAccountPayload?: CashAtAtmAccountPayload.AsObject,
|
||||||
|
paypalAccountPayload?: PayPalAccountPayload.AsObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum MessageCase {
|
export enum MessageCase {
|
||||||
@ -3733,6 +3739,7 @@ export namespace PaymentAccountPayload {
|
|||||||
MONESE_ACCOUNT_PAYLOAD = 38,
|
MONESE_ACCOUNT_PAYLOAD = 38,
|
||||||
VERSE_ACCOUNT_PAYLOAD = 39,
|
VERSE_ACCOUNT_PAYLOAD = 39,
|
||||||
CASH_AT_ATM_ACCOUNT_PAYLOAD = 40,
|
CASH_AT_ATM_ACCOUNT_PAYLOAD = 40,
|
||||||
|
PAYPAL_ACCOUNT_PAYLOAD = 41,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4551,8 +4558,8 @@ export namespace UpholdAccountPayload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class CashAppAccountPayload extends jspb.Message {
|
export class CashAppAccountPayload extends jspb.Message {
|
||||||
getCashTag(): string;
|
getEmailOrMobileNrOrCashtag(): string;
|
||||||
setCashTag(value: string): CashAppAccountPayload;
|
setEmailOrMobileNrOrCashtag(value: string): CashAppAccountPayload;
|
||||||
|
|
||||||
serializeBinary(): Uint8Array;
|
serializeBinary(): Uint8Array;
|
||||||
toObject(includeInstance?: boolean): CashAppAccountPayload.AsObject;
|
toObject(includeInstance?: boolean): CashAppAccountPayload.AsObject;
|
||||||
@ -4564,7 +4571,7 @@ export class CashAppAccountPayload extends jspb.Message {
|
|||||||
|
|
||||||
export namespace CashAppAccountPayload {
|
export namespace CashAppAccountPayload {
|
||||||
export type AsObject = {
|
export type AsObject = {
|
||||||
cashTag: string,
|
emailOrMobileNrOrCashtag: string,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4587,11 +4594,8 @@ export namespace MoneyBeamAccountPayload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class VenmoAccountPayload extends jspb.Message {
|
export class VenmoAccountPayload extends jspb.Message {
|
||||||
getVenmoUserName(): string;
|
getEmailOrMobileNrOrUsername(): string;
|
||||||
setVenmoUserName(value: string): VenmoAccountPayload;
|
setEmailOrMobileNrOrUsername(value: string): VenmoAccountPayload;
|
||||||
|
|
||||||
getHolderName(): string;
|
|
||||||
setHolderName(value: string): VenmoAccountPayload;
|
|
||||||
|
|
||||||
serializeBinary(): Uint8Array;
|
serializeBinary(): Uint8Array;
|
||||||
toObject(includeInstance?: boolean): VenmoAccountPayload.AsObject;
|
toObject(includeInstance?: boolean): VenmoAccountPayload.AsObject;
|
||||||
@ -4603,8 +4607,25 @@ export class VenmoAccountPayload extends jspb.Message {
|
|||||||
|
|
||||||
export namespace VenmoAccountPayload {
|
export namespace VenmoAccountPayload {
|
||||||
export type AsObject = {
|
export type AsObject = {
|
||||||
venmoUserName: string,
|
emailOrMobileNrOrUsername: string,
|
||||||
holderName: string,
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class PayPalAccountPayload extends jspb.Message {
|
||||||
|
getEmailOrMobileNrOrUsername(): string;
|
||||||
|
setEmailOrMobileNrOrUsername(value: string): PayPalAccountPayload;
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): PayPalAccountPayload.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: PayPalAccountPayload): PayPalAccountPayload.AsObject;
|
||||||
|
static serializeBinaryToWriter(message: PayPalAccountPayload, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): PayPalAccountPayload;
|
||||||
|
static deserializeBinaryFromReader(message: PayPalAccountPayload, reader: jspb.BinaryReader): PayPalAccountPayload;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace PayPalAccountPayload {
|
||||||
|
export type AsObject = {
|
||||||
|
emailOrMobileNrOrUsername: string,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4631,8 +4652,8 @@ export namespace PopmoneyAccountPayload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class RevolutAccountPayload extends jspb.Message {
|
export class RevolutAccountPayload extends jspb.Message {
|
||||||
getUserName(): string;
|
getUsername(): string;
|
||||||
setUserName(value: string): RevolutAccountPayload;
|
setUsername(value: string): RevolutAccountPayload;
|
||||||
|
|
||||||
serializeBinary(): Uint8Array;
|
serializeBinary(): Uint8Array;
|
||||||
toObject(includeInstance?: boolean): RevolutAccountPayload.AsObject;
|
toObject(includeInstance?: boolean): RevolutAccountPayload.AsObject;
|
||||||
@ -4644,7 +4665,7 @@ export class RevolutAccountPayload extends jspb.Message {
|
|||||||
|
|
||||||
export namespace RevolutAccountPayload {
|
export namespace RevolutAccountPayload {
|
||||||
export type AsObject = {
|
export type AsObject = {
|
||||||
userName: string,
|
username: string,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7669,6 +7690,9 @@ export namespace PaymentAccountForm {
|
|||||||
PAY_BY_MAIL = 13,
|
PAY_BY_MAIL = 13,
|
||||||
CASH_AT_ATM = 14,
|
CASH_AT_ATM = 14,
|
||||||
AUSTRALIA_PAYID = 15,
|
AUSTRALIA_PAYID = 15,
|
||||||
|
CASH_APP = 16,
|
||||||
|
PAYPAL = 17,
|
||||||
|
VENMO = 18,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7801,7 +7825,9 @@ export namespace PaymentAccountFormField {
|
|||||||
SPECIAL_INSTRUCTIONS = 54,
|
SPECIAL_INSTRUCTIONS = 54,
|
||||||
STATE = 55,
|
STATE = 55,
|
||||||
TRADE_CURRENCIES = 56,
|
TRADE_CURRENCIES = 56,
|
||||||
USER_NAME = 57,
|
USERNAME = 57,
|
||||||
|
EMAIL_OR_MOBILE_NR_OR_USERNAME = 58,
|
||||||
|
EMAIL_OR_MOBILE_NR_OR_CASHTAG = 59,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Component {
|
export enum Component {
|
||||||
|
261
dist/protobuf/pb_pb.js
vendored
261
dist/protobuf/pb_pb.js
vendored
@ -127,6 +127,7 @@ 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.OpenOffer.State', null, global);
|
||||||
goog.exportSymbol('proto.io.haveno.protobuffer.PaxumAccountPayload', 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.PayByMailAccountPayload', null, global);
|
||||||
|
goog.exportSymbol('proto.io.haveno.protobuffer.PayPalAccountPayload', null, global);
|
||||||
goog.exportSymbol('proto.io.haveno.protobuffer.PaymentAccount', 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.PaymentAccountFilter', null, global);
|
||||||
goog.exportSymbol('proto.io.haveno.protobuffer.PaymentAccountForm', null, global);
|
goog.exportSymbol('proto.io.haveno.protobuffer.PaymentAccountForm', null, global);
|
||||||
@ -2355,6 +2356,27 @@ if (goog.DEBUG && !COMPILED) {
|
|||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.VenmoAccountPayload.displayName = 'proto.io.haveno.protobuffer.VenmoAccountPayload';
|
proto.io.haveno.protobuffer.VenmoAccountPayload.displayName = 'proto.io.haveno.protobuffer.VenmoAccountPayload';
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.io.haveno.protobuffer.PayPalAccountPayload, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload.displayName = 'proto.io.haveno.protobuffer.PayPalAccountPayload';
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Generated by JsPbCodeGenerator.
|
* Generated by JsPbCodeGenerator.
|
||||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
@ -30565,7 +30587,7 @@ proto.io.haveno.protobuffer.RawTransactionInput.prototype.setValue = function(va
|
|||||||
* @private {!Array<!Array<number>>}
|
* @private {!Array<!Array<number>>}
|
||||||
* @const
|
* @const
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.PaymentAccountPayload.oneofGroups_ = [[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]];
|
proto.io.haveno.protobuffer.PaymentAccountPayload.oneofGroups_ = [[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41]];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
@ -30607,7 +30629,8 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.MessageCase = {
|
|||||||
CEL_PAY_ACCOUNT_PAYLOAD: 37,
|
CEL_PAY_ACCOUNT_PAYLOAD: 37,
|
||||||
MONESE_ACCOUNT_PAYLOAD: 38,
|
MONESE_ACCOUNT_PAYLOAD: 38,
|
||||||
VERSE_ACCOUNT_PAYLOAD: 39,
|
VERSE_ACCOUNT_PAYLOAD: 39,
|
||||||
CASH_AT_ATM_ACCOUNT_PAYLOAD: 40
|
CASH_AT_ATM_ACCOUNT_PAYLOAD: 40,
|
||||||
|
PAYPAL_ACCOUNT_PAYLOAD: 41
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30687,7 +30710,8 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.toObject = function(includeIns
|
|||||||
celPayAccountPayload: (f = msg.getCelPayAccountPayload()) && proto.io.haveno.protobuffer.CelPayAccountPayload.toObject(includeInstance, f),
|
celPayAccountPayload: (f = msg.getCelPayAccountPayload()) && proto.io.haveno.protobuffer.CelPayAccountPayload.toObject(includeInstance, f),
|
||||||
moneseAccountPayload: (f = msg.getMoneseAccountPayload()) && proto.io.haveno.protobuffer.MoneseAccountPayload.toObject(includeInstance, f),
|
moneseAccountPayload: (f = msg.getMoneseAccountPayload()) && proto.io.haveno.protobuffer.MoneseAccountPayload.toObject(includeInstance, f),
|
||||||
verseAccountPayload: (f = msg.getVerseAccountPayload()) && proto.io.haveno.protobuffer.VerseAccountPayload.toObject(includeInstance, f),
|
verseAccountPayload: (f = msg.getVerseAccountPayload()) && proto.io.haveno.protobuffer.VerseAccountPayload.toObject(includeInstance, f),
|
||||||
cashAtAtmAccountPayload: (f = msg.getCashAtAtmAccountPayload()) && proto.io.haveno.protobuffer.CashAtAtmAccountPayload.toObject(includeInstance, f)
|
cashAtAtmAccountPayload: (f = msg.getCashAtAtmAccountPayload()) && proto.io.haveno.protobuffer.CashAtAtmAccountPayload.toObject(includeInstance, f),
|
||||||
|
paypalAccountPayload: (f = msg.getPaypalAccountPayload()) && proto.io.haveno.protobuffer.PayPalAccountPayload.toObject(includeInstance, f)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (includeInstance) {
|
if (includeInstance) {
|
||||||
@ -30922,6 +30946,11 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.deserializeBinaryFromReader =
|
|||||||
reader.readMessage(value,proto.io.haveno.protobuffer.CashAtAtmAccountPayload.deserializeBinaryFromReader);
|
reader.readMessage(value,proto.io.haveno.protobuffer.CashAtAtmAccountPayload.deserializeBinaryFromReader);
|
||||||
msg.setCashAtAtmAccountPayload(value);
|
msg.setCashAtAtmAccountPayload(value);
|
||||||
break;
|
break;
|
||||||
|
case 41:
|
||||||
|
var value = new proto.io.haveno.protobuffer.PayPalAccountPayload;
|
||||||
|
reader.readMessage(value,proto.io.haveno.protobuffer.PayPalAccountPayload.deserializeBinaryFromReader);
|
||||||
|
msg.setPaypalAccountPayload(value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
reader.skipField();
|
reader.skipField();
|
||||||
break;
|
break;
|
||||||
@ -31264,6 +31293,14 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.serializeBinaryToWriter = func
|
|||||||
proto.io.haveno.protobuffer.CashAtAtmAccountPayload.serializeBinaryToWriter
|
proto.io.haveno.protobuffer.CashAtAtmAccountPayload.serializeBinaryToWriter
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
f = message.getPaypalAccountPayload();
|
||||||
|
if (f != null) {
|
||||||
|
writer.writeMessage(
|
||||||
|
41,
|
||||||
|
f,
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload.serializeBinaryToWriter
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -32675,6 +32712,43 @@ proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.hasCashAtAtmAccountP
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional PayPalAccountPayload paypal_account_payload = 41;
|
||||||
|
* @return {?proto.io.haveno.protobuffer.PayPalAccountPayload}
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.getPaypalAccountPayload = function() {
|
||||||
|
return /** @type{?proto.io.haveno.protobuffer.PayPalAccountPayload} */ (
|
||||||
|
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.PayPalAccountPayload, 41));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?proto.io.haveno.protobuffer.PayPalAccountPayload|undefined} value
|
||||||
|
* @return {!proto.io.haveno.protobuffer.PaymentAccountPayload} returns this
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.setPaypalAccountPayload = function(value) {
|
||||||
|
return jspb.Message.setOneofWrapperField(this, 41, proto.io.haveno.protobuffer.PaymentAccountPayload.oneofGroups_[0], value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the message field making it undefined.
|
||||||
|
* @return {!proto.io.haveno.protobuffer.PaymentAccountPayload} returns this
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.clearPaypalAccountPayload = function() {
|
||||||
|
return this.setPaypalAccountPayload(undefined);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this field is set.
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PaymentAccountPayload.prototype.hasPaypalAccountPayload = function() {
|
||||||
|
return jspb.Message.getField(this, 41) != null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -38653,7 +38727,7 @@ proto.io.haveno.protobuffer.CashAppAccountPayload.prototype.toObject = function(
|
|||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.CashAppAccountPayload.toObject = function(includeInstance, msg) {
|
proto.io.haveno.protobuffer.CashAppAccountPayload.toObject = function(includeInstance, msg) {
|
||||||
var f, obj = {
|
var f, obj = {
|
||||||
cashTag: jspb.Message.getFieldWithDefault(msg, 1, "")
|
emailOrMobileNrOrCashtag: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||||
};
|
};
|
||||||
|
|
||||||
if (includeInstance) {
|
if (includeInstance) {
|
||||||
@ -38692,7 +38766,7 @@ proto.io.haveno.protobuffer.CashAppAccountPayload.deserializeBinaryFromReader =
|
|||||||
switch (field) {
|
switch (field) {
|
||||||
case 1:
|
case 1:
|
||||||
var value = /** @type {string} */ (reader.readString());
|
var value = /** @type {string} */ (reader.readString());
|
||||||
msg.setCashTag(value);
|
msg.setEmailOrMobileNrOrCashtag(value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
reader.skipField();
|
reader.skipField();
|
||||||
@ -38723,7 +38797,7 @@ proto.io.haveno.protobuffer.CashAppAccountPayload.prototype.serializeBinary = fu
|
|||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.CashAppAccountPayload.serializeBinaryToWriter = function(message, writer) {
|
proto.io.haveno.protobuffer.CashAppAccountPayload.serializeBinaryToWriter = function(message, writer) {
|
||||||
var f = undefined;
|
var f = undefined;
|
||||||
f = message.getCashTag();
|
f = message.getEmailOrMobileNrOrCashtag();
|
||||||
if (f.length > 0) {
|
if (f.length > 0) {
|
||||||
writer.writeString(
|
writer.writeString(
|
||||||
1,
|
1,
|
||||||
@ -38734,10 +38808,10 @@ proto.io.haveno.protobuffer.CashAppAccountPayload.serializeBinaryToWriter = func
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional string cash_tag = 1;
|
* optional string email_or_mobile_nr_or_cashtag = 1;
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.CashAppAccountPayload.prototype.getCashTag = function() {
|
proto.io.haveno.protobuffer.CashAppAccountPayload.prototype.getEmailOrMobileNrOrCashtag = function() {
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -38746,7 +38820,7 @@ proto.io.haveno.protobuffer.CashAppAccountPayload.prototype.getCashTag = functio
|
|||||||
* @param {string} value
|
* @param {string} value
|
||||||
* @return {!proto.io.haveno.protobuffer.CashAppAccountPayload} returns this
|
* @return {!proto.io.haveno.protobuffer.CashAppAccountPayload} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.CashAppAccountPayload.prototype.setCashTag = function(value) {
|
proto.io.haveno.protobuffer.CashAppAccountPayload.prototype.setEmailOrMobileNrOrCashtag = function(value) {
|
||||||
return jspb.Message.setProto3StringField(this, 1, value);
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -38913,8 +38987,7 @@ proto.io.haveno.protobuffer.VenmoAccountPayload.prototype.toObject = function(op
|
|||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.VenmoAccountPayload.toObject = function(includeInstance, msg) {
|
proto.io.haveno.protobuffer.VenmoAccountPayload.toObject = function(includeInstance, msg) {
|
||||||
var f, obj = {
|
var f, obj = {
|
||||||
venmoUserName: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
emailOrMobileNrOrUsername: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||||
holderName: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (includeInstance) {
|
if (includeInstance) {
|
||||||
@ -38953,11 +39026,7 @@ proto.io.haveno.protobuffer.VenmoAccountPayload.deserializeBinaryFromReader = fu
|
|||||||
switch (field) {
|
switch (field) {
|
||||||
case 1:
|
case 1:
|
||||||
var value = /** @type {string} */ (reader.readString());
|
var value = /** @type {string} */ (reader.readString());
|
||||||
msg.setVenmoUserName(value);
|
msg.setEmailOrMobileNrOrUsername(value);
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
var value = /** @type {string} */ (reader.readString());
|
|
||||||
msg.setHolderName(value);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
reader.skipField();
|
reader.skipField();
|
||||||
@ -38988,28 +39057,21 @@ proto.io.haveno.protobuffer.VenmoAccountPayload.prototype.serializeBinary = func
|
|||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.VenmoAccountPayload.serializeBinaryToWriter = function(message, writer) {
|
proto.io.haveno.protobuffer.VenmoAccountPayload.serializeBinaryToWriter = function(message, writer) {
|
||||||
var f = undefined;
|
var f = undefined;
|
||||||
f = message.getVenmoUserName();
|
f = message.getEmailOrMobileNrOrUsername();
|
||||||
if (f.length > 0) {
|
if (f.length > 0) {
|
||||||
writer.writeString(
|
writer.writeString(
|
||||||
1,
|
1,
|
||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getHolderName();
|
|
||||||
if (f.length > 0) {
|
|
||||||
writer.writeString(
|
|
||||||
2,
|
|
||||||
f
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional string venmo_user_name = 1;
|
* optional string email_or_mobile_nr_or_username = 1;
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.VenmoAccountPayload.prototype.getVenmoUserName = function() {
|
proto.io.haveno.protobuffer.VenmoAccountPayload.prototype.getEmailOrMobileNrOrUsername = function() {
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -39018,26 +39080,138 @@ proto.io.haveno.protobuffer.VenmoAccountPayload.prototype.getVenmoUserName = fun
|
|||||||
* @param {string} value
|
* @param {string} value
|
||||||
* @return {!proto.io.haveno.protobuffer.VenmoAccountPayload} returns this
|
* @return {!proto.io.haveno.protobuffer.VenmoAccountPayload} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.VenmoAccountPayload.prototype.setVenmoUserName = function(value) {
|
proto.io.haveno.protobuffer.VenmoAccountPayload.prototype.setEmailOrMobileNrOrUsername = function(value) {
|
||||||
return jspb.Message.setProto3StringField(this, 1, value);
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
/**
|
/**
|
||||||
* optional string holder_name = 2;
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.io.haveno.protobuffer.PayPalAccountPayload.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @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.PayPalAccountPayload} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
emailOrMobileNrOrUsername: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.io.haveno.protobuffer.PayPalAccountPayload}
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.io.haveno.protobuffer.PayPalAccountPayload;
|
||||||
|
return proto.io.haveno.protobuffer.PayPalAccountPayload.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.io.haveno.protobuffer.PayPalAccountPayload} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.io.haveno.protobuffer.PayPalAccountPayload}
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setEmailOrMobileNrOrUsername(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.io.haveno.protobuffer.PayPalAccountPayload} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.PayPalAccountPayload.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getEmailOrMobileNrOrUsername();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string email_or_mobile_nr_or_username = 1;
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.VenmoAccountPayload.prototype.getHolderName = function() {
|
proto.io.haveno.protobuffer.PayPalAccountPayload.prototype.getEmailOrMobileNrOrUsername = function() {
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} value
|
* @param {string} value
|
||||||
* @return {!proto.io.haveno.protobuffer.VenmoAccountPayload} returns this
|
* @return {!proto.io.haveno.protobuffer.PayPalAccountPayload} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.VenmoAccountPayload.prototype.setHolderName = function(value) {
|
proto.io.haveno.protobuffer.PayPalAccountPayload.prototype.setEmailOrMobileNrOrUsername = function(value) {
|
||||||
return jspb.Message.setProto3StringField(this, 2, value);
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -39233,7 +39407,7 @@ proto.io.haveno.protobuffer.RevolutAccountPayload.prototype.toObject = function(
|
|||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.RevolutAccountPayload.toObject = function(includeInstance, msg) {
|
proto.io.haveno.protobuffer.RevolutAccountPayload.toObject = function(includeInstance, msg) {
|
||||||
var f, obj = {
|
var f, obj = {
|
||||||
userName: jspb.Message.getFieldWithDefault(msg, 1, "")
|
username: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||||
};
|
};
|
||||||
|
|
||||||
if (includeInstance) {
|
if (includeInstance) {
|
||||||
@ -39272,7 +39446,7 @@ proto.io.haveno.protobuffer.RevolutAccountPayload.deserializeBinaryFromReader =
|
|||||||
switch (field) {
|
switch (field) {
|
||||||
case 1:
|
case 1:
|
||||||
var value = /** @type {string} */ (reader.readString());
|
var value = /** @type {string} */ (reader.readString());
|
||||||
msg.setUserName(value);
|
msg.setUsername(value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
reader.skipField();
|
reader.skipField();
|
||||||
@ -39303,7 +39477,7 @@ proto.io.haveno.protobuffer.RevolutAccountPayload.prototype.serializeBinary = fu
|
|||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.RevolutAccountPayload.serializeBinaryToWriter = function(message, writer) {
|
proto.io.haveno.protobuffer.RevolutAccountPayload.serializeBinaryToWriter = function(message, writer) {
|
||||||
var f = undefined;
|
var f = undefined;
|
||||||
f = message.getUserName();
|
f = message.getUsername();
|
||||||
if (f.length > 0) {
|
if (f.length > 0) {
|
||||||
writer.writeString(
|
writer.writeString(
|
||||||
1,
|
1,
|
||||||
@ -39314,10 +39488,10 @@ proto.io.haveno.protobuffer.RevolutAccountPayload.serializeBinaryToWriter = func
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional string user_name = 1;
|
* optional string username = 1;
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.RevolutAccountPayload.prototype.getUserName = function() {
|
proto.io.haveno.protobuffer.RevolutAccountPayload.prototype.getUsername = function() {
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -39326,7 +39500,7 @@ proto.io.haveno.protobuffer.RevolutAccountPayload.prototype.getUserName = functi
|
|||||||
* @param {string} value
|
* @param {string} value
|
||||||
* @return {!proto.io.haveno.protobuffer.RevolutAccountPayload} returns this
|
* @return {!proto.io.haveno.protobuffer.RevolutAccountPayload} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.RevolutAccountPayload.prototype.setUserName = function(value) {
|
proto.io.haveno.protobuffer.RevolutAccountPayload.prototype.setUsername = function(value) {
|
||||||
return jspb.Message.setProto3StringField(this, 1, value);
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -61509,7 +61683,10 @@ proto.io.haveno.protobuffer.PaymentAccountForm.FormId = {
|
|||||||
PAXUM: 12,
|
PAXUM: 12,
|
||||||
PAY_BY_MAIL: 13,
|
PAY_BY_MAIL: 13,
|
||||||
CASH_AT_ATM: 14,
|
CASH_AT_ATM: 14,
|
||||||
AUSTRALIA_PAYID: 15
|
AUSTRALIA_PAYID: 15,
|
||||||
|
CASH_APP: 16,
|
||||||
|
PAYPAL: 17,
|
||||||
|
VENMO: 18
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61892,7 +62069,9 @@ proto.io.haveno.protobuffer.PaymentAccountFormField.FieldId = {
|
|||||||
SPECIAL_INSTRUCTIONS: 54,
|
SPECIAL_INSTRUCTIONS: 54,
|
||||||
STATE: 55,
|
STATE: 55,
|
||||||
TRADE_CURRENCIES: 56,
|
TRADE_CURRENCIES: 56,
|
||||||
USER_NAME: 57
|
USERNAME: 57,
|
||||||
|
EMAIL_OR_MOBILE_NR_OR_USERNAME: 58,
|
||||||
|
EMAIL_OR_MOBILE_NR_OR_CASHTAG: 59
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
2
dist/protobuf/pb_pb.js.map
vendored
2
dist/protobuf/pb_pb.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1307,7 +1307,7 @@ test("Can create fiat payment accounts (CI)", async () => {
|
|||||||
|
|
||||||
// edit form
|
// edit form
|
||||||
HavenoUtils.setFormValue(accountForm, PaymentAccountFormField.FieldId.ACCOUNT_NAME, "Revolut account " + moneroTs.GenUtils.getUUID());
|
HavenoUtils.setFormValue(accountForm, PaymentAccountFormField.FieldId.ACCOUNT_NAME, "Revolut account " + moneroTs.GenUtils.getUUID());
|
||||||
HavenoUtils.setFormValue(accountForm, PaymentAccountFormField.FieldId.USER_NAME, "user123");
|
HavenoUtils.setFormValue(accountForm, PaymentAccountFormField.FieldId.USERNAME, "user123");
|
||||||
HavenoUtils.setFormValue(accountForm, PaymentAccountFormField.FieldId.TRADE_CURRENCIES, "gbp,eur,usd");
|
HavenoUtils.setFormValue(accountForm, PaymentAccountFormField.FieldId.TRADE_CURRENCIES, "gbp,eur,usd");
|
||||||
|
|
||||||
// create payment account
|
// create payment account
|
||||||
@ -1316,7 +1316,7 @@ test("Can create fiat payment accounts (CI)", async () => {
|
|||||||
expect(fiatAccount.getSelectedTradeCurrency()!.getCode()).toEqual("USD");
|
expect(fiatAccount.getSelectedTradeCurrency()!.getCode()).toEqual("USD");
|
||||||
expect(fiatAccount.getTradeCurrenciesList().length).toBeGreaterThan(0);
|
expect(fiatAccount.getTradeCurrenciesList().length).toBeGreaterThan(0);
|
||||||
expect(fiatAccount.getPaymentAccountPayload()!.getPaymentMethodId()).toEqual(paymentMethodId);
|
expect(fiatAccount.getPaymentAccountPayload()!.getPaymentMethodId()).toEqual(paymentMethodId);
|
||||||
expect(fiatAccount.getPaymentAccountPayload()!.getRevolutAccountPayload()!.getUserName()).toEqual(HavenoUtils.getFormValue(accountForm, PaymentAccountFormField.FieldId.USER_NAME));
|
expect(fiatAccount.getPaymentAccountPayload()!.getRevolutAccountPayload()!.getUsername()).toEqual(HavenoUtils.getFormValue(accountForm, PaymentAccountFormField.FieldId.USERNAME));
|
||||||
|
|
||||||
// payment account added
|
// payment account added
|
||||||
let found = false;
|
let found = false;
|
||||||
@ -3968,6 +3968,10 @@ function getValidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountForm
|
|||||||
return "jdoe@no.com";
|
return "jdoe@no.com";
|
||||||
case PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR:
|
case PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR:
|
||||||
return "876-512-7813";
|
return "876-512-7813";
|
||||||
|
case PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_USERNAME:
|
||||||
|
return "john.doe"
|
||||||
|
case PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_CASHTAG:
|
||||||
|
return "john.doe"
|
||||||
case PaymentAccountFormField.FieldId.EXTRA_INFO:
|
case PaymentAccountFormField.FieldId.EXTRA_INFO:
|
||||||
return "Please and thanks";
|
return "Please and thanks";
|
||||||
case PaymentAccountFormField.FieldId.HOLDER_ADDRESS:
|
case PaymentAccountFormField.FieldId.HOLDER_ADDRESS:
|
||||||
@ -4022,7 +4026,7 @@ function getValidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountForm
|
|||||||
return field.getSupportedCurrenciesList()[0]!.getCode(); // TODO: randomly select?
|
return field.getSupportedCurrenciesList()[0]!.getCode(); // TODO: randomly select?
|
||||||
}
|
}
|
||||||
else return field.getSupportedCurrenciesList().map(currency => currency.getCode()).join(',');
|
else return field.getSupportedCurrenciesList().map(currency => currency.getCode()).join(',');
|
||||||
case PaymentAccountFormField.FieldId.USER_NAME:
|
case PaymentAccountFormField.FieldId.USERNAME:
|
||||||
return "user123";
|
return "user123";
|
||||||
case PaymentAccountFormField.FieldId.ADDRESS:
|
case PaymentAccountFormField.FieldId.ADDRESS:
|
||||||
const currencyCode = HavenoUtils.getFormValue(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES);
|
const currencyCode = HavenoUtils.getFormValue(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES);
|
||||||
@ -4101,6 +4105,10 @@ function getInvalidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountFo
|
|||||||
return "@no.com";
|
return "@no.com";
|
||||||
case PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR:
|
case PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR:
|
||||||
return ""; // TODO: validate phone numbers, e.g. 876
|
return ""; // TODO: validate phone numbers, e.g. 876
|
||||||
|
case PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_USERNAME:
|
||||||
|
return "A"
|
||||||
|
case PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_CASHTAG:
|
||||||
|
return "A"
|
||||||
case PaymentAccountFormField.FieldId.EXTRA_INFO:
|
case PaymentAccountFormField.FieldId.EXTRA_INFO:
|
||||||
throw new Error("Extra info has no invalid input");
|
throw new Error("Extra info has no invalid input");
|
||||||
case PaymentAccountFormField.FieldId.HOLDER_ADDRESS:
|
case PaymentAccountFormField.FieldId.HOLDER_ADDRESS:
|
||||||
@ -4153,7 +4161,7 @@ function getInvalidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountFo
|
|||||||
}
|
}
|
||||||
case PaymentAccountFormField.FieldId.TRADE_CURRENCIES:
|
case PaymentAccountFormField.FieldId.TRADE_CURRENCIES:
|
||||||
return "abc,def";
|
return "abc,def";
|
||||||
case PaymentAccountFormField.FieldId.USER_NAME:
|
case PaymentAccountFormField.FieldId.USERNAME:
|
||||||
return "A";
|
return "A";
|
||||||
case PaymentAccountFormField.FieldId.ADDRESS:
|
case PaymentAccountFormField.FieldId.ADDRESS:
|
||||||
return "A123";
|
return "A123";
|
||||||
@ -4164,7 +4172,7 @@ function getInvalidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountFo
|
|||||||
|
|
||||||
function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) {
|
function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) {
|
||||||
if (account.getPaymentAccountPayload()?.getCryptoCurrencyAccountPayload()) testCryptoPaymentAccount(account); // TODO: test non-crypto
|
if (account.getPaymentAccountPayload()?.getCryptoCurrencyAccountPayload()) testCryptoPaymentAccount(account); // TODO: test non-crypto
|
||||||
expect(account.getAccountName()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.ACCOUNT_NAME).getValue()); // TODO: using number as payment method, account payload's account name = user name
|
expect(account.getAccountName()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.ACCOUNT_NAME).getValue()); // TODO: using number as payment method, account payload's account name = username
|
||||||
const isCountryBased = account.getPaymentAccountPayload()!.getCountryBasedPaymentAccountPayload() !== undefined;
|
const isCountryBased = account.getPaymentAccountPayload()!.getCountryBasedPaymentAccountPayload() !== undefined;
|
||||||
if (isCountryBased) expect(account.getPaymentAccountPayload()!.getCountryBasedPaymentAccountPayload()!.getCountryCode()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.COUNTRY).getValue());
|
if (isCountryBased) expect(account.getPaymentAccountPayload()!.getCountryBasedPaymentAccountPayload()!.getCountryCode()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.COUNTRY).getValue());
|
||||||
switch (form.getId()) {
|
switch (form.getId()) {
|
||||||
@ -4173,7 +4181,7 @@ function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) {
|
|||||||
expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
|
expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
|
||||||
break;
|
break;
|
||||||
case PaymentAccountForm.FormId.REVOLUT:
|
case PaymentAccountForm.FormId.REVOLUT:
|
||||||
expect(account.getPaymentAccountPayload()!.getRevolutAccountPayload()!.getUserName()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.USER_NAME).getValue());
|
expect(account.getPaymentAccountPayload()!.getRevolutAccountPayload()!.getUsername()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.USERNAME).getValue());
|
||||||
expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
|
expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
|
||||||
break;
|
break;
|
||||||
case PaymentAccountForm.FormId.SEPA:
|
case PaymentAccountForm.FormId.SEPA:
|
||||||
@ -4195,6 +4203,8 @@ function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) {
|
|||||||
case PaymentAccountForm.FormId.ZELLE:
|
case PaymentAccountForm.FormId.ZELLE:
|
||||||
expect(account.getPaymentAccountPayload()!.getZelleAccountPayload()!.getHolderName()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.HOLDER_NAME).getValue());
|
expect(account.getPaymentAccountPayload()!.getZelleAccountPayload()!.getHolderName()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.HOLDER_NAME).getValue());
|
||||||
expect(account.getPaymentAccountPayload()!.getZelleAccountPayload()!.getEmailOrMobileNr()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR).getValue());
|
expect(account.getPaymentAccountPayload()!.getZelleAccountPayload()!.getEmailOrMobileNr()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR).getValue());
|
||||||
|
expect(account.getTradeCurrenciesList().length).toEqual(1);
|
||||||
|
expect(account.getTradeCurrenciesList()[0].getCode()).toEqual("USD");
|
||||||
break;
|
break;
|
||||||
case PaymentAccountForm.FormId.SWIFT:
|
case PaymentAccountForm.FormId.SWIFT:
|
||||||
expect(account.getPaymentAccountPayload()!.getSwiftAccountPayload()!.getBankSwiftCode()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.BANK_SWIFT_CODE).getValue());
|
expect(account.getPaymentAccountPayload()!.getSwiftAccountPayload()!.getBankSwiftCode()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.BANK_SWIFT_CODE).getValue());
|
||||||
@ -4259,6 +4269,20 @@ function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) {
|
|||||||
expect(account.getPaymentAccountPayload()!.getAustraliaPayidPayload()!.getPayid()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.PAYID).getValue());
|
expect(account.getPaymentAccountPayload()!.getAustraliaPayidPayload()!.getPayid()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.PAYID).getValue());
|
||||||
expect(account.getPaymentAccountPayload()!.getAustraliaPayidPayload()!.getExtraInfo()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.EXTRA_INFO).getValue());
|
expect(account.getPaymentAccountPayload()!.getAustraliaPayidPayload()!.getExtraInfo()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.EXTRA_INFO).getValue());
|
||||||
break;
|
break;
|
||||||
|
case PaymentAccountForm.FormId.CASH_APP:
|
||||||
|
expect(account.getPaymentAccountPayload()!.getCashAppAccountPayload()!.getEmailOrMobileNrOrCashtag()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_CASHTAG).getValue());
|
||||||
|
expect(account.getTradeCurrenciesList().length).toEqual(2);
|
||||||
|
expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
|
||||||
|
break;
|
||||||
|
case PaymentAccountForm.FormId.PAYPAL:
|
||||||
|
expect(account.getPaymentAccountPayload()!.getPaypalAccountPayload()!.getEmailOrMobileNrOrUsername()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_USERNAME).getValue());
|
||||||
|
expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
|
||||||
|
break;
|
||||||
|
case PaymentAccountForm.FormId.VENMO:
|
||||||
|
expect(account.getPaymentAccountPayload()!.getVenmoAccountPayload()!.getEmailOrMobileNrOrUsername()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.EMAIL_OR_MOBILE_NR_OR_USERNAME).getValue());
|
||||||
|
expect(account.getTradeCurrenciesList().length).toEqual(1);
|
||||||
|
expect(account.getTradeCurrenciesList()[0].getCode()).toEqual("USD");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error("Unhandled payment method type: " + form.getId());
|
throw new Error("Unhandled payment method type: " + form.getId());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user