Fixate decimal points to 2 ()

This commit is contained in:
Omar Hatem 2025-03-06 01:41:23 +02:00 committed by GitHub
parent f28af937ec
commit e596c19b40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -168,8 +168,7 @@ class MoonPayProvider extends BuyProvider {
final params = {
'baseCurrencyCode': baseCurrencyCode,
'baseCurrencyAmount': amount.toString(),
'amount': amount.toString(),
'baseCurrencyAmount': amount.toStringAsFixed(2),
'paymentMethod': paymentMethod,
'areFeesIncluded': 'false',
'apiKey': _apiKey
@ -232,7 +231,7 @@ class MoonPayProvider extends BuyProvider {
? '#${Palette.blueCraiola.value.toRadixString(16).substring(2, 8)}'
: '#${Palette.moderateSlateBlue.value.toRadixString(16).substring(2, 8)}',
'baseCurrencyCode': isBuyAction ? quote.fiatCurrency.name : quote.cryptoCurrency.name,
'baseCurrencyAmount': amount.toString(),
'baseCurrencyAmount': amount.toStringAsFixed(2),
'walletAddress': cryptoCurrencyAddress,
'lockAmount': 'false',
'showAllCurrencies': 'false',