diff --git a/app/src/main/java/com/alphawallet/app/ui/WalletFragment.java b/app/src/main/java/com/alphawallet/app/ui/WalletFragment.java index ddcd8df69..673b66b40 100644 --- a/app/src/main/java/com/alphawallet/app/ui/WalletFragment.java +++ b/app/src/main/java/com/alphawallet/app/ui/WalletFragment.java @@ -117,8 +117,6 @@ public class WalletFragment extends BaseFragment implements isVisible = true; - setImportToken(); - initList(); initTabLayout(view); @@ -127,6 +125,8 @@ public class WalletFragment extends BaseFragment implements initNotificationView(view); + setImportToken(); + return view; } @@ -328,7 +328,7 @@ public class WalletFragment extends BaseFragment implements { ContractLocator importToken = viewModel.getAssetDefinitionService().getHoldingContract(importFileName); if (importToken != null) Toast.makeText(getContext(), importToken.name, Toast.LENGTH_LONG).show(); - if (importToken != null) adapter.setScrollToken(importToken); + if (importToken != null && adapter != null) adapter.setScrollToken(importToken); importFileName = null; } }