Show warning message when metamask is locked

This commit is contained in:
apanizo 2018-10-10 16:25:34 +02:00
parent 1d0fa2ca63
commit 6de2ad13f8
1 changed files with 3 additions and 3 deletions

View File

@ -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)