1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Fix MetaMaskController untrusted tests network access (#8549)

This commit is contained in:
Whymarrh Whitby 2020-05-07 18:51:47 -02:30 committed by GitHub
parent 7a6b2594f6
commit 84c4b72412
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,6 @@ import { cloneDeep } from 'lodash'
import nock from 'nock'
import ethUtil from 'ethereumjs-util'
import { obj as createThoughStream } from 'through2'
import blacklistJSON from 'eth-phishing-detect/src/config'
import firstTimeState from '../../localhostState'
import createTxMeta from '../../../lib/createTxMeta'
import EthQuery from 'eth-query'
@ -59,11 +58,6 @@ describe('MetaMaskController', function () {
beforeEach(function () {
nock('https://api.infura.io')
.persist()
.get('/v2/blacklist')
.reply(200, blacklistJSON)
nock('https://api.infura.io')
.get('/v1/ticker/ethusd')
.reply(200, '{"base": "ETH", "quote": "USD", "bid": 288.45, "ask": 288.46, "volume": 112888.17569277, "exchange": "bitfinex", "total_volume": 272175.00106721005, "num_exchanges": 8, "timestamp": 1506444677}')
@ -803,12 +797,11 @@ describe('MetaMaskController', function () {
})
describe('#setupUntrustedCommunication', function () {
it('sets up phishing stream for untrusted communication ', async function () {
it('sets up phishing stream for untrusted communication', async function () {
const phishingMessageSender = {
url: 'http://myethereumwalletntw.com',
tab: {},
}
await metamaskController.phishingController.updatePhishingLists()
const { promise, resolve } = deferredPromise()
const streamTest = createThoughStream((chunk, _, cb) => {