extension icon indicating copy to clipboard operation
extension copied to clipboard

refactor: network state to redux

Open fbwoolf opened this issue 1 year ago • 3 comments

Try out this version of the Hiro Wallet - download extension builds.

This PR proposes moving networks state from jotai to redux, except for one derived network atom currentNetworkAtom which can likely also be refactored out later.

  • Removed: useUpdateNetworkState, useUpdateNetworkKey, useSetTransactionRequestAtom, and useSetAtomSignatureRequestToken
  • Added a networks slice which is persisted
  • Sending request network id thru the url params from background script

cc/ @kyranjamie @fbwoolf

fbwoolf avatar Sep 13 '22 21:09 fbwoolf

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
stacks-wallet-web ✅ Ready (Inspect) Visit Preview Sep 24, 2022 at 2:52PM (UTC)

vercel[bot] avatar Sep 13 '22 21:09 vercel[bot]

@kyranjamie I moved the req network id to the background script like we discussed ...and removed the request slice. All seems to be working fine so I think this is ready to review again when you are free. Thx.

fbwoolf avatar Sep 15 '22 14:09 fbwoolf

@kyranjamie hoping this is ready now, but let me know what you think. I would like to make sure it gets merged before anything else major changes on dev. There are quite a few file changes here.

fbwoolf avatar Sep 17 '22 19:09 fbwoolf