fix lint test
This commit is contained in:
parent
bf70685035
commit
75ed7e033e
|
@ -1,6 +1,7 @@
|
|||
const Component = require('react').Component
|
||||
const h = require('react-hyperscript')
|
||||
const connect = require('react-redux').connect
|
||||
import PropTypes from 'prop-types'
|
||||
const actions = require('../../ui/app/actions')
|
||||
const LoadingIndicator = require('./components/loading')
|
||||
const Web3 = require('web3')
|
||||
|
@ -22,6 +23,10 @@ class ConfigScreen extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
static propTypes = {
|
||||
dispatch: PropTypes.func,
|
||||
}
|
||||
|
||||
render () {
|
||||
const state = this.props
|
||||
const metamaskState = state.metamask
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -143,7 +143,6 @@
|
|||
"gulp-autoprefixer": "^5.0.0",
|
||||
"gulp-sass": "^4.0.0",
|
||||
"human-standard-token-abi": "^2.0.0",
|
||||
"i": "^0.3.6",
|
||||
"idb-global": "^2.1.0",
|
||||
"iframe-stream": "^3.0.0",
|
||||
"inject-css": "^0.1.1",
|
||||
|
@ -158,7 +157,6 @@
|
|||
"metamask-inpage-provider": "^1.2.2",
|
||||
"mkdirp": "^0.5.1",
|
||||
"multihashes": "^0.4.12",
|
||||
"npm": "^6.9.0",
|
||||
"number-to-bn": "^1.7.0",
|
||||
"obj-multiplex": "^1.0.0",
|
||||
"obs-store": "^3.0.2",
|
||||
|
|
|
@ -2,6 +2,7 @@ import React from 'react'
|
|||
import assert from 'assert'
|
||||
|
||||
import additions from 'react-testutils-additions'
|
||||
import TestRenderer from 'react-test-renderer'
|
||||
import ReactTestUtils from 'react-dom/test-utils'
|
||||
import { BN } from 'ethereumjs-util'
|
||||
|
||||
|
@ -9,7 +10,6 @@ import BnInput from '../../../old-ui/app/components/bn-as-decimal-input'
|
|||
|
||||
describe('BnInput', function () {
|
||||
it('can tolerate a gas decimal number at a high precision', function (done) {
|
||||
// const renderer = ReactTestUtils.createRenderer()
|
||||
|
||||
let valueStr = '20'
|
||||
while (valueStr.length < 20) {
|
||||
|
@ -40,7 +40,7 @@ describe('BnInput', function () {
|
|||
onChange,
|
||||
}}/>
|
||||
const component = additions.renderIntoDocument(inputComponent)
|
||||
ReactTestUtils.mockComponent(inputComponent)
|
||||
TestRenderer.create(inputComponent)
|
||||
const input = additions.find(component, 'input.hex-input')[0]
|
||||
ReactTestUtils.Simulate.change(input, { preventDefault () {}, target: {
|
||||
value: inputStr,
|
||||
|
@ -49,7 +49,6 @@ describe('BnInput', function () {
|
|||
})
|
||||
|
||||
it('can tolerate wei precision', function (done) {
|
||||
// const renderer = ReactTestUtils.createRenderer()
|
||||
|
||||
const valueStr = '1000000000'
|
||||
|
||||
|
@ -64,21 +63,20 @@ describe('BnInput', function () {
|
|||
const precision = 9 // gwei precision
|
||||
const scale = 9
|
||||
|
||||
const props = {
|
||||
const inputComponent = <BnInput {...{
|
||||
value,
|
||||
scale,
|
||||
precision,
|
||||
onChange: (newBn) => {
|
||||
assert.equal(newBn.toString(), target.toString(), 'should tolerate increase')
|
||||
const reInput = BnInput.downsize(newBn.toString(), 9, 9)
|
||||
const reInput = this.downsize(newBn.toString(), 9, 9)
|
||||
assert.equal(reInput.toString(), inputStr, 'should tolerate increase')
|
||||
done()
|
||||
},
|
||||
}
|
||||
}}/>
|
||||
|
||||
const inputComponent = <BnInput {...{props}}/>
|
||||
const component = additions.renderIntoDocument(inputComponent)
|
||||
ReactTestUtils.mockComponent(inputComponent)
|
||||
TestRenderer.create(inputComponent)
|
||||
const input = additions.find(component, 'input.hex-input')[0]
|
||||
ReactTestUtils.Simulate.change(input, { preventDefault () {}, target: {
|
||||
value: inputStr,
|
||||
|
|
|
@ -64,7 +64,7 @@ const accountModalStyle = {
|
|||
},
|
||||
laptopModalStyle: {
|
||||
width: '360px',
|
||||
top: 'calc(33% + 45px)',
|
||||
// top: 'calc(33% + 45px)',
|
||||
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
borderRadius: '4px',
|
||||
top: '10%',
|
||||
|
@ -155,7 +155,7 @@ const MODALS = {
|
|||
},
|
||||
laptopModalStyle: {
|
||||
width: '375px',
|
||||
top: 'calc(30% + 10px)',
|
||||
// top: 'calc(30% + 10px)',
|
||||
top: '10%',
|
||||
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
transform: 'none',
|
||||
|
@ -271,7 +271,7 @@ const MODALS = {
|
|||
},
|
||||
laptopModalStyle: {
|
||||
width: '449px',
|
||||
top: 'calc(33% + 45px)',
|
||||
// top: 'calc(33% + 45px)',
|
||||
top: '10%',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
|
|
Loading…
Reference in New Issue