Builds ready [${SHORT_SHA1}]:
- mascara,
chrome,
firefox,
edge,
diff --git a/development/mock-dev.js b/development/mock-dev.js
index 45a435443ef8..9b08ad86a6f1 100644
--- a/development/mock-dev.js
+++ b/development/mock-dev.js
@@ -22,7 +22,7 @@ const backGroundConnectionModifiers = require('./backGroundConnectionModifiers')
const Selector = require('./selector')
const MetamaskController = require('../app/scripts/metamask-controller')
const firstTimeState = require('../app/scripts/first-time-state')
-const ExtensionPlatform = require('../app/scripts/platforms/extension')
+import ExtensionPlatform from '../app/scripts/platforms/extension'
const noop = function () {}
const log = require('loglevel')
diff --git a/development/states/pending-tx.json b/development/states/pending-tx.json
index bfa93f7ae3c9..b4a6565fa414 100644
--- a/development/states/pending-tx.json
+++ b/development/states/pending-tx.json
@@ -2,7 +2,6 @@
"metamask": {
"isInitialized": true,
"isUnlocked": true,
- "isMascara": false,
"rpcTarget": "https://rawtestrpc.metamask.io/",
"identities": {
"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825": {
diff --git a/gulpfile.js b/gulpfile.js
index dc36cfb53647..4df65938f854 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -31,6 +31,7 @@ function gulpParallel (...args) {
}
const conf = require('rc')('niftywallet', {
+ INFURA_PROJECT_ID: process.env.INFURA_PROJECT_ID,
ETH_MAINNET_RPC_ENDPOINT: process.env.ETH_MAINNET_RPC_ENDPOINT,
})
@@ -41,8 +42,6 @@ const browserPlatforms = [
'opera',
]
const commonPlatforms = [
- // browser webapp
- 'mascara',
// browser extensions
...browserPlatforms,
]
@@ -69,7 +68,7 @@ createCopyTasks('images', {
destinations: commonPlatforms.map(platform => `./dist/${platform}/images`),
})
createCopyTasks('contractImages', {
- source: './node_modules/eth-contract-metadata/images/',
+ source: './node_modules/@metamask/contract-metadata/images/',
destinations: commonPlatforms.map(platform => `./dist/${platform}/images/contract`),
})
createCopyTasks('contractImagesPOA', {
@@ -112,14 +111,6 @@ createCopyTasks('manifest', {
destinations: browserPlatforms.map(platform => `./dist/${platform}`),
})
-// copy mascara
-
-createCopyTasks('html:mascara', {
- source: './mascara/',
- pattern: 'proxy/index.html',
- destinations: [`./dist/mascara/`],
-})
-
function createCopyTasks (label, opts) {
if (!opts.devOnly) {
const copyTaskName = `copy:${label}`
@@ -254,8 +245,6 @@ const buildJsFiles = [
// bundle tasks
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:extension:js', devMode: true })
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:extension:js' })
-createTasksForBuildJsMascara({ taskPrefix: 'build:mascara:js' })
-createTasksForBuildJsMascara({ taskPrefix: 'dev:mascara:js', devMode: true })
function createTasksForBuildJsExtension ({ buildJsFiles, taskPrefix, devMode, bundleTaskOpts = {} }) {
// inpage must be built before all other scripts:
@@ -275,22 +264,6 @@ function createTasksForBuildJsExtension ({ buildJsFiles, taskPrefix, devMode, bu
createTasksForBuildJs({ rootDir, taskPrefix, bundleTaskOpts, destinations, buildPhase1, buildPhase2 })
}
-function createTasksForBuildJsMascara ({ taskPrefix, devMode, bundleTaskOpts = {} }) {
- // inpage must be built before all other scripts:
- const rootDir = './mascara/src/'
- const buildPhase1 = ['ui', 'proxy', 'background', 'metamascara']
- const destinations = ['./dist/mascara']
- bundleTaskOpts = Object.assign({
- buildSourceMaps: true,
- sourceMapDir: './',
- minifyBuild: false,
- buildWithFullPaths: devMode,
- watch: devMode,
- devMode,
- }, bundleTaskOpts)
- createTasksForBuildJs({ rootDir, taskPrefix, bundleTaskOpts, destinations, buildPhase1 })
-}
-
function createTasksForBuildJs ({ rootDir, taskPrefix, bundleTaskOpts, destinations, buildPhase1 = [], buildPhase2 = [] }) {
// bundle task for each file
const jsFiles = [].concat(buildPhase1, buildPhase2)
@@ -338,7 +311,6 @@ gulp.task('dev',
'clean',
gulp.parallel(
'dev:extension:js',
- 'dev:mascara:js',
'dev:copy',
'dev:reload',
),
@@ -356,23 +328,11 @@ gulp.task('dev:extension',
),
)
-gulp.task('dev:mascara',
- gulp.series(
- 'clean',
- gulp.parallel(
- 'dev:mascara:js',
- 'dev:copy',
- 'dev:reload',
- ),
- ),
-)
-
gulp.task('build',
gulp.series(
'clean',
gulpParallel(
'build:extension:js',
- 'build:mascara:js',
'copy',
),
),
@@ -388,16 +348,6 @@ gulp.task('build:extension',
),
)
-gulp.task('build:mascara',
- gulp.series(
- 'clean',
- gulp.parallel(
- 'build:mascara:js',
- 'copy',
- ),
- ),
-)
-
gulp.task('dist',
gulp.series(
'build',
@@ -430,6 +380,7 @@ function generateBundler (opts, performBundle) {
METAMASK_DEBUG: opts.devMode,
NODE_ENV: opts.devMode ? 'development' : 'production',
ETH_MAINNET_RPC_ENDPOINT: conf.ETH_MAINNET_RPC_ENDPOINT,
+ INFURA_PROJECT_ID: conf.INFURA_PROJECT_ID,
}))
if (opts.watch) {
@@ -510,7 +461,7 @@ function bundleTask (opts) {
buildStream = buildStream
.pipe(uglify({
mangle: {
- reserved: [ 'MetamaskInpageProvider' ],
+ reserved: [ 'MetaMaskInpageProvider' ],
},
}))
}
diff --git a/mascara/README.md b/mascara/README.md
deleted file mode 100644
index 6e3bfe96beed..000000000000
--- a/mascara/README.md
+++ /dev/null
@@ -1,33 +0,0 @@
-start the dual servers (dapp + mascara)
-```
-npm run mascara
-```
-
-### First time use:
-
-- navigate to: http://localhost:9001
-- Create an Account
-- go back to http://localhost:9002
-- open devTools
-- click Sync Tx
-
-### Tests:
-
-```
-npm run testMascara
-```
-
-Test will run in browser, you will have to have these browsers installed:
-
-- Chrome
-- Firefox
-- Opera
-
-
-### Deploy:
-
-Will build and deploy mascara via docker
-
-```
-docker-compose build && docker-compose stop && docker-compose up -d && docker-compose logs --tail 200 -f
-```
\ No newline at end of file
diff --git a/mascara/example/app.js b/mascara/example/app.js
deleted file mode 100644
index 7b6421fdca1a..000000000000
--- a/mascara/example/app.js
+++ /dev/null
@@ -1,38 +0,0 @@
-const EthQuery = require('ethjs-query')
-
-window.addEventListener('load', loadProvider)
-window.addEventListener('message', console.warn)
-
-async function loadProvider () {
- const ethereumProvider = window.metamask.createDefaultProvider({ host: 'http://localhost:9001' })
- const ethQuery = new EthQuery(ethereumProvider)
- const accounts = await ethQuery.accounts()
- window.METAMASK_ACCOUNT = accounts[0] || 'locked'
- logToDom(accounts.length ? accounts[0] : 'LOCKED or undefined', 'account')
- setupButtons(ethQuery)
-}
-
-
-function logToDom (message, context) {
- document.getElementById(context).innerText = message
- console.log(message)
-}
-
-function setupButtons (ethQuery) {
- const accountButton = document.getElementById('action-button-1')
- accountButton.addEventListener('click', async () => {
- const accounts = await ethQuery.accounts()
- window.METAMASK_ACCOUNT = accounts[0] || 'locked'
- logToDom(accounts.length ? accounts[0] : 'LOCKED or undefined', 'account')
- })
- const txButton = document.getElementById('action-button-2')
- txButton.addEventListener('click', async () => {
- if (!window.METAMASK_ACCOUNT || window.METAMASK_ACCOUNT === 'locked') return
- const txHash = await ethQuery.sendTransaction({
- from: window.METAMASK_ACCOUNT,
- to: window.METAMASK_ACCOUNT,
- data: '',
- })
- logToDom(txHash, 'cb-value')
- })
-}
diff --git a/mascara/example/app/index.html b/mascara/example/app/index.html
deleted file mode 100644
index 6ee7bc349616..000000000000
--- a/mascara/example/app/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Nifty Wallet ZeroClient Example
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/mascara/example/server.js b/mascara/example/server.js
deleted file mode 100644
index bdb1efa16b80..000000000000
--- a/mascara/example/server.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const express = require('express')
-const path = require('path')
-const createMetamascaraServer = require('../server/')
-const createBundle = require('../server/util').createBundle
-const serveBundle = require('../server/util').serveBundle
-//
-// Iframe Server
-//
-
-const mascaraServer = createMetamascaraServer()
-
-// start the server
-const mascaraPort = 9001
-mascaraServer.listen(mascaraPort)
-console.log(`Mascara service listening on port ${mascaraPort}`)
-
-
-//
-// Dapp Server
-//
-
-const dappServer = express()
-
-// serve dapp bundle
-serveBundle(dappServer, '/app.js', createBundle(require.resolve('./app.js')))
-dappServer.use(express.static(path.join(__dirname, '/app/')))
-
-// start the server
-const dappPort = '9002'
-dappServer.listen(dappPort)
-console.log(`Dapp listening on port ${dappPort}`)
diff --git a/mascara/proxy/index.html b/mascara/proxy/index.html
deleted file mode 100644
index aeff62423f07..000000000000
--- a/mascara/proxy/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
- Nifty Wallet ZeroClient Iframe
-
-
-
-
-
-
-
- Hello! I am the Nifty Wallet iframe.
-
-
-
diff --git a/mascara/server/index.js b/mascara/server/index.js
deleted file mode 100644
index a30120438212..000000000000
--- a/mascara/server/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const path = require('path')
-const express = require('express')
-const compression = require('compression')
-
-module.exports = createMetamascaraServer
-
-
-function createMetamascaraServer () {
-
- // setup server
- const server = express()
- server.use(compression())
-
- // serve assets
- server.use(express.static(path.join(__dirname, '/../ui/'), { setHeaders: (res) => res.set('X-Frame-Options', 'DENY') }))
- server.use(express.static(path.join(__dirname, '/../../dist/mascara')))
- server.use(express.static(path.join(__dirname, '/../proxy')))
-
- return server
-
-}
diff --git a/mascara/server/util.js b/mascara/server/util.js
deleted file mode 100644
index f9692afb6065..000000000000
--- a/mascara/server/util.js
+++ /dev/null
@@ -1,47 +0,0 @@
-const browserify = require('browserify')
-const watchify = require('watchify')
-
-module.exports = {
- serveBundle,
- createBundle,
-}
-
-
-function serveBundle (server, path, bundle) {
- server.get(path, function (req, res) {
- res.setHeader('Content-Type', 'application/javascript; charset=UTF-8')
- res.send(bundle.latest)
- })
-}
-
-function createBundle (entryPoint) {
-
- var bundleContainer = {}
-
- var bundler = browserify({
- entries: [entryPoint],
- cache: {},
- packageCache: {},
- plugin: [watchify],
- })
- .transform('babelify')
- .transform('uglifyify', { global: true })
-
- bundler.on('update', bundle)
- bundle()
-
- return bundleContainer
-
- function bundle () {
- bundler.bundle(function (err, result) {
- if (err) {
- console.log(`Bundle failed! (${entryPoint})`)
- console.error(err)
- return
- }
- console.log(`Bundle updated! (${entryPoint})`)
- bundleContainer.latest = result.toString()
- })
- }
-
-}
diff --git a/mascara/src/app/buy-ether-widget/index.js b/mascara/src/app/buy-ether-widget/index.js
deleted file mode 100644
index 4bac141487e2..000000000000
--- a/mascara/src/app/buy-ether-widget/index.js
+++ /dev/null
@@ -1,198 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import classnames from 'classnames'
-import {connect} from 'react-redux'
-import {qrcode} from 'qrcode-npm'
-import copyToClipboard from 'copy-to-clipboard'
-import ShapeShiftForm from '../shapeshift-form'
-import {buyEth, showAccountDetail} from '../../../../ui/app/actions'
-
-const OPTION_VALUES = {
- COINBASE: 'coinbase',
- SHAPESHIFT: 'shapeshift',
- QR_CODE: 'qr_code',
-}
-
-const OPTIONS = [
- {
- name: 'Direct Deposit',
- value: OPTION_VALUES.QR_CODE,
- },
- {
- name: 'Buy with Dollars',
- value: OPTION_VALUES.COINBASE,
- },
- {
- name: 'Buy with Cryptos',
- value: OPTION_VALUES.SHAPESHIFT,
- },
-]
-
-class BuyEtherWidget extends Component {
-
- static propTypes = {
- address: PropTypes.string,
- skipText: PropTypes.string,
- className: PropTypes.string,
- onSkip: PropTypes.func,
- goToCoinbase: PropTypes.func,
- showAccountDetail: PropTypes.func,
- };
-
- state = {
- selectedOption: OPTION_VALUES.QR_CODE,
- };
-
-
- copyToClipboard = () => {
- const { address } = this.props
-
- this.setState({ justCopied: true }, () => copyToClipboard(address))
-
- setTimeout(() => this.setState({ justCopied: false }), 1000)
- }
-
- renderSkip () {
- const {showAccountDetail, address, skipText, onSkip} = this.props
-
- return (
- {
- if (onSkip) return onSkip()
- showAccountDetail(address)
- }}
- >
- {skipText || 'Do it later'}
-
- )
- }
-
- renderCoinbaseLogo () {
- return (
-
- )
- }
-
- renderCoinbaseForm () {
- const {goToCoinbase, address} = this.props
-
- return (
-
-
{this.renderCoinbaseLogo()}
-
Coinbase is the world’s most popular way to buy and sell bitcoin, ethereum, and litecoin.
-
What is Ethereum?
-
-
-
-
- )
- }
-
- renderContent () {
- const { address } = this.props
- const { justCopied } = this.state
- const qrImage = qrcode(4, 'M')
- qrImage.addData(address)
- qrImage.make()
-
- switch (this.state.selectedOption) {
- case OPTION_VALUES.COINBASE:
- return this.renderCoinbaseForm()
- case OPTION_VALUES.SHAPESHIFT:
- return (
-
-
-
- Trade any leading blockchain asset for any other. Protection by Design. No Account Needed.
-
-
-
- )
- case OPTION_VALUES.QR_CODE:
- return (
-
-
-
Deposit Ether directly into your account.
-
(This is the account address that Nifty Wallet created for you to recieve funds.)
-
-
-
-
- )
- default:
- return null
- }
- }
-
- render () {
- const { className = '' } = this.props
- const { selectedOption } = this.state
-
- return (
-
-
-
Deposit Options
- {this.renderSkip()}
-
-
-
- {OPTIONS.map(({ name, value }) => (
-
this.setState({ selectedOption: value })}
- >
-
{name}
- {value === selectedOption && (
-
- )}
-
- ))}
-
-
- {this.renderContent()}
-
-
-
- )
- }
-}
-
-export default connect(
- ({ metamask: { selectedAddress } }) => ({
- address: selectedAddress,
- }),
- dispatch => ({
- goToCoinbase: address => dispatch(buyEth({ network: '1', address, amount: 0 })),
- showAccountDetail: address => dispatch(showAccountDetail(address)),
- }),
-)(BuyEtherWidget)
diff --git a/mascara/src/app/first-time/breadcrumbs.js b/mascara/src/app/first-time/breadcrumbs.js
deleted file mode 100644
index d86e10d4842e..000000000000
--- a/mascara/src/app/first-time/breadcrumbs.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-
-export default class Breadcrumbs extends Component {
-
- static propTypes = {
- total: PropTypes.number,
- currentIndex: PropTypes.number,
- };
-
- render () {
- const {total, currentIndex} = this.props
- return (
-
- {Array(total).fill().map((_, i) => (
-
- ))}
-
- )
- }
-
-}
diff --git a/mascara/src/app/first-time/buy-ether-screen.js b/mascara/src/app/first-time/buy-ether-screen.js
deleted file mode 100644
index 65589b7d46fc..000000000000
--- a/mascara/src/app/first-time/buy-ether-screen.js
+++ /dev/null
@@ -1,200 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import classnames from 'classnames'
-import {connect} from 'react-redux'
-import {qrcode} from 'qrcode-npm'
-import copyToClipboard from 'copy-to-clipboard'
-import ShapeShiftForm from '../shapeshift-form'
-import Identicon from '../../../../ui/app/components/identicon'
-import {buyEth, showAccountDetail} from '../../../../ui/app/actions'
-
-class BuyEtherScreen extends Component {
- static OPTION_VALUES = {
- COINBASE: 'coinbase',
- SHAPESHIFT: 'shapeshift',
- QR_CODE: 'qr_code',
- };
-
- static OPTIONS = [
- {
- name: 'Direct Deposit',
- value: BuyEtherScreen.OPTION_VALUES.QR_CODE,
- },
- {
- name: 'Buy with Dollars',
- value: BuyEtherScreen.OPTION_VALUES.COINBASE,
- },
- {
- name: 'Buy with Cryptos',
- value: BuyEtherScreen.OPTION_VALUES.SHAPESHIFT,
- },
- ];
-
- static propTypes = {
- address: PropTypes.string,
- goToCoinbase: PropTypes.func.isRequired,
- showAccountDetail: PropTypes.func.isRequired,
- }
-
- state = {
- selectedOption: BuyEtherScreen.OPTION_VALUES.QR_CODE,
- justCopied: false,
- }
-
- copyToClipboard = () => {
- const { address } = this.props
-
- this.setState({ justCopied: true }, () => copyToClipboard(address))
-
- setTimeout(() => this.setState({ justCopied: false }), 1000)
- }
-
- renderSkip () {
- const {showAccountDetail, address} = this.props
-
- return (
- showAccountDetail(address)}
- >
- Do it later
-
- )
- }
-
- renderCoinbaseLogo () {
- return (
-
- )
- }
-
- renderCoinbaseForm () {
- const {goToCoinbase, address} = this.props
-
- return (
-
-
{this.renderCoinbaseLogo()}
-
Coinbase is the world’s most popular way to buy and sell bitcoin, ethereum, and litecoin.
-
What is Ethereum?
-
-
-
-
- )
- }
-
- renderContent () {
- const { OPTION_VALUES } = BuyEtherScreen
- const { address } = this.props
- const { justCopied } = this.state
- const qrImage = qrcode(4, 'M')
- qrImage.addData(address)
- qrImage.make()
-
- switch (this.state.selectedOption) {
- case OPTION_VALUES.COINBASE:
- return this.renderCoinbaseForm()
- case OPTION_VALUES.SHAPESHIFT:
- return (
-
-
-
- Trade any leading blockchain asset for any other. Protection by Design. No Account Needed.
-
-
-
- )
- case OPTION_VALUES.QR_CODE:
- return (
-
-
-
Deposit Ether directly into your account.
-
(This is the account address that Nifty Wallet created for you to recieve funds.)
-
-
-
-
- )
- default:
- return null
- }
- }
-
- render () {
- const { OPTIONS } = BuyEtherScreen
- const { selectedOption } = this.state
-
- return (
-
-
-
Deposit Ether
-
- Nifty Wallet works best if you have Ether in your account to pay for transaction gas fees and more. To get Ether, choose from one of these methods.
-
-
-
-
Deposit Options
- {this.renderSkip()}
-
-
-
- {OPTIONS.map(({ name, value }) => (
-
this.setState({ selectedOption: value })}
- >
-
{name}
- {value === selectedOption && (
-
- )}
-
- ))}
-
-
- {this.renderContent()}
-
-
-
-
- )
- }
-}
-
-export default connect(
- ({ metamask: { selectedAddress } }) => ({
- address: selectedAddress,
- }),
- dispatch => ({
- goToCoinbase: address => dispatch(buyEth({ network: '1', address, amount: 0 })),
- showAccountDetail: address => dispatch(showAccountDetail(address)),
- }),
-)(BuyEtherScreen)
diff --git a/mascara/src/app/first-time/confirm-seed-screen.js b/mascara/src/app/first-time/confirm-seed-screen.js
deleted file mode 100644
index ee51e20ac9f9..000000000000
--- a/mascara/src/app/first-time/confirm-seed-screen.js
+++ /dev/null
@@ -1,163 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import { connect } from 'react-redux'
-import { withRouter } from 'react-router-dom'
-import classnames from 'classnames'
-import shuffle from 'lodash.shuffle'
-import { compose } from 'recompose'
-import Identicon from '../../../../ui/app/components/identicon'
-import { confirmSeedWords, showModal } from '../../../../ui/app/actions'
-import Breadcrumbs from './breadcrumbs'
-import LoadingScreen from './loading-screen'
-import { DEFAULT_ROUTE, INITIALIZE_BACKUP_PHRASE_ROUTE } from '../../../../ui/app/routes'
-
-class ConfirmSeedScreen extends Component {
- static propTypes = {
- isLoading: PropTypes.bool,
- address: PropTypes.string,
- seedWords: PropTypes.string,
- confirmSeedWords: PropTypes.func,
- history: PropTypes.object,
- openBuyEtherModal: PropTypes.func,
- };
-
- static defaultProps = {
- seedWords: '',
- }
-
- constructor (props) {
- super(props)
- const { seedWords } = props
- this.state = {
- selectedSeeds: [],
- shuffledSeeds: seedWords && shuffle(seedWords.split(' ')) || [],
- }
- }
-
- // eslint-disable-next-line camelcase
- UNSAFE_componentWillMount () {
- const { seedWords, history } = this.props
-
- if (!seedWords) {
- history.push(DEFAULT_ROUTE)
- }
- }
-
- handleClick () {
- const { confirmSeedWords, history, openBuyEtherModal } = this.props
-
- confirmSeedWords()
- .then(() => {
- history.push(DEFAULT_ROUTE)
- openBuyEtherModal()
- })
- }
-
- render () {
- const { seedWords, history } = this.props
- const { selectedSeeds, shuffledSeeds } = this.state
- const isValid = seedWords === selectedSeeds.map(([_, seed]) => seed).join(' ')
-
- return (
-
- {
- this.props.isLoading
- ?
- : (
-
-
-
-
{
- e.preventDefault()
- history.push(INITIALIZE_BACKUP_PHRASE_ROUTE)
- }}
- href="#"
- >
- {`< Back`}
-
-
-
-
-
- Confirm your Secret Backup Phrase
-
-
- Please select each phrase in order to make sure it is correct.
-
-
- {selectedSeeds.map(([_, word], i) => (
-
- ))}
-
-
- {shuffledSeeds.map((word, i) => {
- const isSelected = selectedSeeds
- .filter(([index, seed]) => seed === word && index === i)
- .length
-
- return (
-
- )
- })}
-
-
-
-
-
-
-
-
- )
- }
-
- )
- }
-}
-
-export default compose(
- withRouter,
- connect(
- ({ metamask: { selectedAddress, seedWords }, appState: { isLoading } }) => ({
- seedWords,
- isLoading,
- address: selectedAddress,
- }),
- dispatch => ({
- confirmSeedWords: () => dispatch(confirmSeedWords()),
- openBuyEtherModal: () => dispatch(showModal({ name: 'DEPOSIT_ETHER'})),
- }),
- ),
-)(ConfirmSeedScreen)
diff --git a/mascara/src/app/first-time/create-password-screen.js b/mascara/src/app/first-time/create-password-screen.js
deleted file mode 100644
index e505f6a3cdb5..000000000000
--- a/mascara/src/app/first-time/create-password-screen.js
+++ /dev/null
@@ -1,216 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import {connect} from 'react-redux'
-import { withRouter } from 'react-router-dom'
-import { compose } from 'recompose'
-import { createNewVaultAndKeychain } from '../../../../ui/app/actions'
-import Breadcrumbs from './breadcrumbs'
-import EventEmitter from 'events'
-import classnames from 'classnames'
-import {
- INITIALIZE_UNIQUE_IMAGE_ROUTE,
- INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE,
- INITIALIZE_NOTICE_ROUTE,
-} from '../../../../ui/app/routes'
-import TextField from '../../../../ui/app/components/text-field'
-
-class CreatePasswordScreen extends Component {
- static contextTypes = {
- t: PropTypes.func,
- }
-
- static propTypes = {
- isLoading: PropTypes.bool.isRequired,
- createAccount: PropTypes.func.isRequired,
- history: PropTypes.object.isRequired,
- isInitialized: PropTypes.bool,
- isUnlocked: PropTypes.bool,
- isMascara: PropTypes.bool.isRequired,
- }
-
- state = {
- password: '',
- confirmPassword: '',
- passwordError: null,
- confirmPasswordError: null,
- }
-
- constructor (props) {
- super(props)
- this.animationEventEmitter = new EventEmitter()
- }
-
- // eslint-disable-next-line camelcase
- UNSAFE_componentWillMount () {
- const { isInitialized, history } = this.props
-
- if (isInitialized) {
- history.push(INITIALIZE_NOTICE_ROUTE)
- }
- }
-
- isValid () {
- const { password, confirmPassword } = this.state
-
- if (!password || !confirmPassword) {
- return false
- }
-
- if (password.length < 8) {
- return false
- }
-
- return password === confirmPassword
- }
-
- createAccount = (event) => {
- event.preventDefault()
-
- if (!this.isValid()) {
- return
- }
-
- const { password } = this.state
- const { createAccount, history } = this.props
-
- this.setState({ isLoading: true })
- createAccount(password)
- .then(() => history.push(INITIALIZE_UNIQUE_IMAGE_ROUTE))
- }
-
- handlePasswordChange (password) {
- const { confirmPassword } = this.state
- let confirmPasswordError = null
- let passwordError = null
-
- if (password && password.length < 8) {
- passwordError = this.context.t('passwordNotLongEnough')
- }
-
- if (confirmPassword && password !== confirmPassword) {
- confirmPasswordError = this.context.t('passwordsDontMatch')
- }
-
- this.setState({ password, passwordError, confirmPasswordError })
- }
-
- handleConfirmPasswordChange (confirmPassword) {
- const { password } = this.state
- let confirmPasswordError = null
-
- if (password !== confirmPassword) {
- confirmPasswordError = this.context.t('passwordsDontMatch')
- }
-
- this.setState({ confirmPassword, confirmPasswordError })
- }
-
- render () {
- const { history, isMascara } = this.props
- const { passwordError, confirmPasswordError } = this.state
- const { t } = this.context
-
- return (
-
-
- {isMascara &&
-
- Nifty Wallet is a secure identity vault for Ethereum.
-
-
- It allows you to hold ether & tokens, and interact with decentralized applications.
-
-
}
-
-
-
- )
- }
-}
-
-const mapStateToProps = ({ metamask, appState }) => {
- const { isInitialized, isUnlocked, isMascara, noActiveNotices } = metamask
- const { isLoading } = appState
-
- return {
- isLoading,
- isInitialized,
- isUnlocked,
- isMascara,
- noActiveNotices,
- }
-}
-
-export default compose(
- withRouter,
- connect(
- mapStateToProps,
- dispatch => ({
- createAccount: password => dispatch(createNewVaultAndKeychain(password)),
- }),
- ),
-)(CreatePasswordScreen)
diff --git a/mascara/src/app/first-time/import-account-screen.js b/mascara/src/app/first-time/import-account-screen.js
deleted file mode 100644
index b9b137277828..000000000000
--- a/mascara/src/app/first-time/import-account-screen.js
+++ /dev/null
@@ -1,214 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import {connect} from 'react-redux'
-import classnames from 'classnames'
-import LoadingScreen from './loading-screen'
-import {importNewAccount, hideWarning} from '../../../../ui/app/actions'
-
-class Input extends Component {
-
- static propTypes = {
- label: PropTypes.string.isRequired,
- placeholder: PropTypes.string.isRequired,
- type: PropTypes.string.isRequired,
- errorMessage: PropTypes.string.isRequired,
- onChange: PropTypes.func.isRequired,
- }
-
-render () {
- const {label, type, placeholder, errorMessage, onChange} = this.props
- return (
-
-
{label}
-
-
{errorMessage}
-
-)
-}
- }
-
-class ImportAccountScreen extends Component {
- static OPTIONS = {
- PRIVATE_KEY: 'private_key',
- JSON_FILE: 'json_file',
- };
-
- static propTypes = {
- warning: PropTypes.string,
- back: PropTypes.func.isRequired,
- next: PropTypes.func.isRequired,
- importNewAccount: PropTypes.func.isRequired,
- hideWarning: PropTypes.func.isRequired,
- isLoading: PropTypes.bool.isRequired,
- };
-
- state = {
- selectedOption: ImportAccountScreen.OPTIONS.PRIVATE_KEY,
- privateKey: '',
- jsonFile: {},
- }
-
- isValid () {
- const { OPTIONS } = ImportAccountScreen
- const { privateKey, jsonFile, password } = this.state
-
- switch (this.state.selectedOption) {
- case OPTIONS.JSON_FILE:
- return Boolean(jsonFile && password)
- case OPTIONS.PRIVATE_KEY:
- default:
- return Boolean(privateKey)
- }
- }
-
- onClick = () => {
- const { OPTIONS } = ImportAccountScreen
- const { importNewAccount, next } = this.props
- const { privateKey, jsonFile, password } = this.state
-
- switch (this.state.selectedOption) {
- case OPTIONS.JSON_FILE:
- return importNewAccount('JSON File', [ jsonFile, password ])
- // JS runtime requires caught rejections but failures are handled by Redux
- .catch()
- .then(next)
- case OPTIONS.PRIVATE_KEY:
- default:
- return importNewAccount('Private Key', [ privateKey ])
- // JS runtime requires caught rejections but failures are handled by Redux
- .catch()
- .then(next)
- }
- }
-
- renderPrivateKey () {
- return Input({
- label: 'Add Private Key String',
- placeholder: 'Enter private key',
- onChange: e => this.setState({ privateKey: e.target.value }),
- errorMessage: this.props.warning && 'Something went wrong. Please make sure your private key is correct.',
- })
- }
-
- renderJsonFile () {
- const { jsonFile: { name } } = this.state
- const { warning } = this.props
-
- return (
-
-
-
Upload File
-
-
this.setState({ jsonFile: e.target.files[0] })}
- />
-
-
{name}
-
-
- {warning && 'Something went wrong. Please make sure your JSON file is properly formatted.'}
-
-
- {Input({
- label: 'Enter Password',
- placeholder: 'Enter Password',
- type: 'password',
- onChange: e => this.setState({ password: e.target.value }),
- errorMessage: warning && 'Please make sure your password is correct.',
- })}
-
- )
- }
-
- renderContent () {
- const { OPTIONS } = ImportAccountScreen
-
- switch (this.state.selectedOption) {
- case OPTIONS.JSON_FILE:
- return this.renderJsonFile()
- case OPTIONS.PRIVATE_KEY:
- default:
- return this.renderPrivateKey()
- }
- }
-
- render () {
- const { OPTIONS } = ImportAccountScreen
- const { selectedOption } = this.state
-
- return this.props.isLoading
- ?
- : (
-
- )
- }
-}
-
-export default connect(
- ({ appState: { isLoading, warning } }) => ({ isLoading, warning }),
- dispatch => ({
- importNewAccount: (strategy, args) => dispatch(importNewAccount(strategy, args)),
- hideWarning: () => dispatch(hideWarning()),
- }),
-)(ImportAccountScreen)
diff --git a/mascara/src/app/first-time/import-seed-phrase-screen.js b/mascara/src/app/first-time/import-seed-phrase-screen.js
deleted file mode 100644
index f7cf76b29916..000000000000
--- a/mascara/src/app/first-time/import-seed-phrase-screen.js
+++ /dev/null
@@ -1,191 +0,0 @@
-import {validateMnemonic} from 'bip39'
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import {connect} from 'react-redux'
-import {
- createNewVaultAndRestore,
- unMarkPasswordForgotten,
-} from '../../../../ui/app/actions'
-import { INITIALIZE_NOTICE_ROUTE } from '../../../../ui/app/routes'
-import TextField from '../../../../ui/app/components/text-field'
-
-class ImportSeedPhraseScreen extends Component {
- static contextTypes = {
- t: PropTypes.func,
- }
-
- static propTypes = {
- warning: PropTypes.string,
- createNewVaultAndRestore: PropTypes.func.isRequired,
- leaveImportSeedScreenState: PropTypes.func,
- history: PropTypes.object,
- isLoading: PropTypes.bool,
- };
-
- state = {
- seedPhrase: '',
- password: '',
- confirmPassword: '',
- seedPhraseError: null,
- passwordError: null,
- confirmPasswordError: null,
- }
-
- parseSeedPhrase = (seedPhrase) => {
- return seedPhrase
- .match(/\w+/g)
- .join(' ')
- }
-
- handleSeedPhraseChange (seedPhrase) {
- let seedPhraseError = null
-
- if (seedPhrase) {
- const wordsCount = this.parseSeedPhrase(seedPhrase).split(' ').length
- if (wordsCount !== 12 && wordsCount !== 24) {
- seedPhraseError = this.context.t('seedPhraseReq')
- } else if (!validateMnemonic(seedPhrase)) {
- seedPhraseError = this.context.t('invalidSeedPhrase')
- }
- }
-
- this.setState({ seedPhrase, seedPhraseError })
- }
-
- handlePasswordChange (password) {
- const { confirmPassword } = this.state
- let confirmPasswordError = null
- let passwordError = null
-
- if (password && password.length < 8) {
- passwordError = this.context.t('passwordNotLongEnough')
- }
-
- if (confirmPassword && password !== confirmPassword) {
- confirmPasswordError = this.context.t('passwordsDontMatch')
- }
-
- this.setState({ password, passwordError, confirmPasswordError })
- }
-
- handleConfirmPasswordChange (confirmPassword) {
- const { password } = this.state
- let confirmPasswordError = null
-
- if (password !== confirmPassword) {
- confirmPasswordError = this.context.t('passwordsDontMatch')
- }
-
- this.setState({ confirmPassword, confirmPasswordError })
- }
-
- onClick = () => {
- const { password, seedPhrase } = this.state
- const {
- createNewVaultAndRestore,
- leaveImportSeedScreenState,
- history,
- } = this.props
-
- leaveImportSeedScreenState()
- createNewVaultAndRestore(password, this.parseSeedPhrase(seedPhrase))
- .then(() => history.push(INITIALIZE_NOTICE_ROUTE))
- }
-
- hasError () {
- const { passwordError, confirmPasswordError, seedPhraseError } = this.state
- return passwordError || confirmPasswordError || seedPhraseError
- }
-
- render () {
- const {
- seedPhrase,
- password,
- confirmPassword,
- seedPhraseError,
- passwordError,
- confirmPasswordError,
- } = this.state
- const { t } = this.context
- const { isLoading } = this.props
- const disabled = !seedPhrase || !password || !confirmPassword || isLoading || this.hasError()
-
- return (
-
-
-
-
{
- e.preventDefault()
- this.props.history.goBack()
- }}
- href="#"
- >
- {`< Back`}
-
-
- Import an Account with Seed Phrase
-
-
- Enter your secret twelve word phrase here to restore your vault.
-
-
-
-
-
- { seedPhraseError }
-
-
this.handlePasswordChange(event.target.value)}
- error={passwordError}
- autoComplete="new-password"
- margin="normal"
- largeLabel
- />
- this.handleConfirmPasswordChange(event.target.value)}
- error={confirmPasswordError}
- autoComplete="confirm-password"
- margin="normal"
- largeLabel
- />
-
-
-
-
- )
- }
-}
-
-export default connect(
- ({ appState: { warning, isLoading } }) => ({ warning, isLoading }),
- dispatch => ({
- leaveImportSeedScreenState: () => {
- dispatch(unMarkPasswordForgotten())
- },
- createNewVaultAndRestore: (pw, seed) => dispatch(createNewVaultAndRestore(pw, seed)),
- }),
-)(ImportSeedPhraseScreen)
diff --git a/mascara/src/app/first-time/index.css b/mascara/src/app/first-time/index.css
deleted file mode 100644
index f3df240e76a1..000000000000
--- a/mascara/src/app/first-time/index.css
+++ /dev/null
@@ -1,925 +0,0 @@
-@font-face {
- font-family: 'Roboto';
- font-style: normal;
- font-weight: 400;
- src: local('Roboto'), local('Roboto-Regular'), url('/fonts/Roboto/Roboto-Regular.ttf') format('truetype');
- unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
-}
-
-.first-time-flow {
- width: 100vw;
- background-color: #fff;
- overflow: auto;
- display: flex;
- justify-content: center;
- flex: 1 0 auto;
- font-weight: 400;
- font-family: Roboto;
-}
-
-@media screen and (min-height: 601px) {
- .first-time-flow {
- height: 100vh;
- }
-}
-
-.alpha-warning__container {
- display: flex;
- justify-content: center;
- background: #f7861c;
- flex: 0 0 auto;
-}
-
-.alpha-warning,
-.alpha-warning-welcome-screen {
- color: #fff;
- line-height: 2em;
-}
-
-@media screen and (min-width: 576px) {
- .alpha-warning {
- width: 85vw;
- }
-}
-
-@media screen and (min-width: 769px) {
- .alpha-warning {
- width: 80vw;
- }
-}
-
-@media screen and (min-width: 1281px) {
- .alpha-warning {
- width: 62vw;
- }
-}
-
-.alpha-warning-welcome-screen {
- padding-left: 0;
- text-align: center;
-}
-
-.first-view-main-wrapper {
- display: flex;
- width: 100%;
- height: 100%;
- justify-content: center;
- padding: 0 10px;
-}
-
-.first-view-main,
-.first-view-main__mascara {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
-}
-
-.first-view-main__mascara {
- justify-content: space-between;
-}
-
-@media screen and (min-width: 1281px) {
- .first-view-main {
- width: 62vw;
- }
-}
-
-.mascara-info {
- display: flex;
- flex-flow: column;
- margin-top: 70px;
- width: 35vw;
- max-width: 550px;
-}
-
-.mascara-info :first-child {
- align-self: flex-end;
-}
-
-.info {
- font-size: 19px;
-}
-
-.create-password,
-.unique-image,
-.tou,
-.backup-phrase,
-.import-account,
-.buy-ether {
- display: flex;
- flex-flow: column nowrap;
- margin: 60px 0 30px 0;
- position: relative;
-}
-
-.import-account {
- max-width: initial;
-}
-
-@media only screen and (max-width: 575px) {
- .create-password,
- .unique-image,
- .tou,
- .backup-phrase,
- .import-account,
- .buy-ether {
- margin: 24px;
- display: flex;
- flex-flow: column nowrap;
- width: calc(100vw - 80px);
- }
-
- .create-password__title,
- .unique-image__title,
- .tou__title,
- .backup-phrase__title,
- .import-account__title,
- .buy-ether__title,
- .tou__title,
- .backup-phrase__title {
- width: initial !important;
- }
-
- .alpha-warning,
- .alpha-warning-welcome-screen {
- line-height: 1em;
- padding: 8px 12px;
- }
-
- .first-view-main {
- height: 100%;
- flex-direction: column;
- align-items: center;
- justify-content: flex-start;
- margin-top: 12px;
- }
-
- .mascara-info {
- margin-top: 0px;
- width: 100%;
- align-items: center;
- }
-
- .mascara-info .info {
- text-align: center;
- font-size: 16px;
- margin: 0 10px;
- padding-left: 0px;
- }
-
- .mascara-info :first-child {
- align-self: center;
- }
-
- .first-view-phone-invisible {
- display: none;
- }
-
- .first-time-flow__input {
- width: 100%;
- }
-
- .tou__body {
- margin: 0 !important;
- padding: 16px 20px !important;
- height: 30vh !important;
- }
-
- .backup-phrase__content-wrapper {
- flex-flow: column nowrap;
- }
-
- .backup-phrase__body-text {
- width: initial !important;
- }
-
- .backup-phrase__secret {
- width: initial !important;
- padding: 12px !important;
- }
-
- .backup-phrase__secret-words {
- font-size: 16px;
- line-height: 22px;
- }
-
- .backup-phrase__tips {
- margin: 40px 0 !important;
- width: initial !important;
- }
-
- .backup-phrase__confirm-secret,
- .import-account__secret-phrase {
- width: initial !important;
- height: initial !important;
- min-height: 190px;
- }
-
- .backup-phrase__confirm-seed-options {
- width: initial !important;
- }
-}
-
-.tou {
- max-width: 46rem;
-}
-
-.create-password__title,
-.unique-image__title,
-.tou__title,
-.backup-phrase__title,
-.import-account__title,
-.buy-ether__title {
- color: #1B344D;
- font-size: 40px;
- line-height: 51px;
- margin-bottom: 24px;
-}
-
-.import-account__title {
- margin-bottom: 10px;
-}
-
-.tou__title,
-.backup-phrase__title {
- width: 480px;
-}
-
-.create-password__confirm-input {
- margin-top: 16px;
-}
-
-.create-password__import-link {
- margin-bottom: 54px;
-}
-
-.unique-image__title,
-.tou__title,
-.backup-phrase__title,
-.buy-ether__title {
- margin-top: 24px;
-}
-
-.unique-image__body-text,
-.backup-phrase__body-text,
-.buy-ether__body-text {
- color: #1B344D;
- font-size: 16px;
- line-height: 23px;
- font-family: Roboto;
-}
-
-.buy-ether__small-body-text {
- font-family: Roboto;
- height: 14px;
- color: #757575;
- font-size: 12px;
- line-height: 14px;
-}
-
-.unique-image__body-text {
- width: 335px;
-}
-
-@media only screen and (max-width: 575px) {
- .unique-image__body-text {
- width: initial;
- }
-}
-
-.unique-image__body-text +
-.unique-image__body-text,
-.backup-phrase__body-text +
-.backup-phrase__body-text,
-.backup-phrase__tips-text +
-.backup-phrase__tips-text {
- margin-top: 24px;
-}
-
-.tou__body {
- border: 1px solid #979797;
- border-radius: 8px;
- background-color: #FFFFFF;
- margin: 0 142px 0 0;
- height: 200px;
- overflow-y: auto;
- color: #757575;
- font-family: Roboto;
- font-size: 12px;
- line-height: 15px;
- text-align: justify;
- padding: 22px 30px;
-}
-
-.backup-phrase__content-wrapper {
- display: flex;
- flex-flow: row wrap;
- justify-content: space-between;
-}
-
-.backup-phrase__phrase {
- flex-grow: .5;
- min-width: 0;
-}
-
-.backup-phrase__next-button {
- flex-grow: 1;
- width: 100%;
-}
-
-.backup-phrase__body-text {
- width: 450px;
-}
-
-.backup-phrase__tips {
- margin-top: 40px;
- width: 285px;
- flex-grow: .5;
- min-width: 0;
-}
-
-.backup-phrase__tips-text {
- color: #5B5D67;
- font-size: 16px;
- line-height: 23px;
- font-family: Roboto;
- min-width: 0;
-}
-
-.backup-phrase__tips-text--link {
- color: #2f9ae0;
- cursor: pointer;
-}
-
-.backup-phrase__tips-text--link:hover {
- color: #2f9ae0;
-}
-
-.backup-phrase__tips-text--strong {
- font-weight: bold;
-}
-
-@media only screen and (max-width: 768px) {
- .backup-phrase__content-wrapper {
- flex-direction: column;
- }
-
- .backup-phrase__phrase {
- flex: 1 0 auto;
- }
-
- .backup-phrase__tips {
- width: 100%;
- flex: 1 0 auto;
- }
-}
-
-.backup-phrase__secret {
- position: relative;
- display: flex;
- justify-content: center;
- width: 349px;
- border: 1px solid #CDCDCD;
- border-radius: 6px;
- background-color: #FFFFFF;
- padding: 20px 0;
- margin-top: 36px;
-}
-
-.backup-phrase__secret-words {
- width: 310px;
- color: #5B5D67;
- font-family: Roboto;
- font-size: 20px;
- line-height: 26px;
- text-align: center;
-}
-
-.backup-phrase__secret-words--hidden {
- filter: blur(5px);
-}
-
-.backup-phrase__secret-blocker {
- position: absolute;
- top: 0;
- bottom: 0;
- height: 100%;
- width: 100%;
- background-color: rgba(0,0,0,0.6);
- display: flex;
- flex-flow: column nowrap;
- align-items: center;
- padding: 13px 0 18px;
-}
-
-.backup-phrase__reveal-button {
- border: 1px solid #979797;
- border-radius: 4px;
- background: none;
- box-shadow: none;
- color: #FFFFFF;
- font-family: Roboto;
- font-size: 12px;
- font-weight: bold;
- line-height: 15px;
- text-align: center;
- text-transform: uppercase;
- margin-top: 10px;
-}
-
-.backup-phrase__back-button,
-.import-account__back-button {
- margin-bottom: 18px;
- color: #22232c;
- font-size: 16px;
- line-height: 21px;
- position: absolute;
- top: -25px;
-}
-
-.backup-phrase__back-button {
- top: -30px;
-}
-
-button.backup-phrase__reveal-button:hover {
- transform: scale(1);
-}
-
-.backup-phrase__confirm-secret,
-.import-account__secret-phrase {
- height: 190px;
- width: 495px;
- border: 1px solid #CDCDCD;
- border-radius: 6px;
- background-color: #FFFFFF;
- margin: 25px 0 36px;
- padding: 17px;
-}
-
-.import-account__secret-phrase {
- font-size: 16px;
- margin: initial;
-}
-
-.import-account__secret-phrase::placeholder {
- color: #9B9B9B;
- font-weight: 200;
-}
-
-.backup-phrase__confirm-seed-options {
- display: flex;
- flex-flow: row wrap;
- width: 465px;
- position: relative;
- left: -7px;
-}
-
-.backup-phrase__confirm-seed-option {
- color: #5B5D67;
- font-family: Roboto;
- font-size: 16px;
- line-height: 21px;
- background-color: #E7E7E7;
- padding: 8px 19px;
- box-shadow: none;
- min-width: 65px;
- margin: 7px;
-}
-
-.backup-phrase__confirm-seed-option--selected {
- background-color: #85D1CC;
- color: #FFFFFF;
-}
-
-button.backup-phrase__confirm-seed-option:hover {
- transform: scale(1);
-}
-
-.import-account__faq-link {
- font-size: 18px;
- line-height: 23px;
- font-family: Roboto;
-}
-
-.import-account__selector-label {
- color: #1B344D;
- font-size: 16px;
-}
-
-.import-account__dropdown {
- width: 325px;
- border: 1px solid #CDCDCD;
- border-radius: 4px;
- background-color: #FFFFFF;
- margin-top: 14px;
- color: #5B5D67;
- font-family: Roboto;
- font-size: 18px;
- line-height: 23px;
- padding: 14px 21px;
- appearance: none;
- -webkit-appearance: none;
- -moz-appearance: none;
- cursor: pointer;
-}
-
-.import-account__description-text {
- color: #757575;
- font-size: 18px;
- line-height: 23px;
- margin-top: 21px;
- font-family: Roboto;
-}
-
-.import-account__input-wrapper {
- display: flex;
- flex-flow: column nowrap;
- margin-top: 30px;
-}
-
-.import-account__input-error-message {
- margin-top: 10px;
- width: 422px;
- color: #FF001F;
- font-size: 16px;
- line-height: 21px;
-}
-
-.import-account__input-label {
- margin-bottom: 9px;
- color: #1B344D;
- font-size: 18px;
- line-height: 23px;
-}
-
-.import-account__input-label__disabled {
- opacity: 0.5;
-}
-
-.import-account__input {
- width: 350px;
-}
-
-@media only screen and (max-width: 575px) {
- .import-account__input {
- width: 100%;
- }
-}
-
-.import-account__file-input {
- display: none;
-}
-
-.import-account__file-input-label {
- height: 53px;
- width: 148px;
- border: 1px solid #1B344D;
- border-radius: 4px;
- color: #1B344D;
- font-family: Roboto;
- font-size: 18px;
- display: flex;
- flex-flow: column nowrap;
- align-items: center;
- justify-content: center;
- cursor: pointer;
-}
-
-.import-account__file-picker-wrapper {
- display: flex;
- flex-flow: row nowrap;
- align-items: center;
-}
-
-.import-account__file-name {
- color: #000000;
- font-family: Roboto;
- font-size: 18px;
- line-height: 23px;
- margin-left: 22px;
-}
-
-.buy-ether__content-wrapper {
- display: flex;
- flex-flow: column nowrap;
- margin-top: 31px;
-}
-
-.buy-ether__content-headline-wrapper {
- display: flex;
- flex-flow: row nowrap;
- align-items: center;
- justify-content: space-between;
-}
-
-.buy-ether__content-headline {
- color: #1B344D;
- font-family: Roboto;
- font-size: 18px;
- line-height: 23px;
-}
-
-.buy-ether__do-it-later {
- color: #1B344D;
- font-size: 16px;
- line-height: 23px;
- cursor: pointer;
-}
-
-.buy-ether__content {
- margin-top: 12px;
- display: flex;
- flex-flow: row nowrap;
-}
-
-.buy-ether__side-panel {
- display: flex;
- flex-flow: column nowrap;
-}
-
-.buy-ether__side-panel-item {
- display: flex;
- flex-flow: row nowrap;
- align-items: center;
- padding: 20px 0;
- color: #9B9B9B;
- font-family: Roboto;
- font-size: 14px;
- line-height: 18px;
- cursor: pointer;
- min-width: 140px;
-}
-
-
-.buy-ether__side-panel-item {
- border-bottom: 1px solid #CDCDCD;
-}
-
-.buy-ether__side-panel-item--selected {
- position: relative;
- color: #1B344D;
-}
-
-.buy-ether__side-panel-item-name {
- flex: 1 0 auto;
- padding-right: 13px;
-}
-
-.buy-ether__action-content {
- margin-left: 34px;
-}
-
-.buy-ether__buttons {
- display: flex;
- flex-flow: row nowrap;
- align-items: center;
-}
-
-.buy-ether__button-separator-text {
- font-size: 20px;
- line-height: 26px;
- font-family: Roboto;
- margin: 35px 0 14px 30px;
- display: flex;
- flex-flow: column nowrap;
- justify-content: center;
-}
-
-.buy-ether__faq-link {
- margin-top: 26px;
- color: #1B344D !important;
- font-size: 14px !important;
- line-height: 18px !important;
- font-family: Roboto;
-}
-
-.buy-ether__action-content-wrapper {
- display: flex;
- flex-flow: column nowrap;
-}
-
-.first-time-flow__input {
- max-width: 350px;
-}
-
-.first-time-flow__button {
- height: 54px;
- width: 198px;
- box-shadow: 0 2px 4px 0 rgba(0,0,0,0.14);
- color: #FFFFFF;
- font-size: 20px;
- font-weight: 500;
- font-family: Roboto;
- line-height: 26px;
- text-align: center;
- text-transform: uppercase;
- margin: 35px 0 14px;
- transition: 200ms ease-in-out;
- background-color: rgba(247, 134, 28, 0.9);
-}
-
-button.first-time-flow__button[disabled] {
- opacity: .6;
-}
-
-button.first-time-flow__button:hover {
- transform: scale(1);
- background-color: rgba(247, 134, 28, 0.9);
-}
-
-.first-time-flow__button--tertiary {
- height: 54px;
- width: 198px;
- box-shadow: none;
- color: #1B344D;
- font-size: 20px;
- line-height: 26px;
- font-family: Roboto;
- text-align: center;
- margin: 35px 0 14px;
- background-color: transparent;
-}
-
-button.first-time-flow__button--tertiary:hover {
- transform: scale(1);
-}
-
-.first-time-flow__link {
- color: #1B344D;
- font-size: 18px;
- line-height: 23px;
-}
-
-.breadcrumbs {
- display: flex;
- flex-flow: row nowrap;
-}
-
-.breadcrumb {
- height: 10px;
- width: 10px;
- border: 1px solid #979797;
- border-radius: 50%;
-}
-
-.breadcrumb + .breadcrumb {
- margin-left: 10px;
-}
-
-.loading-screen {
- width: 100vw;
- height: 100vh;
- display: flex;
- flex-flow: column nowrap;
- align-items: center;
- margin-top: 143px;
-}
-
-.loading-screen .spinner {
- margin-bottom: 25px;
- width: 100px;
- height: 100px;
-}
-
-.loading-screen__message {
- color: #1B344D;
- font-size: 20px;
- line-height: 26px;
- text-align: center;
- font-family: Roboto;
-}
-
-.icon {
- background-repeat: no-repeat;
- background-size: contain;
- background-position: center;
-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RU5ErkJggg==');
- width: 161px;
- height: 84px;
- background-size: cover;
- background-repeat: no-repeat;
- background-position: 50%;
-}
-
-.shapeshift-form {
- width: 360px;
- border-radius: 8px;
- background-color: rgba(0, 0, 0, .05);
- padding: 17px 15px;
-}
-
-.shapeshift-form__selectors {
- display: flex;
- flex-flow: row nowrap;
- align-items: center;
- padding-bottom: 17px;
-}
-
-.shapeshift-form__caret {
- width: 40px;
- height: 40px;
- flex: 0 0 auto;
- width: 120px;
- margin-top: 24px;
-}
-
-.shapeshift-form__selector {
- flex: 1 0 auto;
-}
-
-.shapeshift-form__selector-label,
-.shapeshift-form__deposit-instruction {
- color: #757575;
- color: rgba(0, 0, 0, 0.45);
- font-family: Roboto;
- font-weight: 300;
- line-height: 19px;
- padding-bottom: 6px;
-}
-
-.shapeshift-form__selector-input {
- color: #5B5D67;
- font-size: 16px;
- font-weight: 300;
- line-height: 21px;
- border: 1px solid #D8D8D8;
- background-color: #FFFFFF;
- text-align: center;
- width: 100%;
- height: 45px;
- line-height: 44px;
- font-family: Roboto;
-}
-
-.shapeshift-form__address-input-label {
- color: #757575;
- font-size: 14px;
- font-weight: 500;
- line-height: 18px;
- padding-bottom: 6px;
- font-family: Roboto;
-}
-
-.shapeshift-form__address-input {
- border: 1px solid #D8D8D8;
- background-color: #FFFFFF;
- font-size: 16px;
- font-weight: 300;
- line-height: 21px;
- padding: 15px;
- width: 100%;
-}
-
-.shapeshift-form__address-input-wrapper--error .shapeshift-form__address-input {
- border-color: #FF001F;
-}
-
-.shapeshift-form__address-input-error-message {
- color: #FF001F;
- font-family: Roboto;
- font-size: 12px;
- height: 24px;
- line-height: 18px;
-}
-
-.shapeshift-form__metadata {
- display: flex;
- flex-flow: row wrap;
- color: #9B9B9B;
- font-family: Roboto;
- font-size: 10px;
- line-height: 16px;
-}
-
-.shapeshift-form__metadata-wrapper {
- flex: 1 0 50%;
- display: flex;
- flex-flow: row nowrap;
- overflow: hidden;
- white-space: nowrap;
-}
-
-.shapeshift-form__metadata-wrapper:nth-child(odd) {
- padding-right: 14px;
-}
-
-.shapeshift-form__metadata-label {
- flex: 1 0 60%;
-}
-
-.shapeshift-form__metadata-value {
- flex: 0 0 40%;
- overflow: hidden;
- color: #000;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
-.shapeshift-form__qr-code {
- display: flex;
- flex-flow: row nowrap;
- justify-content: center;
-}
diff --git a/mascara/src/app/first-time/index.js b/mascara/src/app/first-time/index.js
deleted file mode 100644
index f08e24c8589e..000000000000
--- a/mascara/src/app/first-time/index.js
+++ /dev/null
@@ -1,99 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import {connect} from 'react-redux'
-import { withRouter, Switch, Route } from 'react-router-dom'
-import { compose } from 'recompose'
-
-import CreatePasswordScreen from './create-password-screen'
-import UniqueImageScreen from './unique-image-screen'
-import NoticeScreen from './notice-screen'
-import BackupPhraseScreen from './seed-screen'
-import ImportAccountScreen from './import-account-screen'
-import ImportSeedPhraseScreen from './import-seed-phrase-screen'
-import ConfirmSeed from './confirm-seed-screen'
-import {
- INITIALIZE_ROUTE,
- INITIALIZE_IMPORT_ACCOUNT_ROUTE,
- INITIALIZE_UNIQUE_IMAGE_ROUTE,
- INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE,
- INITIALIZE_NOTICE_ROUTE,
- INITIALIZE_BACKUP_PHRASE_ROUTE,
- INITIALIZE_CONFIRM_SEED_ROUTE,
- INITIALIZE_CREATE_PASSWORD_ROUTE,
-} from '../../../../ui/app/routes'
-import WelcomeScreen from '../../../../ui/app/welcome-screen'
-
-class FirstTimeFlow extends Component {
-
- static propTypes = {
- isInitialized: PropTypes.bool,
- seedWords: PropTypes.string,
- address: PropTypes.string,
- noActiveNotices: PropTypes.bool,
- goToBuyEtherView: PropTypes.func,
- isUnlocked: PropTypes.bool,
- history: PropTypes.object,
- welcomeScreenSeen: PropTypes.bool,
- isPopup: PropTypes.bool,
- };
-
- static defaultProps = {
- isInitialized: false,
- seedWords: '',
- noActiveNotices: false,
- };
-
- render () {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
- }
-}
-
-const mapStateToProps = ({ metamask }) => {
- const {
- isInitialized,
- seedWords,
- noActiveNotices,
- selectedAddress,
- forgottenPassword,
- isMascara,
- isUnlocked,
- welcomeScreenSeen,
- isPopup,
- } = metamask
-
- return {
- isMascara,
- isInitialized,
- seedWords,
- noActiveNotices,
- address: selectedAddress,
- forgottenPassword,
- isUnlocked,
- welcomeScreenSeen,
- isPopup,
- }
-}
-
-export default compose(
- withRouter,
- connect(mapStateToProps),
-)(FirstTimeFlow)
diff --git a/mascara/src/app/first-time/loading-screen.js b/mascara/src/app/first-time/loading-screen.js
deleted file mode 100644
index 596f818ca2d5..000000000000
--- a/mascara/src/app/first-time/loading-screen.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-import Spinner from './spinner'
-
-export default function LoadingScreen ({ className = '', loadingMessage }) {
- return (
-
- )
-}
-
-LoadingScreen.propTypes = {
- className: PropTypes.string,
- loadingMessage: PropTypes.string,
-}
diff --git a/mascara/src/app/first-time/notice-screen.js b/mascara/src/app/first-time/notice-screen.js
deleted file mode 100644
index b04dd3be941e..000000000000
--- a/mascara/src/app/first-time/notice-screen.js
+++ /dev/null
@@ -1,135 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import Markdown from 'react-markdown'
-import { connect } from 'react-redux'
-import { withRouter } from 'react-router-dom'
-import { compose } from 'recompose'
-import debounce from 'lodash.debounce'
-import { markNoticeRead } from '../../../../ui/app/actions'
-import Identicon from '../../../../ui/app/components/identicon'
-import Breadcrumbs from './breadcrumbs'
-import { INITIALIZE_BACKUP_PHRASE_ROUTE } from '../../../../ui/app/routes'
-import LoadingScreen from './loading-screen'
-
-class NoticeScreen extends Component {
- static propTypes = {
- address: PropTypes.string.isRequired,
- nextUnreadNotice: PropTypes.shape({
- title: PropTypes.string,
- date: PropTypes.string,
- body: PropTypes.string,
- }),
- location: PropTypes.shape({
- state: PropTypes.shape({
- next: PropTypes.func.isRequired,
- }),
- }),
- markNoticeRead: PropTypes.func,
- history: PropTypes.object,
- isLoading: PropTypes.bool,
- noActiveNotices: PropTypes.bool,
- };
-
- static defaultProps = {
- nextUnreadNotice: {},
- };
-
- state = {
- atBottom: false,
- }
-
- componentDidMount () {
- if (this.props.noActiveNotices) {
- this.props.history.push(INITIALIZE_BACKUP_PHRASE_ROUTE)
- }
-
- this.onScroll()
- }
-
- acceptTerms = () => {
- const { markNoticeRead, nextUnreadNotice, history } = this.props
- markNoticeRead(nextUnreadNotice)
- .then(hasActiveNotices => {
- if (!hasActiveNotices) {
- history.push(INITIALIZE_BACKUP_PHRASE_ROUTE)
- } else {
- this.setState({ atBottom: false })
- this.onScroll()
- }
- })
- }
-
- onScroll = debounce(() => {
- if (this.state.atBottom) return
-
- const target = document.querySelector('.tou__body')
- const {scrollTop, offsetHeight, scrollHeight} = target
- const atBottom = scrollTop + offsetHeight >= scrollHeight
-
- this.setState({atBottom: atBottom})
- }, 25)
-
- render () {
- const {
- address,
- nextUnreadNotice: { title, body },
- isLoading,
- } = this.props
- const { atBottom } = this.state
-
- return (
- isLoading
- ?
- : (
-
-
-
-
-
-
{title}
-
-
-
-
-
-
-
- )
- )
- }
-}
-
-const mapStateToProps = ({ metamask, appState }) => {
- const { selectedAddress, nextUnreadNotice, noActiveNotices } = metamask
- const { isLoading } = appState
-
- return {
- address: selectedAddress,
- nextUnreadNotice,
- noActiveNotices,
- isLoading,
- }
-}
-
-export default compose(
- withRouter,
- connect(
- mapStateToProps,
- dispatch => ({
- markNoticeRead: notice => dispatch(markNoticeRead(notice)),
- }),
- ),
-)(NoticeScreen)
diff --git a/mascara/src/app/first-time/seed-screen.js b/mascara/src/app/first-time/seed-screen.js
deleted file mode 100644
index 1083b9e14b28..000000000000
--- a/mascara/src/app/first-time/seed-screen.js
+++ /dev/null
@@ -1,177 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import { connect } from 'react-redux'
-import classnames from 'classnames'
-import { withRouter } from 'react-router-dom'
-import { compose } from 'recompose'
-import Identicon from '../../../../ui/app/components/identicon'
-import {exportAsFile} from '../../../../ui/app/util'
-import Breadcrumbs from './breadcrumbs'
-import LoadingScreen from './loading-screen'
-import { DEFAULT_ROUTE, INITIALIZE_CONFIRM_SEED_ROUTE } from '../../../../ui/app/routes'
-
-const LockIcon = props => (
-
-)
-
-class BackupPhraseScreen extends Component {
- static propTypes = {
- isLoading: PropTypes.bool.isRequired,
- address: PropTypes.string.isRequired,
- seedWords: PropTypes.string,
- history: PropTypes.object,
- };
-
- static defaultProps = {
- seedWords: '',
- }
-
- constructor (props) {
- super(props)
- this.state = {
- isShowingSecret: false,
- }
- }
-
- // eslint-disable-next-line camelcase
- UNSAFE_componentWillMount () {
- const { seedWords, history } = this.props
-
- if (!seedWords) {
- history.push(DEFAULT_ROUTE)
- }
- }
-
- exportSeedWords = () => {
- const { seedWords } = this.props
-
- exportAsFile('MetaMask Secret Backup Phrase', seedWords, 'text/plain')
- }
-
- renderSecretWordsContainer () {
- const { isShowingSecret } = this.state
-
- return (
-
-
- {this.props.seedWords}
-
- {!isShowingSecret && (
-
this.setState({ isShowingSecret: true })}
- >
-
-
- Click here to reveal secret words
-
-
- )}
-
- )
- }
-
- renderSecretScreen () {
- const { isShowingSecret } = this.state
- const { history } = this.props
-
- return (
-
-
-
Secret Backup Phrase
-
- Your secret backup phrase makes it easy to back up and restore your account.
-
-
- WARNING: Never disclose your backup phrase. Anyone with this phrase can take your Ether forever.
-
- {this.renderSecretWordsContainer()}
-
-
-
Tips:
-
- Store this phrase in a password manager like 1Password.
-
-
- Write this phrase on a piece of paper and store in a secure location. If you want even more security, write it down on multiple pieces of paper and store each in 2 - 3 different locations.
-
-
- Memorize this phrase.
-
-
-
-
-
-
-
-
- )
- }
-
- render () {
- return this.props.isLoading
- ?
- : (
-
-
-
-
- {this.renderSecretScreen()}
-
-
-
- )
- }
-}
-
-export default compose(
- withRouter,
- connect(
- ({ metamask: { selectedAddress, seedWords }, appState: { isLoading } }) => ({
- seedWords,
- isLoading,
- address: selectedAddress,
- }),
- ),
-)(BackupPhraseScreen)
diff --git a/mascara/src/app/first-time/spinner.js b/mascara/src/app/first-time/spinner.js
deleted file mode 100644
index 78dca9a88645..000000000000
--- a/mascara/src/app/first-time/spinner.js
+++ /dev/null
@@ -1,70 +0,0 @@
-import React from 'react';
-
-export default function Spinner({ className = '', color = "#000000" }) {
- return (
-
-
-
- );
-}
diff --git a/mascara/src/app/first-time/unique-image-screen.js b/mascara/src/app/first-time/unique-image-screen.js
deleted file mode 100644
index e1f9299bb618..000000000000
--- a/mascara/src/app/first-time/unique-image-screen.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import { withRouter } from 'react-router-dom'
-import { compose } from 'recompose'
-import {connect} from 'react-redux'
-import Identicon from '../../../../ui/app/components/identicon'
-import Breadcrumbs from './breadcrumbs'
-import { INITIALIZE_NOTICE_ROUTE } from '../../../../ui/app/routes'
-
-class UniqueImageScreen extends Component {
- static propTypes = {
- address: PropTypes.string,
- history: PropTypes.object,
- }
-
- render () {
- return (
-
-
-
-
-
Your unique account image
-
- This image was programmatically generated for you by your new account number.
-
-
- You’ll see this image everytime you need to confirm a transaction.
-
-
-
-
-
-
- )
- }
-}
-
-export default compose(
- withRouter,
- connect(
- ({ metamask: { selectedAddress } }) => ({
- address: selectedAddress,
- }),
- ),
-)(UniqueImageScreen)
diff --git a/mascara/src/app/shapeshift-form/index.js b/mascara/src/app/shapeshift-form/index.js
deleted file mode 100644
index 4a89a97df733..000000000000
--- a/mascara/src/app/shapeshift-form/index.js
+++ /dev/null
@@ -1,219 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-import classnames from 'classnames'
-import {qrcode} from 'qrcode-npm'
-import {connect} from 'react-redux'
-import {shapeShiftSubview, pairUpdate, buyWithShapeShift} from '../../../../ui/app/actions'
-import {isValidAddress} from '../../../../ui/app/util'
-
-export class ShapeShiftForm extends Component {
- static propTypes = {
- selectedAddress: PropTypes.string.isRequired,
- btnClass: PropTypes.string.isRequired,
- tokenExchangeRates: PropTypes.object.isRequired,
- coinOptions: PropTypes.object.isRequired,
- shapeShiftSubview: PropTypes.func.isRequired,
- pairUpdate: PropTypes.func.isRequired,
- buyWithShapeShift: PropTypes.func.isRequired,
- };
-
- state = {
- depositCoin: 'btc',
- refundAddress: '',
- showQrCode: false,
- depositAddress: '',
- errorMessage: '',
- isLoading: false,
- };
-
- // eslint-disable-next-line camelcase
- UNSAFE_componentWillMount () {
- this.props.shapeShiftSubview()
- }
-
- onCoinChange = e => {
- const coin = e.target.value
- this.setState({
- depositCoin: coin,
- errorMessage: '',
- })
- this.props.pairUpdate(coin)
- }
-
- onBuyWithShapeShift = () => {
- this.setState({
- isLoading: true,
- showQrCode: true,
- })
-
- const {
- buyWithShapeShift,
- selectedAddress: withdrawal,
- } = this.props
- const {
- refundAddress: returnAddress,
- depositCoin,
- } = this.state
- const pair = `${depositCoin}_eth`
- const data = {
- withdrawal,
- pair,
- returnAddress,
- // Public api key
- 'apiKey': '803d1f5df2ed1b1476e4b9e6bcd089e34d8874595dda6a23b67d93c56ea9cc2445e98a6748b219b2b6ad654d9f075f1f1db139abfa93158c04e825db122c14b6',
- }
-
- if (isValidAddress(withdrawal)) {
- buyWithShapeShift(data)
- .then(d => this.setState({
- showQrCode: true,
- depositAddress: d.deposit,
- isLoading: false,
- }))
- .catch(() => this.setState({
- showQrCode: false,
- errorMessage: 'Invalid Request',
- isLoading: false,
- }))
- }
- }
-
- renderMetadata (label, value) {
- return (
-
-
- {label}:
-
-
- {value}
-
-
- )
- }
-
- renderMarketInfo () {
- const { depositCoin } = this.state
- const coinPair = `${depositCoin}_eth`
- const { tokenExchangeRates } = this.props
- const {
- limit,
- rate,
- minimum,
- } = tokenExchangeRates[coinPair] || {}
-
- return (
-
- {this.renderMetadata('Status', limit ? 'Available' : 'Unavailable')}
- {this.renderMetadata('Limit', limit)}
- {this.renderMetadata('Exchange Rate', rate)}
- {this.renderMetadata('Minimum', minimum)}
-
- )
- }
-
- renderQrCode () {
- const { depositAddress, isLoading } = this.state
- const qrImage = qrcode(4, 'M')
- qrImage.addData(depositAddress)
- qrImage.make()
-
- return (
-
-
- Deposit your BTC to the address bellow:
-
-
- {isLoading
- ?
- :
- }
-
- {this.renderMarketInfo()}
-
- )
- }
-
- render () {
- const { coinOptions, btnClass } = this.props
- const { depositCoin, errorMessage, showQrCode } = this.state
- const coinPair = `${depositCoin}_eth`
- const { tokenExchangeRates } = this.props
- const token = tokenExchangeRates[coinPair]
-
- return showQrCode ? this.renderQrCode() : (
-
-
-
-
-
- Deposit
-
-
-
-
-
-
- Receive
-
-
- ETH
-
-
-
-
-
- Your Refund Address
-
-
this.setState({
- refundAddress: e.target.value,
- errorMessage: '',
- })}
- />
-
- {errorMessage}
-
-
- {this.renderMarketInfo()}
-
-
-
- )
- }
-}
-
-export default connect(
- ({ metamask: { coinOptions, tokenExchangeRates, selectedAddress } }) => ({
- coinOptions, tokenExchangeRates, selectedAddress,
- }),
- dispatch => ({
- shapeShiftSubview: () => dispatch(shapeShiftSubview()),
- pairUpdate: coin => dispatch(pairUpdate(coin)),
- buyWithShapeShift: data => dispatch(buyWithShapeShift(data)),
- }),
-)(ShapeShiftForm)
diff --git a/mascara/src/background.js b/mascara/src/background.js
deleted file mode 100644
index f39c98406c19..000000000000
--- a/mascara/src/background.js
+++ /dev/null
@@ -1,134 +0,0 @@
-global.window = global
-
-const SwGlobalListener = require('sw-stream/lib/sw-global-listener.js')
-const connectionListener = new SwGlobalListener(global)
-const setupMultiplex = require('../../app/scripts/lib/stream-utils.js').setupMultiplex
-
-const DbController = require('idb-global')
-
-const SwPlatform = require('../../app/scripts/platforms/sw')
-const MetamaskController = require('../../app/scripts/metamask-controller')
-
-const Migrator = require('../../app/scripts/lib/migrator/')
-const migrations = require('../../app/scripts/migrations/')
-const firstTimeState = require('../../app/scripts/first-time-state')
-
-const STORAGE_KEY = 'metamask-config'
-const METAMASK_DEBUG = process.env.METAMASK_DEBUG
-global.metamaskPopupIsOpen = false
-
-const log = require('loglevel')
-global.log = log
-log.setDefaultLevel(METAMASK_DEBUG ? 'debug' : 'warn')
-
-global.addEventListener('install', function (event) {
- event.waitUntil(global.skipWaiting())
-})
-global.addEventListener('activate', function (event) {
- event.waitUntil(global.clients.claim())
-})
-
-log.debug('inside:open')
-
-// state persistence
-const dbController = new DbController({
- key: STORAGE_KEY,
-})
-
-start().catch(log.error)
-
-async function start () {
- log.debug('Nifty Wallet initializing...')
- const initState = await loadStateFromPersistence()
- await setupController(initState)
- log.debug('Nifty Wallet initialization complete.')
-}
-
-//
-// State and Persistence
-//
-async function loadStateFromPersistence () {
- // migrations
- const migrator = new Migrator({ migrations })
- const initialState = migrator.generateInitialState(firstTimeState)
- dbController.initialState = initialState
- const versionedData = await dbController.open()
- const migratedData = await migrator.migrateData(versionedData)
- await dbController.put(migratedData)
- return migratedData.data
-}
-
-async function setupController (initState, client) {
-
- //
- // MetaMask Controller
- //
-
- const platform = new SwPlatform()
-
- const controller = new MetamaskController({
- // platform specific implementation
- platform,
- // User confirmation callbacks:
- showUnconfirmedMessage: noop,
- unlockAccountMessage: noop,
- showUnapprovedTx: noop,
- // initial state
- initState,
- })
- global.metamaskController = controller
-
- controller.store.subscribe(async (state) => {
- try {
- const versionedData = await versionifyData(state)
- await dbController.put(versionedData)
- } catch (e) { console.error('METAMASK Error:', e) }
- })
-
- async function versionifyData (state) {
- const rawData = await dbController.get()
- return {
- data: state,
- meta: rawData.meta,
- }
- }
-
- //
- // connect to other contexts
- //
-
- connectionListener.on('remote', (portStream, messageEvent) => {
- log.debug('REMOTE CONECTION FOUND***********')
- connectRemote(portStream, messageEvent.data.context)
- })
-
- function connectRemote (connectionStream, context) {
- var isMetaMaskInternalProcess = (context === 'popup')
- if (isMetaMaskInternalProcess) {
- // communication with popup
- controller.setupTrustedCommunication(connectionStream, 'MetaMask')
- global.metamaskPopupIsOpen = true
- } else {
- // communication with page
- setupUntrustedCommunication(connectionStream, context)
- }
- }
-
- function setupUntrustedCommunication (connectionStream, originDomain) {
- // setup multiplexing
- var mx = setupMultiplex(connectionStream)
- // connect features
- controller.setupProviderConnection(mx.createStream('provider'), originDomain)
- controller.setupPublicConfig(mx.createStream('publicConfig'))
- }
-}
-// // this will be useful later but commented out for linting for now (liiiinting)
-// function sendMessageToAllClients (message) {
-// global.clients.matchAll().then(function (clients) {
-// clients.forEach(function (client) {
-// client.postMessage(message)
-// })
-// })
-// }
-
-function noop () {}
diff --git a/mascara/src/metamascara.js b/mascara/src/metamascara.js
deleted file mode 100644
index 0af6f532fb27..000000000000
--- a/mascara/src/metamascara.js
+++ /dev/null
@@ -1 +0,0 @@
-global.metamask = require('metamascara')
diff --git a/mascara/src/proxy.js b/mascara/src/proxy.js
deleted file mode 100644
index 80b4dc516c1b..000000000000
--- a/mascara/src/proxy.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const createParentStream = require('iframe-stream').ParentStream
-const SwController = require('sw-controller')
-const SwStream = require('sw-stream/lib/sw-stream.js')
-
-const keepAliveDelay = Math.floor(Math.random() * (30000 - 1000)) + 1000
-const background = new SwController({
- fileName: './scripts/background.js',
- keepAlive: true,
- keepAliveInterval: 30000,
- keepAliveDelay,
-})
-
-const pageStream = createParentStream()
-background.on('ready', () => {
- const swStream = SwStream({
- serviceWorker: background.controller,
- context: 'dapp',
- })
- pageStream.pipe(swStream).pipe(pageStream)
-
-})
-background.on('updatefound', () => window.location.reload())
-
-background.on('error', console.error)
-background.startWorker()
diff --git a/mascara/src/ui.js b/mascara/src/ui.js
deleted file mode 100644
index 7c06b3299226..000000000000
--- a/mascara/src/ui.js
+++ /dev/null
@@ -1,73 +0,0 @@
-const injectCss = require('inject-css')
-const SwController = require('sw-controller')
-const SwStream = require('sw-stream')
-const MetaMaskUiCss = require('../../old-ui/css')
-const MetamascaraPlatform = require('../../app/scripts/platforms/window')
-const startPopup = require('../../app/scripts/popup-core')
-
-// create platform global
-global.platform = new MetamascaraPlatform()
-
-var css = MetaMaskUiCss()
-injectCss(css)
-const container = document.getElementById('app-content')
-
-const name = 'popup'
-window.METAMASK_UI_TYPE = name
-window.METAMASK_PLATFORM_TYPE = 'mascara'
-
-const keepAliveDelay = Math.floor(Math.random() * (30000 - 1000)) + 1000
-
-const swController = new SwController({
- fileName: './background.js',
- keepAlive: true,
- keepAliveDelay,
- keepAliveInterval: 20000,
-})
-
-swController.once('updatefound', windowReload)
-swController.once('ready', async () => {
- try {
- swController.removeListener('updatefound', windowReload)
- console.log('swController ready')
- await timeout(1000)
- console.log('connecting to app')
- await connectApp()
- console.log('app connected')
- } catch (err) {
- console.error(err)
- }
-})
-
-console.log('starting service worker')
-swController.startWorker()
-
-// Setup listener for when the service worker is read
-function connectApp () {
- const connectionStream = SwStream({
- serviceWorker: swController.getWorker(),
- context: name,
- })
- return new Promise((resolve, reject) => {
- startPopup({ container, connectionStream }, (err, store) => {
- console.log('hello from MetaMascara ui!')
- if (err) reject(err)
- store.subscribe(() => {
- const state = store.getState()
- if (state.appState.shouldClose) window.close()
- })
- resolve()
- })
- })
-}
-
-function windowReload () {
- if (window.METAMASK_SKIP_RELOAD) return
- window.location.reload()
-}
-
-function timeout (time) {
- return new Promise((resolve) => {
- setTimeout(resolve, time || 1500)
- })
-}
diff --git a/mascara/test/helpers.js b/mascara/test/helpers.js
deleted file mode 100644
index 8fc5c816bda9..000000000000
--- a/mascara/test/helpers.js
+++ /dev/null
@@ -1,7 +0,0 @@
-export default function wait (time) {
- return new Promise(function (resolve, reject) {
- setTimeout(function () {
- resolve()
- }, time * 3 || 1500)
- })
-}
diff --git a/mascara/test/index.js b/mascara/test/index.js
deleted file mode 100644
index d62e43705d06..000000000000
--- a/mascara/test/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var fs = require('fs')
-var path = require('path')
-var browserify = require('browserify')
-var tests = fs.readdirSync(path.join(__dirname, 'lib'))
-var bundlePath = path.join(__dirname, 'test-bundle.js')
-var b = browserify()
-
-// Remove old bundle
-try {
- fs.unlinkSync(bundlePath)
-} catch (e) {
- console.error(e)
-}
-
-var writeStream = fs.createWriteStream(bundlePath)
-
-tests.forEach(function (fileName) {
- b.add(path.join(__dirname, 'lib', fileName))
-})
-
-b.bundle().pipe(writeStream)
-
diff --git a/mascara/test/jquery-3.1.0.min.js b/mascara/test/jquery-3.1.0.min.js
deleted file mode 100644
index f6a6a99e60ee..000000000000
--- a/mascara/test/jquery-3.1.0.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */
-!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"label"in b&&b.disabled===a||"form"in b&&b.disabled===a||"form"in b&&b.disabled===!1&&(b.isDisabled===a||b.isDisabled!==!a&&("label"in b||!ea(b))!==a)}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(_,aa),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=V.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(_,aa),$.test(j[0].type)&&qa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&sa(j),!a)return G.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||$.test(a)&&qa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){if(r.isFunction(b))return r.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return r.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(C.test(b))return r.filter(b,a,c);b=r.filter(b,a)}return r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType})}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/\S+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,
-r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,ja=/^$|\/(?:java|ecma)script/i,ka={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};ka.optgroup=ka.option,ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead,ka.th=ka.td;function la(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function ma(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=la(l.appendChild(f),"script"),j&&ma(g),c){k=0;while(f=g[k++])ja.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var pa=d.documentElement,qa=/^key/,ra=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sa=/^([^.]*)(?:\.(.+)|)/;function ta(){return!0}function ua(){return!1}function va(){try{return d.activeElement}catch(a){}}function wa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)wa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ua;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(pa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c-1:r.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h\x20\t\r\n\f]*)[^>]*)\/>/gi,ya=/
-