CW-443 Use networkWallets on OnRamper (#1012)

* CW-443 Use networkWallets on OnRamper

* CW-443 Normalize XMR
This commit is contained in:
Konstantin Ullrich 2023-07-26 18:48:53 +02:00 committed by GitHub
parent b2c8b32e49
commit da2f1c62f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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, '', <String, dynamic>{
'apiKey': _apiKey,
'defaultCrypto': _normalizeCryptoCurrency,
'wallets': '${_wallet.currency.title}:${_wallet.walletAddresses.address}',
'networkWallets': '${networkName}:${_wallet.walletAddresses.address}',
'supportSell': "false",
'supportSwap': "false",
'primaryColor': primaryColor,