Skip to content

Commit

Permalink
Fix: simplex get quote with sepa payment method (old app)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamboster committed Aug 1, 2024
1 parent d09a9a8 commit 3747fab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/bitcore-wallet-service/src/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
{
Expand Down

0 comments on commit 3747fab

Please sign in to comment.