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:
parent
94e923d965
commit
be0b401885
@ -21,12 +21,5 @@
|
||||
"node": ">=8.9"
|
||||
},
|
||||
"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": {
|
||||
"chalk": "^2.4.1",
|
||||
"dotenv": "^6.0.0",
|
||||
"mocha": "^5.2.0",
|
||||
"promise-retry": "^1.1.1",
|
||||
"shelljs": "^0.8.2",
|
||||
"tree-kill": "^1.2.0",
|
||||
|
@ -40,16 +40,8 @@
|
||||
"chai": "^4.1.2",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"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",
|
||||
"nyc": "^12.0.2",
|
||||
"prettier": "^1.12.1",
|
||||
"proxyquire": "^2.0.1",
|
||||
"simple-statistics": "^6.1.0",
|
||||
"sinon": "^6.1.0"
|
||||
|
@ -16,12 +16,10 @@ const readFile = (...paths) => {
|
||||
|
||||
function computeSignatureRequestStats(signatureRequests, senderHome) {
|
||||
const processingLogs = signatureRequests.filter(x => x.eventTransactionHash)
|
||||
const txSentMap = senderHome
|
||||
.filter(x => x.eventTransactionHash)
|
||||
.reduce((acc, x) => {
|
||||
acc[x.eventTransactionHash] = x
|
||||
return acc
|
||||
}, {})
|
||||
const txSentMap = senderHome.filter(x => x.eventTransactionHash).reduce((acc, x) => {
|
||||
acc[x.eventTransactionHash] = x
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
const times = processingLogs.map(x => txSentMap[x.eventTransactionHash].time - x.time)
|
||||
|
||||
@ -36,12 +34,10 @@ function computeSignatureRequestStats(signatureRequests, senderHome) {
|
||||
|
||||
function computeCollectedSignaturesStats(collectedSignatures, senderForeign) {
|
||||
const processingLogs = collectedSignatures.filter(x => x.eventTransactionHash)
|
||||
const txSentMap = senderForeign
|
||||
.filter(x => x.eventTransactionHash)
|
||||
.reduce((acc, x) => {
|
||||
acc[x.eventTransactionHash] = x
|
||||
return acc
|
||||
}, {})
|
||||
const txSentMap = senderForeign.filter(x => x.eventTransactionHash).reduce((acc, x) => {
|
||||
acc[x.eventTransactionHash] = x
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
const times = processingLogs.map(x => txSentMap[x.eventTransactionHash].time - x.time)
|
||||
|
||||
|
15
package.json
15
package.json
@ -7,7 +7,20 @@
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"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": [
|
||||
"oracle",
|
||||
|
@ -3,9 +3,7 @@
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"mocha": "^5.1.1"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"deploy": "node ./scripts/deploy.js"
|
||||
}
|
||||
|
@ -14,7 +14,6 @@
|
||||
"gh-pages": "^1.1.0",
|
||||
"mobx": "^4.0.2",
|
||||
"mobx-react": "^5.0.0",
|
||||
"mocha": "^5.1.1",
|
||||
"node-sass-chokidar": "^1.0.1",
|
||||
"numeral": "^2.0.6",
|
||||
"react": "^16.2.0",
|
||||
@ -24,7 +23,7 @@
|
||||
"react-dom": "^16.2.0",
|
||||
"react-router": "^4.3.1",
|
||||
"react-router-dom": "^4.2.2",
|
||||
"react-scripts": "2.1.8",
|
||||
"react-scripts": "3.0.1",
|
||||
"react-transition-group": "^2.2.1",
|
||||
"selenium-webdriver": "^3.6.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)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "5.12.0",
|
||||
"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",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"jest-dom": "^3.0.1",
|
||||
"nodemon": "^1.18.11",
|
||||
"prettier": "^1.14.3",
|
||||
"react-testing-library": "^5.4.4"
|
||||
},
|
||||
"browserslist": [
|
||||
|
@ -17,19 +17,21 @@ export const Configuration = ({
|
||||
/>
|
||||
<div className="separator" />
|
||||
<DataBlock description="Authorities" value={numeral(authorities).format('0')} type="" />
|
||||
{maxSingleDeposit && maxSingleDeposit !== '0' && <div className="separator" /> && (
|
||||
<DataBlock
|
||||
description="Max Single Deposit"
|
||||
value={numeral(maxSingleDeposit).format('0.00 a', Math.floor)}
|
||||
type={symbol}
|
||||
/>
|
||||
)}
|
||||
{maxSingleDeposit && maxSingleDeposit !== '0' && <div className="separator" /> && (
|
||||
<DataBlock
|
||||
description={`Remaining Daily ${symbol} Quota`}
|
||||
value={numeral(maxTotalBalance).format('0.00 a', Math.floor)}
|
||||
type={symbol}
|
||||
/>
|
||||
)}
|
||||
{maxSingleDeposit &&
|
||||
maxSingleDeposit !== '0' && <div className="separator" /> && (
|
||||
<DataBlock
|
||||
description="Max Single Deposit"
|
||||
value={numeral(maxSingleDeposit).format('0.00 a', Math.floor)}
|
||||
type={symbol}
|
||||
/>
|
||||
)}
|
||||
{maxSingleDeposit &&
|
||||
maxSingleDeposit !== '0' && <div className="separator" /> && (
|
||||
<DataBlock
|
||||
description={`Remaining Daily ${symbol} Quota`}
|
||||
value={numeral(maxTotalBalance).format('0.00 a', Math.floor)}
|
||||
type={symbol}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
@ -23,8 +23,7 @@ export const Disclaimer = ({ onConfirmation }) => (
|
||||
{' '}
|
||||
support page
|
||||
</a>
|
||||
.
|
||||
<br />
|
||||
.<br />
|
||||
<br />
|
||||
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
|
||||
|
@ -16,9 +16,8 @@ export const FeeStatistics = ({ depositFeeCollected, withdrawFeeCollected }) =>
|
||||
dataTestid="deposit-fees-block"
|
||||
/>
|
||||
)}
|
||||
{depositFeeCollected.shouldDisplay && withdrawFeeCollected.shouldDisplay && (
|
||||
<div className="separator" />
|
||||
)}
|
||||
{depositFeeCollected.shouldDisplay &&
|
||||
withdrawFeeCollected.shouldDisplay && <div className="separator" />}
|
||||
{withdrawFeeCollected.shouldDisplay && (
|
||||
<DataBlock
|
||||
description="Withdrawal Fees"
|
||||
|
@ -1,11 +1,21 @@
|
||||
import { action, observable } from 'mobx'
|
||||
|
||||
class AlertStore {
|
||||
@observable alerts = []
|
||||
@observable showLoading = false
|
||||
@observable loadingStepIndex = -1
|
||||
@observable blockConfirmations = 0
|
||||
@observable showDailyQuotaInfo = false
|
||||
@observable
|
||||
alerts = []
|
||||
|
||||
@observable
|
||||
showLoading = false
|
||||
|
||||
@observable
|
||||
loadingStepIndex = -1
|
||||
|
||||
@observable
|
||||
blockConfirmations = 0
|
||||
|
||||
@observable
|
||||
showDailyQuotaInfo = false
|
||||
|
||||
homeConnectionErrorSended = false
|
||||
foreignConnectionErrorSended = false
|
||||
|
||||
|
@ -37,27 +37,69 @@ import { processLargeArrayAsync } from './utils/array'
|
||||
import { fromDecimals } from './utils/decimals'
|
||||
|
||||
class ForeignStore {
|
||||
@observable state = null
|
||||
@observable loading = true
|
||||
@observable events = []
|
||||
@observable totalSupply = ''
|
||||
@observable symbol = 'NOSYM'
|
||||
@observable tokenName = ''
|
||||
@observable balance = ''
|
||||
@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 = ''
|
||||
@observable
|
||||
state = null
|
||||
|
||||
@observable
|
||||
loading = true
|
||||
|
||||
@observable
|
||||
events = []
|
||||
|
||||
@observable
|
||||
totalSupply = ''
|
||||
|
||||
@observable
|
||||
symbol = 'NOSYM'
|
||||
|
||||
@observable
|
||||
tokenName = ''
|
||||
|
||||
@observable
|
||||
balance = ''
|
||||
|
||||
@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 = {
|
||||
totalFeeDistributedFromSignatures: 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
|
||||
|
||||
class GasPriceStore {
|
||||
@observable gasPrice = null
|
||||
@observable
|
||||
gasPrice = null
|
||||
|
||||
oracleUrl = null
|
||||
speedType = null
|
||||
updateInterval = null
|
||||
@ -53,7 +55,8 @@ class GasPriceStore {
|
||||
setTimeout(() => this.updateGasPrice(), this.updateInterval)
|
||||
}
|
||||
|
||||
@computed get gasPriceInHex() {
|
||||
@computed
|
||||
get gasPriceInHex() {
|
||||
return toHex(this.gasPrice)
|
||||
}
|
||||
}
|
||||
|
@ -48,26 +48,65 @@ async function asyncForEach(array, callback) {
|
||||
}
|
||||
|
||||
class HomeStore {
|
||||
@observable state = null
|
||||
@observable loading = true
|
||||
@observable events = []
|
||||
@observable errors = []
|
||||
@observable balance = ''
|
||||
@observable filter = false
|
||||
@observable 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 = {
|
||||
@observable
|
||||
state = null
|
||||
|
||||
@observable
|
||||
loading = true
|
||||
|
||||
@observable
|
||||
events = []
|
||||
|
||||
@observable
|
||||
errors = []
|
||||
|
||||
@observable
|
||||
balance = ''
|
||||
|
||||
@observable
|
||||
filter = false
|
||||
|
||||
@observable
|
||||
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,
|
||||
depositsValue: BN(0),
|
||||
withdraws: 0,
|
||||
@ -76,18 +115,23 @@ class HomeStore {
|
||||
users: new Set(),
|
||||
finished: false
|
||||
}
|
||||
@observable depositFeeCollected = {
|
||||
|
||||
@observable
|
||||
depositFeeCollected = {
|
||||
value: BN(0),
|
||||
type: '',
|
||||
shouldDisplay: false,
|
||||
finished: false
|
||||
}
|
||||
@observable withdrawFeeCollected = {
|
||||
|
||||
@observable
|
||||
withdrawFeeCollected = {
|
||||
value: BN(0),
|
||||
type: '',
|
||||
shouldDisplay: false,
|
||||
finished: false
|
||||
}
|
||||
|
||||
feeManager = {
|
||||
totalFeeDistributedFromSignatures: BN(0),
|
||||
totalFeeDistributedFromAffirmation: BN(0)
|
||||
|
@ -5,7 +5,8 @@ import { getUnit } from './utils/bridgeMode'
|
||||
import yn from '../components/utils/yn'
|
||||
|
||||
class TxStore {
|
||||
@observable txsValues = {}
|
||||
@observable
|
||||
txsValues = {}
|
||||
|
||||
constructor(rootStore) {
|
||||
this.web3Store = rootStore.web3Store
|
||||
|
@ -4,24 +4,37 @@ import { balanceLoaded } from './utils/testUtils'
|
||||
import { BRIDGE_MODES } from './utils/bridgeMode'
|
||||
|
||||
class Web3Store {
|
||||
@observable injectedWeb3 = {}
|
||||
@observable defaultAccount = { address: '', homeBalance: '' }
|
||||
@observable
|
||||
injectedWeb3 = {}
|
||||
@observable
|
||||
defaultAccount = { address: '', homeBalance: '' }
|
||||
|
||||
@observable homeWeb3 = {}
|
||||
@observable foreignWeb3 = {}
|
||||
@observable
|
||||
homeWeb3 = {}
|
||||
@observable
|
||||
foreignWeb3 = {}
|
||||
|
||||
@observable loading = true
|
||||
@observable errors = []
|
||||
@observable
|
||||
loading = true
|
||||
@observable
|
||||
errors = []
|
||||
|
||||
@observable getWeb3Promise = null
|
||||
@observable setHomeWeb3Promise = null
|
||||
@observable metamaskNotSetted = false
|
||||
@observable
|
||||
getWeb3Promise = null
|
||||
@observable
|
||||
setHomeWeb3Promise = null
|
||||
@observable
|
||||
metamaskNotSetted = false
|
||||
|
||||
@observable homeNet = { id: '', name: '' }
|
||||
@observable foreignNet = { id: '', name: '' }
|
||||
@observable metamaskNet = { id: '', name: '' }
|
||||
@observable
|
||||
homeNet = { 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
|
||||
FOREIGN_HTTP_PARITY_URL = process.env.REACT_APP_FOREIGN_HTTP_PARITY_URL
|
||||
|
Loading…
Reference in New Issue
Block a user