Fix: app crashing when safe address is null (#947)

* - Fixs non null check on notificationsMiddleware.ts

* - Fixs non null check on notificationsMiddleware.ts

* - Removes yarn.lock changes
This commit is contained in:
Agustin Pane 2020-05-21 14:57:03 -03:00 committed by GitHub
parent d9e62adc26
commit 7cc6349785
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -152,7 +152,11 @@ const notificationsMiddleware = (store) => (next) => async (action) => {
} }
case ADD_SAFE: { case ADD_SAFE: {
const state = store.getState() const state = store.getState()
const currentSafeAddress = safeParamAddressFromStateSelector(state) const { safe } = action.payload
const currentSafeAddress = safeParamAddressFromStateSelector(state) || safe.address
if (!currentSafeAddress) {
break
}
const isUserOwner = grantedSelector(state) const isUserOwner = grantedSelector(state)
const { needUpdate } = await getSafeVersionInfo(currentSafeAddress) const { needUpdate } = await getSafeVersionInfo(currentSafeAddress)