mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
swap from within wallet fix if started in incognito mode
This commit is contained in:
parent
f0d414bc86
commit
7e6f0f18cd
1 changed files with 18 additions and 3 deletions
|
@ -270,11 +270,26 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
final currency = await showLoading(
|
Future<Currency?> _future;
|
||||||
whileFuture: ExchangeDataLoadingService.instance.isar.currencies
|
try {
|
||||||
|
_future = ExchangeDataLoadingService.instance.isar.currencies
|
||||||
.where()
|
.where()
|
||||||
.tickerEqualToAnyExchangeNameName(coin.ticker)
|
.tickerEqualToAnyExchangeNameName(coin.ticker)
|
||||||
.findFirst(),
|
.findFirst();
|
||||||
|
} catch (_) {
|
||||||
|
_future = ExchangeDataLoadingService.instance
|
||||||
|
.init()
|
||||||
|
.then(
|
||||||
|
(_) => ExchangeDataLoadingService.instance.loadAll(),
|
||||||
|
)
|
||||||
|
.then((_) => ExchangeDataLoadingService.instance.isar.currencies
|
||||||
|
.where()
|
||||||
|
.tickerEqualToAnyExchangeNameName(coin.ticker)
|
||||||
|
.findFirst());
|
||||||
|
}
|
||||||
|
|
||||||
|
final currency = await showLoading(
|
||||||
|
whileFuture: _future,
|
||||||
context: context,
|
context: context,
|
||||||
message: "Loading...",
|
message: "Loading...",
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue