From 64ac9fa350231a7140f4cb94aa375bcd0dc42a03 Mon Sep 17 00:00:00 2001 From: Gabriel Masclef Date: Mon, 17 Jan 2022 17:54:22 -0300 Subject: [PATCH] Ref: Use USDP for Simplex instead PAX --- src/pages/buy-crypto/crypto-offers/crypto-offers.ts | 4 +++- src/providers/simplex/simplex.ts | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/pages/buy-crypto/crypto-offers/crypto-offers.ts b/src/pages/buy-crypto/crypto-offers/crypto-offers.ts index 16a2360d3a8..35fee26dbe4 100644 --- a/src/pages/buy-crypto/crypto-offers/crypto-offers.ts +++ b/src/pages/buy-crypto/crypto-offers/crypto-offers.ts @@ -345,7 +345,9 @@ export class CryptoOffersPage { break; } const data = { - digital_currency: this.wallet.coin.toUpperCase(), + digital_currency: this.simplexProvider.checkSimplexCoin( + this.wallet.coin.toUpperCase() + ), fiat_currency: this.fiatCurrency, requested_currency: this.fiatCurrency, requested_amount: this.amount, diff --git a/src/providers/simplex/simplex.ts b/src/providers/simplex/simplex.ts index 431d3c28951..05f58447f47 100644 --- a/src/providers/simplex/simplex.ts +++ b/src/providers/simplex/simplex.ts @@ -213,6 +213,11 @@ export class SimplexProvider { .toFixed(2); } + public checkSimplexCoin(coin: string): string { + if (coin == 'PAX') return 'USDP'; + return coin; + } + public async simplexPaymentRequest( wallet, address: string, @@ -245,11 +250,11 @@ export class SimplexProvider { amount: quoteData.fiatTotalAmount }, requested_digital_amount: { - currency: wallet.coin.toUpperCase(), + currency: this.checkSimplexCoin(wallet.coin.toUpperCase()), amount: quoteData.cryptoAmount }, destination_wallet: { - currency: wallet.coin.toUpperCase(), + currency: this.checkSimplexCoin(wallet.coin.toUpperCase()), address, tag: '' },