Merge pull request #1585 from MetaMask/t-lint

Lint Fixes
feature/default_network_editable
Frankie 8 years ago committed by GitHub
commit fe87a908ff
  1. 4
      app/scripts/lib/migrator/index.js
  2. 2
      test/unit/components/bn-as-decimal-input-test.js
  3. 3
      test/unit/components/pending-tx-test.js
  4. 1
      test/unit/explorer-link-test.js
  5. 6
      test/unit/network-contoller-test.js
  6. 1
      test/unit/tx-controller-test.js

@ -14,8 +14,8 @@ class Migrator {
async migrateData (versionedData = this.generateInitialState()) {
const pendingMigrations = this.migrations.filter(migrationIsPending)
for (let index in pendingMigrations) {
let migration = pendingMigrations[index]
for (const index in pendingMigrations) {
const migration = pendingMigrations[index]
versionedData = await migration.migrate(versionedData)
if (!versionedData.data) throw new Error('Migrator - migration returned empty data')
if (versionedData.version !== undefined && versionedData.meta.version !== migration.version) throw new Error('Migrator - Migration did not update version number correctly')

@ -18,7 +18,7 @@ describe('BnInput', function () {
}
const value = new BN(valueStr, 10)
let inputStr = '2.3'
const inputStr = '2.3'
let targetStr = '23'
while (targetStr.length < 19) {

@ -31,7 +31,6 @@ describe('PendingTx', function () {
it('should use updated values when edited.', function (done) {
const renderer = ReactTestUtils.createRenderer()
const newGasPrice = '0x77359400'
@ -40,7 +39,6 @@ describe('PendingTx', function () {
accounts: identities,
txData,
sendTransaction: (txMeta, event) => {
// Assert changes:
const result = ethUtil.addHexPrefix(txMeta.txParams.gasPrice)
assert.notEqual(result, gasPrice, 'gas price should change')
@ -70,7 +68,6 @@ describe('PendingTx', function () {
ReactTestUtils.Simulate.submit(form, { preventDefault () {}, target: { checkValidity () {
return true
} } })
} catch (e) {
console.log('WHAAAA')
console.error(e)

@ -11,5 +11,4 @@ describe('explorer-link', function () {
var result = linkGen('hash', '42')
assert.notEqual(result.indexOf('kovan'), -1, 'kovan injected')
})
})

@ -37,7 +37,7 @@ describe('# Network Controller', function () {
})
describe('#getNetworkState', function () {
it('should return loading when new', function () {
let networkState = networkController.getNetworkState()
const networkState = networkController.getNetworkState()
assert.equal(networkState, 'loading', 'network is loading')
})
})
@ -45,14 +45,14 @@ describe('# Network Controller', function () {
describe('#setNetworkState', function () {
it('should update the network', function () {
networkController.setNetworkState(1)
let networkState = networkController.getNetworkState()
const networkState = networkController.getNetworkState()
assert.equal(networkState, 1, 'network is 1')
})
})
describe('#getRpcAddressForType', function () {
it('should return the right rpc address', function () {
let rpcTarget = networkController.getRpcAddressForType('mainnet')
const rpcTarget = networkController.getRpcAddressForType('mainnet')
assert.equal(rpcTarget, 'https://mainnet.infura.io/metamask', 'returns the right rpcAddress')
})
})

@ -320,5 +320,4 @@ describe('Transaction Controller', function () {
})
})
})
})

Loading…
Cancel
Save