Skip to content

Commit 20d818d

Browse files
authored
Merge branch 'master' into IOPID-1448-409-conflict
2 parents 731c226 + e9754d2 commit 20d818d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/features/wallet/routers/payment.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ import {
1717
getNewTransactionResponsePayload,
1818
getTransactionInfoPayload
1919
} from "../payloads/transactions";
20+
import WalletDB from "../persistence/userWallet";
2021
import {
2122
WalletPaymentFailure,
2223
getStatusCodeForWalletFailure
2324
} from "../types/failure";
25+
import { generateOnboardablePaymentMethods } from "../utils/onboarding";
2426
import { WALLET_PAYMENT_PATH } from "../utils/payment";
2527
import { addPaymentHandler } from "./router";
2628

@@ -181,3 +183,14 @@ addPaymentHandler(
181183
)
182184
)
183185
);
186+
187+
addPaymentHandler("get", "/wallets", (req, res) => {
188+
res.json({ wallets: WalletDB.getUserWallets() });
189+
});
190+
191+
/**
192+
* This API is used to retrieve a list of payment methods available
193+
*/
194+
addPaymentHandler("get", "/payment-methods", (req, res) => {
195+
res.json(generateOnboardablePaymentMethods());
196+
});

0 commit comments

Comments
 (0)