substrate-light-ui icon indicating copy to clipboard operation
substrate-light-ui copied to clipboard

Handle unsubscribes for extension's wasm node

Open amaury1093 opened this issue 5 years ago • 0 comments

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.

amaury1093 avatar Feb 05 '20 17:02 amaury1093