support paxum

This commit is contained in:
woodser 2022-06-23 11:16:39 -04:00
parent 22d9ed7ac6
commit 82e43d5940

View File

@ -857,7 +857,7 @@ test("Can get payment accounts", async () => {
test("Can validate payment account forms", async () => {
// supported payment methods
const expectedPaymentMethods = ["REVOLUT", "SEPA", "SEPA_INSTANT", "TRANSFERWISE", "CLEAR_X_CHANGE", "SWIFT", "F2F", "STRIKE", "MONEY_GRAM", "FASTER_PAYMENTS", "UPHOLD"];
const expectedPaymentMethods = ["REVOLUT", "SEPA", "SEPA_INSTANT", "TRANSFERWISE", "CLEAR_X_CHANGE", "SWIFT", "F2F", "STRIKE", "MONEY_GRAM", "FASTER_PAYMENTS", "UPHOLD", "PAXUM"];
// get payment methods
const paymentMethods = await alice.getPaymentMethods();
@ -2690,6 +2690,10 @@ function testFiatAccount(account: PaymentAccount, form: PaymentAccountForm) {
expect(account.getPaymentAccountPayload().getUpholdAccountPayload().getAccountOwner()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.ACCOUNT_OWNER).getValue());
expect(account.getPaymentAccountPayload().getUpholdAccountPayload().getAccountId()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.ACCOUNT_ID).getValue());
break;
case PaymentAccountForm.FormId.PAXUM:
expect(account.getPaymentAccountPayload().getPaxumAccountPayload().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:
throw new Error("Unhandled payment method type: " + form.getId());
}