Skip to content

Commit

Permalink
Skip onramper transaction page and go directly to provider
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarHatem28 committed Jan 5, 2025
1 parent d1c45a5 commit 474c6bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/buy/onramper/onramper_buy_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ class OnRamperBuyProvider extends BuyProvider {
required String cryptoCurrencyAddress,
String? countryCode}) async {
final actionType = isBuyAction ? 'buy' : 'sell';
final prefix = actionType == 'sell' ? actionType + '_' : '';

final primaryColor = getColorStr(Theme.of(context).primaryColor);
final secondaryColor = getColorStr(Theme.of(context).colorScheme.background);
Expand All @@ -216,11 +215,12 @@ class OnRamperBuyProvider extends BuyProvider {

final uri = Uri.https(_baseUrl, '', {
'apiKey': _apiKey,
'mode': actionType,
'${prefix}defaultFiat': quote.fiatCurrency.name,
'${prefix}defaultCrypto': defaultCrypto,
'${prefix}defaultAmount': amount.toString(),
if (paymentMethod != null) '${prefix}defaultPaymentMethod': paymentMethod,
'txnType': actionType,
'txnFiat': quote.fiatCurrency.name,
'txnCrypto': defaultCrypto,
'txnAmount': amount.toString(),
'skipTransactionScreen': "true",
if (paymentMethod != null) 'txnPaymentMethod': paymentMethod,
'onlyOnramps': quote.rampId,
'networkWallets': '$defaultCrypto:$cryptoCurrencyAddress',
'walletAddress': cryptoCurrencyAddress,
Expand Down

0 comments on commit 474c6bb

Please sign in to comment.