1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

Ensure Etherscan result is valid before reading it (#7426)

This commit is contained in:
Whymarrh Whitby 2019-11-15 13:47:42 -03:30 committed by GitHub
parent 5e84c5055c
commit 00e43d0b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,7 +208,7 @@ class IncomingTransactionsController {
}
_processTxFetchResponse ({ status, result = [], address, currentNetworkID }) {
if (status !== '0' && result.length > 0) {
if (status === '1' && Array.isArray(result) && result.length > 0) {
const remoteTxList = {}
const remoteTxs = []
result.forEach((tx) => {