init state provider fix

This commit is contained in:
julian 2024-05-08 10:58:14 -06:00
parent 9ff14ea471
commit 8a076a8d5b

View file

@ -170,7 +170,9 @@ class _WalletViewState extends ConsumerState<WalletView> {
final wallet = ref.read(pWallets).getWallet(walletId);
coin = wallet.info.coin;
ref.read(currentWalletIdProvider.notifier).state = wallet.walletId;
WidgetsBinding.instance.addPostFrameCallback((_) {
ref.read(currentWalletIdProvider.notifier).state = wallet.walletId;
});
if (!wallet.shouldAutoSync) {
// enable auto sync if it wasn't enabled when loading wallet