Skip to content

Commit

Permalink
Merge pull request #12001 from Gamboster/ref/simplexUseUsdpForPax
Browse files Browse the repository at this point in the history
Ref: Use USDP for Simplex instead PAX
  • Loading branch information
cmgustavo committed Jan 21, 2022
2 parents f05ef1a + 64ac9fa commit 001c06c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/pages/buy-crypto/crypto-offers/crypto-offers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 7 additions & 2 deletions src/providers/simplex/simplex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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: ''
},
Expand Down

0 comments on commit 001c06c

Please sign in to comment.