Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_parseResponse (response) {
const data = super._parseResponse(response)
return formatEthResponse(data)
}
if (error) {
reject(new WalletError(error.toString(), error))
return
}
if (!data) {
reject(new WalletError('Metamask response was empty'))
return
}
if (typeof data.result === 'undefined') {
reject(new WalletError('Metamask response was empty'))
return
}
const formattedResult = formatEthResponse(data.result)
resolve(formattedResult)
})
})