substrate-light-ui
substrate-light-ui copied to clipboard
Handle unsubscribes for extension's wasm node
https://github.com/paritytech/substrate-light-ui/blob/fccb56374ee89e2963687fd99286085ba03ecba0/packages/extension-app/src/background/index.ts#L68-L78
We subscribe to the light node, but when the port closes, we don't actually call unsubscribe.
I guess we would need to store all the subscriptionIds, and on port.disconnect, call state_unsubscribeStorage() on all those ids.