@moonpay/platform-sdk-core 1.21.0 → 1.23.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 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
- return apiFetch(ctx, "/platform/v1/payment-methods");
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),