change modal window source
This commit is contained in:
parent
5118715952
commit
bf70685035
|
@ -67,4 +67,4 @@ class ConfirmScreen extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default ConfirmScreen
|
||||
module.exports = ConfirmScreen
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
const inherits = require('util').inherits
|
||||
const Component = require('react').Component
|
||||
const h = require('react-hyperscript')
|
||||
const connect = require('react-redux').connect
|
||||
|
@ -14,7 +13,296 @@ const Modal = require('../../ui/app/components/modals/index').Modal
|
|||
const ethNetProps = require('eth-net-props')
|
||||
const { networks } = require('../../app/scripts/controllers/network/util')
|
||||
|
||||
module.exports = connect(mapStateToProps)(ConfigScreen)
|
||||
class ConfigScreen extends Component {
|
||||
|
||||
constructor (props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
loading: false,
|
||||
}
|
||||
}
|
||||
|
||||
render () {
|
||||
const state = this.props
|
||||
const metamaskState = state.metamask
|
||||
const warning = state.warning
|
||||
|
||||
return (
|
||||
h('.flex-column.flex-grow', {
|
||||
style: {
|
||||
maxHeight: '585px',
|
||||
overflowY: 'auto',
|
||||
},
|
||||
}, [
|
||||
|
||||
h(LoadingIndicator, {
|
||||
isLoading: this.state.loading,
|
||||
}),
|
||||
|
||||
h(Modal, {}, []),
|
||||
|
||||
// subtitle and nav
|
||||
h('.section-title.flex-row.flex-center', [
|
||||
h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
|
||||
onClick: () => {
|
||||
state.dispatch(actions.goHome())
|
||||
},
|
||||
style: {
|
||||
position: 'absolute',
|
||||
left: '30px',
|
||||
},
|
||||
}),
|
||||
h('h2', 'Settings'),
|
||||
]),
|
||||
|
||||
h('div', {
|
||||
style: {
|
||||
margin: '0 30px',
|
||||
},
|
||||
}, [
|
||||
h('.error', {
|
||||
style: {
|
||||
display: warning ? 'block' : 'none',
|
||||
},
|
||||
}, warning),
|
||||
]),
|
||||
|
||||
// conf view
|
||||
h('.flex-column.flex-justify-center.flex-grow.select-none', [
|
||||
h('.flex-space-around', {
|
||||
style: {
|
||||
padding: '30px',
|
||||
overflow: 'auto',
|
||||
},
|
||||
}, [
|
||||
|
||||
this.currentProviderDisplay(metamaskState, state),
|
||||
|
||||
h('div', { style: {display: 'flex'} }, [
|
||||
h('input#new_rpc', {
|
||||
placeholder: 'New RPC URL',
|
||||
style: {
|
||||
width: 'inherit',
|
||||
flex: '1 0 auto',
|
||||
height: '32px',
|
||||
margin: '20px 20px 0 0',
|
||||
borderRadius: '3px',
|
||||
border: '1px solid #e2e2e2',
|
||||
padding: '10px',
|
||||
},
|
||||
onKeyPress: (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
const element = event.target
|
||||
const newRpc = element.value
|
||||
this.rpcValidation(newRpc, state)
|
||||
}
|
||||
},
|
||||
}),
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
marginTop: '20px',
|
||||
},
|
||||
onClick: (event) => {
|
||||
event.preventDefault()
|
||||
const element = document.querySelector('input#new_rpc')
|
||||
const newRpc = element.value
|
||||
this.rpcValidation(newRpc, state)
|
||||
},
|
||||
}, 'Save'),
|
||||
]),
|
||||
|
||||
h('hr.horizontal-line'),
|
||||
|
||||
this.currentConversionInformation(metamaskState, state),
|
||||
|
||||
h('hr.horizontal-line', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}),
|
||||
|
||||
h('div', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}, [
|
||||
h('p', {
|
||||
style: {
|
||||
fontFamily: 'Nunito Regular',
|
||||
fontSize: '14px',
|
||||
lineHeight: '18px',
|
||||
},
|
||||
}, `State logs contain your public account addresses and sent transactions.`),
|
||||
h('br'),
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
},
|
||||
onClick (event) {
|
||||
window.logStateString((err, result) => {
|
||||
if (err) {
|
||||
state.dispatch(actions.displayWarning('Error in retrieving state logs.'))
|
||||
} else {
|
||||
exportAsFile('Nifty Wallet State Logs.json', result)
|
||||
}
|
||||
})
|
||||
},
|
||||
}, 'Download State Logs'),
|
||||
]),
|
||||
|
||||
h('hr.horizontal-line', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}),
|
||||
|
||||
h('div', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}, [
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
},
|
||||
onClick (event) {
|
||||
event.preventDefault()
|
||||
state.dispatch(actions.revealSeedConfirmation())
|
||||
},
|
||||
}, 'Reveal Seed Words'),
|
||||
]),
|
||||
|
||||
h('hr.horizontal-line', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}),
|
||||
|
||||
h('div', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}, [
|
||||
|
||||
h('p', {
|
||||
style: {
|
||||
fontFamily: 'Nunito Regular',
|
||||
fontSize: '14px',
|
||||
lineHeight: '18px',
|
||||
},
|
||||
}, [
|
||||
'Resetting is for developer use only. ',
|
||||
]),
|
||||
h('br'),
|
||||
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
},
|
||||
onClick (event) {
|
||||
event.preventDefault()
|
||||
state.dispatch(actions.resetAccount())
|
||||
},
|
||||
}, 'Reset Account'),
|
||||
|
||||
h('hr.horizontal-line', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}),
|
||||
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
},
|
||||
onClick (event) {
|
||||
event.preventDefault()
|
||||
state.dispatch(actions.confirmChangePassword())
|
||||
},
|
||||
}, 'Change password'),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
])
|
||||
)
|
||||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
this.props.dispatch(actions.displayWarning(''))
|
||||
}
|
||||
|
||||
rpcValidation (newRpc, state) {
|
||||
if (validUrl.isWebUri(newRpc)) {
|
||||
this.setState({
|
||||
loading: true,
|
||||
})
|
||||
const web3 = new Web3(new Web3.providers.HttpProvider(newRpc))
|
||||
web3.eth.getBlockNumber((err, res) => {
|
||||
if (err) {
|
||||
state.dispatch(actions.displayWarning('Invalid RPC endpoint'))
|
||||
} else {
|
||||
state.dispatch(actions.setRpcTarget(newRpc))
|
||||
}
|
||||
this.setState({
|
||||
loading: false,
|
||||
})
|
||||
})
|
||||
} else {
|
||||
if (!newRpc.startsWith('http')) {
|
||||
state.dispatch(actions.displayWarning('URIs require the appropriate HTTP/HTTPS prefix.'))
|
||||
} else {
|
||||
state.dispatch(actions.displayWarning('Invalid RPC URI'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
currentConversionInformation (metamaskState, state) {
|
||||
const currentCurrency = metamaskState.currentCurrency
|
||||
const conversionDate = metamaskState.conversionDate
|
||||
return h('div', [
|
||||
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, 'Current Conversion'),
|
||||
h('span', {style: { fontWeight: 'bold', paddingRight: '10px', fontSize: '13px'}}, `Updated ${Date(conversionDate)}`),
|
||||
h('select#currentCurrency', {
|
||||
onChange (event) {
|
||||
event.preventDefault()
|
||||
const element = document.getElementById('currentCurrency')
|
||||
const newCurrency = element.value
|
||||
state.dispatch(actions.setCurrentCurrency(newCurrency))
|
||||
},
|
||||
defaultValue: currentCurrency,
|
||||
}, infuraCurrencies.map((currency) => {
|
||||
return h('option', {key: currency.quote.code, value: currency.quote.code}, `${currency.quote.code.toUpperCase()} - ${currency.quote.name}`)
|
||||
})
|
||||
),
|
||||
])
|
||||
}
|
||||
|
||||
currentProviderDisplay (metamaskState, state) {
|
||||
const provider = metamaskState.provider
|
||||
let title, value
|
||||
|
||||
if (networks[provider.type]) {
|
||||
title = 'Current Network'
|
||||
value = ethNetProps.props.getNetworkDisplayName(networks[provider.type].networkID)
|
||||
} else {
|
||||
title = 'Current RPC'
|
||||
value = metamaskState.provider.rpcTarget
|
||||
}
|
||||
|
||||
return h('div', [
|
||||
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, title),
|
||||
h('span', value),
|
||||
provider.type === 'rpc' && h('button', {
|
||||
onClick (event) {
|
||||
event.preventDefault()
|
||||
state.dispatch(actions.showDeleteRPC())
|
||||
},
|
||||
}, 'Delete'),
|
||||
])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function mapStateToProps (state) {
|
||||
return {
|
||||
|
@ -23,290 +311,4 @@ function mapStateToProps (state) {
|
|||
}
|
||||
}
|
||||
|
||||
inherits(ConfigScreen, Component)
|
||||
function ConfigScreen () {
|
||||
this.state = {
|
||||
loading: false,
|
||||
}
|
||||
Component.call(this)
|
||||
}
|
||||
|
||||
ConfigScreen.prototype.render = function () {
|
||||
const state = this.props
|
||||
const metamaskState = state.metamask
|
||||
const warning = state.warning
|
||||
|
||||
return (
|
||||
h('.flex-column.flex-grow', {
|
||||
style: {
|
||||
maxHeight: '585px',
|
||||
overflowY: 'auto',
|
||||
},
|
||||
}, [
|
||||
|
||||
h(LoadingIndicator, {
|
||||
isLoading: this.state.loading,
|
||||
}),
|
||||
|
||||
h(Modal, {}, []),
|
||||
|
||||
// subtitle and nav
|
||||
h('.section-title.flex-row.flex-center', [
|
||||
h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
|
||||
onClick: () => {
|
||||
state.dispatch(actions.goHome())
|
||||
},
|
||||
style: {
|
||||
position: 'absolute',
|
||||
left: '30px',
|
||||
},
|
||||
}),
|
||||
h('h2', 'Settings'),
|
||||
]),
|
||||
|
||||
h('div', {
|
||||
style: {
|
||||
margin: '0 30px',
|
||||
},
|
||||
}, [
|
||||
h('.error', {
|
||||
style: {
|
||||
display: warning ? 'block' : 'none',
|
||||
},
|
||||
}, warning),
|
||||
]),
|
||||
|
||||
// conf view
|
||||
h('.flex-column.flex-justify-center.flex-grow.select-none', [
|
||||
h('.flex-space-around', {
|
||||
style: {
|
||||
padding: '30px',
|
||||
overflow: 'auto',
|
||||
},
|
||||
}, [
|
||||
|
||||
currentProviderDisplay(metamaskState, state),
|
||||
|
||||
h('div', { style: {display: 'flex'} }, [
|
||||
h('input#new_rpc', {
|
||||
placeholder: 'New RPC URL',
|
||||
style: {
|
||||
width: 'inherit',
|
||||
flex: '1 0 auto',
|
||||
height: '32px',
|
||||
margin: '20px 20px 0 0',
|
||||
borderRadius: '3px',
|
||||
border: '1px solid #e2e2e2',
|
||||
padding: '10px',
|
||||
},
|
||||
onKeyPress: (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
const element = event.target
|
||||
const newRpc = element.value
|
||||
this.rpcValidation(newRpc, state)
|
||||
}
|
||||
},
|
||||
}),
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
marginTop: '20px',
|
||||
},
|
||||
onClick: (event) => {
|
||||
event.preventDefault()
|
||||
const element = document.querySelector('input#new_rpc')
|
||||
const newRpc = element.value
|
||||
this.rpcValidation(newRpc, state)
|
||||
},
|
||||
}, 'Save'),
|
||||
]),
|
||||
|
||||
h('hr.horizontal-line'),
|
||||
|
||||
currentConversionInformation(metamaskState, state),
|
||||
|
||||
h('hr.horizontal-line', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}),
|
||||
|
||||
h('div', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}, [
|
||||
h('p', {
|
||||
style: {
|
||||
fontFamily: 'Nunito Regular',
|
||||
fontSize: '14px',
|
||||
lineHeight: '18px',
|
||||
},
|
||||
}, `State logs contain your public account addresses and sent transactions.`),
|
||||
h('br'),
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
},
|
||||
onClick (event) {
|
||||
window.logStateString((err, result) => {
|
||||
if (err) {
|
||||
state.dispatch(actions.displayWarning('Error in retrieving state logs.'))
|
||||
} else {
|
||||
exportAsFile('Nifty Wallet State Logs.json', result)
|
||||
}
|
||||
})
|
||||
},
|
||||
}, 'Download State Logs'),
|
||||
]),
|
||||
|
||||
h('hr.horizontal-line', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}),
|
||||
|
||||
h('div', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}, [
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
},
|
||||
onClick (event) {
|
||||
event.preventDefault()
|
||||
state.dispatch(actions.revealSeedConfirmation())
|
||||
},
|
||||
}, 'Reveal Seed Words'),
|
||||
]),
|
||||
|
||||
h('hr.horizontal-line', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}),
|
||||
|
||||
h('div', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}, [
|
||||
|
||||
h('p', {
|
||||
style: {
|
||||
fontFamily: 'Nunito Regular',
|
||||
fontSize: '14px',
|
||||
lineHeight: '18px',
|
||||
},
|
||||
}, [
|
||||
'Resetting is for developer use only. ',
|
||||
]),
|
||||
h('br'),
|
||||
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
},
|
||||
onClick (event) {
|
||||
event.preventDefault()
|
||||
state.dispatch(actions.resetAccount())
|
||||
},
|
||||
}, 'Reset Account'),
|
||||
|
||||
h('hr.horizontal-line', {
|
||||
style: {
|
||||
marginTop: '20px',
|
||||
},
|
||||
}),
|
||||
|
||||
h('button', {
|
||||
style: {
|
||||
alignSelf: 'center',
|
||||
},
|
||||
onClick (event) {
|
||||
event.preventDefault()
|
||||
state.dispatch(actions.confirmChangePassword())
|
||||
},
|
||||
}, 'Change password'),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
])
|
||||
)
|
||||
}
|
||||
|
||||
ConfigScreen.prototype.componentWillUnmount = function () {
|
||||
this.props.dispatch(actions.displayWarning(''))
|
||||
}
|
||||
|
||||
ConfigScreen.prototype.rpcValidation = function (newRpc, state) {
|
||||
if (validUrl.isWebUri(newRpc)) {
|
||||
this.setState({
|
||||
loading: true,
|
||||
})
|
||||
const web3 = new Web3(new Web3.providers.HttpProvider(newRpc))
|
||||
web3.eth.getBlockNumber((err, res) => {
|
||||
if (err) {
|
||||
state.dispatch(actions.displayWarning('Invalid RPC endpoint'))
|
||||
} else {
|
||||
state.dispatch(actions.setRpcTarget(newRpc))
|
||||
}
|
||||
this.setState({
|
||||
loading: false,
|
||||
})
|
||||
})
|
||||
} else {
|
||||
if (!newRpc.startsWith('http')) {
|
||||
state.dispatch(actions.displayWarning('URIs require the appropriate HTTP/HTTPS prefix.'))
|
||||
} else {
|
||||
state.dispatch(actions.displayWarning('Invalid RPC URI'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function currentConversionInformation (metamaskState, state) {
|
||||
const currentCurrency = metamaskState.currentCurrency
|
||||
const conversionDate = metamaskState.conversionDate
|
||||
return h('div', [
|
||||
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, 'Current Conversion'),
|
||||
h('span', {style: { fontWeight: 'bold', paddingRight: '10px', fontSize: '13px'}}, `Updated ${Date(conversionDate)}`),
|
||||
h('select#currentCurrency', {
|
||||
onChange (event) {
|
||||
event.preventDefault()
|
||||
const element = document.getElementById('currentCurrency')
|
||||
const newCurrency = element.value
|
||||
state.dispatch(actions.setCurrentCurrency(newCurrency))
|
||||
},
|
||||
defaultValue: currentCurrency,
|
||||
}, infuraCurrencies.map((currency) => {
|
||||
return h('option', {key: currency.quote.code, value: currency.quote.code}, `${currency.quote.code.toUpperCase()} - ${currency.quote.name}`)
|
||||
})
|
||||
),
|
||||
])
|
||||
}
|
||||
|
||||
function currentProviderDisplay (metamaskState, state) {
|
||||
const provider = metamaskState.provider
|
||||
let title, value
|
||||
|
||||
if (networks[provider.type]) {
|
||||
title = 'Current Network'
|
||||
value = ethNetProps.props.getNetworkDisplayName(networks[provider.type].networkID)
|
||||
} else {
|
||||
title = 'Current RPC'
|
||||
value = metamaskState.provider.rpcTarget
|
||||
}
|
||||
|
||||
return h('div', [
|
||||
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, title),
|
||||
h('span', value),
|
||||
provider.type === 'rpc' && h('button', {
|
||||
onClick (event) {
|
||||
event.preventDefault()
|
||||
state.dispatch(actions.showDeleteRPC())
|
||||
},
|
||||
}, 'Delete'),
|
||||
])
|
||||
}
|
||||
module.exports = connect(mapStateToProps)(ConfigScreen)
|
||||
|
|
|
@ -8519,40 +8519,6 @@
|
|||
"js-sha3": "^0.5.7"
|
||||
}
|
||||
},
|
||||
"eth-hd-keyring": {
|
||||
"version": "github:vbaranov/eth-hd-keyring#64d0fa741af88d5f232f9518fd150190c421b3e7",
|
||||
"from": "github:vbaranov/eth-hd-keyring#2.0.1",
|
||||
"requires": {
|
||||
"bip39": "^2.2.0",
|
||||
"eth-sig-util": "^2.0.1",
|
||||
"ethereumjs-abi": "^0.6.5",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethereumjs-wallet": "^0.6.0",
|
||||
"events": "^1.1.1",
|
||||
"xtend": "^4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "^0.1.3",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"events": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
||||
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
|
||||
}
|
||||
}
|
||||
},
|
||||
"eth-json-rpc-filters": {
|
||||
"version": "github:poanetwork/eth-json-rpc-filters#22d40ab0103e3b4bc1c35b0818ef674b17fa1e78",
|
||||
"from": "github:poanetwork/eth-json-rpc-filters#3.0.2",
|
||||
|
@ -8605,8 +8571,33 @@
|
|||
"resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz",
|
||||
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
|
||||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-util": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
"integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "0.1.6",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereumjs-abi": {
|
||||
|
@ -8772,8 +8763,33 @@
|
|||
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-util": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
"integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "0.1.6",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereum-common": {
|
||||
|
@ -8785,7 +8801,6 @@
|
|||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-util": "^6.0.0"
|
||||
|
@ -8795,7 +8810,6 @@
|
|||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
"integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
|
@ -8915,7 +8929,6 @@
|
|||
"bip39": "^2.4.0",
|
||||
"bluebird": "^3.5.0",
|
||||
"browser-passworder": "^2.0.3",
|
||||
"eth-hd-keyring": "github:vbaranov/eth-hd-keyring#64d0fa741af88d5f232f9518fd150190c421b3e7",
|
||||
"eth-sig-util": "^1.4.0",
|
||||
"eth-simple-keyring": "^2.0.0",
|
||||
"ethereumjs-util": "^5.1.2",
|
||||
|
@ -8933,13 +8946,116 @@
|
|||
"object-assign": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"eth-hd-keyring": {
|
||||
"version": "github:vbaranov/eth-hd-keyring#64d0fa741af88d5f232f9518fd150190c421b3e7",
|
||||
"from": "github:vbaranov/eth-hd-keyring#64d0fa741af88d5f232f9518fd150190c421b3e7",
|
||||
"requires": {
|
||||
"bip39": "^2.2.0",
|
||||
"eth-sig-util": "^2.0.1",
|
||||
"ethereumjs-abi": "^0.6.5",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethereumjs-wallet": "^0.6.0",
|
||||
"events": "^1.1.1",
|
||||
"xtend": "^4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-sig-util": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-2.2.0.tgz",
|
||||
"integrity": "sha512-bAxW35bL4U2lrtjjV8rFGJ8B27z4Sn5v9eIaNdpPUnPfUAtrvx5j8atfyV+k+JOnbppcvKhWCO1rQSBk4kkAhw==",
|
||||
"requires": {
|
||||
"buffer": "^5.2.1",
|
||||
"elliptic": "^6.4.0",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"tweetnacl": "^1.0.0",
|
||||
"tweetnacl-util": "^0.15.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "0.6.5",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz",
|
||||
"integrity": "sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=",
|
||||
"requires": {
|
||||
"bn.js": "^4.10.0",
|
||||
"ethereumjs-util": "^4.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz",
|
||||
"integrity": "sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=",
|
||||
"requires": {
|
||||
"bn.js": "^4.8.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"keccakjs": "^0.2.0",
|
||||
"rlp": "^2.0.0",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereumjs-abi": {
|
||||
"version": "0.6.7",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.7.tgz",
|
||||
"integrity": "sha512-EMLOA8ICO5yAaXDhjVEfYjsJIXYutY8ufTE93eEKwsVtp2usQreKwsDTJ9zvam3omYqNuffr8IONIqb2uUslGQ==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-util": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
"integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "0.1.6",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"eth-sig-util": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz",
|
||||
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
|
||||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-util": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
"integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "0.1.6",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereumjs-abi": {
|
||||
|
@ -8980,6 +9096,11 @@
|
|||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"events": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
||||
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
|
||||
},
|
||||
"obs-store": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/obs-store/-/obs-store-2.4.1.tgz",
|
||||
|
@ -9010,8 +9131,33 @@
|
|||
"resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz",
|
||||
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
|
||||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-util": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
"integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "0.1.6",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereumjs-abi": {
|
||||
|
@ -9405,8 +9551,33 @@
|
|||
"resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz",
|
||||
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
|
||||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-util": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
"integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "0.1.6",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereumjs-abi": {
|
||||
|
@ -9479,6 +9650,22 @@
|
|||
"ethereumjs-util": "^5.0.1",
|
||||
"ethereumjs-vm": "^2.6.0",
|
||||
"through2": "^2.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "^0.1.3",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereum-common": {
|
||||
|
@ -9524,6 +9711,22 @@
|
|||
"ethereumjs-util": "^5.0.0",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "^0.1.3",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereumjs-block": {
|
||||
|
@ -9536,6 +9739,22 @@
|
|||
"ethereumjs-tx": "^1.2.2",
|
||||
"ethereumjs-util": "^5.0.0",
|
||||
"merkle-patricia-tree": "^2.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "^0.1.3",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereumjs-common": {
|
||||
|
@ -9556,6 +9775,20 @@
|
|||
"version": "0.0.18",
|
||||
"resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz",
|
||||
"integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8="
|
||||
},
|
||||
"ethereumjs-util": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "^0.1.3",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -10131,8 +10364,7 @@
|
|||
"exenv": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz",
|
||||
"integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=",
|
||||
"dev": true
|
||||
"integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50="
|
||||
},
|
||||
"exists-stat": {
|
||||
"version": "1.0.0",
|
||||
|
@ -13595,7 +13827,6 @@
|
|||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
|
@ -13617,7 +13848,6 @@
|
|||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
|
||||
"integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
|
@ -14856,7 +15086,6 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz",
|
||||
"integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"browserify-aes": "^1.0.6",
|
||||
"create-hash": "^1.1.2",
|
||||
|
@ -15578,14 +15807,12 @@
|
|||
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"dev": true,
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-util": "^6.0.0"
|
||||
|
@ -15595,7 +15822,6 @@
|
|||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
"integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
|
@ -16055,7 +16281,6 @@
|
|||
"version": "0.1.6",
|
||||
"resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz",
|
||||
"integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-hex-prefixed": "1.0.0",
|
||||
"strip-hex-prefix": "1.0.0"
|
||||
|
@ -16389,8 +16614,7 @@
|
|||
"file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"filesize": {
|
||||
"version": "3.6.1",
|
||||
|
@ -17879,8 +18103,7 @@
|
|||
"is-hex-prefixed": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz",
|
||||
"integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=",
|
||||
"dev": true
|
||||
"integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ="
|
||||
},
|
||||
"is-natural-number": {
|
||||
"version": "4.0.1",
|
||||
|
@ -18206,7 +18429,6 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz",
|
||||
"integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bindings": "^1.2.1",
|
||||
"inherits": "^2.0.3",
|
||||
|
@ -21307,7 +21529,6 @@
|
|||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/rlp/-/rlp-2.1.0.tgz",
|
||||
"integrity": "sha512-93U7IKH5j7nmXFVg19MeNBGzQW5uXW1pmCuKY8veeKIhYTE32C2d0mOegfiIAfXcHOKJjjPlJisn8iHDF5AezA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1"
|
||||
}
|
||||
|
@ -21423,7 +21644,6 @@
|
|||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.6.2.tgz",
|
||||
"integrity": "sha512-90nYt7yb0LmI4A2jJs1grglkTAXrBwxYAjP9bpeKjvJKOjG2fOeH/YI/lchDMIvjrOasd5QXwvV2jwN168xNng==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bindings": "^1.2.1",
|
||||
"bip66": "^1.1.3",
|
||||
|
@ -22089,7 +22309,6 @@
|
|||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz",
|
||||
"integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-hex-prefixed": "1.0.0"
|
||||
}
|
||||
|
@ -22479,7 +22698,6 @@
|
|||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
|
||||
"integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-typedarray": "^1.0.0"
|
||||
}
|
||||
|
@ -23089,14 +23307,12 @@
|
|||
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"dev": true,
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-util": "^6.0.0"
|
||||
|
@ -23106,7 +23322,6 @@
|
|||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
"integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
|
@ -23186,23 +23401,20 @@
|
|||
"dev": true,
|
||||
"requires": {
|
||||
"underscore": "1.8.3",
|
||||
"web3-core-helpers": "1.0.0-beta.35",
|
||||
"websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
|
||||
"web3-core-helpers": "1.0.0-beta.35"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"websocket": {
|
||||
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
|
||||
"from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",
|
||||
"dev": true,
|
||||
"from": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
|
||||
"requires": {
|
||||
"debug": "^2.2.0",
|
||||
"nan": "^2.3.3",
|
||||
|
@ -23655,8 +23867,7 @@
|
|||
"yaeti": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz",
|
||||
"integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=",
|
||||
"dev": true
|
||||
"integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc="
|
||||
},
|
||||
"yallist": {
|
||||
"version": "2.1.2",
|
||||
|
@ -28997,6 +29208,20 @@
|
|||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
|
||||
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
|
||||
},
|
||||
"ethereumjs-util": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "^0.1.3",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -37488,8 +37713,7 @@
|
|||
"react-lifecycles-compat": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
|
||||
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
|
||||
},
|
||||
"react-markdown": {
|
||||
"version": "3.6.0",
|
||||
|
@ -37519,7 +37743,6 @@
|
|||
"version": "3.8.1",
|
||||
"resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.8.1.tgz",
|
||||
"integrity": "sha512-aLKeZM9pgXpIKVwopRHMuvqKWiBajkqisDA8UzocdCF6S4fyKVfLWmZR5G1Q0ODBxxxxf2XIwiCP8G/11GJAuw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"exenv": "^1.2.0",
|
||||
"prop-types": "^15.5.10",
|
||||
|
@ -37531,7 +37754,6 @@
|
|||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz",
|
||||
"integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
|
@ -43520,7 +43742,6 @@
|
|||
"resolved": "https://registry.npmjs.org/web3/-/web3-0.20.7.tgz",
|
||||
"integrity": "sha512-VU6/DSUX93d1fCzBz7WP/SGCQizO1rKZi4Px9j/3yRyfssHyFcZamMw2/sj4E8TlfMXONvZLoforR8B4bRoyTQ==",
|
||||
"requires": {
|
||||
"bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
|
||||
"crypto-js": "^3.1.4",
|
||||
"utf8": "^2.1.1",
|
||||
"xhr2-cookies": "^1.1.0",
|
||||
|
@ -43529,7 +43750,7 @@
|
|||
"dependencies": {
|
||||
"bignumber.js": {
|
||||
"version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
|
||||
"from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git"
|
||||
"from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -176,12 +176,12 @@
|
|||
"ramda": "^0.24.1",
|
||||
"raven-js": "^3.24.2",
|
||||
"react": "^16.8.6",
|
||||
"react-transition-group": "^1.2.1",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-hyperscript": "^3.0.0",
|
||||
"react-inspector": "^2.3.0",
|
||||
"react-markdown": "^3.0.0",
|
||||
"react-media": "^1.8.0",
|
||||
"react-modal": "^3.8.1",
|
||||
"react-redux": "^7.1.0",
|
||||
"react-router-dom": "^4.2.2",
|
||||
"react-select": "^1.0.0",
|
||||
|
@ -189,6 +189,7 @@
|
|||
"react-tippy": "^1.2.2",
|
||||
"react-toggle-button": "^2.2.0",
|
||||
"react-tooltip": "^3.10.0",
|
||||
"react-transition-group": "^1.2.1",
|
||||
"react-trigger-change": "^1.0.2",
|
||||
"reactify": "^1.1.1",
|
||||
"readable-stream": "^2.3.3",
|
||||
|
|
|
@ -1,491 +1,483 @@
|
|||
// const Component = require('react').Component
|
||||
// const h = require('react-hyperscript')
|
||||
// const inherits = require('util').inherits
|
||||
// const connect = require('react-redux').connect
|
||||
// // const FadeModal = require('boron').FadeModal
|
||||
// const actions = require('../../actions')
|
||||
// // const isMobileView = require('../../../lib/is-mobile-view')
|
||||
// const { getEnvironmentType } = require('../../../../app/scripts/lib/util')
|
||||
// const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums')
|
||||
const Component = require('react').Component
|
||||
const h = require('react-hyperscript')
|
||||
const inherits = require('util').inherits
|
||||
const connect = require('react-redux').connect
|
||||
const FadeModal = require('react-modal')
|
||||
const actions = require('../../actions')
|
||||
const isMobileView = require('../../../lib/is-mobile-view')
|
||||
const { getEnvironmentType } = require('../../../../app/scripts/lib/util')
|
||||
const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums')
|
||||
|
||||
// // Modal Components
|
||||
// const BuyOptions = require('./buy-options-modal')
|
||||
// const DepositEtherModal = require('./deposit-ether-modal')
|
||||
// const AccountDetailsModal = require('./account-details-modal')
|
||||
// const EditAccountNameModal = require('./edit-account-name-modal')
|
||||
// const ExportPrivateKeyModal = require('./export-private-key-modal')
|
||||
// const NewAccountModal = require('./new-account-modal')
|
||||
// const ShapeshiftDepositTxModal = require('./shapeshift-deposit-tx-modal.js')
|
||||
// const HideTokenConfirmationModal = require('./hide-token-confirmation-modal')
|
||||
// const CustomizeGasModal = require('../customize-gas-modal')
|
||||
// const NotifcationModal = require('./notification-modal')
|
||||
// const QRScanner = require('./qr-scanner')
|
||||
//Modal Components
|
||||
const BuyOptions = require('./buy-options-modal')
|
||||
const DepositEtherModal = require('./deposit-ether-modal')
|
||||
const AccountDetailsModal = require('./account-details-modal')
|
||||
const EditAccountNameModal = require('./edit-account-name-modal')
|
||||
const ExportPrivateKeyModal = require('./export-private-key-modal')
|
||||
const NewAccountModal = require('./new-account-modal')
|
||||
const ShapeshiftDepositTxModal = require('./shapeshift-deposit-tx-modal.js')
|
||||
const HideTokenConfirmationModal = require('./hide-token-confirmation-modal')
|
||||
const CustomizeGasModal = require('../customize-gas-modal')
|
||||
const NotifcationModal = require('./notification-modal')
|
||||
const QRScanner = require('./qr-scanner')
|
||||
|
||||
// import ConfirmRemoveAccount from './confirm-remove-account'
|
||||
// import ConfirmResetAccount from './confirm-reset-account'
|
||||
// import TransactionConfirmed from './transaction-confirmed'
|
||||
// import ConfirmCustomizeGasModal from './customize-gas'
|
||||
// import CancelTransaction from './cancel-transaction'
|
||||
// import WelcomeBeta from './welcome-beta'
|
||||
// import TransactionDetails from './transaction-details'
|
||||
// import RejectTransactions from './reject-transactions'
|
||||
import ConfirmRemoveAccount from './confirm-remove-account'
|
||||
import ConfirmResetAccount from './confirm-reset-account'
|
||||
import TransactionConfirmed from './transaction-confirmed'
|
||||
import ConfirmCustomizeGasModal from './customize-gas'
|
||||
import CancelTransaction from './cancel-transaction'
|
||||
import WelcomeBeta from './welcome-beta'
|
||||
import TransactionDetails from './transaction-details'
|
||||
import RejectTransactions from './reject-transactions'
|
||||
|
||||
// const modalContainerBaseStyle = {
|
||||
// transform: 'translate3d(-50%, 0, 0px)',
|
||||
// border: '1px solid #CCCFD1',
|
||||
// borderRadius: '8px',
|
||||
// backgroundColor: '#FFFFFF',
|
||||
// boxShadow: '0 2px 22px 0 rgba(0,0,0,0.2)',
|
||||
// }
|
||||
const modalContainerBaseStyle = {
|
||||
transform: 'translate3d(-50%, 0, 0px)',
|
||||
border: '1px solid #CCCFD1',
|
||||
borderRadius: '8px',
|
||||
backgroundColor: '#FFFFFF',
|
||||
boxShadow: '0 2px 22px 0 rgba(0,0,0,0.2)',
|
||||
}
|
||||
|
||||
// const modalContainerLaptopStyle = {
|
||||
// ...modalContainerBaseStyle,
|
||||
// width: '344px',
|
||||
// top: '15%',
|
||||
// }
|
||||
const modalContainerLaptopStyle = {
|
||||
...modalContainerBaseStyle,
|
||||
width: '344px',
|
||||
top: '15%',
|
||||
}
|
||||
|
||||
// const modalContainerMobileStyle = {
|
||||
// ...modalContainerBaseStyle,
|
||||
// width: '309px',
|
||||
// top: '12.5%',
|
||||
// }
|
||||
const modalContainerMobileStyle = {
|
||||
...modalContainerBaseStyle,
|
||||
width: '309px',
|
||||
top: '12.5%',
|
||||
}
|
||||
|
||||
// const accountModalStyle = {
|
||||
// mobileModalStyle: {
|
||||
// width: '95%',
|
||||
// // top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh',
|
||||
// boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
// borderRadius: '4px',
|
||||
// top: '10%',
|
||||
// transform: 'none',
|
||||
// left: '0',
|
||||
// right: '0',
|
||||
// margin: '0 auto',
|
||||
// },
|
||||
// laptopModalStyle: {
|
||||
// width: '360px',
|
||||
// // top: 'calc(33% + 45px)',
|
||||
// boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
// borderRadius: '4px',
|
||||
// top: '10%',
|
||||
// transform: 'none',
|
||||
// left: '0',
|
||||
// right: '0',
|
||||
// margin: '0 auto',
|
||||
// },
|
||||
// contentStyle: {
|
||||
// borderRadius: '4px',
|
||||
// },
|
||||
// }
|
||||
const accountModalStyle = {
|
||||
mobileModalStyle: {
|
||||
width: '95%',
|
||||
// top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh',
|
||||
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
borderRadius: '4px',
|
||||
top: '10%',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '360px',
|
||||
top: 'calc(33% + 45px)',
|
||||
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
borderRadius: '4px',
|
||||
top: '10%',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '4px',
|
||||
},
|
||||
}
|
||||
|
||||
// // const MODALS = {
|
||||
// // BUY: {
|
||||
// // contents: [
|
||||
// // h(BuyOptions, {}, []),
|
||||
// // ],
|
||||
// // mobileModalStyle: {
|
||||
// // width: '95%',
|
||||
// // // top: isPopupOrNotification() === 'popup' ? '48vh' : '36.5vh',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
|
||||
// // top: '10%',
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // width: '66%',
|
||||
// // maxWidth: '550px',
|
||||
// // top: 'calc(10% + 10px)',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
|
||||
// // transform: 'none',
|
||||
// // },
|
||||
// // },
|
||||
const MODALS = {
|
||||
BUY: {
|
||||
contents: [
|
||||
h(BuyOptions, {}, []),
|
||||
],
|
||||
mobileModalStyle: {
|
||||
width: '95%',
|
||||
// top: isPopupOrNotification() === 'popup' ? '48vh' : '36.5vh',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
|
||||
top: '10%',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '66%',
|
||||
maxWidth: '550px',
|
||||
top: 'calc(10% + 10px)',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
|
||||
transform: 'none',
|
||||
},
|
||||
},
|
||||
|
||||
// // DEPOSIT_ETHER: {
|
||||
// // contents: [
|
||||
// // h(DepositEtherModal, {}, []),
|
||||
// // ],
|
||||
// // onHide: (props) => props.hideWarning(),
|
||||
// // mobileModalStyle: {
|
||||
// // width: '100%',
|
||||
// // height: '100%',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
|
||||
// // top: '0',
|
||||
// // display: 'flex',
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // width: '850px',
|
||||
// // top: 'calc(10% + 10px)',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // boxShadow: '0 0 6px 0 rgba(0,0,0,0.3)',
|
||||
// // borderRadius: '7px',
|
||||
// // transform: 'none',
|
||||
// // height: 'calc(80% - 20px)',
|
||||
// // overflowY: 'hidden',
|
||||
// // },
|
||||
// // contentStyle: {
|
||||
// // borderRadius: '7px',
|
||||
// // height: '100%',
|
||||
// // },
|
||||
// // },
|
||||
DEPOSIT_ETHER: {
|
||||
contents: [
|
||||
h(DepositEtherModal, {}, []),
|
||||
],
|
||||
onHide: (props) => props.hideWarning(),
|
||||
mobileModalStyle: {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
|
||||
top: '0',
|
||||
display: 'flex',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '850px',
|
||||
top: 'calc(10% + 10px)',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
boxShadow: '0 0 6px 0 rgba(0,0,0,0.3)',
|
||||
borderRadius: '7px',
|
||||
transform: 'none',
|
||||
height: 'calc(80% - 20px)',
|
||||
overflowY: 'hidden',
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '7px',
|
||||
height: '100%',
|
||||
},
|
||||
},
|
||||
|
||||
// // EDIT_ACCOUNT_NAME: {
|
||||
// // contents: [
|
||||
// // h(EditAccountNameModal, {}, []),
|
||||
// // ],
|
||||
// // mobileModalStyle: {
|
||||
// // width: '95%',
|
||||
// // // top: isPopupOrNotification() === 'popup' ? '48vh' : '36.5vh',
|
||||
// // top: '10%',
|
||||
// // boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // width: '375px',
|
||||
// // // top: 'calc(30% + 10px)',
|
||||
// // top: '10%',
|
||||
// // boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // },
|
||||
// // },
|
||||
EDIT_ACCOUNT_NAME: {
|
||||
contents: [
|
||||
h(EditAccountNameModal, {}, []),
|
||||
],
|
||||
mobileModalStyle: {
|
||||
width: '95%',
|
||||
// top: isPopupOrNotification() === 'popup' ? '48vh' : '36.5vh',
|
||||
top: '10%',
|
||||
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '375px',
|
||||
top: 'calc(30% + 10px)',
|
||||
top: '10%',
|
||||
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
},
|
||||
|
||||
// // ACCOUNT_DETAILS: {
|
||||
// // contents: [
|
||||
// // h(AccountDetailsModal, {}, []),
|
||||
// // ],
|
||||
// // ...accountModalStyle,
|
||||
// // },
|
||||
ACCOUNT_DETAILS: {
|
||||
contents: [
|
||||
h(AccountDetailsModal, {}, []),
|
||||
],
|
||||
...accountModalStyle,
|
||||
},
|
||||
|
||||
// // EXPORT_PRIVATE_KEY: {
|
||||
// // contents: [
|
||||
// // h(ExportPrivateKeyModal, {}, []),
|
||||
// // ],
|
||||
// // ...accountModalStyle,
|
||||
// // },
|
||||
EXPORT_PRIVATE_KEY: {
|
||||
contents: [
|
||||
h(ExportPrivateKeyModal, {}, []),
|
||||
],
|
||||
...accountModalStyle,
|
||||
},
|
||||
|
||||
// // SHAPESHIFT_DEPOSIT_TX: {
|
||||
// // contents: [
|
||||
// // h(ShapeshiftDepositTxModal),
|
||||
// // ],
|
||||
// // ...accountModalStyle,
|
||||
// // },
|
||||
SHAPESHIFT_DEPOSIT_TX: {
|
||||
contents: [
|
||||
h(ShapeshiftDepositTxModal),
|
||||
],
|
||||
...accountModalStyle,
|
||||
},
|
||||
|
||||
// // HIDE_TOKEN_CONFIRMATION: {
|
||||
// // contents: [
|
||||
// // h(HideTokenConfirmationModal, {}, []),
|
||||
// // ],
|
||||
// // mobileModalStyle: {
|
||||
// // width: '95%',
|
||||
// // top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh',
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // width: '449px',
|
||||
// // top: 'calc(33% + 45px)',
|
||||
// // },
|
||||
// // },
|
||||
HIDE_TOKEN_CONFIRMATION: {
|
||||
contents: [
|
||||
h(HideTokenConfirmationModal, {}, []),
|
||||
],
|
||||
mobileModalStyle: {
|
||||
width: '95%',
|
||||
top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '449px',
|
||||
top: 'calc(33% + 45px)',
|
||||
},
|
||||
},
|
||||
|
||||
// // BETA_UI_NOTIFICATION_MODAL: {
|
||||
// // contents: h(WelcomeBeta),
|
||||
// // mobileModalStyle: {
|
||||
// // ...modalContainerMobileStyle,
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // ...modalContainerLaptopStyle,
|
||||
// // },
|
||||
// // contentStyle: {
|
||||
// // borderRadius: '8px',
|
||||
// // },
|
||||
// // },
|
||||
BETA_UI_NOTIFICATION_MODAL: {
|
||||
contents: h(WelcomeBeta),
|
||||
mobileModalStyle: {
|
||||
...modalContainerMobileStyle,
|
||||
},
|
||||
laptopModalStyle: {
|
||||
...modalContainerLaptopStyle,
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '8px',
|
||||
},
|
||||
},
|
||||
|
||||
// // OLD_UI_NOTIFICATION_MODAL: {
|
||||
// // contents: [
|
||||
// // h(NotifcationModal, {
|
||||
// // header: 'oldUI',
|
||||
// // message: 'oldUIMessage',
|
||||
// // }),
|
||||
// // ],
|
||||
// // mobileModalStyle: {
|
||||
// // width: '95%',
|
||||
// // top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh',
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // width: '449px',
|
||||
// // top: 'calc(33% + 45px)',
|
||||
// // },
|
||||
// // },
|
||||
OLD_UI_NOTIFICATION_MODAL: {
|
||||
contents: [
|
||||
h(NotifcationModal, {
|
||||
header: 'oldUI',
|
||||
message: 'oldUIMessage',
|
||||
}),
|
||||
],
|
||||
mobileModalStyle: {
|
||||
width: '95%',
|
||||
top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '449px',
|
||||
top: 'calc(33% + 45px)',
|
||||
},
|
||||
},
|
||||
|
||||
// // CONFIRM_RESET_ACCOUNT: {
|
||||
// // contents: h(ConfirmResetAccount),
|
||||
// // mobileModalStyle: {
|
||||
// // ...modalContainerMobileStyle,
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // ...modalContainerLaptopStyle,
|
||||
// // },
|
||||
// // contentStyle: {
|
||||
// // borderRadius: '8px',
|
||||
// // },
|
||||
// // },
|
||||
CONFIRM_RESET_ACCOUNT: {
|
||||
contents: h(ConfirmResetAccount),
|
||||
mobileModalStyle: {
|
||||
...modalContainerMobileStyle,
|
||||
},
|
||||
laptopModalStyle: {
|
||||
...modalContainerLaptopStyle,
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '8px',
|
||||
},
|
||||
},
|
||||
|
||||
// // CONFIRM_REMOVE_ACCOUNT: {
|
||||
// // contents: h(ConfirmRemoveAccount),
|
||||
// // mobileModalStyle: {
|
||||
// // ...modalContainerMobileStyle,
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // ...modalContainerLaptopStyle,
|
||||
// // },
|
||||
// // contentStyle: {
|
||||
// // borderRadius: '8px',
|
||||
// // },
|
||||
// // },
|
||||
CONFIRM_REMOVE_ACCOUNT: {
|
||||
contents: h(ConfirmRemoveAccount),
|
||||
mobileModalStyle: {
|
||||
...modalContainerMobileStyle,
|
||||
},
|
||||
laptopModalStyle: {
|
||||
...modalContainerLaptopStyle,
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '8px',
|
||||
},
|
||||
},
|
||||
|
||||
// // NEW_ACCOUNT: {
|
||||
// // contents: [
|
||||
// // h(NewAccountModal, {}, []),
|
||||
// // ],
|
||||
// // mobileModalStyle: {
|
||||
// // width: '95%',
|
||||
// // // top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh',
|
||||
// // top: '10%',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // width: '449px',
|
||||
// // // top: 'calc(33% + 45px)',
|
||||
// // top: '10%',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // },
|
||||
// // },
|
||||
NEW_ACCOUNT: {
|
||||
contents: [
|
||||
h(NewAccountModal, {}, []),
|
||||
],
|
||||
mobileModalStyle: {
|
||||
width: '95%',
|
||||
// top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh',
|
||||
top: '10%',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '449px',
|
||||
top: 'calc(33% + 45px)',
|
||||
top: '10%',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
},
|
||||
|
||||
// // CUSTOMIZE_GAS: {
|
||||
// // contents: [
|
||||
// // h(CustomizeGasModal),
|
||||
// // ],
|
||||
// // mobileModalStyle: {
|
||||
// // width: '100vw',
|
||||
// // height: '100vh',
|
||||
// // top: '0',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // width: '720px',
|
||||
// // height: '377px',
|
||||
// // top: '80px',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // },
|
||||
// // },
|
||||
CUSTOMIZE_GAS: {
|
||||
contents: [
|
||||
h(CustomizeGasModal),
|
||||
],
|
||||
mobileModalStyle: {
|
||||
width: '100vw',
|
||||
height: '100vh',
|
||||
top: '0',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '720px',
|
||||
height: '377px',
|
||||
top: '80px',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
},
|
||||
|
||||
// // CONFIRM_CUSTOMIZE_GAS: {
|
||||
// // contents: h(ConfirmCustomizeGasModal),
|
||||
// // mobileModalStyle: {
|
||||
// // width: '100vw',
|
||||
// // height: '100vh',
|
||||
// // top: '0',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // width: '720px',
|
||||
// // height: '377px',
|
||||
// // top: '80px',
|
||||
// // transform: 'none',
|
||||
// // left: '0',
|
||||
// // right: '0',
|
||||
// // margin: '0 auto',
|
||||
// // },
|
||||
// // },
|
||||
CONFIRM_CUSTOMIZE_GAS: {
|
||||
contents: h(ConfirmCustomizeGasModal),
|
||||
mobileModalStyle: {
|
||||
width: '100vw',
|
||||
height: '100vh',
|
||||
top: '0',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '720px',
|
||||
height: '377px',
|
||||
top: '80px',
|
||||
transform: 'none',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
},
|
||||
},
|
||||
|
||||
// // TRANSACTION_CONFIRMED: {
|
||||
// // disableBackdropClick: true,
|
||||
// // contents: h(TransactionConfirmed),
|
||||
// // mobileModalStyle: {
|
||||
// // ...modalContainerMobileStyle,
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // ...modalContainerLaptopStyle,
|
||||
// // },
|
||||
// // contentStyle: {
|
||||
// // borderRadius: '8px',
|
||||
// // },
|
||||
// // },
|
||||
TRANSACTION_CONFIRMED: {
|
||||
disableBackdropClick: true,
|
||||
contents: h(TransactionConfirmed),
|
||||
mobileModalStyle: {
|
||||
...modalContainerMobileStyle,
|
||||
},
|
||||
laptopModalStyle: {
|
||||
...modalContainerLaptopStyle,
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '8px',
|
||||
},
|
||||
},
|
||||
|
||||
// // QR_SCANNER: {
|
||||
// // contents: h(QRScanner),
|
||||
// // mobileModalStyle: {
|
||||
// // ...modalContainerMobileStyle,
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // ...modalContainerLaptopStyle,
|
||||
// // },
|
||||
// // contentStyle: {
|
||||
// // borderRadius: '8px',
|
||||
// // },
|
||||
// // },
|
||||
QR_SCANNER: {
|
||||
contents: h(QRScanner),
|
||||
mobileModalStyle: {
|
||||
...modalContainerMobileStyle,
|
||||
},
|
||||
laptopModalStyle: {
|
||||
...modalContainerLaptopStyle,
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '8px',
|
||||
},
|
||||
},
|
||||
|
||||
// // CANCEL_TRANSACTION: {
|
||||
// // contents: h(CancelTransaction),
|
||||
// // mobileModalStyle: {
|
||||
// // ...modalContainerMobileStyle,
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // ...modalContainerLaptopStyle,
|
||||
// // },
|
||||
// // contentStyle: {
|
||||
// // borderRadius: '8px',
|
||||
// // },
|
||||
// // },
|
||||
CANCEL_TRANSACTION: {
|
||||
contents: h(CancelTransaction),
|
||||
mobileModalStyle: {
|
||||
...modalContainerMobileStyle,
|
||||
},
|
||||
laptopModalStyle: {
|
||||
...modalContainerLaptopStyle,
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '8px',
|
||||
},
|
||||
},
|
||||
|
||||
// // TRANSACTION_DETAILS: {
|
||||
// // contents: h(TransactionDetails),
|
||||
// // mobileModalStyle: {
|
||||
// // ...modalContainerMobileStyle,
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // ...modalContainerLaptopStyle,
|
||||
// // },
|
||||
// // contentStyle: {
|
||||
// // borderRadius: '8px',
|
||||
// // },
|
||||
// // },
|
||||
TRANSACTION_DETAILS: {
|
||||
contents: h(TransactionDetails),
|
||||
mobileModalStyle: {
|
||||
...modalContainerMobileStyle,
|
||||
},
|
||||
laptopModalStyle: {
|
||||
...modalContainerLaptopStyle,
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '8px',
|
||||
},
|
||||
},
|
||||
|
||||
// // REJECT_TRANSACTIONS: {
|
||||
// // contents: h(RejectTransactions),
|
||||
// // mobileModalStyle: {
|
||||
// // ...modalContainerMobileStyle,
|
||||
// // },
|
||||
// // laptopModalStyle: {
|
||||
// // ...modalContainerLaptopStyle,
|
||||
// // },
|
||||
// // contentStyle: {
|
||||
// // borderRadius: '8px',
|
||||
// // },
|
||||
// // },
|
||||
REJECT_TRANSACTIONS: {
|
||||
contents: h(RejectTransactions),
|
||||
mobileModalStyle: {
|
||||
...modalContainerMobileStyle,
|
||||
},
|
||||
laptopModalStyle: {
|
||||
...modalContainerLaptopStyle,
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '8px',
|
||||
},
|
||||
},
|
||||
|
||||
// // DEFAULT: {
|
||||
// // contents: [],
|
||||
// // mobileModalStyle: {},
|
||||
// // laptopModalStyle: {},
|
||||
// // },
|
||||
// // }
|
||||
DEFAULT: {
|
||||
contents: [],
|
||||
mobileModalStyle: {},
|
||||
laptopModalStyle: {},
|
||||
},
|
||||
}
|
||||
|
||||
// // const BACKDROPSTYLE = {
|
||||
// // backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
||||
// // }
|
||||
const BACKDROPSTYLE = {
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
||||
}
|
||||
|
||||
// function mapStateToProps (state) {
|
||||
// return {
|
||||
// active: state.appState.modal.open,
|
||||
// modalState: state.appState.modal.modalState,
|
||||
// }
|
||||
// }
|
||||
|
||||
// function mapDispatchToProps (dispatch) {
|
||||
// return {
|
||||
// hideModal: () => {
|
||||
// dispatch(actions.hideModal())
|
||||
// },
|
||||
// hideWarning: () => {
|
||||
// dispatch(actions.hideWarning())
|
||||
// },
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// // Global Modal Component
|
||||
// inherits(Modal, Component)
|
||||
// function Modal () {
|
||||
// Component.call(this)
|
||||
// }
|
||||
|
||||
// module.exports = connect(mapStateToProps, mapDispatchToProps)(Modal)
|
||||
|
||||
// Modal.prototype.render = function () {
|
||||
// // const modal = MODALS[this.props.modalState.name || 'DEFAULT']
|
||||
|
||||
// // const { contents: children, disableBackdropClick = false } = modal
|
||||
// // const modalStyle = modal[isMobileView() ? 'mobileModalStyle' : 'laptopModalStyle']
|
||||
// // const contentStyle = modal.contentStyle || {}
|
||||
|
||||
// // todo
|
||||
// return null
|
||||
// // return h(FadeModal,
|
||||
// // {
|
||||
// // className: 'modal',
|
||||
// // keyboard: false,
|
||||
// // onHide: () => {
|
||||
// // if (modal.onHide) {
|
||||
// // modal.onHide(this.props)
|
||||
// // }
|
||||
// // this.onHide()
|
||||
// // },
|
||||
// // ref: (ref) => {
|
||||
// // this.modalRef = ref
|
||||
// // },
|
||||
// // modalStyle,
|
||||
// // contentStyle,
|
||||
// // backdropStyle: BACKDROPSTYLE,
|
||||
// // closeOnClick: !disableBackdropClick,
|
||||
// // },
|
||||
// // children,
|
||||
// // )
|
||||
// }
|
||||
|
||||
// Modal.prototype.componentWillReceiveProps = function (nextProps) {
|
||||
// if (nextProps.active) {
|
||||
// this.show()
|
||||
// } else if (this.props.active) {
|
||||
// this.hide()
|
||||
// }
|
||||
// }
|
||||
|
||||
// Modal.prototype.onHide = function () {
|
||||
// if (this.props.onHideCallback) {
|
||||
// this.props.onHideCallback()
|
||||
// }
|
||||
// this.props.hideModal()
|
||||
// }
|
||||
|
||||
// Modal.prototype.hide = function () {
|
||||
// this.modalRef.hide()
|
||||
// }
|
||||
|
||||
// Modal.prototype.show = function () {
|
||||
// this.modalRef.show()
|
||||
// }
|
||||
|
||||
export default class Modal {
|
||||
render () {
|
||||
return null
|
||||
function mapStateToProps (state) {
|
||||
return {
|
||||
active: state.appState.modal.open,
|
||||
modalState: state.appState.modal.modalState,
|
||||
}
|
||||
}
|
||||
|
||||
function mapDispatchToProps (dispatch) {
|
||||
return {
|
||||
hideModal: () => {
|
||||
dispatch(actions.hideModal())
|
||||
},
|
||||
hideWarning: () => {
|
||||
dispatch(actions.hideWarning())
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Global Modal Component
|
||||
inherits(Modal, Component)
|
||||
function Modal () {
|
||||
Component.call(this)
|
||||
}
|
||||
|
||||
module.exports = connect(mapStateToProps, mapDispatchToProps)(Modal)
|
||||
|
||||
Modal.prototype.render = function () {
|
||||
const modal = MODALS[this.props.modalState.name || 'DEFAULT']
|
||||
|
||||
const { contents: children, disableBackdropClick = false } = modal
|
||||
const modalStyle = modal[isMobileView() ? 'mobileModalStyle' : 'laptopModalStyle']
|
||||
const contentStyle = modal.contentStyle || {}
|
||||
|
||||
return h(FadeModal,
|
||||
{
|
||||
className: 'modal',
|
||||
keyboard: false,
|
||||
onHide: () => {
|
||||
if (modal.onHide) {
|
||||
modal.onHide(this.props)
|
||||
}
|
||||
this.onHide()
|
||||
},
|
||||
ref: (ref) => {
|
||||
this.modalRef = ref
|
||||
},
|
||||
modalStyle,
|
||||
contentStyle,
|
||||
backdropStyle: BACKDROPSTYLE,
|
||||
closeOnClick: !disableBackdropClick,
|
||||
},
|
||||
children,
|
||||
)
|
||||
}
|
||||
|
||||
Modal.prototype.componentWillReceiveProps = function (nextProps) {
|
||||
if (nextProps.active) {
|
||||
this.show()
|
||||
} else if (this.props.active) {
|
||||
this.hide()
|
||||
}
|
||||
}
|
||||
|
||||
Modal.prototype.onHide = function () {
|
||||
if (this.props.onHideCallback) {
|
||||
this.props.onHideCallback()
|
||||
}
|
||||
this.props.hideModal()
|
||||
}
|
||||
|
||||
Modal.prototype.hide = function () {
|
||||
this.modalRef.hide()
|
||||
}
|
||||
|
||||
Modal.prototype.show = function () {
|
||||
this.modalRef.show()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue