mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
Cast rateId as optional String for calculateAmount for ChangeNow api. (#612)
This commit is contained in:
@@ -232,7 +232,7 @@ class ChangeNowExchangeProvider extends ExchangeProvider {
|
||||
final responseJSON = json.decode(response.body) as Map<String, dynamic>;
|
||||
final fromAmount = double.parse(responseJSON['fromAmount'].toString());
|
||||
final toAmount = double.parse(responseJSON['toAmount'].toString());
|
||||
final rateId = responseJSON['rateId'] as String ?? '';
|
||||
final rateId = responseJSON['rateId'] as String? ?? '';
|
||||
|
||||
if (rateId.isNotEmpty) {
|
||||
_lastUsedRateId = rateId;
|
||||
|
||||
Reference in New Issue
Block a user