storacha-network / w3ui

👩‍🎤 Headless, type-safe, UI components for the next generation Web3.Storage APIs.
Other
63 stars 25 forks source link

chore: extract and test the datamodel logic from `Provider` #602

Closed travis closed 7 months ago

travis commented 7 months ago

One of the core goals here was to fix a bug where the client wouldn't get reset when servicePrincipal or connection changed. The easiest way to make sure this was tested was to extract all of the datamodel creation and management logic to a dedicated hook and test that.

Thanks to @gobengo for pointing out the bug and suggesting the fix: https://github.com/web3-storage/w3ui/pull/595#discussion_r1411060383