# How I Fixed Wallet State Issues Using FCL with Flow JavaScript SDK

**URL:** <https://forum.flow.com/t/how-i-fixed-wallet-state-issues-using-fcl-with-flow-javascript-sdk/8085>\
**Category:** Flow JavaScript SDK\
**Created:** [July 27, 2025, 2:59pm UTC](https://forum.flow.com/t/how-i-fixed-wallet-state-issues-using-fcl-with-flow-javascript-sdk/8085 "2025-07-27T14:59:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tisabib](https://avatars.discourse-cdn.com/v4/letter/t/58f4c7/32.png) [@tisabib](https://forum.flow.com/u/tisabib)\
**Post date:** [July 27, 2025, 2:59pm UTC](https://forum.flow.com/t/how-i-fixed-wallet-state-issues-using-fcl-with-flow-javascript-sdk/8085/1 "2025-07-27T14:59:35Z")

</div>

Hello

I ran into an issue while using the Flow JavaScript SDK (FCL) in my project. After logging in with a wallet; everything worked fine until the user refreshed the page. 😇The wallet state didn’t persist properly & `fcl.currentUser()` would sometimes return `null`; breaking parts of the app. 🙂

To fix this; I created a small wrapper around `fcl.currentUser().subscribe()` to manage the wallet state manually on page load. 🙃This made the app much more stable. If you are facing something similar; the [FCL Authentication Guide](https://developers.flow.com/tools/clients/fcl-js/authentication) helped me a lot.

Also; for anyone new and wondering [what is javascript](https://www.igmguru.com/blog/what-is-javascript) it’s the programming language used to build interactive websites, and in this case, it’s what we use to connect to Flow wallets using FCL. 😇

Hope this helps someone!

Thank you !! 🙂

---

<div class="post-metadata">

**Author:** ![discourse\_ai\_spam](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@discourse\_ai\_spam](https://forum.flow.com/u/discourse_ai_spam)\
**Post date:** [July 27, 2025, 2:59pm UTC](https://forum.flow.com/t/how-i-fixed-wallet-state-issues-using-fcl-with-flow-javascript-sdk/8085/2 "2025-07-27T14:59:39Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/flow/original/1X/4bd0631f3e6f9b6541c85664b066e30c0887200e.png) [@system](https://forum.flow.com/u/system)\
**Post date:** [July 29, 2025, 3:09pm UTC](https://forum.flow.com/t/how-i-fixed-wallet-state-issues-using-fcl-with-flow-javascript-sdk/8085/3 "2025-07-29T15:09:26Z")

</div>


