mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
refresh button null error fix
This commit is contained in:
parent
6771e39e8a
commit
b6f58e4ce1
1 changed files with 13 additions and 1 deletions
|
@ -66,7 +66,19 @@ class _RefreshButtonState extends ConsumerState<WalletRefreshButton>
|
|||
eventBus.on<WalletSyncStatusChangedEvent>().listen(
|
||||
(event) async {
|
||||
if (event.walletId == widget.walletId &&
|
||||
widget.tokenContractAddress == null ||
|
||||
widget.tokenContractAddress == null) {
|
||||
switch (event.newStatus) {
|
||||
case WalletSyncStatus.unableToSync:
|
||||
_spinController?.stop();
|
||||
break;
|
||||
case WalletSyncStatus.synced:
|
||||
_spinController?.stop();
|
||||
break;
|
||||
case WalletSyncStatus.syncing:
|
||||
unawaited(_spinController?.repeat());
|
||||
break;
|
||||
}
|
||||
} else if (widget.tokenContractAddress != null &&
|
||||
event.walletId == widget.walletId + widget.tokenContractAddress!) {
|
||||
switch (event.newStatus) {
|
||||
case WalletSyncStatus.unableToSync:
|
||||
|
|
Loading…
Reference in a new issue