iotex-desktop-wallet
iotex-desktop-wallet copied to clipboard
when lock wallet on ioPayDesktop, dapp can still read wallet from ws. we should lock ws too.
repo steps:
- open https://iotex-dapp-sample.herokuapp.com/ or run this sample locally.
- unlock a wallet and make sure dapp-sample connected
- lock wallet (switch wallet)
- refresh dapp-sample. the dapp-sample can still connect.
we should resolve it by steps:
- renderer process should:
window['closeWss'] = () => ipcRederer.send('closeEvent');
-
main process should listen
ipcMain.on(
closeEvent)
andWsInstance.disconnect()
; -
in react state change:
window.closeWss()
;