mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-04 12:34:14 +01:00
Cw 188 fix grey screen (#537)
* Fix late initialization exception when using late with Mobx Fix index out of range exception in picker * Add haven account list class to configure file to be generated in haven.dart
This commit is contained in:
@@ -9,22 +9,21 @@ class BuyAmountViewModel = BuyAmountViewModelBase with _$BuyAmountViewModel;
|
||||
|
||||
abstract class BuyAmountViewModelBase with Store {
|
||||
BuyAmountViewModelBase()
|
||||
: amount = '' {
|
||||
: amount = '',
|
||||
fiatCurrency = FiatCurrency.usd {
|
||||
int selectedIndex = FiatCurrency.currenciesAvailableToBuyWith
|
||||
.indexOf(getIt.get<SettingsStore>().fiatCurrency);
|
||||
|
||||
if (selectedIndex == -1) {
|
||||
selectedIndex = FiatCurrency.currenciesAvailableToBuyWith
|
||||
.indexOf(FiatCurrency.usd);
|
||||
if (selectedIndex != -1) {
|
||||
fiatCurrency = FiatCurrency.currenciesAvailableToBuyWith[selectedIndex];
|
||||
}
|
||||
fiatCurrency = FiatCurrency.currenciesAvailableToBuyWith[selectedIndex];
|
||||
}
|
||||
|
||||
@observable
|
||||
String amount;
|
||||
|
||||
@observable
|
||||
late FiatCurrency fiatCurrency;
|
||||
FiatCurrency fiatCurrency;
|
||||
|
||||
@computed
|
||||
double get doubleAmount {
|
||||
|
||||
Reference in New Issue
Block a user