mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-07-23 15:00:43 -04:00
test paysafe
This commit is contained in:
parent
68f596cf4a
commit
52c7f14e4e
1 changed files with 6 additions and 2 deletions
|
@ -4325,7 +4325,7 @@ function getValidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountForm
|
||||||
case PaymentAccountFormField.FieldId.INTERMEDIARY_SWIFT_CODE:
|
case PaymentAccountFormField.FieldId.INTERMEDIARY_SWIFT_CODE:
|
||||||
return "10987654321"; // TODO: use real swift code
|
return "10987654321"; // TODO: use real swift code
|
||||||
case PaymentAccountFormField.FieldId.MOBILE_NR:
|
case PaymentAccountFormField.FieldId.MOBILE_NR:
|
||||||
throw new Error("Not implemented");
|
return "876-512-7813";
|
||||||
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:
|
||||||
|
@ -4464,7 +4464,7 @@ function getInvalidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountFo
|
||||||
case PaymentAccountFormField.FieldId.INTERMEDIARY_SWIFT_CODE:
|
case PaymentAccountFormField.FieldId.INTERMEDIARY_SWIFT_CODE:
|
||||||
return "A";
|
return "A";
|
||||||
case PaymentAccountFormField.FieldId.MOBILE_NR:
|
case PaymentAccountFormField.FieldId.MOBILE_NR:
|
||||||
throw new Error("Not implemented");
|
return "A";
|
||||||
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:
|
||||||
|
@ -4613,6 +4613,10 @@ function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) {
|
||||||
expect(account.getTradeCurrenciesList().length).toEqual(1);
|
expect(account.getTradeCurrenciesList().length).toEqual(1);
|
||||||
expect(account.getTradeCurrenciesList()[0].getCode()).toEqual("USD");
|
expect(account.getTradeCurrenciesList()[0].getCode()).toEqual("USD");
|
||||||
break;
|
break;
|
||||||
|
case PaymentAccountForm.FormId.PAYSAFE:
|
||||||
|
expect(account.getPaymentAccountPayload()!.getPaysafeAccountPayload()!.getEmail()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.EMAIL).getValue());
|
||||||
|
expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error("Unhandled payment method type: " + form.getId());
|
throw new Error("Unhandled payment method type: " + form.getId());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue