From 3747fab7af4fe20da0c8d85e499bf998c67f4d92 Mon Sep 17 00:00:00 2001 From: Gabriel Masclef Date: Thu, 1 Aug 2024 11:44:41 -0300 Subject: [PATCH] Fix: simplex get quote with sepa payment method (old app) --- packages/bitcore-wallet-service/src/lib/server.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/bitcore-wallet-service/src/lib/server.ts b/packages/bitcore-wallet-service/src/lib/server.ts index 75f77a067ed..cc6e8ce4d77 100644 --- a/packages/bitcore-wallet-service/src/lib/server.ts +++ b/packages/bitcore-wallet-service/src/lib/server.ts @@ -5875,6 +5875,11 @@ export class WalletService implements IWalletService { Authorization: 'ApiKey ' + API_KEY }; + if (req.body && req.body.payment_methods && Array.isArray(req.body.payment_methods)) { + // Workaround to fix older versions of the app + req.body.payment_methods = req.body.payment_methods.map(item => item === 'simplex_account' ? 'sepa_open_banking' : item); + } + this.request.post( API + '/wallet/merchant/v2/quote', {