@moonpay/platform-sdk-core 1.19.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -234,8 +234,12 @@ async function submitIdentityFiles(ctx, id, body) {
|
|
|
234
234
|
|
|
235
235
|
// src/api/payment-methods.ts
|
|
236
236
|
var import_result3 = require("@moonpay/platform-protocol/result");
|
|
237
|
-
async function getPaymentMethods(ctx) {
|
|
238
|
-
|
|
237
|
+
async function getPaymentMethods(ctx, params = {}) {
|
|
238
|
+
const searchParams = new URLSearchParams();
|
|
239
|
+
if (params.currency) searchParams.set("currency", params.currency);
|
|
240
|
+
const query = searchParams.toString();
|
|
241
|
+
const path = `/platform/v1/payment-methods${query ? `?${query}` : ""}`;
|
|
242
|
+
return apiFetch(ctx, path);
|
|
239
243
|
}
|
|
240
244
|
async function deletePaymentMethod(ctx, paymentMethodId) {
|
|
241
245
|
const response = await ctx.fetch(
|
|
@@ -284,7 +288,7 @@ function createClientCore(options) {
|
|
|
284
288
|
}),
|
|
285
289
|
getQuote: (params) => getQuote(ctx, params),
|
|
286
290
|
getAssets: (params) => getAssets(ctx, params),
|
|
287
|
-
getPaymentMethods: () => getPaymentMethods(ctx),
|
|
291
|
+
getPaymentMethods: (params) => getPaymentMethods(ctx, params),
|
|
288
292
|
listTransactions: (params) => listTransactions(ctx, params),
|
|
289
293
|
getTransaction: (id) => getTransaction(ctx, id),
|
|
290
294
|
simulateBankTransfer: (id, params) => simulateBankTransfer(ctx, id, params),
|