Update dependencies (#72)

* Extracted common eslint devDependencies

* Applied prettier fixes for ui

* Extracted common mocha dependency

* Remove unused eslint plugins

* Prettier fix

* Updated dependency according to yarn audit

* Re-added eslint plugins

* Eslint plugins in one place

* Update dependencies failing on ci
This commit is contained in:
Przemyslaw Rzad 2019-05-25 13:27:52 +02:00 committed by GitHub
parent 94e923d965
commit be0b401885
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 2136 additions and 1825 deletions

@ -21,12 +21,5 @@
"node": ">=8.9" "node": ">=8.9"
}, },
"devDependencies": { "devDependencies": {
"eslint": "5.12.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-prettier": "^2.6.2",
"prettier": "^1.14.3"
} }
} }

@ -12,7 +12,6 @@
"dependencies": { "dependencies": {
"chalk": "^2.4.1", "chalk": "^2.4.1",
"dotenv": "^6.0.0", "dotenv": "^6.0.0",
"mocha": "^5.2.0",
"promise-retry": "^1.1.1", "promise-retry": "^1.1.1",
"shelljs": "^0.8.2", "shelljs": "^0.8.2",
"tree-kill": "^1.2.0", "tree-kill": "^1.2.0",

@ -40,16 +40,8 @@
"chai": "^4.1.2", "chai": "^4.1.2",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"concurrently": "^3.6.0", "concurrently": "^3.6.0",
"eslint": "5.12.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-prettier": "^2.6.0",
"mocha": "^5.2.0",
"ndjson": "^1.5.0", "ndjson": "^1.5.0",
"nyc": "^12.0.2", "nyc": "^12.0.2",
"prettier": "^1.12.1",
"proxyquire": "^2.0.1", "proxyquire": "^2.0.1",
"simple-statistics": "^6.1.0", "simple-statistics": "^6.1.0",
"sinon": "^6.1.0" "sinon": "^6.1.0"

@ -16,9 +16,7 @@ const readFile = (...paths) => {
function computeSignatureRequestStats(signatureRequests, senderHome) { function computeSignatureRequestStats(signatureRequests, senderHome) {
const processingLogs = signatureRequests.filter(x => x.eventTransactionHash) const processingLogs = signatureRequests.filter(x => x.eventTransactionHash)
const txSentMap = senderHome const txSentMap = senderHome.filter(x => x.eventTransactionHash).reduce((acc, x) => {
.filter(x => x.eventTransactionHash)
.reduce((acc, x) => {
acc[x.eventTransactionHash] = x acc[x.eventTransactionHash] = x
return acc return acc
}, {}) }, {})
@ -36,9 +34,7 @@ function computeSignatureRequestStats(signatureRequests, senderHome) {
function computeCollectedSignaturesStats(collectedSignatures, senderForeign) { function computeCollectedSignaturesStats(collectedSignatures, senderForeign) {
const processingLogs = collectedSignatures.filter(x => x.eventTransactionHash) const processingLogs = collectedSignatures.filter(x => x.eventTransactionHash)
const txSentMap = senderForeign const txSentMap = senderForeign.filter(x => x.eventTransactionHash).reduce((acc, x) => {
.filter(x => x.eventTransactionHash)
.reduce((acc, x) => {
acc[x.eventTransactionHash] = x acc[x.eventTransactionHash] = x
return acc return acc
}, {}) }, {})

@ -7,7 +7,20 @@
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"wsrun": "^3.6.5" "wsrun": "3.6.5",
"eslint-config-prettier": "3.1.0",
"eslint": "5.16.0",
"eslint-config-airbnb": "17.1.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-node": "7.0.1",
"eslint-plugin-prettier": "2.6.2",
"eslint-config-react-app": "^4.0.1",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-react-hooks": "^1.6.0",
"eslint-plugin-flowtype": "^3.8.1",
"prettier": "1.14.3",
"mocha": "^5.2.0"
}, },
"workspaces": [ "workspaces": [
"oracle", "oracle",

@ -3,9 +3,7 @@
"version": "0.0.1", "version": "0.0.1",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"devDependencies": { "devDependencies": {},
"mocha": "^5.1.1"
},
"scripts": { "scripts": {
"deploy": "node ./scripts/deploy.js" "deploy": "node ./scripts/deploy.js"
} }

@ -14,7 +14,6 @@
"gh-pages": "^1.1.0", "gh-pages": "^1.1.0",
"mobx": "^4.0.2", "mobx": "^4.0.2",
"mobx-react": "^5.0.0", "mobx-react": "^5.0.0",
"mocha": "^5.1.1",
"node-sass-chokidar": "^1.0.1", "node-sass-chokidar": "^1.0.1",
"numeral": "^2.0.6", "numeral": "^2.0.6",
"react": "^16.2.0", "react": "^16.2.0",
@ -24,7 +23,7 @@
"react-dom": "^16.2.0", "react-dom": "^16.2.0",
"react-router": "^4.3.1", "react-router": "^4.3.1",
"react-router-dom": "^4.2.2", "react-router-dom": "^4.2.2",
"react-scripts": "2.1.8", "react-scripts": "3.0.1",
"react-transition-group": "^2.2.1", "react-transition-group": "^2.2.1",
"selenium-webdriver": "^3.6.0", "selenium-webdriver": "^3.6.0",
"sweetalert": "^2.1.0", "sweetalert": "^2.1.0",
@ -49,20 +48,9 @@
"postinstall": "(cp lib/web3-eth/index.js ../node_modules/web3-eth/src && cp lib/web3-eth/index.js ./node_modules/web3-eth/src)" "postinstall": "(cp lib/web3-eth/index.js ../node_modules/web3-eth/src && cp lib/web3-eth/index.js ./node_modules/web3-eth/src)"
}, },
"devDependencies": { "devDependencies": {
"eslint": "5.12.0", "babel-eslint": "^10.0.1",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.1.0",
"eslint-config-react-app": "^4.0.1",
"eslint-plugin-flowtype": "^3.8.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-prettier": "^2.6.2",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-react-hooks": "^1.6.0",
"jest-dom": "^3.0.1", "jest-dom": "^3.0.1",
"nodemon": "^1.18.11", "nodemon": "^1.18.11",
"prettier": "^1.14.3",
"react-testing-library": "^5.4.4" "react-testing-library": "^5.4.4"
}, },
"browserslist": [ "browserslist": [

@ -17,14 +17,16 @@ export const Configuration = ({
/> />
<div className="separator" /> <div className="separator" />
<DataBlock description="Authorities" value={numeral(authorities).format('0')} type="" /> <DataBlock description="Authorities" value={numeral(authorities).format('0')} type="" />
{maxSingleDeposit && maxSingleDeposit !== '0' && <div className="separator" /> && ( {maxSingleDeposit &&
maxSingleDeposit !== '0' && <div className="separator" /> && (
<DataBlock <DataBlock
description="Max Single Deposit" description="Max Single Deposit"
value={numeral(maxSingleDeposit).format('0.00 a', Math.floor)} value={numeral(maxSingleDeposit).format('0.00 a', Math.floor)}
type={symbol} type={symbol}
/> />
)} )}
{maxSingleDeposit && maxSingleDeposit !== '0' && <div className="separator" /> && ( {maxSingleDeposit &&
maxSingleDeposit !== '0' && <div className="separator" /> && (
<DataBlock <DataBlock
description={`Remaining Daily ${symbol} Quota`} description={`Remaining Daily ${symbol} Quota`}
value={numeral(maxTotalBalance).format('0.00 a', Math.floor)} value={numeral(maxTotalBalance).format('0.00 a', Math.floor)}

@ -23,8 +23,7 @@ export const Disclaimer = ({ onConfirmation }) => (
{' '} {' '}
support page support page
</a> </a>
. .<br />
<br />
<br /> <br />
Use of this app and the TokenBridge is at your own risk. Users may experience unexpected Use of this app and the TokenBridge is at your own risk. Users may experience unexpected
delays, unexpected visual artifacts, unexpected loss of tokens or funds from improper app delays, unexpected visual artifacts, unexpected loss of tokens or funds from improper app

@ -16,9 +16,8 @@ export const FeeStatistics = ({ depositFeeCollected, withdrawFeeCollected }) =>
dataTestid="deposit-fees-block" dataTestid="deposit-fees-block"
/> />
)} )}
{depositFeeCollected.shouldDisplay && withdrawFeeCollected.shouldDisplay && ( {depositFeeCollected.shouldDisplay &&
<div className="separator" /> withdrawFeeCollected.shouldDisplay && <div className="separator" />}
)}
{withdrawFeeCollected.shouldDisplay && ( {withdrawFeeCollected.shouldDisplay && (
<DataBlock <DataBlock
description="Withdrawal Fees" description="Withdrawal Fees"

@ -1,11 +1,21 @@
import { action, observable } from 'mobx' import { action, observable } from 'mobx'
class AlertStore { class AlertStore {
@observable alerts = [] @observable
@observable showLoading = false alerts = []
@observable loadingStepIndex = -1
@observable blockConfirmations = 0 @observable
@observable showDailyQuotaInfo = false showLoading = false
@observable
loadingStepIndex = -1
@observable
blockConfirmations = 0
@observable
showDailyQuotaInfo = false
homeConnectionErrorSended = false homeConnectionErrorSended = false
foreignConnectionErrorSended = false foreignConnectionErrorSended = false

@ -37,27 +37,69 @@ import { processLargeArrayAsync } from './utils/array'
import { fromDecimals } from './utils/decimals' import { fromDecimals } from './utils/decimals'
class ForeignStore { class ForeignStore {
@observable state = null @observable
@observable loading = true state = null
@observable events = []
@observable totalSupply = '' @observable
@observable symbol = 'NOSYM' loading = true
@observable tokenName = ''
@observable balance = '' @observable
@observable filter = false events = []
@observable maxCurrentDeposit = ''
@observable maxPerTx = '' @observable
@observable minPerTx = '' totalSupply = ''
@observable latestBlockNumber = 0
@observable validators = [] @observable
@observable validatorsCount = 0 symbol = 'NOSYM'
@observable foreignBridgeValidators = ''
@observable requiredSignatures = 0 @observable
@observable dailyLimit = 0 tokenName = ''
@observable totalSpentPerDay = 0
@observable tokenAddress = '' @observable
@observable feeEventsFinished = false balance = ''
@observable tokenType = ''
@observable
filter = false
@observable
maxCurrentDeposit = ''
@observable
maxPerTx = ''
@observable
minPerTx = ''
@observable
latestBlockNumber = 0
@observable
validators = []
@observable
validatorsCount = 0
@observable
foreignBridgeValidators = ''
@observable
requiredSignatures = 0
@observable
dailyLimit = 0
@observable
totalSpentPerDay = 0
@observable
tokenAddress = ''
@observable
feeEventsFinished = false
@observable
tokenType = ''
feeManager = { feeManager = {
totalFeeDistributedFromSignatures: BN(0), totalFeeDistributedFromSignatures: BN(0),
totalFeeDistributedFromAffirmation: BN(0) totalFeeDistributedFromAffirmation: BN(0)

@ -12,7 +12,9 @@ const FOREIGN_GAS_PRICE_SPEED_TYPE = process.env.REACT_APP_FOREIGN_GAS_PRICE_SPE
const FOREIGN_GAS_PRICE_UPDATE_INTERVAL = process.env.REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL const FOREIGN_GAS_PRICE_UPDATE_INTERVAL = process.env.REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL
class GasPriceStore { class GasPriceStore {
@observable gasPrice = null @observable
gasPrice = null
oracleUrl = null oracleUrl = null
speedType = null speedType = null
updateInterval = null updateInterval = null
@ -53,7 +55,8 @@ class GasPriceStore {
setTimeout(() => this.updateGasPrice(), this.updateInterval) setTimeout(() => this.updateGasPrice(), this.updateInterval)
} }
@computed get gasPriceInHex() { @computed
get gasPriceInHex() {
return toHex(this.gasPrice) return toHex(this.gasPrice)
} }
} }

@ -48,26 +48,65 @@ async function asyncForEach(array, callback) {
} }
class HomeStore { class HomeStore {
@observable state = null @observable
@observable loading = true state = null
@observable events = []
@observable errors = [] @observable
@observable balance = '' loading = true
@observable filter = false
@observable maxCurrentDeposit = '' @observable
@observable maxPerTx = '' events = []
@observable latestBlockNumber = 0
@observable validators = [] @observable
@observable validatorsCount = 0 errors = []
@observable homeBridgeValidators = ''
@observable requiredSignatures = 0 @observable
@observable dailyLimit = 0 balance = ''
@observable totalSpentPerDay = 0
@observable tokenAddress = '' @observable
@observable symbol = process.env.REACT_APP_HOME_NATIVE_NAME || 'NONAME' filter = false
@observable tokenName = ''
@observable userBalance = 0 @observable
@observable statistics = { maxCurrentDeposit = ''
@observable
maxPerTx = ''
@observable
latestBlockNumber = 0
@observable
validators = []
@observable
validatorsCount = 0
@observable
homeBridgeValidators = ''
@observable
requiredSignatures = 0
@observable
dailyLimit = 0
@observable
totalSpentPerDay = 0
@observable
tokenAddress = ''
@observable
symbol = process.env.REACT_APP_HOME_NATIVE_NAME || 'NONAME'
@observable
tokenName = ''
@observable
userBalance = 0
@observable
statistics = {
deposits: 0, deposits: 0,
depositsValue: BN(0), depositsValue: BN(0),
withdraws: 0, withdraws: 0,
@ -76,18 +115,23 @@ class HomeStore {
users: new Set(), users: new Set(),
finished: false finished: false
} }
@observable depositFeeCollected = {
@observable
depositFeeCollected = {
value: BN(0), value: BN(0),
type: '', type: '',
shouldDisplay: false, shouldDisplay: false,
finished: false finished: false
} }
@observable withdrawFeeCollected = {
@observable
withdrawFeeCollected = {
value: BN(0), value: BN(0),
type: '', type: '',
shouldDisplay: false, shouldDisplay: false,
finished: false finished: false
} }
feeManager = { feeManager = {
totalFeeDistributedFromSignatures: BN(0), totalFeeDistributedFromSignatures: BN(0),
totalFeeDistributedFromAffirmation: BN(0) totalFeeDistributedFromAffirmation: BN(0)

@ -5,7 +5,8 @@ import { getUnit } from './utils/bridgeMode'
import yn from '../components/utils/yn' import yn from '../components/utils/yn'
class TxStore { class TxStore {
@observable txsValues = {} @observable
txsValues = {}
constructor(rootStore) { constructor(rootStore) {
this.web3Store = rootStore.web3Store this.web3Store = rootStore.web3Store

@ -4,24 +4,37 @@ import { balanceLoaded } from './utils/testUtils'
import { BRIDGE_MODES } from './utils/bridgeMode' import { BRIDGE_MODES } from './utils/bridgeMode'
class Web3Store { class Web3Store {
@observable injectedWeb3 = {} @observable
@observable defaultAccount = { address: '', homeBalance: '' } injectedWeb3 = {}
@observable
defaultAccount = { address: '', homeBalance: '' }
@observable homeWeb3 = {} @observable
@observable foreignWeb3 = {} homeWeb3 = {}
@observable
foreignWeb3 = {}
@observable loading = true @observable
@observable errors = [] loading = true
@observable
errors = []
@observable getWeb3Promise = null @observable
@observable setHomeWeb3Promise = null getWeb3Promise = null
@observable metamaskNotSetted = false @observable
setHomeWeb3Promise = null
@observable
metamaskNotSetted = false
@observable homeNet = { id: '', name: '' } @observable
@observable foreignNet = { id: '', name: '' } homeNet = { id: '', name: '' }
@observable metamaskNet = { id: '', name: '' } @observable
foreignNet = { id: '', name: '' }
@observable
metamaskNet = { id: '', name: '' }
@observable walletInstalled = true @observable
walletInstalled = true
HOME_HTTP_PARITY_URL = process.env.REACT_APP_HOME_HTTP_PARITY_URL HOME_HTTP_PARITY_URL = process.env.REACT_APP_HOME_HTTP_PARITY_URL
FOREIGN_HTTP_PARITY_URL = process.env.REACT_APP_FOREIGN_HTTP_PARITY_URL FOREIGN_HTTP_PARITY_URL = process.env.REACT_APP_FOREIGN_HTTP_PARITY_URL

3611
yarn.lock

File diff suppressed because it is too large Load Diff