mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2024-10-01 01:35:42 -04:00
test australia payid over api
This commit is contained in:
parent
02e21c4e91
commit
3da57580fe
5
dist/protobuf/pb_pb.d.ts
vendored
5
dist/protobuf/pb_pb.d.ts
vendored
@ -4169,6 +4169,9 @@ export class AustraliaPayidPayload extends jspb.Message {
|
|||||||
getPayid(): string;
|
getPayid(): string;
|
||||||
setPayid(value: string): AustraliaPayidPayload;
|
setPayid(value: string): AustraliaPayidPayload;
|
||||||
|
|
||||||
|
getExtraInfo(): string;
|
||||||
|
setExtraInfo(value: string): AustraliaPayidPayload;
|
||||||
|
|
||||||
serializeBinary(): Uint8Array;
|
serializeBinary(): Uint8Array;
|
||||||
toObject(includeInstance?: boolean): AustraliaPayidPayload.AsObject;
|
toObject(includeInstance?: boolean): AustraliaPayidPayload.AsObject;
|
||||||
static toObject(includeInstance: boolean, msg: AustraliaPayidPayload): AustraliaPayidPayload.AsObject;
|
static toObject(includeInstance: boolean, msg: AustraliaPayidPayload): AustraliaPayidPayload.AsObject;
|
||||||
@ -4181,6 +4184,7 @@ export namespace AustraliaPayidPayload {
|
|||||||
export type AsObject = {
|
export type AsObject = {
|
||||||
bankAccountName: string,
|
bankAccountName: string,
|
||||||
payid: string,
|
payid: string,
|
||||||
|
extraInfo: string,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7664,6 +7668,7 @@ export namespace PaymentAccountForm {
|
|||||||
PAXUM = 12,
|
PAXUM = 12,
|
||||||
PAY_BY_MAIL = 13,
|
PAY_BY_MAIL = 13,
|
||||||
CASH_AT_ATM = 14,
|
CASH_AT_ATM = 14,
|
||||||
|
AUSTRALIA_PAYID = 15,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
35
dist/protobuf/pb_pb.js
vendored
35
dist/protobuf/pb_pb.js
vendored
@ -35808,7 +35808,8 @@ proto.io.haveno.protobuffer.AustraliaPayidPayload.prototype.toObject = function(
|
|||||||
proto.io.haveno.protobuffer.AustraliaPayidPayload.toObject = function(includeInstance, msg) {
|
proto.io.haveno.protobuffer.AustraliaPayidPayload.toObject = function(includeInstance, msg) {
|
||||||
var f, obj = {
|
var f, obj = {
|
||||||
bankAccountName: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
bankAccountName: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||||
payid: jspb.Message.getFieldWithDefault(msg, 2, "")
|
payid: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||||
|
extraInfo: jspb.Message.getFieldWithDefault(msg, 3, "")
|
||||||
};
|
};
|
||||||
|
|
||||||
if (includeInstance) {
|
if (includeInstance) {
|
||||||
@ -35853,6 +35854,10 @@ proto.io.haveno.protobuffer.AustraliaPayidPayload.deserializeBinaryFromReader =
|
|||||||
var value = /** @type {string} */ (reader.readString());
|
var value = /** @type {string} */ (reader.readString());
|
||||||
msg.setPayid(value);
|
msg.setPayid(value);
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setExtraInfo(value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
reader.skipField();
|
reader.skipField();
|
||||||
break;
|
break;
|
||||||
@ -35896,6 +35901,13 @@ proto.io.haveno.protobuffer.AustraliaPayidPayload.serializeBinaryToWriter = func
|
|||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
f = message.getExtraInfo();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
3,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -35935,6 +35947,24 @@ proto.io.haveno.protobuffer.AustraliaPayidPayload.prototype.setPayid = function(
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string extra_info = 3;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.AustraliaPayidPayload.prototype.getExtraInfo = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.io.haveno.protobuffer.AustraliaPayidPayload} returns this
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.AustraliaPayidPayload.prototype.setExtraInfo = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 3, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of repeated fields within this message type.
|
* List of repeated fields within this message type.
|
||||||
@ -61478,7 +61508,8 @@ proto.io.haveno.protobuffer.PaymentAccountForm.FormId = {
|
|||||||
UPHOLD: 11,
|
UPHOLD: 11,
|
||||||
PAXUM: 12,
|
PAXUM: 12,
|
||||||
PAY_BY_MAIL: 13,
|
PAY_BY_MAIL: 13,
|
||||||
CASH_AT_ATM: 14
|
CASH_AT_ATM: 14,
|
||||||
|
AUSTRALIA_PAYID: 15
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
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
@ -3923,7 +3923,7 @@ function getValidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountForm
|
|||||||
case PaymentAccountFormField.FieldId.ANSWER:
|
case PaymentAccountFormField.FieldId.ANSWER:
|
||||||
throw new Error("Not implemented");
|
throw new Error("Not implemented");
|
||||||
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NAME:
|
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NAME:
|
||||||
throw new Error("Not implemented");
|
return "John Doe";
|
||||||
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NUMBER:
|
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NUMBER:
|
||||||
throw new Error("Not implemented");
|
throw new Error("Not implemented");
|
||||||
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_TYPE:
|
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_TYPE:
|
||||||
@ -3995,7 +3995,7 @@ function getValidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountForm
|
|||||||
case PaymentAccountFormField.FieldId.NATIONAL_ACCOUNT_ID:
|
case PaymentAccountFormField.FieldId.NATIONAL_ACCOUNT_ID:
|
||||||
throw new Error("Not implemented");
|
throw new Error("Not implemented");
|
||||||
case PaymentAccountFormField.FieldId.PAYID:
|
case PaymentAccountFormField.FieldId.PAYID:
|
||||||
throw new Error("Not implemented");
|
return "john.doe@example.com";
|
||||||
case PaymentAccountFormField.FieldId.PIX_KEY:
|
case PaymentAccountFormField.FieldId.PIX_KEY:
|
||||||
throw new Error("Not implemented");
|
throw new Error("Not implemented");
|
||||||
case PaymentAccountFormField.FieldId.POSTAL_ADDRESS:
|
case PaymentAccountFormField.FieldId.POSTAL_ADDRESS:
|
||||||
@ -4054,7 +4054,7 @@ function getInvalidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountFo
|
|||||||
case PaymentAccountFormField.FieldId.ANSWER:
|
case PaymentAccountFormField.FieldId.ANSWER:
|
||||||
throw new Error("Not implemented");
|
throw new Error("Not implemented");
|
||||||
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NAME:
|
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NAME:
|
||||||
throw new Error("Not implemented");
|
return "F";
|
||||||
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NUMBER:
|
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NUMBER:
|
||||||
throw new Error("Not implemented");
|
throw new Error("Not implemented");
|
||||||
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_TYPE:
|
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_TYPE:
|
||||||
@ -4130,7 +4130,7 @@ function getInvalidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountFo
|
|||||||
case PaymentAccountFormField.FieldId.NATIONAL_ACCOUNT_ID:
|
case PaymentAccountFormField.FieldId.NATIONAL_ACCOUNT_ID:
|
||||||
throw new Error("Not implemented");
|
throw new Error("Not implemented");
|
||||||
case PaymentAccountFormField.FieldId.PAYID:
|
case PaymentAccountFormField.FieldId.PAYID:
|
||||||
throw new Error("Not implemented");
|
return "A";
|
||||||
case PaymentAccountFormField.FieldId.PIX_KEY:
|
case PaymentAccountFormField.FieldId.PIX_KEY:
|
||||||
throw new Error("Not implemented");
|
throw new Error("Not implemented");
|
||||||
case PaymentAccountFormField.FieldId.POSTAL_ADDRESS:
|
case PaymentAccountFormField.FieldId.POSTAL_ADDRESS:
|
||||||
@ -4254,6 +4254,11 @@ function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) {
|
|||||||
expect(account.getTradeCurrenciesList().length).toEqual(1);
|
expect(account.getTradeCurrenciesList().length).toEqual(1);
|
||||||
expect(account.getTradeCurrenciesList()[0].getCode()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
|
expect(account.getTradeCurrenciesList()[0].getCode()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
|
||||||
break;
|
break;
|
||||||
|
case PaymentAccountForm.FormId.AUSTRALIA_PAYID:
|
||||||
|
expect(account.getPaymentAccountPayload()!.getAustraliaPayidPayload()!.getBankAccountName()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.BANK_ACCOUNT_NAME).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());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error("Unhandled payment method type: " + form.getId());
|
throw new Error("Unhandled payment method type: " + form.getId());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user