Show warning message when metamask is locked
This commit is contained in:
parent
1d0fa2ca63
commit
6de2ad13f8
|
@ -23,9 +23,9 @@ const UNLOCK_MSG = 'Unlock your wallet to connect'
|
|||
export default (openSnackbar: Function) => async (dispatch: ReduxDispatch<*>) => {
|
||||
const response: ProviderProps = await getProviderInfo()
|
||||
|
||||
const { loaded } = response
|
||||
const msg = loaded ? SUCCESS_MSG : UNLOCK_MSG
|
||||
const variant = loaded ? 'success' : 'warning'
|
||||
const { available } = response
|
||||
const msg = available ? SUCCESS_MSG : UNLOCK_MSG
|
||||
const variant = available ? 'success' : 'warning'
|
||||
openSnackbar(msg, variant)
|
||||
|
||||
processProviderResponse(dispatch, response)
|
||||
|
|
Loading…
Reference in New Issue