Skip to content

Commit

Permalink
Merge branch 'master' into IOPID-1448-409-conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowsheep1 authored Feb 8, 2024
2 parents 731c226 + e9754d2 commit 20d818d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/features/wallet/routers/payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ import {
getNewTransactionResponsePayload,
getTransactionInfoPayload
} from "../payloads/transactions";
import WalletDB from "../persistence/userWallet";
import {
WalletPaymentFailure,
getStatusCodeForWalletFailure
} from "../types/failure";
import { generateOnboardablePaymentMethods } from "../utils/onboarding";
import { WALLET_PAYMENT_PATH } from "../utils/payment";
import { addPaymentHandler } from "./router";

Expand Down Expand Up @@ -181,3 +183,14 @@ addPaymentHandler(
)
)
);

addPaymentHandler("get", "/wallets", (req, res) => {
res.json({ wallets: WalletDB.getUserWallets() });
});

/**
* This API is used to retrieve a list of payment methods available
*/
addPaymentHandler("get", "/payment-methods", (req, res) => {
res.json(generateOnboardablePaymentMethods());
});

0 comments on commit 20d818d

Please sign in to comment.