mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-24 10:54:13 +01:00
- Add whether this provide supports fixed rate or not
- Fix Change now fixed rate exchange due to wrong rate id
This commit is contained in:
@@ -306,10 +306,11 @@ abstract class ExchangeViewModelBase with Store {
|
||||
}
|
||||
|
||||
Future<void> _calculateBestRate() async {
|
||||
final amount = double.tryParse(depositAmount) ?? 1;
|
||||
final amount = double.tryParse(isFixedRateMode ? receiveAmount : depositAmount) ?? 1;
|
||||
|
||||
final result = await Future.wait<double>(
|
||||
_tradeAvailableProviders
|
||||
.where((element) => element.supportsFixedRate)
|
||||
.map((element) => element.calculateAmount(
|
||||
from: depositCurrency,
|
||||
to: receiveCurrency,
|
||||
|
||||
Reference in New Issue
Block a user