FuelLabs / fuels-wallet

💳 The official Fuel wallet.
https://wallet.fuel.network
Apache License 2.0
919 stars 389 forks source link

Fix storybook for DApps screens #305

Open luizstacio opened 1 year ago

luizstacio commented 1 year ago

After integrating the DApps screens with the SDK, the storybook for these screens stopped working.

The reason for this was challenging to mock the requirements for each screen.

Screens to be fixed;

pedronauck commented 1 year ago

@luizstacio All DApp screens are very coupled with the SDK, I guess we should decouple them by using the store as a trigger. By using the store, we could trigger internal methods of them inside the story loader or even useEffect. Right now, isn't possible to simulate initial triggers inside the related machines because all screens are very dependent of SDK triggers inside their hooks.

My idea is being able to do something like this:

store.requestTransaction({ input })
store.requestConnect({ input })
store.signMessage({})