Skip to content

Commit

Permalink
fix screen id typo and clear cache error because wrapper = null (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo authored Aug 9, 2021
1 parent b4789c4 commit 254ed8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/AccountModule/AccountModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import ConnectedScreen from './AccountModuleConnectedScreen'
import ErrorScreen from './AccountModuleErrorScreen'

const SCREEN_ID = Object.freeze({
providers: WALLET_STATUS.providerId,
providers: WALLET_STATUS.providers,
connecting: WALLET_STATUS.connecting,
connected: WALLET_STATUS.connected,
error: WALLET_STATUS.error,
Expand Down
4 changes: 3 additions & 1 deletion src/components/GlobalPreferences/Network/Network.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ const useNetwork = wrapper => {
window.location.reload()
}, [ethNode, ipfsGateway, networkType])
const handleClearCache = useCallback(async () => {
await wrapper.cache.clear()
if (wrapper) {
await wrapper.cache.clear()
}
window.localStorage.clear()
window.location.reload()
}, [wrapper])
Expand Down

0 comments on commit 254ed8f

Please sign in to comment.