diff --git a/src/App.js b/src/App.js index b590e08d69..695b12889a 100644 --- a/src/App.js +++ b/src/App.js @@ -7,11 +7,6 @@ function App() { const openModal = () => { p.onConnect() } - const clearLocalStorage = () => { - localStorage.clear() - document.getElementById('accounts').innerHTML = '' - document.getElementById('chain').innerHTML = '' - } p.internalEvents.on('accountsChanged', (accounts) => { document.getElementById('accounts').innerHTML = JSON.stringify(accounts) }) @@ -19,11 +14,15 @@ function App() { p.internalEvents.on('chainChanged', (chain) => { document.getElementById('chain').innerHTML = chain }) + + p.internalEvents.on('disconnect', (chain) => { + document.getElementById('accounts').innerHTML = '' + document.getElementById('chain').innerHTML = '' + }) return (