Cast rateId as optional String for calculateAmount for ChangeNow api. (#612)
mkyq committed
Nov 8, 2022 at 15:57 UTC
d99aac9d98085d1c449c3ab1844755a3fac12c38
1 file changed
+1
-1
lib/exchange/changenow/changenow_exchange_provider.dart
+1
-1
@@ -232,7 +232,7 @@ class ChangeNowExchangeProvider extends ExchangeProvider {
232
final responseJSON = json.decode(response.body) as Map<String, dynamic>;
233
final fromAmount = double.parse(responseJSON['fromAmount'].toString());
234
final toAmount = double.parse(responseJSON['toAmount'].toString());
235
- final rateId = responseJSON['rateId'] as String ?? '';
235
+ final rateId = responseJSON['rateId'] as String? ?? '';
236
237
if (rateId.isNotEmpty) {
238
_lastUsedRateId = rateId;