mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
bandaid fix
This commit is contained in:
parent
1fb62d3e54
commit
0ce0b1d30e
2 changed files with 11 additions and 0 deletions
|
@ -107,6 +107,7 @@ class _ExchangeCurrencySelectionViewState
|
|||
if (widget.pairedTicker == null) {
|
||||
return await _getCurrencies();
|
||||
}
|
||||
await ExchangeDataLoadingService.instance.initDB();
|
||||
List<Currency> currencies = await ExchangeDataLoadingService
|
||||
.instance.isar.currencies
|
||||
.where()
|
||||
|
@ -153,6 +154,7 @@ class _ExchangeCurrencySelectionViewState
|
|||
}
|
||||
|
||||
Future<List<Currency>> _getCurrencies() async {
|
||||
await ExchangeDataLoadingService.instance.initDB();
|
||||
final currencies = await ExchangeDataLoadingService.instance.isar.currencies
|
||||
.where()
|
||||
.filter()
|
||||
|
|
|
@ -196,6 +196,9 @@ class ExchangeDataLoadingService {
|
|||
}
|
||||
|
||||
Future<void> _loadChangeNowCurrencies() async {
|
||||
if (_isar == null) {
|
||||
await initDB();
|
||||
}
|
||||
final exchange = ChangeNowExchange.instance;
|
||||
final responseCurrencies = await exchange.getAllCurrencies(false);
|
||||
if (responseCurrencies.value != null) {
|
||||
|
@ -325,6 +328,9 @@ class ExchangeDataLoadingService {
|
|||
// }
|
||||
|
||||
Future<void> loadMajesticBankCurrencies() async {
|
||||
if (_isar == null) {
|
||||
await initDB();
|
||||
}
|
||||
final exchange = MajesticBankExchange.instance;
|
||||
final responseCurrencies = await exchange.getAllCurrencies(false);
|
||||
|
||||
|
@ -347,6 +353,9 @@ class ExchangeDataLoadingService {
|
|||
}
|
||||
|
||||
Future<void> loadTrocadorCurrencies() async {
|
||||
if (_isar == null) {
|
||||
await initDB();
|
||||
}
|
||||
final exchange = TrocadorExchange.instance;
|
||||
final responseCurrencies = await exchange.getAllCurrencies(false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue