From da2f1c62f56de919658170af1f8fae58eba3ee47 Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Wed, 26 Jul 2023 18:48:53 +0200 Subject: [PATCH] CW-443 Use networkWallets on OnRamper (#1012) * CW-443 Use networkWallets on OnRamper * CW-443 Normalize XMR --- lib/buy/onramper/onramper_buy_provider.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/buy/onramper/onramper_buy_provider.dart b/lib/buy/onramper/onramper_buy_provider.dart index 33c63df61..68be59f4e 100644 --- a/lib/buy/onramper/onramper_buy_provider.dart +++ b/lib/buy/onramper/onramper_buy_provider.dart @@ -20,6 +20,8 @@ class OnRamperBuyProvider { switch (_wallet.currency) { case CryptoCurrency.ltc: return "LTC_LITECOIN"; + case CryptoCurrency.xmr: + return "XMR_MONERO"; default: return _wallet.currency.title; } @@ -60,11 +62,12 @@ class OnRamperBuyProvider { break; } + final networkName = _wallet.currency.fullName?.toUpperCase().replaceAll(" ", ""); return Uri.https(_baseUrl, '', { 'apiKey': _apiKey, 'defaultCrypto': _normalizeCryptoCurrency, - 'wallets': '${_wallet.currency.title}:${_wallet.walletAddresses.address}', + 'networkWallets': '${networkName}:${_wallet.walletAddresses.address}', 'supportSell': "false", 'supportSwap': "false", 'primaryColor': primaryColor,