From 12bc9e223393b435854deb2f390690b1aa3156f1 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 2 Jan 2019 12:48:08 -0600 Subject: [PATCH 0001/1466] Initial setup --- common/Root.tsx | 24 ++++++++++++++++++- .../v2/features/CreateWallet/CreateWallet.tsx | 5 ++++ common/v2/features/CreateWallet/index.ts | 1 + common/v2/features/Dashboard/Dashboard.tsx | 5 ++++ common/v2/features/Dashboard/index.ts | 1 + common/v2/features/Home/Home.tsx | 5 ++++ common/v2/features/Home/index.ts | 1 + .../v2/features/ImportWallet/ImportWallet.tsx | 5 ++++ common/v2/features/ImportWallet/index.ts | 1 + common/v2/features/index.ts | 4 ++++ common/v2/features/registry.json | 12 ++++++++++ 11 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 common/v2/features/CreateWallet/CreateWallet.tsx create mode 100644 common/v2/features/CreateWallet/index.ts create mode 100644 common/v2/features/Dashboard/Dashboard.tsx create mode 100644 common/v2/features/Dashboard/index.ts create mode 100644 common/v2/features/Home/Home.tsx create mode 100644 common/v2/features/Home/index.ts create mode 100644 common/v2/features/ImportWallet/ImportWallet.tsx create mode 100644 common/v2/features/ImportWallet/index.ts diff --git a/common/Root.tsx b/common/Root.tsx index 01057cd5d..d49a9a151 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -49,11 +49,13 @@ type Props = OwnProps & StateProps & DispatchProps; interface State { error: Error | null; + developmentMode: boolean; } class RootClass extends Component { public state = { - error: null + error: null, + developmentMode: Boolean(window.localStorage.getItem('MyCrypto Dev Mode')) }; public componentDidMount() { @@ -121,6 +123,16 @@ class RootClass extends Component {
+ {/* {process.env.NODE_ENV !== 'production' && ( + + )} */} ); } @@ -150,6 +162,16 @@ class RootClass extends Component { } root.classList.add(`theme--${theme}`); } + + private handleDevelopmentModeButtonClick = () => { + const isDevelopmentMode = window.localStorage.getItem('MyCrypto Dev Mode'); + + if (isDevelopmentMode) { + window.localStorage.removeItem('MyCrypto Dev Mode'); + } else { + window.localStorage.setItem('MyCrypto Dev Mode', 'true'); + } + }; } const LegacyRoutes = withRouter(props => { diff --git a/common/v2/features/CreateWallet/CreateWallet.tsx b/common/v2/features/CreateWallet/CreateWallet.tsx new file mode 100644 index 000000000..8933de052 --- /dev/null +++ b/common/v2/features/CreateWallet/CreateWallet.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function CreateWallet() { + return
Create Wallet
; +} diff --git a/common/v2/features/CreateWallet/index.ts b/common/v2/features/CreateWallet/index.ts new file mode 100644 index 000000000..9b401d8ef --- /dev/null +++ b/common/v2/features/CreateWallet/index.ts @@ -0,0 +1 @@ +export { default } from './CreateWallet'; diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx new file mode 100644 index 000000000..f0ce880dd --- /dev/null +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function Dashboard() { + return
Dashboard
; +} diff --git a/common/v2/features/Dashboard/index.ts b/common/v2/features/Dashboard/index.ts new file mode 100644 index 000000000..449ae5672 --- /dev/null +++ b/common/v2/features/Dashboard/index.ts @@ -0,0 +1 @@ +export { default } from './Dashboard'; diff --git a/common/v2/features/Home/Home.tsx b/common/v2/features/Home/Home.tsx new file mode 100644 index 000000000..d5afb8622 --- /dev/null +++ b/common/v2/features/Home/Home.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function Home() { + return
Home
; +} diff --git a/common/v2/features/Home/index.ts b/common/v2/features/Home/index.ts new file mode 100644 index 000000000..41e08eefd --- /dev/null +++ b/common/v2/features/Home/index.ts @@ -0,0 +1 @@ +export { default } from './Home'; diff --git a/common/v2/features/ImportWallet/ImportWallet.tsx b/common/v2/features/ImportWallet/ImportWallet.tsx new file mode 100644 index 000000000..fc56e59e2 --- /dev/null +++ b/common/v2/features/ImportWallet/ImportWallet.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function ImportWallet() { + return
Impot Wallet
; +} diff --git a/common/v2/features/ImportWallet/index.ts b/common/v2/features/ImportWallet/index.ts new file mode 100644 index 000000000..10e6de2a2 --- /dev/null +++ b/common/v2/features/ImportWallet/index.ts @@ -0,0 +1 @@ +export { default } from './ImportWallet'; diff --git a/common/v2/features/index.ts b/common/v2/features/index.ts index b723d32e9..842fd498d 100644 --- a/common/v2/features/index.ts +++ b/common/v2/features/index.ts @@ -1 +1,5 @@ export * from './BuyAndExchange'; +export * from './CreateWallet'; +export * from './Dashboard'; +export * from './Home'; +export * from './ImportWallet'; diff --git a/common/v2/features/registry.json b/common/v2/features/registry.json index dc0e764eb..fc9c8bbc2 100644 --- a/common/v2/features/registry.json +++ b/common/v2/features/registry.json @@ -2,5 +2,17 @@ { "name": "Buy and Exchange", "key": "buyAndExchange" + }, + { + "name": "Create Wallet", + "key": "createWallet" + }, + { + "name": "Dashboard", + "key": "dashboard" + }, + { + "name": "Home", + "key": "home" } ] From 4a768c7462ca94a69db0faf1c75ed4960219793d Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 2 Jan 2019 12:57:24 -0600 Subject: [PATCH 0002/1466] Further initial setup --- common/Root.tsx | 17 ++++++++++++----- common/v2/features/CreateWallet/index.ts | 1 + common/v2/features/CreateWallet/routes.ts | 1 + common/v2/features/Dashboard/index.ts | 1 + common/v2/features/Dashboard/routes.ts | 1 + common/v2/features/Home/index.ts | 1 + common/v2/features/Home/routes.ts | 1 + common/v2/features/ImportWallet/index.ts | 1 + common/v2/features/ImportWallet/routes.ts | 1 + 9 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 common/v2/features/CreateWallet/routes.ts create mode 100644 common/v2/features/Dashboard/routes.ts create mode 100644 common/v2/features/Home/routes.ts create mode 100644 common/v2/features/ImportWallet/routes.ts diff --git a/common/Root.tsx b/common/Root.tsx index d49a9a151..269447e2e 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -76,7 +76,7 @@ class RootClass extends Component { public render() { const { store, onboardingActive } = this.props; - const { error } = this.state; + const { error, developmentMode } = this.state; if (error) { return ; @@ -85,7 +85,8 @@ class RootClass extends Component { const routes = ( - {gatherFeatureRoutes().map((config, i) => )} + {developmentMode && + gatherFeatureRoutes().map((config, i) => )} @@ -123,16 +124,20 @@ class RootClass extends Component {
- {/* {process.env.NODE_ENV !== 'production' && ( + {process.env.NODE_ENV !== 'production' && ( - )} */} + )} ); } @@ -168,8 +173,10 @@ class RootClass extends Component { if (isDevelopmentMode) { window.localStorage.removeItem('MyCrypto Dev Mode'); + this.setState({ developmentMode: false }); } else { window.localStorage.setItem('MyCrypto Dev Mode', 'true'); + this.setState({ developmentMode: true }); } }; } diff --git a/common/v2/features/CreateWallet/index.ts b/common/v2/features/CreateWallet/index.ts index 9b401d8ef..4856c6403 100644 --- a/common/v2/features/CreateWallet/index.ts +++ b/common/v2/features/CreateWallet/index.ts @@ -1 +1,2 @@ export { default } from './CreateWallet'; +export { default as createWalletRoutes } from './routes'; diff --git a/common/v2/features/CreateWallet/routes.ts b/common/v2/features/CreateWallet/routes.ts new file mode 100644 index 000000000..d6d1738de --- /dev/null +++ b/common/v2/features/CreateWallet/routes.ts @@ -0,0 +1 @@ +export default []; diff --git a/common/v2/features/Dashboard/index.ts b/common/v2/features/Dashboard/index.ts index 449ae5672..bf1523543 100644 --- a/common/v2/features/Dashboard/index.ts +++ b/common/v2/features/Dashboard/index.ts @@ -1 +1,2 @@ export { default } from './Dashboard'; +export { default as dashboardRoutes } from './routes'; diff --git a/common/v2/features/Dashboard/routes.ts b/common/v2/features/Dashboard/routes.ts new file mode 100644 index 000000000..d6d1738de --- /dev/null +++ b/common/v2/features/Dashboard/routes.ts @@ -0,0 +1 @@ +export default []; diff --git a/common/v2/features/Home/index.ts b/common/v2/features/Home/index.ts index 41e08eefd..ea30a5e31 100644 --- a/common/v2/features/Home/index.ts +++ b/common/v2/features/Home/index.ts @@ -1 +1,2 @@ export { default } from './Home'; +export { default as homeRoutes } from './routes'; diff --git a/common/v2/features/Home/routes.ts b/common/v2/features/Home/routes.ts new file mode 100644 index 000000000..d6d1738de --- /dev/null +++ b/common/v2/features/Home/routes.ts @@ -0,0 +1 @@ +export default []; diff --git a/common/v2/features/ImportWallet/index.ts b/common/v2/features/ImportWallet/index.ts index 10e6de2a2..d414a3cd6 100644 --- a/common/v2/features/ImportWallet/index.ts +++ b/common/v2/features/ImportWallet/index.ts @@ -1 +1,2 @@ export { default } from './ImportWallet'; +export { default as importWalletRoutes } from './routes'; diff --git a/common/v2/features/ImportWallet/routes.ts b/common/v2/features/ImportWallet/routes.ts new file mode 100644 index 000000000..d6d1738de --- /dev/null +++ b/common/v2/features/ImportWallet/routes.ts @@ -0,0 +1 @@ +export default []; From 1157e4505cca3c44b1844ca8690cd16bde9416cd Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 2 Jan 2019 13:29:18 -0600 Subject: [PATCH 0003/1466] Initial setup of home page --- common/v2/features/CreateWallet/routes.ts | 11 ++++++++- common/v2/features/Home/Home.scss | 10 ++++++++ common/v2/features/Home/Home.tsx | 22 +++++++++++++++++- .../Home/components/GetStartedPanel.scss | 11 +++++++++ .../Home/components/GetStartedPanel.tsx | 23 +++++++++++++++++++ common/v2/features/Home/components/index.ts | 1 + common/v2/features/Home/routes.ts | 11 ++++++++- .../v2/features/ImportWallet/ImportWallet.tsx | 2 +- common/v2/features/ImportWallet/routes.ts | 11 ++++++++- common/v2/features/registry.json | 4 ++++ 10 files changed, 101 insertions(+), 5 deletions(-) create mode 100644 common/v2/features/Home/Home.scss create mode 100644 common/v2/features/Home/components/GetStartedPanel.scss create mode 100644 common/v2/features/Home/components/GetStartedPanel.tsx create mode 100644 common/v2/features/Home/components/index.ts diff --git a/common/v2/features/CreateWallet/routes.ts b/common/v2/features/CreateWallet/routes.ts index d6d1738de..4822309bd 100644 --- a/common/v2/features/CreateWallet/routes.ts +++ b/common/v2/features/CreateWallet/routes.ts @@ -1 +1,10 @@ -export default []; +import CreateWallet from './CreateWallet'; + +export default [ + { + name: 'Create Wallet', + path: '/create-wallet', + exact: true, + component: CreateWallet + } +]; diff --git a/common/v2/features/Home/Home.scss b/common/v2/features/Home/Home.scss new file mode 100644 index 000000000..93148ea13 --- /dev/null +++ b/common/v2/features/Home/Home.scss @@ -0,0 +1,10 @@ +.Home { + display: flex; + + &-copy { + flex: 1; + } + &-getStarted { + flex: 1; + } +} diff --git a/common/v2/features/Home/Home.tsx b/common/v2/features/Home/Home.tsx index d5afb8622..5c5106fd2 100644 --- a/common/v2/features/Home/Home.tsx +++ b/common/v2/features/Home/Home.tsx @@ -1,5 +1,25 @@ import React from 'react'; +import { GetStartedPanel } from './components'; +import './Home.scss'; + export default function Home() { - return
Home
; + return ( +
+
+

Awesome Sales Copy

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt + ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation + ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur + sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. +

+
+
+ +
+
+ ); } diff --git a/common/v2/features/Home/components/GetStartedPanel.scss b/common/v2/features/Home/components/GetStartedPanel.scss new file mode 100644 index 000000000..d114b663a --- /dev/null +++ b/common/v2/features/Home/components/GetStartedPanel.scss @@ -0,0 +1,11 @@ +.GetStartedPanel { + text-align: center; + + &-options { + display: flex; + + &-option { + flex: 1; + } + } +} diff --git a/common/v2/features/Home/components/GetStartedPanel.tsx b/common/v2/features/Home/components/GetStartedPanel.tsx new file mode 100644 index 000000000..3e177dd8d --- /dev/null +++ b/common/v2/features/Home/components/GetStartedPanel.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; + +import './GetStartedPanel.scss'; + +export default function GetStartedPanel() { + return ( +
+

+ Let's get started!
Select an option below: +

+
+ + I'm new! Create new wallet + + + I need to import an existing wallet + +
+
I have a MyCrypto Account
+
+ ); +} diff --git a/common/v2/features/Home/components/index.ts b/common/v2/features/Home/components/index.ts new file mode 100644 index 000000000..bf1b0d339 --- /dev/null +++ b/common/v2/features/Home/components/index.ts @@ -0,0 +1 @@ +export { default as GetStartedPanel } from './GetStartedPanel'; diff --git a/common/v2/features/Home/routes.ts b/common/v2/features/Home/routes.ts index d6d1738de..db943c665 100644 --- a/common/v2/features/Home/routes.ts +++ b/common/v2/features/Home/routes.ts @@ -1 +1,10 @@ -export default []; +import Home from './Home'; + +export default [ + { + name: 'Home', + path: '/', + exact: true, + component: Home + } +]; diff --git a/common/v2/features/ImportWallet/ImportWallet.tsx b/common/v2/features/ImportWallet/ImportWallet.tsx index fc56e59e2..06fdf60dd 100644 --- a/common/v2/features/ImportWallet/ImportWallet.tsx +++ b/common/v2/features/ImportWallet/ImportWallet.tsx @@ -1,5 +1,5 @@ import React from 'react'; export default function ImportWallet() { - return
Impot Wallet
; + return
Import Wallet
; } diff --git a/common/v2/features/ImportWallet/routes.ts b/common/v2/features/ImportWallet/routes.ts index d6d1738de..7affec1e5 100644 --- a/common/v2/features/ImportWallet/routes.ts +++ b/common/v2/features/ImportWallet/routes.ts @@ -1 +1,10 @@ -export default []; +import ImportWallet from './ImportWallet'; + +export default [ + { + name: 'Import Wallet', + path: '/import-wallet', + exact: true, + component: ImportWallet + } +]; diff --git a/common/v2/features/registry.json b/common/v2/features/registry.json index fc9c8bbc2..63625c68d 100644 --- a/common/v2/features/registry.json +++ b/common/v2/features/registry.json @@ -14,5 +14,9 @@ { "name": "Home", "key": "home" + }, + { + "name": "Import Wallet", + "key": "importWallet" } ] From a80c9e80b3121af0bef43580402b22c1393c43eb Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 2 Jan 2019 13:54:12 -0600 Subject: [PATCH 0004/1466] Initial setup for CreateWallet --- .../v2/features/CreateWallet/CreateWallet.tsx | 22 +++++++++++-- .../components/ConfirmPhrasePanel.tsx | 5 +++ .../components/DownloadAppPanel.tsx | 18 +++++++++++ .../components/DownloadKeystorePanel.tsx | 5 +++ .../components/GeneratePasswordPanel.tsx | 5 +++ .../components/GeneratePhrasePanel.tsx | 5 +++ .../components/SavePrivateKeyPanel.tsx | 5 +++ .../components/SelectMethodPanel.tsx | 5 +++ .../components/SelectNetworkPanel.tsx | 5 +++ .../features/CreateWallet/components/index.ts | 8 +++++ common/v2/features/CreateWallet/constants.ts | 32 +++++++++++++++++++ 11 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx create mode 100644 common/v2/features/CreateWallet/components/DownloadAppPanel.tsx create mode 100644 common/v2/features/CreateWallet/components/DownloadKeystorePanel.tsx create mode 100644 common/v2/features/CreateWallet/components/GeneratePasswordPanel.tsx create mode 100644 common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx create mode 100644 common/v2/features/CreateWallet/components/SavePrivateKeyPanel.tsx create mode 100644 common/v2/features/CreateWallet/components/SelectMethodPanel.tsx create mode 100644 common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx create mode 100644 common/v2/features/CreateWallet/components/index.ts create mode 100644 common/v2/features/CreateWallet/constants.ts diff --git a/common/v2/features/CreateWallet/CreateWallet.tsx b/common/v2/features/CreateWallet/CreateWallet.tsx index 8933de052..390300513 100644 --- a/common/v2/features/CreateWallet/CreateWallet.tsx +++ b/common/v2/features/CreateWallet/CreateWallet.tsx @@ -1,5 +1,21 @@ -import React from 'react'; +import React, { Component } from 'react'; -export default function CreateWallet() { - return
Create Wallet
; +import { isDesktop } from 'v2/utils'; +import { CreateWalletStages, createWalletStageToComponentHash } from './constants'; + +export default class CreateWallet extends Component { + public state = { + stage: isDesktop() ? CreateWalletStages.SelectNetwork : CreateWalletStages.DownloadApp + }; + + public render() { + const { stage } = this.state; + const ActivePanel = createWalletStageToComponentHash[stage]; + + return ( +
+ +
+ ); + } } diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx new file mode 100644 index 000000000..88eeb8e06 --- /dev/null +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function ConfirmPhrasePanel() { + return
Confirm Phrase
; +} diff --git a/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx b/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx new file mode 100644 index 000000000..7ccb4b4d9 --- /dev/null +++ b/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx @@ -0,0 +1,18 @@ +import React from 'react'; + +export default function DownloadAppPanel() { + return ( +
+

Download App

+

+ Please download the MyCrypto Desktop app so you can securely complete creating your new + account and start managing your funds. +

+ + + + + +
+ ); +} diff --git a/common/v2/features/CreateWallet/components/DownloadKeystorePanel.tsx b/common/v2/features/CreateWallet/components/DownloadKeystorePanel.tsx new file mode 100644 index 000000000..08261321a --- /dev/null +++ b/common/v2/features/CreateWallet/components/DownloadKeystorePanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function DownloadKeystorePanel() { + return
Download Keystore
; +} diff --git a/common/v2/features/CreateWallet/components/GeneratePasswordPanel.tsx b/common/v2/features/CreateWallet/components/GeneratePasswordPanel.tsx new file mode 100644 index 000000000..ed59e9228 --- /dev/null +++ b/common/v2/features/CreateWallet/components/GeneratePasswordPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function GeneratePasswordPanel() { + return
Generate Password
; +} diff --git a/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx new file mode 100644 index 000000000..25b8f2338 --- /dev/null +++ b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function GeneratePhrasePanel() { + return
Generate Phrase
; +} diff --git a/common/v2/features/CreateWallet/components/SavePrivateKeyPanel.tsx b/common/v2/features/CreateWallet/components/SavePrivateKeyPanel.tsx new file mode 100644 index 000000000..c11aa29ed --- /dev/null +++ b/common/v2/features/CreateWallet/components/SavePrivateKeyPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SavePrivateKeyPanel() { + return
Save Private Key
; +} diff --git a/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx b/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx new file mode 100644 index 000000000..7647aed7e --- /dev/null +++ b/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SelectMethodPanel() { + return
Select Method
; +} diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx new file mode 100644 index 000000000..3f6f630ff --- /dev/null +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SelectNetworkPanel() { + return
Select Network
; +} diff --git a/common/v2/features/CreateWallet/components/index.ts b/common/v2/features/CreateWallet/components/index.ts new file mode 100644 index 000000000..3c6fe5962 --- /dev/null +++ b/common/v2/features/CreateWallet/components/index.ts @@ -0,0 +1,8 @@ +export { default as ConfirmPhrasePanel } from './ConfirmPhrasePanel'; +export { default as DownloadAppPanel } from './DownloadAppPanel'; +export { default as DownloadKeystorePanel } from './DownloadKeystorePanel'; +export { default as GeneratePasswordPanel } from './GeneratePasswordPanel'; +export { default as GeneratePhrasePanel } from './GeneratePhrasePanel'; +export { default as SavePrivateKeyPanel } from './SavePrivateKeyPanel'; +export { default as SelectMethodPanel } from './SelectMethodPanel'; +export { default as SelectNetworkPanel } from './SelectNetworkPanel'; diff --git a/common/v2/features/CreateWallet/constants.ts b/common/v2/features/CreateWallet/constants.ts new file mode 100644 index 000000000..c60779eb2 --- /dev/null +++ b/common/v2/features/CreateWallet/constants.ts @@ -0,0 +1,32 @@ +import { + DownloadAppPanel, + SelectNetworkPanel, + SelectMethodPanel, + GeneratePhrasePanel, + ConfirmPhrasePanel, + GeneratePasswordPanel, + DownloadKeystorePanel, + SavePrivateKeyPanel +} from './components'; + +export enum CreateWalletStages { + DownloadApp, + SelectNetwork, + SelectMethod, + GeneratePhrase, + ConfirmPhrase, + GeneratePassword, + DownloadKeystore, + SavePrivateKey +} + +export const createWalletStageToComponentHash = { + [CreateWalletStages.DownloadApp]: DownloadAppPanel, + [CreateWalletStages.SelectNetwork]: SelectNetworkPanel, + [CreateWalletStages.SelectMethod]: SelectMethodPanel, + [CreateWalletStages.GeneratePhrase]: GeneratePhrasePanel, + [CreateWalletStages.ConfirmPhrase]: ConfirmPhrasePanel, + [CreateWalletStages.GeneratePassword]: GeneratePasswordPanel, + [CreateWalletStages.DownloadKeystore]: DownloadKeystorePanel, + [CreateWalletStages.SavePrivateKey]: SavePrivateKeyPanel +}; From c77bca14bd872d59822b3ac51e799b0674b58dce Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 2 Jan 2019 14:09:47 -0600 Subject: [PATCH 0005/1466] Initial setup for ImportWallet --- .../v2/features/ImportWallet/ImportWallet.tsx | 21 ++++++++++++-- .../components/ConnectLedgerPanel.tsx | 5 ++++ .../components/ConnectMetaMaskPanel.tsx | 5 ++++ .../components/ConnectParitySignerPanel.tsx | 5 ++++ .../components/ConnectSafeTMiniPanel.tsx | 5 ++++ .../components/ConnectTrezorPanel.tsx | 5 ++++ .../components/SelectMethodPanel.tsx | 5 ++++ .../components/SelectNetworkAndNodePanel.tsx | 5 ++++ .../features/ImportWallet/components/index.ts | 7 +++++ common/v2/features/ImportWallet/constants.ts | 29 +++++++++++++++++++ 10 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 common/v2/features/ImportWallet/components/ConnectLedgerPanel.tsx create mode 100644 common/v2/features/ImportWallet/components/ConnectMetaMaskPanel.tsx create mode 100644 common/v2/features/ImportWallet/components/ConnectParitySignerPanel.tsx create mode 100644 common/v2/features/ImportWallet/components/ConnectSafeTMiniPanel.tsx create mode 100644 common/v2/features/ImportWallet/components/ConnectTrezorPanel.tsx create mode 100644 common/v2/features/ImportWallet/components/SelectMethodPanel.tsx create mode 100644 common/v2/features/ImportWallet/components/SelectNetworkAndNodePanel.tsx create mode 100644 common/v2/features/ImportWallet/components/index.ts create mode 100644 common/v2/features/ImportWallet/constants.ts diff --git a/common/v2/features/ImportWallet/ImportWallet.tsx b/common/v2/features/ImportWallet/ImportWallet.tsx index 06fdf60dd..4a115dc74 100644 --- a/common/v2/features/ImportWallet/ImportWallet.tsx +++ b/common/v2/features/ImportWallet/ImportWallet.tsx @@ -1,5 +1,20 @@ -import React from 'react'; +import React, { Component } from 'react'; -export default function ImportWallet() { - return
Import Wallet
; +import { ImportWalletStages, importWalletStageToComponentHash } from './constants'; + +export default class CreateWallet extends Component { + public state = { + stage: ImportWalletStages.SelectMethod + }; + + public render() { + const { stage } = this.state; + const ActivePanel = importWalletStageToComponentHash[stage]; + + return ( +
+ +
+ ); + } } diff --git a/common/v2/features/ImportWallet/components/ConnectLedgerPanel.tsx b/common/v2/features/ImportWallet/components/ConnectLedgerPanel.tsx new file mode 100644 index 000000000..194a04911 --- /dev/null +++ b/common/v2/features/ImportWallet/components/ConnectLedgerPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function ConnectLedgerPanel() { + return
Connect Ledger
; +} diff --git a/common/v2/features/ImportWallet/components/ConnectMetaMaskPanel.tsx b/common/v2/features/ImportWallet/components/ConnectMetaMaskPanel.tsx new file mode 100644 index 000000000..3a8f1f32c --- /dev/null +++ b/common/v2/features/ImportWallet/components/ConnectMetaMaskPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function ConnectMetaMaskPanel() { + return
Connect MetaMask
; +} diff --git a/common/v2/features/ImportWallet/components/ConnectParitySignerPanel.tsx b/common/v2/features/ImportWallet/components/ConnectParitySignerPanel.tsx new file mode 100644 index 000000000..4d92da7e2 --- /dev/null +++ b/common/v2/features/ImportWallet/components/ConnectParitySignerPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function ConnectParitySignerPanel() { + return
Connect Parity Signer
; +} diff --git a/common/v2/features/ImportWallet/components/ConnectSafeTMiniPanel.tsx b/common/v2/features/ImportWallet/components/ConnectSafeTMiniPanel.tsx new file mode 100644 index 000000000..8245c03e0 --- /dev/null +++ b/common/v2/features/ImportWallet/components/ConnectSafeTMiniPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function ConnectSafeTMiniPanel() { + return
Connect Safe-T Mini
; +} diff --git a/common/v2/features/ImportWallet/components/ConnectTrezorPanel.tsx b/common/v2/features/ImportWallet/components/ConnectTrezorPanel.tsx new file mode 100644 index 000000000..1c0876d2f --- /dev/null +++ b/common/v2/features/ImportWallet/components/ConnectTrezorPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function ConnectTrezorPanel() { + return
Connect Trezor
; +} diff --git a/common/v2/features/ImportWallet/components/SelectMethodPanel.tsx b/common/v2/features/ImportWallet/components/SelectMethodPanel.tsx new file mode 100644 index 000000000..7647aed7e --- /dev/null +++ b/common/v2/features/ImportWallet/components/SelectMethodPanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SelectMethodPanel() { + return
Select Method
; +} diff --git a/common/v2/features/ImportWallet/components/SelectNetworkAndNodePanel.tsx b/common/v2/features/ImportWallet/components/SelectNetworkAndNodePanel.tsx new file mode 100644 index 000000000..e42cf9e47 --- /dev/null +++ b/common/v2/features/ImportWallet/components/SelectNetworkAndNodePanel.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SelectNetworkAndNodePanel() { + return
Select Network and Node
; +} diff --git a/common/v2/features/ImportWallet/components/index.ts b/common/v2/features/ImportWallet/components/index.ts new file mode 100644 index 000000000..cbd1c04d1 --- /dev/null +++ b/common/v2/features/ImportWallet/components/index.ts @@ -0,0 +1,7 @@ +export { default as ConnectLedgerPanel } from './ConnectLedgerPanel'; +export { default as ConnectMetaMaskPanel } from './ConnectMetaMaskPanel'; +export { default as ConnectParitySignerPanel } from './ConnectParitySignerPanel'; +export { default as ConnectSafeTMiniPanel } from './ConnectSafeTMiniPanel'; +export { default as ConnectTrezorPanel } from './ConnectTrezorPanel'; +export { default as SelectMethodPanel } from './SelectMethodPanel'; +export { default as SelectNetworkAndNodePanel } from './SelectNetworkAndNodePanel'; diff --git a/common/v2/features/ImportWallet/constants.ts b/common/v2/features/ImportWallet/constants.ts new file mode 100644 index 000000000..a0736605d --- /dev/null +++ b/common/v2/features/ImportWallet/constants.ts @@ -0,0 +1,29 @@ +import { + SelectMethodPanel, + SelectNetworkAndNodePanel, + ConnectMetaMaskPanel, + ConnectLedgerPanel, + ConnectTrezorPanel, + ConnectParitySignerPanel, + ConnectSafeTMiniPanel +} from './components'; + +export enum ImportWalletStages { + SelectMethod, + SelectNetworkAndNode, + ConnectMetaMask, + ConnectLedger, + ConnectTrezor, + ConnectParitySigner, + ConnectSafeTMini +} + +export const importWalletStageToComponentHash = { + [ImportWalletStages.SelectMethod]: SelectMethodPanel, + [ImportWalletStages.SelectNetworkAndNode]: SelectNetworkAndNodePanel, + [ImportWalletStages.ConnectMetaMask]: ConnectMetaMaskPanel, + [ImportWalletStages.ConnectLedger]: ConnectLedgerPanel, + [ImportWalletStages.ConnectTrezor]: ConnectTrezorPanel, + [ImportWalletStages.ConnectParitySigner]: ConnectParitySignerPanel, + [ImportWalletStages.ConnectSafeTMini]: ConnectSafeTMiniPanel +}; From 4a96cf1507e25ea94712f3bc0d315cd5ca10613a Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Tue, 8 Jan 2019 15:26:10 -0600 Subject: [PATCH 0006/1466] Initial rendition of GetStartedPanel --- common/Root.tsx | 62 ++++--- common/assets/images/icn-existing-wallet.svg | 14 ++ common/assets/images/icn-new-wallet.svg | 19 ++ common/assets/images/icn-sign-in.svg | 12 ++ common/v2/features/Home/Home.scss | 12 +- common/v2/features/Home/Home.tsx | 6 +- .../Home/components/GetStartedPanel.scss | 57 +++++- .../Home/components/GetStartedPanel.tsx | 39 +++- package.json | 32 ++-- webpack_config/makeConfig.js | 5 +- yarn.lock | 173 +++++++++++++++++- 11 files changed, 364 insertions(+), 67 deletions(-) create mode 100644 common/assets/images/icn-existing-wallet.svg create mode 100644 common/assets/images/icn-new-wallet.svg create mode 100644 common/assets/images/icn-sign-in.svg diff --git a/common/Root.tsx b/common/Root.tsx index 269447e2e..12c2b1fc2 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -2,6 +2,8 @@ import React, { Component } from 'react'; import { Store } from 'redux'; import { Provider, connect } from 'react-redux'; import { withRouter, Switch, HashRouter, Route, BrowserRouter } from 'react-router-dom'; +import { ThemeProvider } from 'styled-components'; +import { light } from '@mycrypto/ui'; import { AppState } from 'features/reducers'; import { configSelectors, configMetaSelectors } from 'features/config'; @@ -110,35 +112,37 @@ class RootClass extends Component { : BrowserRouter; return ( - - - - - {onboardingActive && } - {routes} - - - - {process.env.BUILD_ELECTRON && } - - - -
- {process.env.NODE_ENV !== 'production' && ( - - )} - + + + + + + {onboardingActive && } + {routes} + + + + {process.env.BUILD_ELECTRON && } + + + +
+ {process.env.NODE_ENV !== 'production' && ( + + )} + + ); } diff --git a/common/assets/images/icn-existing-wallet.svg b/common/assets/images/icn-existing-wallet.svg new file mode 100644 index 000000000..02054f6a9 --- /dev/null +++ b/common/assets/images/icn-existing-wallet.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/common/assets/images/icn-new-wallet.svg b/common/assets/images/icn-new-wallet.svg new file mode 100644 index 000000000..c00161d48 --- /dev/null +++ b/common/assets/images/icn-new-wallet.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/common/assets/images/icn-sign-in.svg b/common/assets/images/icn-sign-in.svg new file mode 100644 index 000000000..39886cd7d --- /dev/null +++ b/common/assets/images/icn-sign-in.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/common/v2/features/Home/Home.scss b/common/v2/features/Home/Home.scss index 93148ea13..2f508e875 100644 --- a/common/v2/features/Home/Home.scss +++ b/common/v2/features/Home/Home.scss @@ -1,10 +1,18 @@ .Home { display: flex; + flex-direction: column; - &-copy { - flex: 1; + @media (min-width: 700px) { + flex-direction: row; } &-getStarted { flex: 1; + + @media (min-width: 700px) { + order: 1; + } + } + &-copy { + flex: 1; } } diff --git a/common/v2/features/Home/Home.tsx b/common/v2/features/Home/Home.tsx index 5c5106fd2..81b6773c4 100644 --- a/common/v2/features/Home/Home.tsx +++ b/common/v2/features/Home/Home.tsx @@ -6,6 +6,9 @@ import './Home.scss'; export default function Home() { return (
+
+ +

Awesome Sales Copy

@@ -17,9 +20,6 @@ export default function Home() { est laborum.

-
- -
); } diff --git a/common/v2/features/Home/components/GetStartedPanel.scss b/common/v2/features/Home/components/GetStartedPanel.scss index d114b663a..24a432d66 100644 --- a/common/v2/features/Home/components/GetStartedPanel.scss +++ b/common/v2/features/Home/components/GetStartedPanel.scss @@ -1,11 +1,66 @@ .GetStartedPanel { + padding: 50px 70px; text-align: center; + &-heading { + margin-bottom: 30px; + font-size: 35px; + font-weight: bold; + } &-options { display: flex; + flex-direction: column; + justify-content: space-around; + @media (min-width: 700px) { + flex-direction: row; + justify-content: space-evenly; + } &-option { - flex: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + height: 200px; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 0 0 rgba(0, 0, 0, 0.05), + 0 1px 3px 0 rgba(0, 0, 0, 0.1); + + @media (min-width: 700px) { + flex: 1; + width: 200px; + } + &-image { + display: flex; + align-items: flex-end; + justify-content: center; + width: 90px; + height: 90px; + margin: 10px 0; + padding-top: 10px; + } + p { + display: flex; + align-items: center; + justify-content: center; + padding: 0 20px; + + @media (min-width: 700px) { + flex: 1; + padding: 0; + } + } + } + } + &-alreadyHaveAccount { + button { + margin-top: 23px; + + img { + margin-right: 15px; + } + p { + display: inline; + } } } } diff --git a/common/v2/features/Home/components/GetStartedPanel.tsx b/common/v2/features/Home/components/GetStartedPanel.tsx index 3e177dd8d..a2cbc00f9 100644 --- a/common/v2/features/Home/components/GetStartedPanel.tsx +++ b/common/v2/features/Home/components/GetStartedPanel.tsx @@ -1,23 +1,44 @@ import React from 'react'; import { Link } from 'react-router-dom'; +import { Button, Heading, Panel, Typography } from '@mycrypto/ui'; + +// Legacy +import newWalletIcon from 'common/assets/images/icn-new-wallet.svg'; +import existingWalletIcon from 'common/assets/images/icn-existing-wallet.svg'; +import signInIcon from 'common/assets/images/icn-sign-in.svg'; import './GetStartedPanel.scss'; export default function GetStartedPanel() { return ( -
-

+ + Let's get started!
Select an option below: -

+
- - I'm new! Create new wallet + + +
+ Create new wallet +
+ I'm new! Create wallet (Download App to Create Wallet) +
- - I need to import an existing wallet + + +
+ Existing wallet +
+ I need to import an existing wallet +
-
I have a MyCrypto Account
-
+ + + + ); } diff --git a/package.json b/package.json index f9a98179b..d10537e56 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@ledgerhq/hw-app-eth": "4.7.3", "@ledgerhq/hw-transport-node-hid": "4.7.6", "@ledgerhq/hw-transport-u2f": "4.12.0", + "@mycrypto/ui": "^0.7.0", "@parity/qr-signer": "0.3.1", "axios": "0.18.0", "babel-polyfill": "6.26.0", @@ -22,8 +23,7 @@ "classnames": "2.2.5", "electron-updater": "2.21.10", "ethereum-blockies-base64": "1.0.2", - "ethereumjs-abi": - "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", + "ethereumjs-abi": "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", "ethereumjs-tx": "1.3.4", "ethereumjs-util": "5.1.5", "ethereumjs-wallet": "0.6.0", @@ -63,6 +63,7 @@ "rskjs-util": "1.0.3", "scryptsy": "2.0.0", "semver": "5.5.0", + "styled-components": "^4.0.2", "trezor.js": "6.17.5", "uuid": "3.2.1", "wallet-address-validator": "0.2.4", @@ -172,19 +173,13 @@ "prebuild": "check-node-version --package", "build:downloadable": "webpack --mode=production --config webpack_config/webpack.html.js", "prebuild:downloadable": "check-node-version --package", - "build:electron": - "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", - "build:electron:osx": - "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=osx node webpack_config/buildElectron.js", - "build:electron:windows": - "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=windows node webpack_config/buildElectron.js", - "build:electron:linux": - "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=linux node webpack_config/buildElectron.js", + "build:electron": "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", + "build:electron:osx": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=osx node webpack_config/buildElectron.js", + "build:electron:windows": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=windows node webpack_config/buildElectron.js", + "build:electron:linux": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=linux node webpack_config/buildElectron.js", "prebuild:electron": "check-node-version --package", - "jenkins:build:linux": - "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", - "jenkins:build:mac": - "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", + "jenkins:build:linux": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", + "jenkins:build:mac": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", "jenkins:upload": "node jenkins/upload", "test:coverage": "jest --config=jest_config/jest.config.json --coverage", "test": "jest --config=jest_config/jest.config.json", @@ -197,16 +192,13 @@ "predev": "check-node-version --package", "dev:https": "HTTPS=true node webpack_config/devServer.js", "predev:https": "check-node-version --package", - "dev:electron": - "concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true node webpack_config/devServer.js' 'webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'", + "dev:electron": "concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true node webpack_config/devServer.js' 'webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'", "tslint": "tslint --project . --exclude common/vendor/**/*", "tscheck": "tsc --noEmit", "start": "npm run dev", "precommit": "lint-staged", - "formatAll": - "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", - "prettier:diff": - "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", + "formatAll": "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", + "prettier:diff": "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", "prepush": "npm run tslint && npm run tscheck", "update:tokens": "ts-node scripts/update-tokens", "postinstall": "electron-rebuild --force" diff --git a/webpack_config/makeConfig.js b/webpack_config/makeConfig.js index d800254cd..54d589ecc 100644 --- a/webpack_config/makeConfig.js +++ b/webpack_config/makeConfig.js @@ -90,7 +90,10 @@ module.exports = function(opts = {}) { rules.push( { test: /\.css$/, - include: path.resolve(config.path.src, 'vendor'), + include: [ + path.resolve(config.path.src, 'vendor'), + path.resolve(__dirname, '../node_modules/typeface-lato') + ], use: ['style-loader', 'css-loader'] }, { diff --git a/yarn.lock b/yarn.lock index 11a0d426f..4a5c54061 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,6 +32,18 @@ dependencies: "@babel/highlight" "7.0.0-beta.44" +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-module-imports@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" + dependencies: + "@babel/types" "^7.0.0" + "@babel/highlight@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5" @@ -53,6 +65,28 @@ dependencies: regenerator-runtime "^0.12.0" +"@babel/types@^7.0.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" + dependencies: + esutils "^2.0.2" + lodash "^4.17.10" + to-fast-properties "^2.0.0" + +"@emotion/is-prop-valid@^0.7.3": + version "0.7.3" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.7.3.tgz#a6bf4fa5387cbba59d44e698a4680f481a8da6cc" + dependencies: + "@emotion/memoize" "0.7.1" + +"@emotion/memoize@0.7.1": + version "0.7.1" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.1.tgz#e93c13942592cf5ef01aa8297444dc192beee52f" + +"@emotion/unitless@^0.7.0": + version "0.7.3" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.3.tgz#6310a047f12d21a1036fb031317219892440416f" + "@ledgerhq/hw-app-eth@4.7.3": version "4.7.3" resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-4.7.3.tgz#d352e19658ae296532e522c53c8ec2a1a77b64e5" @@ -79,6 +113,17 @@ dependencies: events "^2.0.0" +"@mycrypto/ui@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.7.0.tgz#7384c17a26c7411068715d95a57e14b00aeb282c" + dependencies: + "@types/lodash.throttle" "^4.1.4" + ethereum-blockies-base64 "^1.0.2" + lodash.throttle "^4.1.1" + polished "^2.2.0" + react-inlinesvg "^0.8.3" + typeface-lato "^0.0.54" + "@parity/erc681@0.1.1": version "0.1.1" resolved "https://registry.yarnpkg.com/@parity/erc681/-/erc681-0.1.1.tgz#0ade5233751011c15d5e75bd2bb583a9ba450a5e" @@ -151,6 +196,16 @@ version "3.3.2" resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.2.tgz#8700226bdde24b6f98e3a60126dbaab3b2a3ab41" +"@types/lodash.throttle@^4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@types/lodash.throttle/-/lodash.throttle-4.1.4.tgz#db210627eb05ef68af99344669818c5baad24039" + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.14.119" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.119.tgz#be847e5f4bc3e35e46d041c394ead8b603ad8b39" + "@types/lodash@4.14.107": version "4.14.107" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.107.tgz#b2d2ae3958bfb8ff828495cbe12214af9e4d035e" @@ -951,6 +1006,15 @@ babel-plugin-jest-hoist@^22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.4.tgz#b9851906eab34c7bf6f8c895a2b08bea1a844c0b" +"babel-plugin-styled-components@>= 1": + version "1.10.0" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.0.tgz#ff1f42ad2cc78c21f26b62266b8f564dbc862939" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-module-imports" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" + lodash "^4.17.10" + babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" @@ -987,6 +1051,10 @@ babel-plugin-syntax-flow@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" +babel-plugin-syntax-jsx@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" @@ -2861,6 +2929,10 @@ css-animation@^1.3.2: babel-runtime "6.x" component-classes "^1.2.5" +css-color-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" + css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" @@ -2929,6 +3001,14 @@ css-selector-tokenizer@^0.7.0: fastparse "^1.1.1" regexpu-core "^1.0.0" +css-to-react-native@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.2.2.tgz#c077d0f7bf3e6c915a539e7325821c9dd01f9965" + dependencies: + css-color-keywords "^1.0.0" + fbjs "^0.8.5" + postcss-value-parser "^3.3.0" + css-tree@1.0.0-alpha.27: version "1.0.0-alpha.27" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.27.tgz#f211526909c7dc940843d83b9376ed98ddb8de47" @@ -3986,7 +4066,7 @@ etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" -ethereum-blockies-base64@1.0.2: +ethereum-blockies-base64@1.0.2, ethereum-blockies-base64@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/ethereum-blockies-base64/-/ethereum-blockies-base64-1.0.2.tgz#4aebca52142bf4d16a3144e6e2b59303e39ed2b3" dependencies: @@ -4379,7 +4459,7 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -fbjs@^0.8.0: +fbjs@^0.8.0, fbjs@^0.8.5: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" dependencies: @@ -5563,6 +5643,14 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +httpplease@^0.16.4: + version "0.16.4" + resolved "https://registry.yarnpkg.com/httpplease/-/httpplease-0.16.4.tgz#d382ebe230ef5079080b4e9ffebf316a9e75c0da" + dependencies: + urllite "~0.5.0" + xmlhttprequest "*" + xtend "~3.0.0" + https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" @@ -7324,6 +7412,10 @@ lodash.templatesettings@^3.0.0: lodash._reinterpolate "^3.0.0" lodash.escape "^3.0.0" +lodash.throttle@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" + lodash.topath@4.5.2: version "4.5.2" resolved "https://registry.yarnpkg.com/lodash.topath/-/lodash.topath-4.5.2.tgz#3616351f3bba61994a0931989660bd03254fd009" @@ -7340,6 +7432,10 @@ lodash@^3.2.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" +lodash@^4.17.10: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + lodash@~2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e" @@ -7521,6 +7617,10 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" +memoize-one@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.1.0.tgz#a2387c58c03fff27ca390c31b764a79addf3f906" + memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -8841,6 +8941,12 @@ pngquant-bin@^4.0.0: execa "^0.10.0" logalot "^2.0.0" +polished@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/polished/-/polished-2.3.1.tgz#557ea07e5bcb1b9c7d71935a01d0315831234d48" + dependencies: + "@babel/runtime" "^7.0.0" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -9539,6 +9645,13 @@ react-hot-loader@4.0.0: prop-types "^15.6.0" shallowequal "^1.0.2" +react-inlinesvg@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/react-inlinesvg/-/react-inlinesvg-0.8.3.tgz#866f4db92a84a30d0f0d076439a980fd000b0693" + dependencies: + httpplease "^0.16.4" + once "^1.4.0" + react-input-autosize@^2.1.2: version "2.2.1" resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.1.tgz#ec428fa15b1592994fb5f9aa15bb1eb6baf420f8" @@ -9549,6 +9662,10 @@ react-is@^16.3.2: version "16.3.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.3.2.tgz#f4d3d0e2f5fbb6ac46450641eb2e25bf05d36b22" +react-is@^16.6.0: + version "16.7.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.7.0.tgz#c1bd21c64f1f1364c6f70695ec02d69392f41bfa" + react-markdown@3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-3.3.0.tgz#a87cdd822aa9302d6add9687961dd1a82a45d02e" @@ -11182,6 +11299,30 @@ style-loader@0.20.3: loader-utils "^1.1.0" schema-utils "^0.4.5" +styled-components@^4.0.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.1.3.tgz#4472447208e618b57e84deaaeb6acd34a5e0fe9b" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@emotion/is-prop-valid" "^0.7.3" + "@emotion/unitless" "^0.7.0" + babel-plugin-styled-components ">= 1" + css-to-react-native "^2.2.2" + memoize-one "^4.0.0" + prop-types "^15.5.4" + react-is "^16.6.0" + stylis "^3.5.0" + stylis-rule-sheet "^0.0.10" + supports-color "^5.5.0" + +stylis-rule-sheet@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" + +stylis@^3.5.0: + version "3.5.4" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" + subarg@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" @@ -11227,6 +11368,12 @@ supports-color@^5.2.0, supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + dependencies: + has-flag "^3.0.0" + svg2png@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/svg2png/-/svg2png-3.0.1.tgz#a2644d68b0231ac00af431aa163714ff17106447" @@ -11493,6 +11640,10 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + to-ico@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/to-ico/-/to-ico-1.1.5.tgz#1d32da5f2c90922edee6b686d610c54527b5a8d5" @@ -11757,6 +11908,10 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" +typeface-lato@^0.0.54: + version "0.0.54" + resolved "https://registry.yarnpkg.com/typeface-lato/-/typeface-lato-0.0.54.tgz#6ea56309a8b0cfdb7e8246e05de4b58b8272b47c" + typeforce@^1.11.3: version "1.12.0" resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.12.0.tgz#ca40899919f1466d7819e37be039406beb912a2e" @@ -12058,6 +12213,12 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +urllite@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/urllite/-/urllite-0.5.0.tgz#1b7bb9ca3fb0db9520de113466bbcf7cc341451a" + dependencies: + xtend "~4.0.0" + use@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" @@ -12651,6 +12812,10 @@ xmldom@0.1.x: version "0.1.27" resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" +xmlhttprequest@*: + version "1.8.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -12661,6 +12826,10 @@ xtend@~2.1.1: dependencies: object-keys "~0.4.0" +xtend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a" + y18n@^3.2.0, y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" From 4bd56d726e0457d4ac32f32577f0cd1203c7bf9f Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Tue, 8 Jan 2019 17:19:20 -0600 Subject: [PATCH 0007/1466] Initial rendition of DownloadAppPanel --- .../components/DownloadAppPanel.scss | 46 +++++++++++++++++++ .../components/DownloadAppPanel.tsx | 39 ++++++++++++---- 2 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 common/v2/features/CreateWallet/components/DownloadAppPanel.scss diff --git a/common/v2/features/CreateWallet/components/DownloadAppPanel.scss b/common/v2/features/CreateWallet/components/DownloadAppPanel.scss new file mode 100644 index 000000000..a2747d689 --- /dev/null +++ b/common/v2/features/CreateWallet/components/DownloadAppPanel.scss @@ -0,0 +1,46 @@ +.DownloadAppPanel { + display: flex; + flex-direction: column; + align-items: center; + max-width: 565px; + padding: 42px 71px 50px 71px; + text-align: center; + + &-heading { + font-size: 32px; + font-weight: bold; + } + &-icon { + width: 135px; + height: 135px; + margin: 24px 0; + } + &-optionGroup { + display: flex; + flex-direction: column; + + @media (min-width: 700px) { + flex-direction: row; + } + &-option { + width: 320px; + margin-bottom: 15px; + + @media (min-width: 700px) { + width: 200px; + + &:first-of-type { + margin-right: 20px; + } + } + } + } + &-option { + width: 320px; + margin-bottom: 15px; + + @media (min-width: 700px) { + width: 420px; + } + } +} diff --git a/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx b/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx index 7ccb4b4d9..ec6aa5520 100644 --- a/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx +++ b/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx @@ -1,18 +1,37 @@ import React from 'react'; +import { Button, Panel, Heading, Typography } from '@mycrypto/ui'; + +import './DownloadAppPanel.scss'; export default function DownloadAppPanel() { return ( -
-

Download App

-

+ + Download App + Please download the MyCrypto Desktop app so you can securely complete creating your new account and start managing your funds. -

- - - - - -
+ + Desktop + +
+ + +
+
+ + +
+ + Not sure what this is? Learn more about our desktop app. + + ); } From d0a92cb954888028eca64f0c2b68621b3c771f7e Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Tue, 8 Jan 2019 17:52:14 -0600 Subject: [PATCH 0008/1466] Pause --- .../components/SelectNetworkPanel.scss | 9 +++++++++ .../components/SelectNetworkPanel.tsx | 16 +++++++++++++++- common/v2/features/CreateWallet/constants.ts | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 common/v2/features/CreateWallet/components/SelectNetworkPanel.scss diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss b/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss new file mode 100644 index 000000000..4938b2353 --- /dev/null +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss @@ -0,0 +1,9 @@ +.SelectNetworkPanel { + max-width: 560px; + padding: 42px 71px 50px 71px; + + &-heading { + font-size: 32px; + font-weight: bold; + } +} diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx index 3f6f630ff..4c81e52d4 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -1,5 +1,19 @@ import React from 'react'; +import { ComboBox, Heading, Panel, Typography } from '@mycrypto/ui'; + +import './SelectNetworkPanel.scss'; export default function SelectNetworkPanel() { - return
Select Network
; + return ( + + Select Network + + Not sure what to choose? Leave displayed defaults below and just click next! + + + + + + + ); } diff --git a/common/v2/features/CreateWallet/constants.ts b/common/v2/features/CreateWallet/constants.ts index c60779eb2..2d3375ea3 100644 --- a/common/v2/features/CreateWallet/constants.ts +++ b/common/v2/features/CreateWallet/constants.ts @@ -21,7 +21,7 @@ export enum CreateWalletStages { } export const createWalletStageToComponentHash = { - [CreateWalletStages.DownloadApp]: DownloadAppPanel, + [CreateWalletStages.DownloadApp]: SelectNetworkPanel, [CreateWalletStages.SelectNetwork]: SelectNetworkPanel, [CreateWalletStages.SelectMethod]: SelectMethodPanel, [CreateWalletStages.GeneratePhrase]: GeneratePhrasePanel, From 31819ac6a94bec0bfcbad2d022af1596362f0444 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 9 Jan 2019 13:30:02 -0600 Subject: [PATCH 0009/1466] Create Layout and add it to Home --- common/assets/images/icn-desktop-app.svg | 18 ++++++++++ common/v2/components/Layout.scss | 9 +++++ common/v2/components/Layout.tsx | 28 ++++++++++++++++ common/v2/components/index.ts | 1 + .../components/DownloadAppPanel.tsx | 5 ++- common/v2/features/CreateWallet/constants.ts | 2 +- common/v2/features/Home/Home.scss | 4 +++ common/v2/features/Home/Home.tsx | 33 ++++++++++--------- 8 files changed, 83 insertions(+), 17 deletions(-) create mode 100644 common/assets/images/icn-desktop-app.svg create mode 100644 common/v2/components/Layout.scss create mode 100644 common/v2/components/Layout.tsx create mode 100644 common/v2/components/index.ts diff --git a/common/assets/images/icn-desktop-app.svg b/common/assets/images/icn-desktop-app.svg new file mode 100644 index 000000000..78ef7d95d --- /dev/null +++ b/common/assets/images/icn-desktop-app.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/common/v2/components/Layout.scss b/common/v2/components/Layout.scss new file mode 100644 index 000000000..74caf19e2 --- /dev/null +++ b/common/v2/components/Layout.scss @@ -0,0 +1,9 @@ +.Layout { + &-content { + padding: 50px 20px; + + @media (min-width: 700px) { + padding: 50px 80px; + } + } +} diff --git a/common/v2/components/Layout.tsx b/common/v2/components/Layout.tsx new file mode 100644 index 000000000..b1d840827 --- /dev/null +++ b/common/v2/components/Layout.tsx @@ -0,0 +1,28 @@ +import React from 'react'; + +import './Layout.scss'; + +// Legacy +import { makeAutoNodeName } from 'libs/nodes'; +import { Query } from 'components/renderCbs'; +import NewHeader from 'components/Header/NewHeader/NewHeader'; +import NewFooter from 'components/Footer/NewFooter/NewFooter'; + +interface Props { + children: any; +} + +export default function Layout({ children }: Props) { + return ( +
+ ( + + )} + /> +
{children}
+ +
+ ); +} diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts new file mode 100644 index 000000000..6c48faec7 --- /dev/null +++ b/common/v2/components/index.ts @@ -0,0 +1 @@ +export { default as Layout } from './Layout'; diff --git a/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx b/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx index ec6aa5520..44daf13bd 100644 --- a/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx +++ b/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx @@ -3,6 +3,9 @@ import { Button, Panel, Heading, Typography } from '@mycrypto/ui'; import './DownloadAppPanel.scss'; +// Legacy +import desktopAppIcon from 'common/assets/images/icn-desktop-app.svg'; + export default function DownloadAppPanel() { return ( @@ -11,7 +14,7 @@ export default function DownloadAppPanel() { Please download the MyCrypto Desktop app so you can securely complete creating your new account and start managing your funds. - Desktop + Desktop
+ )} + {children} +
+ ); +} diff --git a/common/v2/components/Layout.scss b/common/v2/components/Layout.scss index 74caf19e2..1ae71c1d5 100644 --- a/common/v2/components/Layout.scss +++ b/common/v2/components/Layout.scss @@ -1,9 +1,15 @@ .Layout { &-content { - padding: 50px 20px; + padding: 100px 30px 50px 30px; @media (min-width: 700px) { padding: 50px 80px; + + &.centered { + display: flex; + align-items: center; + justify-content: center; + } } } } diff --git a/common/v2/components/Layout.tsx b/common/v2/components/Layout.tsx index b1d840827..c09cca4a9 100644 --- a/common/v2/components/Layout.tsx +++ b/common/v2/components/Layout.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import classnames from 'classnames'; import './Layout.scss'; @@ -9,10 +10,15 @@ import NewHeader from 'components/Header/NewHeader/NewHeader'; import NewFooter from 'components/Footer/NewFooter/NewFooter'; interface Props { + centered: boolean; children: any; } -export default function Layout({ children }: Props) { +export default function Layout({ centered, children }: Props) { + const contentClassName = classnames('Layout-content', { + centered + }); + return (
)} /> -
{children}
+
{children}
); diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index 6c48faec7..741046014 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -1 +1,2 @@ +export { default as ContentPanel } from './ContentPanel'; export { default as Layout } from './Layout'; diff --git a/common/v2/features/CreateWallet/CreateWallet.tsx b/common/v2/features/CreateWallet/CreateWallet.tsx index 390300513..4ff732c3e 100644 --- a/common/v2/features/CreateWallet/CreateWallet.tsx +++ b/common/v2/features/CreateWallet/CreateWallet.tsx @@ -1,5 +1,6 @@ import React, { Component } from 'react'; +import { Layout } from 'v2/components'; import { isDesktop } from 'v2/utils'; import { CreateWalletStages, createWalletStageToComponentHash } from './constants'; @@ -13,9 +14,11 @@ export default class CreateWallet extends Component { const ActivePanel = createWalletStageToComponentHash[stage]; return ( -
- -
+ +
+ +
+
); } } diff --git a/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx b/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx index 44daf13bd..f07d0698b 100644 --- a/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx +++ b/common/v2/features/CreateWallet/components/DownloadAppPanel.tsx @@ -1,14 +1,16 @@ import React from 'react'; -import { Button, Panel, Heading, Typography } from '@mycrypto/ui'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { Button, Heading, Typography } from '@mycrypto/ui'; +import { ContentPanel } from 'v2/components'; import './DownloadAppPanel.scss'; // Legacy import desktopAppIcon from 'common/assets/images/icn-desktop-app.svg'; -export default function DownloadAppPanel() { +export function DownloadAppPanel({ history }: RouteComponentProps<{}>) { return ( - + Download App Please download the MyCrypto Desktop app so you can securely complete creating your new @@ -35,6 +37,8 @@ export default function DownloadAppPanel() { Not sure what this is? Learn more about our desktop app. - + ); } + +export default withRouter(DownloadAppPanel); From 71a1e0cc60538bfd14bb06078be92feccb362961 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 9 Jan 2019 14:18:45 -0600 Subject: [PATCH 0011/1466] Add Stepper and incorporate into Select Network --- common/v2/components/Stepper.scss | 29 +++++++++++++++++ common/v2/components/Stepper.tsx | 31 +++++++++++++++++++ common/v2/components/index.ts | 1 + .../components/SelectNetworkPanel.scss | 22 +++++++++++-- .../components/SelectNetworkPanel.tsx | 17 +++++++--- common/v2/features/CreateWallet/constants.ts | 2 +- 6 files changed, 93 insertions(+), 9 deletions(-) create mode 100644 common/v2/components/Stepper.scss create mode 100644 common/v2/components/Stepper.tsx diff --git a/common/v2/components/Stepper.scss b/common/v2/components/Stepper.scss new file mode 100644 index 000000000..c07a2e891 --- /dev/null +++ b/common/v2/components/Stepper.scss @@ -0,0 +1,29 @@ +.Stepper { + display: flex; + align-items: center; + + &-wrapper { + display: flex; + align-items: center; + justify-content: center; + width: 12px; + height: 12px; + margin-right: 8px; + background: #007a99; + border-radius: 50%; + + &-activeStep { + width: 6px; + height: 6px; + background: #fff; + border-radius: 50%; + } + } + &-step { + width: 8px; + height: 8px; + margin-right: 8px; + background: #007a99; + border-radius: 50%; + } +} diff --git a/common/v2/components/Stepper.tsx b/common/v2/components/Stepper.tsx new file mode 100644 index 000000000..c0ade007a --- /dev/null +++ b/common/v2/components/Stepper.tsx @@ -0,0 +1,31 @@ +import React from 'react'; +import classnames from 'classnames'; + +import './Stepper.scss'; + +interface Props { + className?: string; + current: number; + total: number; +} + +export default function Stepper({ current, total, className, ...rest }: Props) { + const currentOffset = current - 1; + const stepperClassName = classnames('Stepper', className); + + return ( +
+ {Array.from( + { length: total }, + (_, index) => + index === currentOffset ? ( +
+
+
+ ) : ( +
+ ) + )} +
+ ); +} diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index 741046014..86e2306c4 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -1,2 +1,3 @@ export { default as ContentPanel } from './ContentPanel'; export { default as Layout } from './Layout'; +export { default as Stepper } from './Stepper'; diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss b/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss index 4938b2353..cd1a90a38 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss @@ -2,8 +2,24 @@ max-width: 560px; padding: 42px 71px 50px 71px; - &-heading { - font-size: 32px; - font-weight: bold; + &-top { + display: flex; + flex-direction: column; + align-items: center; + + @media (min-width: 700px) { + flex-direction: row; + justify-content: space-between; + } + &-heading { + margin-top: 0; + font-size: 32px; + font-weight: bold; + } + &-stepper { + @media (min-width: 700px) { + order: 2; + } + } } } diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx index 4c81e52d4..8f22e49e7 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -1,12 +1,17 @@ import React from 'react'; -import { ComboBox, Heading, Panel, Typography } from '@mycrypto/ui'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { ComboBox, Heading, Typography } from '@mycrypto/ui'; +import { ContentPanel, Stepper } from 'v2/components'; import './SelectNetworkPanel.scss'; -export default function SelectNetworkPanel() { +export function SelectNetworkPanel({ history }: RouteComponentProps<{}>) { return ( - - Select Network + +
+ + Select Network +
Not sure what to choose? Leave displayed defaults below and just click next! @@ -14,6 +19,8 @@ export default function SelectNetworkPanel() { -
+ ); } + +export default withRouter(SelectNetworkPanel); diff --git a/common/v2/features/CreateWallet/constants.ts b/common/v2/features/CreateWallet/constants.ts index c60779eb2..2d3375ea3 100644 --- a/common/v2/features/CreateWallet/constants.ts +++ b/common/v2/features/CreateWallet/constants.ts @@ -21,7 +21,7 @@ export enum CreateWalletStages { } export const createWalletStageToComponentHash = { - [CreateWalletStages.DownloadApp]: DownloadAppPanel, + [CreateWalletStages.DownloadApp]: SelectNetworkPanel, [CreateWalletStages.SelectNetwork]: SelectNetworkPanel, [CreateWalletStages.SelectMethod]: SelectMethodPanel, [CreateWalletStages.GeneratePhrase]: GeneratePhrasePanel, From c905a316590e7e9b97b59405c55eec42341c254a Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 9 Jan 2019 14:31:05 -0600 Subject: [PATCH 0012/1466] Abstract out SteppedPanel --- common/v2/components/ContentPanel.tsx | 7 +++- .../components/SelectNetworkPanel.scss | 24 +----------- .../components/SelectNetworkPanel.tsx | 22 +++++------ .../CreateWallet/components/SteppedPanel.scss | 25 ++++++++++++ .../CreateWallet/components/SteppedPanel.tsx | 39 +++++++++++++++++++ 5 files changed, 81 insertions(+), 36 deletions(-) create mode 100644 common/v2/features/CreateWallet/components/SteppedPanel.scss create mode 100644 common/v2/features/CreateWallet/components/SteppedPanel.tsx diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index b0f59cc39..aace18dd7 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -8,10 +8,11 @@ import backArrowIcon from 'common/assets/images/icn-back-arrow.svg'; interface Props { children: any; + className: string; onBack?(): void; } -export default function ContentPanel({ onBack, children, ...rest }: Props) { +export default function ContentPanel({ onBack, children, className = '', ...rest }: Props) { return (
{onBack && ( @@ -19,7 +20,9 @@ export default function ContentPanel({ onBack, children, ...rest }: Props) { Back arrow Back )} - {children} + + {children} +
); } diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss b/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss index cd1a90a38..b9c7d6dac 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss @@ -1,25 +1,3 @@ .SelectNetworkPanel { - max-width: 560px; - padding: 42px 71px 50px 71px; - - &-top { - display: flex; - flex-direction: column; - align-items: center; - - @media (min-width: 700px) { - flex-direction: row; - justify-content: space-between; - } - &-heading { - margin-top: 0; - font-size: 32px; - font-weight: bold; - } - &-stepper { - @media (min-width: 700px) { - order: 2; - } - } - } + // } diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx index 8f22e49e7..6ddb0736e 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -1,25 +1,25 @@ import React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { ComboBox, Heading, Typography } from '@mycrypto/ui'; +import { ComboBox } from '@mycrypto/ui'; -import { ContentPanel, Stepper } from 'v2/components'; +import SteppedPanel from './SteppedPanel'; import './SelectNetworkPanel.scss'; export function SelectNetworkPanel({ history }: RouteComponentProps<{}>) { return ( - -
- - Select Network -
- - Not sure what to choose? Leave displayed defaults below and just click next! - + -
+ ); } diff --git a/common/v2/features/CreateWallet/components/SteppedPanel.scss b/common/v2/features/CreateWallet/components/SteppedPanel.scss new file mode 100644 index 000000000..d597ff907 --- /dev/null +++ b/common/v2/features/CreateWallet/components/SteppedPanel.scss @@ -0,0 +1,25 @@ +.SteppedPanel { + max-width: 560px; + padding: 42px 71px 50px 71px; + + &-top { + display: flex; + flex-direction: column; + align-items: center; + + @media (min-width: 700px) { + flex-direction: row; + justify-content: space-between; + } + &-heading { + margin-top: 0; + font-size: 32px; + font-weight: bold; + } + &-stepper { + @media (min-width: 700px) { + order: 2; + } + } + } +} diff --git a/common/v2/features/CreateWallet/components/SteppedPanel.tsx b/common/v2/features/CreateWallet/components/SteppedPanel.tsx new file mode 100644 index 000000000..1ec615829 --- /dev/null +++ b/common/v2/features/CreateWallet/components/SteppedPanel.tsx @@ -0,0 +1,39 @@ +import React from 'react'; +import classnames from 'classnames'; +import { Heading, Typography } from '@mycrypto/ui'; + +import { ContentPanel, Stepper } from 'v2/components'; +import './SteppedPanel.scss'; + +interface Props { + children: any; + currentStep: number; + description: string; + heading: string; + totalSteps: number; + className?: string; + onBack(): void; +} + +export default function SteppedPanel({ + heading, + description, + currentStep, + totalSteps, + onBack, + className = '', + children +}: Props) { + const steppedPanelClassName = classnames('SteppedPanel', className); + + return ( + +
+ + {heading} +
+ {description} + {children} +
+ ); +} From 8d7bdc7364ee219e8e6a0b884f7356f19e7f9b66 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 9 Jan 2019 14:43:09 -0600 Subject: [PATCH 0013/1466] Initial rendition of SelectMethodPanel --- .../components/SelectMethodPanel.scss | 18 ++++++++++ .../components/SelectMethodPanel.tsx | 34 +++++++++++++++++-- common/v2/features/CreateWallet/constants.ts | 2 +- 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 common/v2/features/CreateWallet/components/SelectMethodPanel.scss diff --git a/common/v2/features/CreateWallet/components/SelectMethodPanel.scss b/common/v2/features/CreateWallet/components/SelectMethodPanel.scss new file mode 100644 index 000000000..830734558 --- /dev/null +++ b/common/v2/features/CreateWallet/components/SelectMethodPanel.scss @@ -0,0 +1,18 @@ +.SelectMethodPanel { + &-content { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + + &-icon { + width: 150px; + height: 150px; + margin: 46px 0 80px 0; + } + &-button { + width: 100%; + margin-bottom: 20px; + } + } +} diff --git a/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx b/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx index 7647aed7e..45479eeef 100644 --- a/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx @@ -1,5 +1,35 @@ import React from 'react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { Button, Typography } from '@mycrypto/ui'; -export default function SelectMethodPanel() { - return
Select Method
; +import SteppedPanel from './SteppedPanel'; +import './SelectMethodPanel.scss'; + +// Legacy +import newWalletIcon from 'common/assets/images/icn-new-wallet.svg'; + +export function SelectMethodPanel({ history }: RouteComponentProps<{}>) { + return ( + +
+ New wallet + + + Don’t want use a phrase? Create wallet with keystore file. + + + Already have a wallet? Unlock it now. + +
+
+ ); } + +export default withRouter(SelectMethodPanel); diff --git a/common/v2/features/CreateWallet/constants.ts b/common/v2/features/CreateWallet/constants.ts index 2d3375ea3..9c6ac5e37 100644 --- a/common/v2/features/CreateWallet/constants.ts +++ b/common/v2/features/CreateWallet/constants.ts @@ -21,7 +21,7 @@ export enum CreateWalletStages { } export const createWalletStageToComponentHash = { - [CreateWalletStages.DownloadApp]: SelectNetworkPanel, + [CreateWalletStages.DownloadApp]: SelectMethodPanel, [CreateWalletStages.SelectNetwork]: SelectNetworkPanel, [CreateWalletStages.SelectMethod]: SelectMethodPanel, [CreateWalletStages.GeneratePhrase]: GeneratePhrasePanel, From 72808d4853835fa21ca56d195644d5c114517149 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 14 Jan 2019 12:58:07 -0600 Subject: [PATCH 0014/1466] Generate phrase panel --- common/assets/images/icn-reload.svg | 5 +++ .../components/GeneratePhrasePanel.scss | 33 +++++++++++++++++++ .../components/GeneratePhrasePanel.tsx | 31 +++++++++++++++-- common/v2/features/CreateWallet/constants.ts | 2 +- package.json | 2 +- yarn.lock | 6 ++-- 6 files changed, 72 insertions(+), 7 deletions(-) create mode 100644 common/assets/images/icn-reload.svg create mode 100644 common/v2/features/CreateWallet/components/GeneratePhrasePanel.scss diff --git a/common/assets/images/icn-reload.svg b/common/assets/images/icn-reload.svg new file mode 100644 index 000000000..c2035dd43 --- /dev/null +++ b/common/assets/images/icn-reload.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/common/v2/features/CreateWallet/components/GeneratePhrasePanel.scss b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.scss new file mode 100644 index 000000000..261dee6b7 --- /dev/null +++ b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.scss @@ -0,0 +1,33 @@ +.GeneratePhrasePanel { + &-words { + height: 140px; + margin-top: 25px; + margin-bottom: 150px; + padding: 29px 40px; + border: 1px solid #e5ecf3; + } + &-next { + width: 100%; + margin-bottom: 15px; + } + &-actions { + display: flex; + align-items: center; + + &-action { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + + img { + margin-right: 5px; + } + &:hover { + img { + filter: saturate(100); + } + } + } + } +} diff --git a/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx index 25b8f2338..7a5076a17 100644 --- a/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx +++ b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx @@ -1,5 +1,32 @@ import React from 'react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { Button, Typography } from '@mycrypto/ui'; -export default function GeneratePhrasePanel() { - return
Generate Phrase
; +import SteppedPanel from './SteppedPanel'; +import './GeneratePhrasePanel.scss'; + +// Legacy +import reloadIcon from 'common/assets/images/icn-reload.svg'; + +export function GeneratePhrasePanel({ history }: RouteComponentProps<{}>) { + return ( + + Derp derp derp + +
+ +
+
+ ); } + +export default withRouter(GeneratePhrasePanel); diff --git a/common/v2/features/CreateWallet/constants.ts b/common/v2/features/CreateWallet/constants.ts index 9c6ac5e37..fa3d483be 100644 --- a/common/v2/features/CreateWallet/constants.ts +++ b/common/v2/features/CreateWallet/constants.ts @@ -21,7 +21,7 @@ export enum CreateWalletStages { } export const createWalletStageToComponentHash = { - [CreateWalletStages.DownloadApp]: SelectMethodPanel, + [CreateWalletStages.DownloadApp]: GeneratePhrasePanel, [CreateWalletStages.SelectNetwork]: SelectNetworkPanel, [CreateWalletStages.SelectMethod]: SelectMethodPanel, [CreateWalletStages.GeneratePhrase]: GeneratePhrasePanel, diff --git a/package.json b/package.json index d10537e56..9159fb49f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@ledgerhq/hw-app-eth": "4.7.3", "@ledgerhq/hw-transport-node-hid": "4.7.6", "@ledgerhq/hw-transport-u2f": "4.12.0", - "@mycrypto/ui": "^0.7.0", + "@mycrypto/ui": "^0.8.0", "@parity/qr-signer": "0.3.1", "axios": "0.18.0", "babel-polyfill": "6.26.0", diff --git a/yarn.lock b/yarn.lock index 4a5c54061..a7225ff86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -113,9 +113,9 @@ dependencies: events "^2.0.0" -"@mycrypto/ui@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.7.0.tgz#7384c17a26c7411068715d95a57e14b00aeb282c" +"@mycrypto/ui@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.8.0.tgz#32ebb60544e9a5dcd27f7e361f4f569494b7e16e" dependencies: "@types/lodash.throttle" "^4.1.4" ethereum-blockies-base64 "^1.0.2" From acfb1635518af984e78a7e38389e06cb001831d4 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 14 Jan 2019 13:11:01 -0600 Subject: [PATCH 0015/1466] Initial rendition of ConfirmPhrasePanel --- .../components/ConfirmPhrasePanel.scss | 45 +++++++++++++++++++ .../components/ConfirmPhrasePanel.tsx | 34 +++++++++++++- common/v2/features/CreateWallet/constants.ts | 2 +- 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss new file mode 100644 index 000000000..bca905166 --- /dev/null +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss @@ -0,0 +1,45 @@ +@mixin word { + width: 88px; + height: 28px; + padding: 6px 14px; + border-radius: 1.4px; + background-color: rgba(122, 129, 135, 0.75); + color: #fff; + + &:not(:last-of-type) { + margin-right: 9px; + } +} + +.ConfirmPhrasePanel { + &-activeWords { + height: 200px; + margin-top: 10px; + margin-bottom: 15px; + padding: 15px; + border: 1px solid #e5ecf3; + + &-word { + @include word; + } + } + &-selectableWords { + margin-bottom: 18px; + + &-row { + display: flex; + align-items: center; + + &-entry { + @include word; + + display: flex; + align-items: center; + justify-content: center; + } + } + } + &-next { + width: 100%; + } +} diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx index 88eeb8e06..54fc1ef9a 100644 --- a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx @@ -1,5 +1,35 @@ import React from 'react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { Button, Typography } from '@mycrypto/ui'; -export default function ConfirmPhrasePanel() { - return
Confirm Phrase
; +import SteppedPanel from './SteppedPanel'; +import './ConfirmPhrasePanel.scss'; + +export function ConfirmPhrasePanel({ history }: RouteComponentProps<{}>) { + return ( + +
+ correct + shiver +
+
+
+
Derp
+
Derp
+
Derp
+
Derp
+
+
+ +
+ ); } + +export default withRouter(ConfirmPhrasePanel); diff --git a/common/v2/features/CreateWallet/constants.ts b/common/v2/features/CreateWallet/constants.ts index fa3d483be..25ee0a61b 100644 --- a/common/v2/features/CreateWallet/constants.ts +++ b/common/v2/features/CreateWallet/constants.ts @@ -21,7 +21,7 @@ export enum CreateWalletStages { } export const createWalletStageToComponentHash = { - [CreateWalletStages.DownloadApp]: GeneratePhrasePanel, + [CreateWalletStages.DownloadApp]: ConfirmPhrasePanel, [CreateWalletStages.SelectNetwork]: SelectNetworkPanel, [CreateWalletStages.SelectMethod]: SelectMethodPanel, [CreateWalletStages.GeneratePhrase]: GeneratePhrasePanel, From bc8a67e152f30e53963bb5021cec228c4d85bfca Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 14 Jan 2019 13:47:29 -0600 Subject: [PATCH 0016/1466] Initial rendition of MnemonicProvider --- .../v2/features/CreateWallet/CreateWallet.tsx | 28 ++++++++-- .../components/ConfirmPhrasePanel.tsx | 7 ++- .../components/GeneratePhrasePanel.scss | 2 + .../components/GeneratePhrasePanel.tsx | 55 ++++++++++++------- .../components/MnemonicProvider.tsx | 20 +++++++ .../components/SelectNetworkPanel.scss | 4 +- .../components/SelectNetworkPanel.tsx | 3 +- .../features/CreateWallet/components/index.ts | 1 + common/v2/features/CreateWallet/constants.ts | 4 +- 9 files changed, 93 insertions(+), 31 deletions(-) create mode 100644 common/v2/features/CreateWallet/components/MnemonicProvider.tsx diff --git a/common/v2/features/CreateWallet/CreateWallet.tsx b/common/v2/features/CreateWallet/CreateWallet.tsx index 4ff732c3e..4e83be6d8 100644 --- a/common/v2/features/CreateWallet/CreateWallet.tsx +++ b/common/v2/features/CreateWallet/CreateWallet.tsx @@ -2,23 +2,39 @@ import React, { Component } from 'react'; import { Layout } from 'v2/components'; import { isDesktop } from 'v2/utils'; +import { MnemonicProvider, MnemonicContext } from './components'; import { CreateWalletStages, createWalletStageToComponentHash } from './constants'; export default class CreateWallet extends Component { public state = { - stage: isDesktop() ? CreateWalletStages.SelectNetwork : CreateWalletStages.DownloadApp + // stage: isDesktop() ? CreateWalletStages.SelectNetwork : CreateWalletStages.DownloadApp + stage: CreateWalletStages.GeneratePhrase }; public render() { const { stage } = this.state; const ActivePanel = createWalletStageToComponentHash[stage]; + const isMnemonicPanel = [ + CreateWalletStages.GeneratePhrase, + CreateWalletStages.ConfirmPhrase + ].includes(stage); return ( - -
- -
-
+ + +
+ {isMnemonicPanel ? ( + + {({ words, generateWords }) => ( + + )} + + ) : ( + + )} +
+
+
); } } diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx index 54fc1ef9a..96fb3e5aa 100644 --- a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx @@ -5,7 +5,12 @@ import { Button, Typography } from '@mycrypto/ui'; import SteppedPanel from './SteppedPanel'; import './ConfirmPhrasePanel.scss'; -export function ConfirmPhrasePanel({ history }: RouteComponentProps<{}>) { +interface Props { + words: string[]; + generateWords(): void; +} + +export function ConfirmPhrasePanel({ history }: Props & RouteComponentProps<{}>) { return ( ) { - return ( - - Derp derp derp - -
- -
-
- ); +interface Props { + words: string[]; + generateWords(): void; +} + +export class GeneratePhrasePanel extends Component> { + public componentDidMount() { + const { generateWords } = this.props; + + generateWords(); + } + + public render() { + const { history, words } = this.props; + + return ( + + {words.join(' ')} + +
+ +
+
+ ); + } } export default withRouter(GeneratePhrasePanel); diff --git a/common/v2/features/CreateWallet/components/MnemonicProvider.tsx b/common/v2/features/CreateWallet/components/MnemonicProvider.tsx new file mode 100644 index 000000000..518df0b19 --- /dev/null +++ b/common/v2/features/CreateWallet/components/MnemonicProvider.tsx @@ -0,0 +1,20 @@ +import React, { Component } from 'react'; +import { generateMnemonic } from 'bip39'; + +export const MnemonicContext = React.createContext(); + +export default class MnemonicProvider extends Component { + public state = { + words: [], + generateWords: () => + this.setState({ + words: generateMnemonic().split(' ') + }) + }; + + public render() { + const { children } = this.props; + + return {children}; + } +} diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss b/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss index b9c7d6dac..2b0e022a2 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss @@ -1,3 +1,5 @@ .SelectNetworkPanel { - // + &-next { + width: 100%; + } } diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx index 6ddb0736e..e07be2ee4 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { ComboBox } from '@mycrypto/ui'; +import { Button, ComboBox } from '@mycrypto/ui'; import SteppedPanel from './SteppedPanel'; import './SelectNetworkPanel.scss'; @@ -19,6 +19,7 @@ export function SelectNetworkPanel({ history }: RouteComponentProps<{}>) { +
); } diff --git a/common/v2/features/CreateWallet/components/index.ts b/common/v2/features/CreateWallet/components/index.ts index 3c6fe5962..c3e030f3d 100644 --- a/common/v2/features/CreateWallet/components/index.ts +++ b/common/v2/features/CreateWallet/components/index.ts @@ -3,6 +3,7 @@ export { default as DownloadAppPanel } from './DownloadAppPanel'; export { default as DownloadKeystorePanel } from './DownloadKeystorePanel'; export { default as GeneratePasswordPanel } from './GeneratePasswordPanel'; export { default as GeneratePhrasePanel } from './GeneratePhrasePanel'; +export { MnemonicContext, default as MnemonicProvider } from './MnemonicProvider'; export { default as SavePrivateKeyPanel } from './SavePrivateKeyPanel'; export { default as SelectMethodPanel } from './SelectMethodPanel'; export { default as SelectNetworkPanel } from './SelectNetworkPanel'; diff --git a/common/v2/features/CreateWallet/constants.ts b/common/v2/features/CreateWallet/constants.ts index 25ee0a61b..90396fab9 100644 --- a/common/v2/features/CreateWallet/constants.ts +++ b/common/v2/features/CreateWallet/constants.ts @@ -21,8 +21,8 @@ export enum CreateWalletStages { } export const createWalletStageToComponentHash = { - [CreateWalletStages.DownloadApp]: ConfirmPhrasePanel, - [CreateWalletStages.SelectNetwork]: SelectNetworkPanel, + [CreateWalletStages.DownloadApp]: DownloadAppPanel, + [CreateWalletStages.SelectNetwork]: GeneratePhrasePanel, [CreateWalletStages.SelectMethod]: SelectMethodPanel, [CreateWalletStages.GeneratePhrase]: GeneratePhrasePanel, [CreateWalletStages.ConfirmPhrase]: ConfirmPhrasePanel, From f518235f14bfbc77e9e0fabcf0077d810b91cc73 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 14 Jan 2019 14:41:49 -0600 Subject: [PATCH 0017/1466] Most functionality for Mnemonic --- .../v2/features/CreateWallet/CreateWallet.tsx | 42 ++++++- .../components/ConfirmPhrasePanel.scss | 34 +++-- .../components/ConfirmPhrasePanel.tsx | 119 +++++++++++++----- .../components/GeneratePhrasePanel.tsx | 20 +-- .../components/SelectMethodPanel.tsx | 12 +- .../components/SelectNetworkPanel.tsx | 12 +- common/v2/features/CreateWallet/constants.ts | 9 +- package.json | 1 + yarn.lock | 4 + 9 files changed, 190 insertions(+), 63 deletions(-) diff --git a/common/v2/features/CreateWallet/CreateWallet.tsx b/common/v2/features/CreateWallet/CreateWallet.tsx index 4e83be6d8..0d72cc285 100644 --- a/common/v2/features/CreateWallet/CreateWallet.tsx +++ b/common/v2/features/CreateWallet/CreateWallet.tsx @@ -3,17 +3,29 @@ import React, { Component } from 'react'; import { Layout } from 'v2/components'; import { isDesktop } from 'v2/utils'; import { MnemonicProvider, MnemonicContext } from './components'; -import { CreateWalletStages, createWalletStageToComponentHash } from './constants'; +import { + CreateWalletStages, + createWalletStageToComponentHash, + createWalletMnemonicFlow +} from './constants'; + +export interface PanelProps { + onBack(): void; + onNext(): void; +} export default class CreateWallet extends Component { public state = { - // stage: isDesktop() ? CreateWalletStages.SelectNetwork : CreateWalletStages.DownloadApp - stage: CreateWalletStages.GeneratePhrase + stage: isDesktop() ? CreateWalletStages.SelectNetwork : CreateWalletStages.SelectNetwork }; public render() { const { stage } = this.state; const ActivePanel = createWalletStageToComponentHash[stage]; + const actions = { + onBack: this.regressToPreviousStage, + onNext: this.advanceToNextStage + }; const isMnemonicPanel = [ CreateWalletStages.GeneratePhrase, CreateWalletStages.ConfirmPhrase @@ -26,15 +38,35 @@ export default class CreateWallet extends Component { {isMnemonicPanel ? ( {({ words, generateWords }) => ( - + )} ) : ( - + )} ); } + + private regressToPreviousStage = () => { + const { stage } = this.state; + const currentIndex = createWalletMnemonicFlow.indexOf(stage); + const previousStage = createWalletMnemonicFlow[currentIndex - 1]; + + if (previousStage != null) { + this.setState({ stage: previousStage }); + } + }; + + private advanceToNextStage = () => { + const { stage } = this.state; + const currentIndex = createWalletMnemonicFlow.indexOf(stage); + const nextStage = createWalletMnemonicFlow[currentIndex + 1]; + + if (nextStage != null) { + this.setState({ stage: nextStage }); + } + }; } diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss index bca905166..f800f9c69 100644 --- a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss @@ -1,4 +1,14 @@ +@mixin row { + display: flex; + align-items: center; + justify-content: space-evenly; + margin-bottom: 9px; +} + @mixin word { + display: flex; + align-items: center; + justify-content: center; width: 88px; height: 28px; padding: 6px 14px; @@ -19,23 +29,31 @@ padding: 15px; border: 1px solid #e5ecf3; - &-word { - @include word; + &-row { + @include row; + + justify-content: flex-start; + + &-word { + @include word; + } } } &-selectableWords { margin-bottom: 18px; &-row { - display: flex; - align-items: center; + @include row; - &-entry { + &-word { @include word; - display: flex; - align-items: center; - justify-content: center; + &.confirmed { + background-color: #a682ff; + } + &.wrong { + background-color: #ef4747; + } } } } diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx index 96fb3e5aa..90fd5f2f4 100644 --- a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx @@ -1,7 +1,10 @@ -import React from 'react'; -import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { Button, Typography } from '@mycrypto/ui'; +import React, { Component } from 'react'; +import classnames from 'classnames'; +import chunk from 'lodash/chunk'; +import shuffle from 'lodash/shuffle'; +import { Button } from '@mycrypto/ui'; +import { PanelProps } from '../CreateWallet'; import SteppedPanel from './SteppedPanel'; import './ConfirmPhrasePanel.scss'; @@ -10,31 +13,89 @@ interface Props { generateWords(): void; } -export function ConfirmPhrasePanel({ history }: Props & RouteComponentProps<{}>) { - return ( - -
- correct - shiver -
-
-
-
Derp
-
Derp
-
Derp
-
Derp
-
-
- -
- ); +interface State { + confirmedWords: string[]; + shuffledWords: string[]; + wrongWord: string; } -export default withRouter(ConfirmPhrasePanel); +export default class ConfirmPhrasePanel extends Component { + public state: State = { + shuffledWords: shuffle(this.props.words), + confirmedWords: [], + wrongWord: '' + }; + + public render() { + const { onBack, onNext } = this.props; + const { confirmedWords, shuffledWords, wrongWord } = this.state; + + return ( + +
+ {chunk(confirmedWords, 4).map((row, rowIndex) => ( +
+ {row.map((word, wordIndex) => ( +
+ {word} +
+ ))} +
+ ))} +
+
+ {chunk(shuffledWords, 4).map((row, rowIndex) => ( +
+ {row.map((word, wordIndex) => ( +
this.confirmWord(word)} + > + {word} +
+ ))} +
+ ))} +
+ +
+ ); + } + + private confirmWord = (word: string) => { + const { words } = this.props; + const { confirmedWords } = this.state; + const nextIndex = confirmedWords.length; + const correctWord = words[nextIndex]; + + if (confirmedWords.includes(word)) { + return; + } else if (word === correctWord) { + this.setState((prevState: State) => ({ + confirmedWords: prevState.confirmedWords.concat(word), + wrongWord: '' + })); + } else { + this.setState({ + wrongWord: word + }); + } + }; +} diff --git a/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx index 1b7601cb5..06779e52a 100644 --- a/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx +++ b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; -import { withRouter, RouteComponentProps } from 'react-router-dom'; import { Button, Typography } from '@mycrypto/ui'; +import { PanelProps } from '../CreateWallet'; import SteppedPanel from './SteppedPanel'; import './GeneratePhrasePanel.scss'; @@ -13,7 +13,7 @@ interface Props { generateWords(): void; } -export class GeneratePhrasePanel extends Component> { +export default class GeneratePhrasePanel extends Component { public componentDidMount() { const { generateWords } = this.props; @@ -21,7 +21,7 @@ export class GeneratePhrasePanel extends Component {words.join(' ')} - +
-
@@ -43,5 +49,3 @@ export class GeneratePhrasePanel extends Component) { +export default function SelectMethodPanel({ onBack, onNext }: PanelProps) { return (
New wallet - + Don’t want use a phrase? Create wallet with keystore file. @@ -31,5 +33,3 @@ export function SelectMethodPanel({ history }: RouteComponentProps<{}>) { ); } - -export default withRouter(SelectMethodPanel); diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx index e07be2ee4..51a4971d6 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -1,27 +1,27 @@ import React from 'react'; -import { withRouter, RouteComponentProps } from 'react-router-dom'; import { Button, ComboBox } from '@mycrypto/ui'; +import { PanelProps } from '../CreateWallet'; import SteppedPanel from './SteppedPanel'; import './SelectNetworkPanel.scss'; -export function SelectNetworkPanel({ history }: RouteComponentProps<{}>) { +export default function SelectNetworkPanel({ onBack, onNext }: PanelProps) { return ( - + ); } - -export default withRouter(SelectNetworkPanel); diff --git a/common/v2/features/CreateWallet/constants.ts b/common/v2/features/CreateWallet/constants.ts index 90396fab9..bd9ae9a66 100644 --- a/common/v2/features/CreateWallet/constants.ts +++ b/common/v2/features/CreateWallet/constants.ts @@ -22,7 +22,7 @@ export enum CreateWalletStages { export const createWalletStageToComponentHash = { [CreateWalletStages.DownloadApp]: DownloadAppPanel, - [CreateWalletStages.SelectNetwork]: GeneratePhrasePanel, + [CreateWalletStages.SelectNetwork]: SelectNetworkPanel, [CreateWalletStages.SelectMethod]: SelectMethodPanel, [CreateWalletStages.GeneratePhrase]: GeneratePhrasePanel, [CreateWalletStages.ConfirmPhrase]: ConfirmPhrasePanel, @@ -30,3 +30,10 @@ export const createWalletStageToComponentHash = { [CreateWalletStages.DownloadKeystore]: DownloadKeystorePanel, [CreateWalletStages.SavePrivateKey]: SavePrivateKeyPanel }; + +export const createWalletMnemonicFlow = [ + CreateWalletStages.SelectNetwork, + CreateWalletStages.SelectMethod, + CreateWalletStages.GeneratePhrase, + CreateWalletStages.ConfirmPhrase +]; diff --git a/package.json b/package.json index 9159fb49f..9181f5b8f 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "idna-uts46": "1.1.0", "jsonschema": "1.2.4", "lodash": "4.17.5", + "lodash.chunk": "^4.2.0", "lodash.flatten": "4.4.0", "lodash.get": "4.4.2", "moment": "2.22.1", diff --git a/yarn.lock b/yarn.lock index a7225ff86..17540ad1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7329,6 +7329,10 @@ lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" +lodash.chunk@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" + lodash.clonedeep@^4.3.2, lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" From c7aec4af157dc5d8ab372823d5352f8d822fb784 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 16 Jan 2019 13:55:12 -0600 Subject: [PATCH 0018/1466] ... --- common/v2/features/CreateWallet/CreateWallet.tsx | 6 +++++- .../CreateWallet/components/ConfirmPhrasePanel.scss | 3 +++ .../features/CreateWallet/components/ConfirmPhrasePanel.tsx | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/common/v2/features/CreateWallet/CreateWallet.tsx b/common/v2/features/CreateWallet/CreateWallet.tsx index 0d72cc285..7b6dd5700 100644 --- a/common/v2/features/CreateWallet/CreateWallet.tsx +++ b/common/v2/features/CreateWallet/CreateWallet.tsx @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { RouteComponentProps } from 'react-router-dom'; import { Layout } from 'v2/components'; import { isDesktop } from 'v2/utils'; @@ -14,7 +15,7 @@ export interface PanelProps { onNext(): void; } -export default class CreateWallet extends Component { +export default class CreateWallet extends Component> { public state = { stage: isDesktop() ? CreateWalletStages.SelectNetwork : CreateWalletStages.SelectNetwork }; @@ -51,12 +52,15 @@ export default class CreateWallet extends Component { } private regressToPreviousStage = () => { + const { history } = this.props; const { stage } = this.state; const currentIndex = createWalletMnemonicFlow.indexOf(stage); const previousStage = createWalletMnemonicFlow[currentIndex - 1]; if (previousStage != null) { this.setState({ stage: previousStage }); + } else { + history.push('/'); } }; diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss index f800f9c69..edb75de30 100644 --- a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.scss @@ -48,6 +48,9 @@ &-word { @include word; + cursor: pointer; + transition: background-color 0.1s ease-in; + &.confirmed { background-color: #a682ff; } diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx index 90fd5f2f4..60568f408 100644 --- a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx @@ -33,7 +33,7 @@ export default class ConfirmPhrasePanel extends Component { return ( Date: Wed, 16 Jan 2019 15:19:34 -0600 Subject: [PATCH 0019/1466] Initial rendition of ActionTiles --- common/assets/images/icn-buy.svg | 29 +++++++++++++++ common/assets/images/icn-hardware-wallet.svg | 23 ++++++++++++ common/assets/images/icn-receive.svg | 21 +++++++++++ common/assets/images/icn-send.svg | 13 +++++++ common/assets/images/icn-swap.svg | 27 ++++++++++++++ common/assets/images/swap copy.svg | 27 ++++++++++++++ common/v2/components/Layout.scss | 2 ++ common/v2/components/Layout.tsx | 2 +- common/v2/features/Dashboard/Dashboard.scss | 13 +++++++ common/v2/features/Dashboard/Dashboard.tsx | 20 ++++++++++- .../Dashboard/components/ActionTile.scss | 30 ++++++++++++++++ .../Dashboard/components/ActionTile.tsx | 19 ++++++++++ .../v2/features/Dashboard/components/index.ts | 1 + common/v2/features/Dashboard/constants.ts | 36 +++++++++++++++++++ common/v2/features/Dashboard/routes.ts | 11 +++++- common/v2/features/Dashboard/types.ts | 5 +++ 16 files changed, 276 insertions(+), 3 deletions(-) create mode 100644 common/assets/images/icn-buy.svg create mode 100644 common/assets/images/icn-hardware-wallet.svg create mode 100644 common/assets/images/icn-receive.svg create mode 100644 common/assets/images/icn-send.svg create mode 100644 common/assets/images/icn-swap.svg create mode 100644 common/assets/images/swap copy.svg create mode 100644 common/v2/features/Dashboard/Dashboard.scss create mode 100644 common/v2/features/Dashboard/components/ActionTile.scss create mode 100644 common/v2/features/Dashboard/components/ActionTile.tsx create mode 100644 common/v2/features/Dashboard/components/index.ts create mode 100644 common/v2/features/Dashboard/constants.ts create mode 100644 common/v2/features/Dashboard/types.ts diff --git a/common/assets/images/icn-buy.svg b/common/assets/images/icn-buy.svg new file mode 100644 index 000000000..9f6961c7f --- /dev/null +++ b/common/assets/images/icn-buy.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/assets/images/icn-hardware-wallet.svg b/common/assets/images/icn-hardware-wallet.svg new file mode 100644 index 000000000..d5ce01228 --- /dev/null +++ b/common/assets/images/icn-hardware-wallet.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/assets/images/icn-receive.svg b/common/assets/images/icn-receive.svg new file mode 100644 index 000000000..fd73ed82c --- /dev/null +++ b/common/assets/images/icn-receive.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/common/assets/images/icn-send.svg b/common/assets/images/icn-send.svg new file mode 100644 index 000000000..b027124d5 --- /dev/null +++ b/common/assets/images/icn-send.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/common/assets/images/icn-swap.svg b/common/assets/images/icn-swap.svg new file mode 100644 index 000000000..be9e67d0b --- /dev/null +++ b/common/assets/images/icn-swap.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/assets/images/swap copy.svg b/common/assets/images/swap copy.svg new file mode 100644 index 000000000..be9e67d0b --- /dev/null +++ b/common/assets/images/swap copy.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/v2/components/Layout.scss b/common/v2/components/Layout.scss index 1ae71c1d5..ccdb906ce 100644 --- a/common/v2/components/Layout.scss +++ b/common/v2/components/Layout.scss @@ -1,4 +1,6 @@ .Layout { + background: #e8eaed; + &-content { padding: 100px 30px 50px 30px; diff --git a/common/v2/components/Layout.tsx b/common/v2/components/Layout.tsx index c09cca4a9..229ca37be 100644 --- a/common/v2/components/Layout.tsx +++ b/common/v2/components/Layout.tsx @@ -10,7 +10,7 @@ import NewHeader from 'components/Header/NewHeader/NewHeader'; import NewFooter from 'components/Footer/NewFooter/NewFooter'; interface Props { - centered: boolean; + centered?: boolean; children: any; } diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss new file mode 100644 index 000000000..9efa760dd --- /dev/null +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -0,0 +1,13 @@ +.Dashboard { + background: #e8eaed; + + &-actions { + display: flex; + flex-direction: column; + + &-row { + display: flex; + margin-bottom: 15px; + } + } +} diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index f0ce880dd..0b1d0b7dd 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -1,5 +1,23 @@ import React from 'react'; +import chunk from 'lodash/chunk'; + +import { Layout } from 'v2/components'; +import { ActionTile } from './components'; +import { actions } from './constants'; +import './Dashboard.scss'; export default function Dashboard() { - return
Dashboard
; + const [topRow, bottomRow] = chunk(actions, 3); + return ( + +
+
+ {topRow.map(action => )} +
+
+ {bottomRow.map(action => )} +
+
+
+ ); } diff --git a/common/v2/features/Dashboard/components/ActionTile.scss b/common/v2/features/Dashboard/components/ActionTile.scss new file mode 100644 index 000000000..7ced40daf --- /dev/null +++ b/common/v2/features/Dashboard/components/ActionTile.scss @@ -0,0 +1,30 @@ +.ActionTile { + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; + width: 105px; + height: 105px; + margin-right: 15px; + background: #fff; + box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.07); + + &-button { + display: flex; + flex-direction: column; + align-items: center; + + &-icon { + display: block; + margin-top: 9px; + } + &-title { + margin: 0; + margin-bottom: 9px; + font-size: 12px; + font-weight: bold; + color: #163150; + word-spacing: 9999px; + } + } +} diff --git a/common/v2/features/Dashboard/components/ActionTile.tsx b/common/v2/features/Dashboard/components/ActionTile.tsx new file mode 100644 index 000000000..b08a55409 --- /dev/null +++ b/common/v2/features/Dashboard/components/ActionTile.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { Button, Typography } from '@mycrypto/ui'; + +import { Action } from '../types'; +import './ActionTile.scss'; + +type Props = Action; + +export default function ActionTile({ icon, title, link }: Props) { + return ( + + + + ); +} diff --git a/common/v2/features/Dashboard/components/index.ts b/common/v2/features/Dashboard/components/index.ts new file mode 100644 index 000000000..ec375a338 --- /dev/null +++ b/common/v2/features/Dashboard/components/index.ts @@ -0,0 +1 @@ +export { default as ActionTile } from './ActionTile'; diff --git a/common/v2/features/Dashboard/constants.ts b/common/v2/features/Dashboard/constants.ts new file mode 100644 index 000000000..675207fbf --- /dev/null +++ b/common/v2/features/Dashboard/constants.ts @@ -0,0 +1,36 @@ +import { Action } from './types'; + +// Legacy +import buyIcon from 'common/assets/images/icn-buy.svg'; +import swapIcon from 'common/assets/images/icn-swap.svg'; +import sendIcon from 'common/assets/images/icn-send.svg'; +import receiveIcon from 'common/assets/images/icn-receive.svg'; +import hardwareWalletIcon from 'common/assets/images/icn-hardware-wallet.svg'; + +export const actions: Action[] = [ + { + icon: buyIcon, + title: 'Buy Assets', + link: '/dashboard/buy' + }, + { + icon: swapIcon, + title: 'Swap Assets', + link: '/dashboard/swap' + }, + { + icon: sendIcon, + title: 'Send Assets', + link: '/dashboard/send' + }, + { + icon: receiveIcon, + title: 'Request Assets', + link: '/dashboard/request' + }, + { + icon: hardwareWalletIcon, + title: 'Get_Hardware Wallet', + link: '/dashboard/get-hardware-wallet' + } +]; diff --git a/common/v2/features/Dashboard/routes.ts b/common/v2/features/Dashboard/routes.ts index d6d1738de..a0b814fe4 100644 --- a/common/v2/features/Dashboard/routes.ts +++ b/common/v2/features/Dashboard/routes.ts @@ -1 +1,10 @@ -export default []; +import Dashboard from './Dashboard'; + +export default [ + { + name: 'Dashboard', + path: '/dashboard', + exact: true, + component: Dashboard + } +]; diff --git a/common/v2/features/Dashboard/types.ts b/common/v2/features/Dashboard/types.ts new file mode 100644 index 000000000..39143af01 --- /dev/null +++ b/common/v2/features/Dashboard/types.ts @@ -0,0 +1,5 @@ +export interface Action { + icon: string; + title: string; + link: string; +} From a7276fd72411df42fe0a1f9b40eb1375b92b2238 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 16 Jan 2019 16:01:58 -0600 Subject: [PATCH 0020/1466] Initial rendition of WalletBreakdown --- common/assets/images/icn-more.svg | 3 + common/v2/components/Layout.scss | 4 + common/v2/components/Layout.tsx | 6 +- common/v2/features/Dashboard/Dashboard.scss | 12 ++- common/v2/features/Dashboard/Dashboard.tsx | 20 ++-- .../Dashboard/components/WalletBreakdown.scss | 80 ++++++++++++++++ .../Dashboard/components/WalletBreakdown.tsx | 95 +++++++++++++++++++ .../v2/features/Dashboard/components/index.ts | 1 + 8 files changed, 211 insertions(+), 10 deletions(-) create mode 100644 common/assets/images/icn-more.svg create mode 100644 common/v2/features/Dashboard/components/WalletBreakdown.scss create mode 100644 common/v2/features/Dashboard/components/WalletBreakdown.tsx diff --git a/common/assets/images/icn-more.svg b/common/assets/images/icn-more.svg new file mode 100644 index 000000000..799342099 --- /dev/null +++ b/common/assets/images/icn-more.svg @@ -0,0 +1,3 @@ + + + diff --git a/common/v2/components/Layout.scss b/common/v2/components/Layout.scss index ccdb906ce..8508d1dfb 100644 --- a/common/v2/components/Layout.scss +++ b/common/v2/components/Layout.scss @@ -13,5 +13,9 @@ justify-content: center; } } + &.fluid { + padding-left: 0; + padding-right: 0; + } } } diff --git a/common/v2/components/Layout.tsx b/common/v2/components/Layout.tsx index 229ca37be..f160505de 100644 --- a/common/v2/components/Layout.tsx +++ b/common/v2/components/Layout.tsx @@ -11,12 +11,14 @@ import NewFooter from 'components/Footer/NewFooter/NewFooter'; interface Props { centered?: boolean; + fluid?: boolean; children: any; } -export default function Layout({ centered, children }: Props) { +export default function Layout({ centered, fluid, children }: Props) { const contentClassName = classnames('Layout-content', { - centered + centered, + fluid }); return ( diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index 9efa760dd..2e0c0e2f2 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -3,11 +3,21 @@ &-actions { display: flex; - flex-direction: column; + align-items: center; + justify-content: center; + padding: 0 15px; &-row { display: flex; margin-bottom: 15px; } } + &-divider { + height: 1px; + width: 100vw; + background: #ddd; + } + &-walletBreakdown { + padding: 15px; + } } diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index 0b1d0b7dd..98e6b738d 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -2,22 +2,28 @@ import React from 'react'; import chunk from 'lodash/chunk'; import { Layout } from 'v2/components'; -import { ActionTile } from './components'; +import { ActionTile, WalletBreakdown } from './components'; import { actions } from './constants'; import './Dashboard.scss'; export default function Dashboard() { const [topRow, bottomRow] = chunk(actions, 3); return ( - +
-
- {topRow.map(action => )} -
-
- {bottomRow.map(action => )} +
+
+ {topRow.map(action => )} +
+
+ {bottomRow.map(action => )} +
+
+
+ +
); } diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.scss b/common/v2/features/Dashboard/components/WalletBreakdown.scss new file mode 100644 index 000000000..ced702097 --- /dev/null +++ b/common/v2/features/Dashboard/components/WalletBreakdown.scss @@ -0,0 +1,80 @@ +.WalletBreakdown { + &-select { + width: 100%; + margin-bottom: 10px; + } + &-panel { + margin-top: 5px; + padding: 15px; + + &-headingWrapper { + display: flex; + align-items: center; + justify-content: space-between; + } + &-heading { + margin: 0; + font-size: 20px; + font-weight: bold; + color: #424242; + } + &-more { + display: block; + } + &-figures { + display: flex; + align-items: center; + justify-content: space-evenly; + margin: 30px 0; + + &-figure { + &-value { + margin: 0; + font-size: 18px; + font-weight: bold; + } + &-label { + margin: 0; + font-size: 12px; + } + } + } + &-divider { + height: 1px; + margin-bottom: 15px; + background: #ddd; + } + &-balances { + display: flex; + flex-direction: column; + color: #282d32; + font-size: 16px; + + &-balance { + display: flex; + justify-content: space-between; + margin: 11px 0; + + &:first-of-type { + margin-top: 16px; + } + &-asset { + &-name { + margin: 0; + } + &-amount { + margin: 0; + + a { + font-size: 12px; + } + } + } + } + &-total { + display: flex; + justify-content: space-between; + } + } + } +} diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.tsx b/common/v2/features/Dashboard/components/WalletBreakdown.tsx new file mode 100644 index 000000000..99e5687e1 --- /dev/null +++ b/common/v2/features/Dashboard/components/WalletBreakdown.tsx @@ -0,0 +1,95 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { ComboBox, Heading, Panel, Typography } from '@mycrypto/ui'; + +import './WalletBreakdown.scss'; + +// Legacy +import moreIcon from 'common/assets/images/icn-more.svg'; + +// Fake Data +const balances = [ + { + asset: 'Ethereum', + amount: '14.13 ETH', + value: '$3,307.95' + }, + { + asset: 'OmiseGO', + amount: '208.321234 OMG', + value: '$646.80' + }, + { + asset: 'Aragon', + amount: '200 ANT', + value: '$159.63' + }, + { + asset: 'Other Tokens', + amount: View Details, + value: '$140.03' + } +]; + +export default function WalletBreakdown() { + return ( +
+ + + + Wallet Breakdown (All Accounts) +
+
+ Ethereum + + 43% Of Your Funds + +
+
+ + $5,204.14 + + + Value in US Dollars + +
+
+
+
+ Balance + More +
+
+ {balances.map(({ asset, amount, value }) => ( +
+
+ + {asset} + + + {amount} + +
+ + {value} + +
+ ))} +
+
+ Total + $2,974.41 +
+
+ +
+ ); +} diff --git a/common/v2/features/Dashboard/components/index.ts b/common/v2/features/Dashboard/components/index.ts index ec375a338..54f67501b 100644 --- a/common/v2/features/Dashboard/components/index.ts +++ b/common/v2/features/Dashboard/components/index.ts @@ -1 +1,2 @@ export { default as ActionTile } from './ActionTile'; +export { default as WalletBreakdown } from './WalletBreakdown'; From eeaf50342d67c0625f0e3719f95b10497ef85671 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 16 Jan 2019 16:27:56 -0600 Subject: [PATCH 0021/1466] Initial rendition of token list --- common/v2/components/Layout.scss | 2 +- common/v2/features/Dashboard/Dashboard.scss | 6 ++- common/v2/features/Dashboard/Dashboard.tsx | 5 +- .../Dashboard/components/TokenList.scss | 52 +++++++++++++++++++ .../Dashboard/components/TokenList.tsx | 46 ++++++++++++++++ .../v2/features/Dashboard/components/index.ts | 1 + 6 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 common/v2/features/Dashboard/components/TokenList.scss create mode 100644 common/v2/features/Dashboard/components/TokenList.tsx diff --git a/common/v2/components/Layout.scss b/common/v2/components/Layout.scss index 8508d1dfb..801a31215 100644 --- a/common/v2/components/Layout.scss +++ b/common/v2/components/Layout.scss @@ -1,5 +1,5 @@ .Layout { - background: #e8eaed; + background: #f6f8fa; &-content { padding: 100px 30px 50px 30px; diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index 2e0c0e2f2..3971139e3 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -18,6 +18,10 @@ background: #ddd; } &-walletBreakdown { - padding: 15px; + margin-bottom: 13px; + padding: 15px 15px 0 15px; + } + &-tokenList { + padding: 0 15px; } } diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index 98e6b738d..a3244fcd4 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -2,7 +2,7 @@ import React from 'react'; import chunk from 'lodash/chunk'; import { Layout } from 'v2/components'; -import { ActionTile, WalletBreakdown } from './components'; +import { ActionTile, TokenList, WalletBreakdown } from './components'; import { actions } from './constants'; import './Dashboard.scss'; @@ -24,6 +24,9 @@ export default function Dashboard() {
+
+ +
); } diff --git a/common/v2/features/Dashboard/components/TokenList.scss b/common/v2/features/Dashboard/components/TokenList.scss new file mode 100644 index 000000000..03accb10a --- /dev/null +++ b/common/v2/features/Dashboard/components/TokenList.scss @@ -0,0 +1,52 @@ +.TokenList { + max-height: 320px; + padding: 15px; + overflow-y: auto; + + &-headingWrapper { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 15px; + + &-heading { + margin: 0; + font-size: 24px; + font-weight: bold; + color: #424242; + } + &-button { + font-size: 18px; + } + } + &-tokens { + display: flex; + flex-direction: column; + + &-token { + display: flex; + align-items: center; + justify-content: space-between; + padding: 9px 0; + + &-asset { + display: flex; + align-items: center; + + &-name { + margin: 0; + margin-left: 30px; + } + } + &-value { + display: flex; + align-items: center; + + &-amount { + margin: 0; + margin-right: 10px; + } + } + } + } +} diff --git a/common/v2/features/Dashboard/components/TokenList.tsx b/common/v2/features/Dashboard/components/TokenList.tsx new file mode 100644 index 000000000..f918d3399 --- /dev/null +++ b/common/v2/features/Dashboard/components/TokenList.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { Button, Heading, Panel, Typography } from '@mycrypto/ui'; + +import './TokenList.scss'; + +// Legacy +import moreIcon from 'common/assets/images/icn-more.svg'; + +// Fake Data +const tokens = [ + { + image: 'https://placehold.it/30x30', + name: 'Stack', + value: '$3,037.95' + }, + { + image: 'https://placehold.it/30x30', + name: 'OmiseGO', + value: '$3,037.95' + } +]; + +export default function TokenList() { + return ( + +
+ Token + +
+
+ {tokens.map(({ image, name, value }) => ( +
+
+ {name} + {name} +
+
+ {value} + More +
+
+ ))} +
+
+ ); +} diff --git a/common/v2/features/Dashboard/components/index.ts b/common/v2/features/Dashboard/components/index.ts index 54f67501b..e56fb31fb 100644 --- a/common/v2/features/Dashboard/components/index.ts +++ b/common/v2/features/Dashboard/components/index.ts @@ -1,2 +1,3 @@ export { default as ActionTile } from './ActionTile'; +export { default as TokenList } from './TokenList'; export { default as WalletBreakdown } from './WalletBreakdown'; From 74661473d9289b9e4628f2f8ce9e715999bb6bed Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 16 Jan 2019 16:35:57 -0600 Subject: [PATCH 0022/1466] Abstract out DashboardPanel --- .../Dashboard/components/DashboardPanel.scss | 20 +++++++++++ .../Dashboard/components/DashboardPanel.tsx | 35 +++++++++++++++++++ .../Dashboard/components/TokenList.scss | 16 --------- .../Dashboard/components/TokenList.tsx | 16 +++++---- .../v2/features/Dashboard/components/index.ts | 1 + 5 files changed, 65 insertions(+), 23 deletions(-) create mode 100644 common/v2/features/Dashboard/components/DashboardPanel.scss create mode 100644 common/v2/features/Dashboard/components/DashboardPanel.tsx diff --git a/common/v2/features/Dashboard/components/DashboardPanel.scss b/common/v2/features/Dashboard/components/DashboardPanel.scss new file mode 100644 index 000000000..7550ac26f --- /dev/null +++ b/common/v2/features/Dashboard/components/DashboardPanel.scss @@ -0,0 +1,20 @@ +.DashboardPanel { + padding: 15px; + + &-headingWrapper { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 15px; + + &-heading { + margin: 0; + font-size: 24px; + font-weight: bold; + color: #424242; + } + &-button { + font-size: 18px; + } + } +} diff --git a/common/v2/features/Dashboard/components/DashboardPanel.tsx b/common/v2/features/Dashboard/components/DashboardPanel.tsx new file mode 100644 index 000000000..c977d0d02 --- /dev/null +++ b/common/v2/features/Dashboard/components/DashboardPanel.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import classnames from 'classnames'; +import { Button, Heading, Panel } from '@mycrypto/ui'; + +import './DashboardPanel.scss'; + +interface Props { + heading: string; + action: string; + actionLink: string; + className?: string; + children: any; +} + +export default function DashboardPanel({ + heading, + action, + actionLink, + className = '', + children, + ...rest +}: Props) { + return ( + +
+ {heading} + + + +
+ {children} +
+ ); +} diff --git a/common/v2/features/Dashboard/components/TokenList.scss b/common/v2/features/Dashboard/components/TokenList.scss index 03accb10a..1bf6c9b4d 100644 --- a/common/v2/features/Dashboard/components/TokenList.scss +++ b/common/v2/features/Dashboard/components/TokenList.scss @@ -3,22 +3,6 @@ padding: 15px; overflow-y: auto; - &-headingWrapper { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 15px; - - &-heading { - margin: 0; - font-size: 24px; - font-weight: bold; - color: #424242; - } - &-button { - font-size: 18px; - } - } &-tokens { display: flex; flex-direction: column; diff --git a/common/v2/features/Dashboard/components/TokenList.tsx b/common/v2/features/Dashboard/components/TokenList.tsx index f918d3399..3ebf7d9a8 100644 --- a/common/v2/features/Dashboard/components/TokenList.tsx +++ b/common/v2/features/Dashboard/components/TokenList.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { Button, Heading, Panel, Typography } from '@mycrypto/ui'; +import { Typography } from '@mycrypto/ui'; +import DashboardPanel from './DashboardPanel'; import './TokenList.scss'; // Legacy @@ -22,11 +23,12 @@ const tokens = [ export default function TokenList() { return ( - -
- Token - -
+
{tokens.map(({ image, name, value }) => (
@@ -41,6 +43,6 @@ export default function TokenList() {
))}
-
+ ); } diff --git a/common/v2/features/Dashboard/components/index.ts b/common/v2/features/Dashboard/components/index.ts index e56fb31fb..ad338371f 100644 --- a/common/v2/features/Dashboard/components/index.ts +++ b/common/v2/features/Dashboard/components/index.ts @@ -1,3 +1,4 @@ export { default as ActionTile } from './ActionTile'; +export { default as DashboardPanel } from './DashboardPanel'; export { default as TokenList } from './TokenList'; export { default as WalletBreakdown } from './WalletBreakdown'; From d617477c2425c98759b698d9a19cf37b47bb7d3d Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Wed, 16 Jan 2019 18:01:07 -0600 Subject: [PATCH 0023/1466] Initial work on AccountList --- common/v2/features/Dashboard/Dashboard.scss | 3 + common/v2/features/Dashboard/Dashboard.tsx | 5 +- .../Dashboard/components/AccountList.scss | 3 + .../Dashboard/components/AccountList.tsx | 77 +++++++++++++++++++ .../Dashboard/components/DashboardPanel.scss | 1 + .../v2/features/Dashboard/components/index.ts | 1 + 6 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 common/v2/features/Dashboard/components/AccountList.scss create mode 100644 common/v2/features/Dashboard/components/AccountList.tsx diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index 3971139e3..959b5ef2b 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -24,4 +24,7 @@ &-tokenList { padding: 0 15px; } + &-accountList { + padding: 0 15px; + } } diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index a3244fcd4..a78dafeaf 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -2,7 +2,7 @@ import React from 'react'; import chunk from 'lodash/chunk'; import { Layout } from 'v2/components'; -import { ActionTile, TokenList, WalletBreakdown } from './components'; +import { AccountList, ActionTile, TokenList, WalletBreakdown } from './components'; import { actions } from './constants'; import './Dashboard.scss'; @@ -27,6 +27,9 @@ export default function Dashboard() {
+
+ +
); } diff --git a/common/v2/features/Dashboard/components/AccountList.scss b/common/v2/features/Dashboard/components/AccountList.scss new file mode 100644 index 000000000..bb000499f --- /dev/null +++ b/common/v2/features/Dashboard/components/AccountList.scss @@ -0,0 +1,3 @@ +.AccountList { + // +} diff --git a/common/v2/features/Dashboard/components/AccountList.tsx b/common/v2/features/Dashboard/components/AccountList.tsx new file mode 100644 index 000000000..bae52a3a8 --- /dev/null +++ b/common/v2/features/Dashboard/components/AccountList.tsx @@ -0,0 +1,77 @@ +import React from 'react'; +import { CollapsibleTable, Copyable, Icon, Identicon, Typography } from '@mycrypto/ui'; + +import DashboardPanel from './DashboardPanel'; +import './AccountList.scss'; + +// Fake Data +const accounts = [ + { + name: 'Wallet #1', + address: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + network: 'Ethereum', + node: 'Epool.io', + value: '$2,203.12', + favorite: false + }, + { + name: 'Wallet #2', + address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe', + network: 'Ethereum', + node: 'MyCrypto', + value: '$1337.42', + favorite: false + } +]; +const truncate = (text: string): string => text.substr(0, 6); +const accountTable = { + head: ['Favorite', 'Label', 'Address', 'Network', 'Value'], + body: accounts.map(({ address, name, network, value }) => [ + , +
+ + {name} +
, + , + {network}, + {value} + ]), + config: { + primaryColumn: 'label', + sortableColumn: 'Label', + sortFunction: (a: any, b: any) => { + const aLabel = a.props.children[1].props.children; + const bLabel = b.props.children[1].props.children; + + return aLabel.localeCompare(bLabel); + }, + hiddenHeadings: ['Favorite'], + iconColumns: ['Favorite'] + } +}; + +export default function AccountList() { + return ( + + + + ); +} diff --git a/common/v2/features/Dashboard/components/DashboardPanel.scss b/common/v2/features/Dashboard/components/DashboardPanel.scss index 7550ac26f..ba52c690c 100644 --- a/common/v2/features/Dashboard/components/DashboardPanel.scss +++ b/common/v2/features/Dashboard/components/DashboardPanel.scss @@ -14,6 +14,7 @@ color: #424242; } &-button { + padding: 9px 16px; font-size: 18px; } } diff --git a/common/v2/features/Dashboard/components/index.ts b/common/v2/features/Dashboard/components/index.ts index ad338371f..b3a75488d 100644 --- a/common/v2/features/Dashboard/components/index.ts +++ b/common/v2/features/Dashboard/components/index.ts @@ -1,3 +1,4 @@ +export { default as AccountList } from './AccountList'; export { default as ActionTile } from './ActionTile'; export { default as DashboardPanel } from './DashboardPanel'; export { default as TokenList } from './TokenList'; From 5b474b507294e3082e810c2f678e3162e4e7f40c Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Fri, 18 Jan 2019 15:56:19 -0600 Subject: [PATCH 0024/1466] Initial rendition of RecentTransactionList --- common/assets/images/icn-new-window.svg | 3 + common/v2/features/Dashboard/Dashboard.scss | 5 +- common/v2/features/Dashboard/Dashboard.tsx | 15 ++- .../Dashboard/components/AccountList.tsx | 34 ++---- .../features/Dashboard/components/Amount.scss | 24 ++++ .../features/Dashboard/components/Amount.tsx | 18 +++ .../components/RecentTransactionList.scss | 3 + .../components/RecentTransactionList.tsx | 106 ++++++++++++++++++ .../components/TransactionLabel.scss | 20 ++++ .../Dashboard/components/TransactionLabel.tsx | 34 ++++++ .../Dashboard/components/WalletBreakdown.tsx | 2 + .../v2/features/Dashboard/components/index.ts | 3 + 12 files changed, 237 insertions(+), 30 deletions(-) create mode 100644 common/assets/images/icn-new-window.svg create mode 100644 common/v2/features/Dashboard/components/Amount.scss create mode 100644 common/v2/features/Dashboard/components/Amount.tsx create mode 100644 common/v2/features/Dashboard/components/RecentTransactionList.scss create mode 100644 common/v2/features/Dashboard/components/RecentTransactionList.tsx create mode 100644 common/v2/features/Dashboard/components/TransactionLabel.scss create mode 100644 common/v2/features/Dashboard/components/TransactionLabel.tsx diff --git a/common/assets/images/icn-new-window.svg b/common/assets/images/icn-new-window.svg new file mode 100644 index 000000000..2fd7463c8 --- /dev/null +++ b/common/assets/images/icn-new-window.svg @@ -0,0 +1,3 @@ + + + diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index 959b5ef2b..f2097f861 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -21,10 +21,7 @@ margin-bottom: 13px; padding: 15px 15px 0 15px; } - &-tokenList { - padding: 0 15px; - } - &-accountList { + &-section { padding: 0 15px; } } diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index a78dafeaf..b992d4ab8 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -2,7 +2,13 @@ import React from 'react'; import chunk from 'lodash/chunk'; import { Layout } from 'v2/components'; -import { AccountList, ActionTile, TokenList, WalletBreakdown } from './components'; +import { + AccountList, + ActionTile, + RecentTransactionList, + TokenList, + WalletBreakdown +} from './components'; import { actions } from './constants'; import './Dashboard.scss'; @@ -24,12 +30,15 @@ export default function Dashboard() {
-
+
-
+
+
+ +
); } diff --git a/common/v2/features/Dashboard/components/AccountList.tsx b/common/v2/features/Dashboard/components/AccountList.tsx index bae52a3a8..0ffc46dde 100644 --- a/common/v2/features/Dashboard/components/AccountList.tsx +++ b/common/v2/features/Dashboard/components/AccountList.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { CollapsibleTable, Copyable, Icon, Identicon, Typography } from '@mycrypto/ui'; +import { Address, CollapsibleTable, Copyable, Icon, Network, Typography } from '@mycrypto/ui'; import DashboardPanel from './DashboardPanel'; import './AccountList.scss'; @@ -23,38 +23,26 @@ const accounts = [ favorite: false } ]; -const truncate = (text: string): string => text.substr(0, 6); +const truncate = (children: string) => { + return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); +}; const accountTable = { head: ['Favorite', 'Label', 'Address', 'Network', 'Value'], body: accounts.map(({ address, name, network, value }) => [ , -
- - {name} -
, +
{}} truncate={truncate} />, , - {network}, + + {network} + , {value} ]), config: { - primaryColumn: 'label', + primaryColumn: 'Label', sortableColumn: 'Label', sortFunction: (a: any, b: any) => { - const aLabel = a.props.children[1].props.children; - const bLabel = b.props.children[1].props.children; + const aLabel = a.props.title; + const bLabel = b.props.title; return aLabel.localeCompare(bLabel); }, diff --git a/common/v2/features/Dashboard/components/Amount.scss b/common/v2/features/Dashboard/components/Amount.scss new file mode 100644 index 000000000..10b533c39 --- /dev/null +++ b/common/v2/features/Dashboard/components/Amount.scss @@ -0,0 +1,24 @@ +.Amount { + display: flex; + align-items: center; + + @media (min-width: 1000px) { + flex-direction: column; + align-items: flex-end; + } + &-asset { + margin: 0; + margin-right: 11px; + font-size: 20px; + color: #424242; + + @media (min-width: 1000px) { + margin-right: 0; + } + } + &-fiat { + margin: 0; + font-size: 16px; + color: #b5bfc7; + } +} diff --git a/common/v2/features/Dashboard/components/Amount.tsx b/common/v2/features/Dashboard/components/Amount.tsx new file mode 100644 index 000000000..b891a2f0c --- /dev/null +++ b/common/v2/features/Dashboard/components/Amount.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import { Typography } from '@mycrypto/ui'; + +import './Amount.scss'; + +interface Props { + assetValue: string; + fiatValue: string; +} + +export default function Amount({ assetValue, fiatValue }: Props) { + return ( +
+ {assetValue} + {fiatValue} +
+ ); +} diff --git a/common/v2/features/Dashboard/components/RecentTransactionList.scss b/common/v2/features/Dashboard/components/RecentTransactionList.scss new file mode 100644 index 000000000..2ea88eb2d --- /dev/null +++ b/common/v2/features/Dashboard/components/RecentTransactionList.scss @@ -0,0 +1,3 @@ +.RecentTransactionList { + // +} diff --git a/common/v2/features/Dashboard/components/RecentTransactionList.tsx b/common/v2/features/Dashboard/components/RecentTransactionList.tsx new file mode 100644 index 000000000..87fc31481 --- /dev/null +++ b/common/v2/features/Dashboard/components/RecentTransactionList.tsx @@ -0,0 +1,106 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { Address, CollapsibleTable } from '@mycrypto/ui'; + +import Amount from './Amount'; +import DashboardPanel from './DashboardPanel'; +import TransactionLabel from './TransactionLabel'; +import './RecentTransactionList.scss'; + +// Legacy +import newWindowIcon from 'common/assets/images/icn-new-window.svg'; + +// Fake Data +const truncate = (children: string) => { + return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); +}; +const recentTransactions = [ + { + uuid: '76b50f76-afb2-4185-ab7d-4d62c0654883', + stage: 'pending', + label: 'OmiseGO Sent', + date: '1547768373', + from: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + to: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + amount: '42.69 OMG', + fiat: { + USD: '$13.37' + } + }, + { + uuid: '76b50f76-afb2-4185-ab7d-4d62c0654884', + stage: 'pending', + label: 'EOS Received', + date: '1547730000', + from: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + to: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + amount: '513.20 EOS', + fiat: { + USD: '$201.45' + } + }, + { + uuid: '76b50f76-afb2-4185-ab7d-4d62c0654885', + stage: 'completed', + label: 'Ethereum Purchased', + date: '1547720000', + from: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + to: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + amount: '4.123 ETH', + fiat: { + USD: '$161.45' + } + } +]; +const pending = recentTransactions.filter(tx => tx.stage === 'pending'); +const completed = recentTransactions.filter(tx => tx.stage === 'completed'); +const createEntries = (stage, collection) => + collection.map(({ label, stage, date, from, to, amount, fiat, uuid }) => [ + , +
{}} address={from} />, +
{}} address={to} />, + , + + View more information about this transaction + + ]); +const recentTransactionsTable = { + head: ['Date', 'From Address', 'To Address', 'Amount', 'View More'], + body: [], + groups: [ + { + title: 'Pending', + entries: createEntries('pending', pending) + }, + { + title: 'Completed', + entries: createEntries('completed', completed) + } + ], + config: { + primaryColumn: 'Date', + sortableColumn: 'Date', + sortFunction: (a: any, b: any) => a.props.date - b.props.date, + hiddenHeadings: ['View More'], + iconColumns: ['View More'] + } +}; + +export default function RecentTransactionList() { + return ( + + + + ); +} diff --git a/common/v2/features/Dashboard/components/TransactionLabel.scss b/common/v2/features/Dashboard/components/TransactionLabel.scss new file mode 100644 index 000000000..cd2fa68fc --- /dev/null +++ b/common/v2/features/Dashboard/components/TransactionLabel.scss @@ -0,0 +1,20 @@ +.TransactionLabel { + display: flex; + align-items: center; + + &-image { + margin-right: 16px; + } + &-info { + color: #424242; + + &-label { + margin: 0; + font-size: 20px; + } + &-stageDate { + margin: 0; + font-size: 16px; + } + } +} diff --git a/common/v2/features/Dashboard/components/TransactionLabel.tsx b/common/v2/features/Dashboard/components/TransactionLabel.tsx new file mode 100644 index 000000000..77498358d --- /dev/null +++ b/common/v2/features/Dashboard/components/TransactionLabel.tsx @@ -0,0 +1,34 @@ +import React from 'react'; +import moment from 'moment'; +import { Typography } from '@mycrypto/ui'; + +import './TransactionLabel.scss'; + +interface Props { + image: string; + label: string; + stage: string; + date: number; +} + +const capitalize = (word: string): string => + word + .split('') + .map((letter, index) => (index === 0 ? letter.toUpperCase() : letter)) + .join(''); + +const formatDate = (date: number): string => moment.unix(date).format('MM/DD/YY h:mm A'); + +export default function TransactionLabel({ image, label, stage, date }: Props) { + return ( +
+ {label} +
+ {label} + + {capitalize(stage)} - {formatDate(date)} + +
+
+ ); +} diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.tsx b/common/v2/features/Dashboard/components/WalletBreakdown.tsx index 99e5687e1..8c2adb5a0 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.tsx +++ b/common/v2/features/Dashboard/components/WalletBreakdown.tsx @@ -37,11 +37,13 @@ export default function WalletBreakdown() { {}} items={new Set(['3 of 9 Accounts'])} /> {}} items={new Set(['US Dollars'])} /> diff --git a/common/v2/features/Dashboard/components/index.ts b/common/v2/features/Dashboard/components/index.ts index b3a75488d..5feee4452 100644 --- a/common/v2/features/Dashboard/components/index.ts +++ b/common/v2/features/Dashboard/components/index.ts @@ -1,5 +1,8 @@ export { default as AccountList } from './AccountList'; export { default as ActionTile } from './ActionTile'; +export { default as Amount } from './Amount'; export { default as DashboardPanel } from './DashboardPanel'; +export { default as RecentTransactionList } from './RecentTransactionList'; export { default as TokenList } from './TokenList'; +export { default as TransactionLabel } from './TransactionLabel'; export { default as WalletBreakdown } from './WalletBreakdown'; From 11c9267f1babc7055bdaac25ecdd3165e2a91e41 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Fri, 18 Jan 2019 17:22:26 -0600 Subject: [PATCH 0025/1466] Adjustment to AccountList --- common/v2/features/Dashboard/components/AccountList.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/common/v2/features/Dashboard/components/AccountList.tsx b/common/v2/features/Dashboard/components/AccountList.tsx index 0ffc46dde..e9d6b24cb 100644 --- a/common/v2/features/Dashboard/components/AccountList.tsx +++ b/common/v2/features/Dashboard/components/AccountList.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Address, CollapsibleTable, Copyable, Icon, Network, Typography } from '@mycrypto/ui'; +import { Address, CollapsibleTable, Icon, Network, Typography } from '@mycrypto/ui'; import DashboardPanel from './DashboardPanel'; import './AccountList.scss'; @@ -27,19 +27,18 @@ const truncate = (children: string) => { return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); }; const accountTable = { - head: ['Favorite', 'Label', 'Address', 'Network', 'Value'], + head: ['Favorite', 'Address', 'Network', 'Value'], body: accounts.map(({ address, name, network, value }) => [ ,
{}} truncate={truncate} />, - , {network} , {value} ]), config: { - primaryColumn: 'Label', - sortableColumn: 'Label', + primaryColumn: 'Address', + sortableColumn: 'Address', sortFunction: (a: any, b: any) => { const aLabel = a.props.title; const bLabel = b.props.title; From 4dd2d3bb01995e28e54aed7d048eb537f97e980d Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 21 Jan 2019 16:55:43 -0600 Subject: [PATCH 0026/1466] Initial rendition of desktop-sized dashboard --- common/v2/components/Layout.tsx | 5 +- common/v2/features/Dashboard/Dashboard.scss | 30 ++++++++- common/v2/features/Dashboard/Dashboard.tsx | 63 ++++++++++++------- .../Dashboard/components/ActionTile.scss | 33 ++++++++++ .../Dashboard/components/ActionTile.tsx | 7 ++- common/v2/features/Dashboard/constants.ts | 15 +++-- common/v2/features/Dashboard/types.ts | 1 + 7 files changed, 122 insertions(+), 32 deletions(-) diff --git a/common/v2/components/Layout.tsx b/common/v2/components/Layout.tsx index f160505de..8594408e7 100644 --- a/common/v2/components/Layout.tsx +++ b/common/v2/components/Layout.tsx @@ -10,19 +10,20 @@ import NewHeader from 'components/Header/NewHeader/NewHeader'; import NewFooter from 'components/Footer/NewFooter/NewFooter'; interface Props { + className?: string; centered?: boolean; fluid?: boolean; children: any; } -export default function Layout({ centered, fluid, children }: Props) { +export default function Layout({ centered, fluid, className = '', children }: Props) { const contentClassName = classnames('Layout-content', { centered, fluid }); return ( -
+
( diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index f2097f861..72d7b4962 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -1,6 +1,9 @@ -.Dashboard { +.Dashboard-mobile { background: #e8eaed; + @media (min-width: 700px) { + display: none; + } &-actions { display: flex; align-items: center; @@ -25,3 +28,28 @@ padding: 0 15px; } } + +.Dashboard-desktop { + display: none; + background: #e8eaed; + + @media (min-width: 700px) { + display: block; + } + &-top { + display: flex; + align-items: center; + + &-left { + flex: 1; + + &-heading { + margin-bottom: 25px; + font-weight: bold; + } + } + &-right { + flex: 2; + } + } +} diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index b992d4ab8..c751c19fd 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -1,5 +1,6 @@ import React from 'react'; import chunk from 'lodash/chunk'; +import { Heading } from '@mycrypto/ui'; import { Layout } from 'v2/components'; import { @@ -15,30 +16,48 @@ import './Dashboard.scss'; export default function Dashboard() { const [topRow, bottomRow] = chunk(actions, 3); return ( - -
-
-
- {topRow.map(action => )} + <> + {/* MOBILE */} + +
+
+
+ {topRow.map(action => )} +
+
+ {bottomRow.map(action => )} +
-
- {bottomRow.map(action => )} +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + {/* DESKTOP */} + +
+
+ + Your Dashboard + +
+ {actions.map(action => )} +
+
{/* */}
-
-
-
- -
-
- -
-
- -
-
- -
- +
{/* */}
+ + ); } diff --git a/common/v2/features/Dashboard/components/ActionTile.scss b/common/v2/features/Dashboard/components/ActionTile.scss index 7ced40daf..04fceefa8 100644 --- a/common/v2/features/Dashboard/components/ActionTile.scss +++ b/common/v2/features/Dashboard/components/ActionTile.scss @@ -9,14 +9,32 @@ background: #fff; box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.07); + @media (min-width: 700px) { + width: auto; + height: 110px; + margin-bottom: 20px; + padding-left: 40px; + padding-right: 40px; + } &-button { display: flex; flex-direction: column; align-items: center; + @media (min-width: 700px) { + flex-direction: row; + justify-content: space-between; + width: 100%; + text-align: left; + } &-icon { + order: 1; display: block; margin-top: 9px; + + @media (min-width: 700px) { + margin-top: 0; + } } &-title { margin: 0; @@ -25,6 +43,21 @@ font-weight: bold; color: #163150; word-spacing: 9999px; + + @media (min-width: 700px) { + margin-bottom: 0; + font-size: 24px; + word-spacing: inherit; + } + &-description { + display: none; + font-size: 16px; + font-weight: normal; + + @media (min-width: 700px) { + display: block; + } + } } } } diff --git a/common/v2/features/Dashboard/components/ActionTile.tsx b/common/v2/features/Dashboard/components/ActionTile.tsx index b08a55409..908f985c0 100644 --- a/common/v2/features/Dashboard/components/ActionTile.tsx +++ b/common/v2/features/Dashboard/components/ActionTile.tsx @@ -7,12 +7,15 @@ import './ActionTile.scss'; type Props = Action; -export default function ActionTile({ icon, title, link }: Props) { +export default function ActionTile({ icon, title, description, link }: Props) { return ( ); diff --git a/common/v2/features/Dashboard/constants.ts b/common/v2/features/Dashboard/constants.ts index 675207fbf..4b9ea64c2 100644 --- a/common/v2/features/Dashboard/constants.ts +++ b/common/v2/features/Dashboard/constants.ts @@ -11,26 +11,31 @@ export const actions: Action[] = [ { icon: buyIcon, title: 'Buy Assets', - link: '/dashboard/buy' + link: '/dashboard/buy', + description: 'Purchase New Assets' }, { icon: swapIcon, title: 'Swap Assets', - link: '/dashboard/swap' + link: '/dashboard/swap', + description: 'Exchange Assets for Other Assets' }, { icon: sendIcon, title: 'Send Assets', - link: '/dashboard/send' + link: '/dashboard/send', + description: 'Transfer Assets to Another Wallet' }, { icon: receiveIcon, title: 'Request Assets', - link: '/dashboard/request' + link: '/dashboard/request', + description: 'Transfer Assets to Your Wallet' }, { icon: hardwareWalletIcon, title: 'Get_Hardware Wallet', - link: '/dashboard/get-hardware-wallet' + link: '/dashboard/get-hardware-wallet', + description: 'Keep Your Funds Safe Offline' } ]; diff --git a/common/v2/features/Dashboard/types.ts b/common/v2/features/Dashboard/types.ts index 39143af01..f6ab4f7a0 100644 --- a/common/v2/features/Dashboard/types.ts +++ b/common/v2/features/Dashboard/types.ts @@ -1,5 +1,6 @@ export interface Action { icon: string; title: string; + description: string; link: string; } From fc243d63e0b110eb9ae007fa29117fa042db3628 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 21 Jan 2019 17:16:03 -0600 Subject: [PATCH 0027/1466] Further work on Dashboard --- common/v2/features/Dashboard/Dashboard.scss | 3 +- common/v2/features/Dashboard/Dashboard.tsx | 4 +- .../Dashboard/components/ActionTile.scss | 2 +- .../Dashboard/components/WalletBreakdown.scss | 41 ++++++- .../Dashboard/components/WalletBreakdown.tsx | 109 ++++++++++-------- 5 files changed, 104 insertions(+), 55 deletions(-) diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index 72d7b4962..a10688758 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -38,12 +38,13 @@ } &-top { display: flex; - align-items: center; + align-items: flex-start; &-left { flex: 1; &-heading { + margin-top: 0; margin-bottom: 25px; font-weight: bold; } diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index c751c19fd..884dd102a 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -54,7 +54,9 @@ export default function Dashboard() { {actions.map(action => )}
-
{/* */}
+
+ +
{/* */}
diff --git a/common/v2/features/Dashboard/components/ActionTile.scss b/common/v2/features/Dashboard/components/ActionTile.scss index 04fceefa8..778279128 100644 --- a/common/v2/features/Dashboard/components/ActionTile.scss +++ b/common/v2/features/Dashboard/components/ActionTile.scss @@ -28,11 +28,11 @@ text-align: left; } &-icon { - order: 1; display: block; margin-top: 9px; @media (min-width: 700px) { + order: 1; margin-top: 0; } } diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.scss b/common/v2/features/Dashboard/components/WalletBreakdown.scss index ced702097..290429f18 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.scss +++ b/common/v2/features/Dashboard/components/WalletBreakdown.scss @@ -1,12 +1,31 @@ .WalletBreakdown { - &-select { - width: 100%; - margin-bottom: 10px; + &-selectWrapper { + display: flex; + flex-direction: column; + + @media (min-width: 700px) { + flex-direction: row; + align-items: center; + padding-left: 150px; + } + &-select { + width: 100%; + margin-bottom: 10px; + } } &-panel { + display: flex; + flex-direction: column; margin-top: 5px; padding: 15px; + @media (min-width: 700px) { + flex-direction: row; + + > div { + flex: 1; + } + } &-headingWrapper { display: flex; align-items: center; @@ -17,6 +36,14 @@ font-size: 20px; font-weight: bold; color: #424242; + + &-extra { + display: inline; + + @media (min-width: 700px) { + display: none; + } + } } &-more { display: block; @@ -43,6 +70,14 @@ height: 1px; margin-bottom: 15px; background: #ddd; + + &.mobile-only { + display: block; + + @media (min-width: 700px) { + display: none; + } + } } &-balances { display: flex; diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.tsx b/common/v2/features/Dashboard/components/WalletBreakdown.tsx index 8c2adb5a0..d1448231a 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.tsx +++ b/common/v2/features/Dashboard/components/WalletBreakdown.tsx @@ -34,61 +34,72 @@ const balances = [ export default function WalletBreakdown() { return (
- {}} - items={new Set(['3 of 9 Accounts'])} - /> - {}} - items={new Set(['US Dollars'])} - /> +
+ {}} + items={new Set(['3 of 9 Accounts'])} + /> + {}} + items={new Set(['US Dollars'])} + /> +
- Wallet Breakdown (All Accounts) -
-
- Ethereum - - 43% Of Your Funds - -
-
- - $5,204.14 - - - Value in US Dollars - +
+ + Wallet Breakdown{' '} + (All Accounts) + +
+
+ + Ethereum + + + 43% Of Your Funds + +
+
+ + $5,204.14 + + + Value in US Dollars + +
-
-
- Balance - More -
-
- {balances.map(({ asset, amount, value }) => ( -
-
- - {asset} - - - {amount} +
+
+
+ Balance + More +
+
+ {balances.map(({ asset, amount, value }) => ( +
+
+ + {asset} + + + {amount} + +
+ + {value}
- - {value} - + ))} +
+
+ Total + $2,974.41
- ))} -
-
- Total - $2,974.41
From 7dbf0c3da48ca5519a12541b2178e4dbc2abd2e6 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 21 Jan 2019 17:57:25 -0600 Subject: [PATCH 0028/1466] Further work --- common/v2/features/Dashboard/Dashboard.scss | 11 +++++++++++ common/v2/features/Dashboard/Dashboard.tsx | 14 ++++++++++++-- .../features/Dashboard/components/AccountList.tsx | 8 ++++++-- .../features/Dashboard/components/ActionTile.scss | 1 + .../Dashboard/components/RecentTransactionList.tsx | 10 +++++++--- .../features/Dashboard/components/TokenList.scss | 3 +++ .../Dashboard/components/WalletBreakdown.scss | 4 ++++ 7 files changed, 44 insertions(+), 7 deletions(-) diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index a10688758..0bf7225fa 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -51,6 +51,17 @@ } &-right { flex: 2; + + > div { + margin-bottom: 18px; + } + } + } + &-modifiedPanel { + padding: 0; + + .DashboardPanel-headingWrapper { + padding: 15px; } } } diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index 884dd102a..725b6c7e0 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -53,12 +53,22 @@ export default function Dashboard() {
{actions.map(action => )}
+
+ +
- +
+ +
+
+ +
-
{/* */}
+
+ +
); diff --git a/common/v2/features/Dashboard/components/AccountList.tsx b/common/v2/features/Dashboard/components/AccountList.tsx index e9d6b24cb..340386e8b 100644 --- a/common/v2/features/Dashboard/components/AccountList.tsx +++ b/common/v2/features/Dashboard/components/AccountList.tsx @@ -4,6 +4,10 @@ import { Address, CollapsibleTable, Icon, Network, Typography } from '@mycrypto/ import DashboardPanel from './DashboardPanel'; import './AccountList.scss'; +interface Props { + className?: string; +} + // Fake Data const accounts = [ { @@ -50,13 +54,13 @@ const accountTable = { } }; -export default function AccountList() { +export default function AccountList({ className = '' }: Props) { return ( diff --git a/common/v2/features/Dashboard/components/ActionTile.scss b/common/v2/features/Dashboard/components/ActionTile.scss index 778279128..99d9b6ffb 100644 --- a/common/v2/features/Dashboard/components/ActionTile.scss +++ b/common/v2/features/Dashboard/components/ActionTile.scss @@ -12,6 +12,7 @@ @media (min-width: 700px) { width: auto; height: 110px; + margin-right: 21px; margin-bottom: 20px; padding-left: 40px; padding-right: 40px; diff --git a/common/v2/features/Dashboard/components/RecentTransactionList.tsx b/common/v2/features/Dashboard/components/RecentTransactionList.tsx index 87fc31481..81a887367 100644 --- a/common/v2/features/Dashboard/components/RecentTransactionList.tsx +++ b/common/v2/features/Dashboard/components/RecentTransactionList.tsx @@ -10,6 +10,10 @@ import './RecentTransactionList.scss'; // Legacy import newWindowIcon from 'common/assets/images/icn-new-window.svg'; +interface Props { + className?: string; +} + // Fake Data const truncate = (children: string) => { return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); @@ -92,13 +96,13 @@ const recentTransactionsTable = { } }; -export default function RecentTransactionList() { +export default function RecentTransactionList({ className = '' }: Props) { return ( diff --git a/common/v2/features/Dashboard/components/TokenList.scss b/common/v2/features/Dashboard/components/TokenList.scss index 1bf6c9b4d..f43474033 100644 --- a/common/v2/features/Dashboard/components/TokenList.scss +++ b/common/v2/features/Dashboard/components/TokenList.scss @@ -3,6 +3,9 @@ padding: 15px; overflow-y: auto; + @media (min-width: 700px) { + margin-right: 21px; + } &-tokens { display: flex; flex-direction: column; diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.scss b/common/v2/features/Dashboard/components/WalletBreakdown.scss index 290429f18..84395ebb9 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.scss +++ b/common/v2/features/Dashboard/components/WalletBreakdown.scss @@ -21,6 +21,7 @@ @media (min-width: 700px) { flex-direction: row; + margin-top: 0; > div { flex: 1; @@ -37,6 +38,9 @@ font-weight: bold; color: #424242; + @media (min-width: 700px) { + font-size: 24px; + } &-extra { display: inline; From 2cbc161b992a3590dd06b852c662658a27d1cb55 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Fri, 25 Jan 2019 16:28:23 -0600 Subject: [PATCH 0029/1466] Fix responsiveness of ActionTiles --- common/v2/features/Dashboard/Dashboard.scss | 44 +++++++++++++++++-- common/v2/features/Dashboard/Dashboard.tsx | 23 ++++------ .../Dashboard/components/ActionTile.scss | 24 ++++++---- .../Dashboard/components/TokenList.scss | 2 +- .../Dashboard/components/WalletBreakdown.scss | 10 ++--- 5 files changed, 70 insertions(+), 33 deletions(-) diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index 0bf7225fa..c13b133dc 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -1,13 +1,21 @@ .Dashboard-mobile { + margin-top: 20px; background: #e8eaed; @media (min-width: 700px) { + margin-top: 60px; + } + @media (min-width: 1000px) { + margin-top: 0; + } + @media (min-width: 1080px) { display: none; } &-actions { + flex: 1; display: flex; + flex-wrap: wrap; align-items: center; - justify-content: center; padding: 0 15px; &-row { @@ -20,9 +28,28 @@ width: 100vw; background: #ddd; } + &-group { + display: flex; + flex-direction: column; + + @media (min-width: 900px) { + flex-direction: row; + } + } &-walletBreakdown { - margin-bottom: 13px; padding: 15px 15px 0 15px; + + @media (min-width: 900px) { + order: 1; + flex: 2; + } + } + &-tokenList { + @media (min-width: 900px) { + order: 0; + flex: 1; + margin-top: 15px; + } } &-section { padding: 0 15px; @@ -33,7 +60,7 @@ display: none; background: #e8eaed; - @media (min-width: 700px) { + @media (min-width: 1080px) { display: block; } &-top { @@ -42,12 +69,23 @@ &-left { flex: 1; + min-width: 241px; &-heading { margin-top: 0; margin-bottom: 25px; font-weight: bold; } + &-actions { + display: flex; + flex-wrap: wrap; + max-width: 400px; + + @media (min-width: 1370px) { + display: block; + margin-right: 21px; + } + } } &-right { flex: 2; diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index 725b6c7e0..f9e71ce6b 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import chunk from 'lodash/chunk'; import { Heading } from '@mycrypto/ui'; import { Layout } from 'v2/components'; @@ -14,27 +13,21 @@ import { actions } from './constants'; import './Dashboard.scss'; export default function Dashboard() { - const [topRow, bottomRow] = chunk(actions, 3); return ( <> {/* MOBILE */}
-
-
- {topRow.map(action => )} -
-
- {bottomRow.map(action => )} -
-
+ {actions.map(action => )}
-
- -
-
- +
+
+ +
+
+ +
diff --git a/common/v2/features/Dashboard/components/ActionTile.scss b/common/v2/features/Dashboard/components/ActionTile.scss index 99d9b6ffb..bfdd61297 100644 --- a/common/v2/features/Dashboard/components/ActionTile.scss +++ b/common/v2/features/Dashboard/components/ActionTile.scss @@ -1,18 +1,24 @@ .ActionTile { - flex-shrink: 0; + flex: 0 0 105px; display: flex; align-items: center; justify-content: center; - width: 105px; + min-width: 105px; height: 105px; margin-right: 15px; + margin-bottom: 15px; background: #fff; box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.07); - @media (min-width: 700px) { - width: auto; + @media (min-width: 640px) { + flex: 1 0 105px; + } + @media (min-width: 1080px) { + flex: 0 0 105px; + } + @media (min-width: 1370px) { + width: 100%; height: 110px; - margin-right: 21px; margin-bottom: 20px; padding-left: 40px; padding-right: 40px; @@ -22,7 +28,7 @@ flex-direction: column; align-items: center; - @media (min-width: 700px) { + @media (min-width: 1370px) { flex-direction: row; justify-content: space-between; width: 100%; @@ -32,7 +38,7 @@ display: block; margin-top: 9px; - @media (min-width: 700px) { + @media (min-width: 1370px) { order: 1; margin-top: 0; } @@ -45,7 +51,7 @@ color: #163150; word-spacing: 9999px; - @media (min-width: 700px) { + @media (min-width: 1370px) { margin-bottom: 0; font-size: 24px; word-spacing: inherit; @@ -55,7 +61,7 @@ font-size: 16px; font-weight: normal; - @media (min-width: 700px) { + @media (min-width: 1370px) { display: block; } } diff --git a/common/v2/features/Dashboard/components/TokenList.scss b/common/v2/features/Dashboard/components/TokenList.scss index f43474033..9a6f7178f 100644 --- a/common/v2/features/Dashboard/components/TokenList.scss +++ b/common/v2/features/Dashboard/components/TokenList.scss @@ -3,7 +3,7 @@ padding: 15px; overflow-y: auto; - @media (min-width: 700px) { + @media (min-width: 1080px) { margin-right: 21px; } &-tokens { diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.scss b/common/v2/features/Dashboard/components/WalletBreakdown.scss index 84395ebb9..3ff8d186e 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.scss +++ b/common/v2/features/Dashboard/components/WalletBreakdown.scss @@ -3,7 +3,7 @@ display: flex; flex-direction: column; - @media (min-width: 700px) { + @media (min-width: 1080px) { flex-direction: row; align-items: center; padding-left: 150px; @@ -19,7 +19,7 @@ margin-top: 5px; padding: 15px; - @media (min-width: 700px) { + @media (min-width: 1080px) { flex-direction: row; margin-top: 0; @@ -38,13 +38,13 @@ font-weight: bold; color: #424242; - @media (min-width: 700px) { + @media (min-width: 1080px) { font-size: 24px; } &-extra { display: inline; - @media (min-width: 700px) { + @media (min-width: 1080px) { display: none; } } @@ -78,7 +78,7 @@ &.mobile-only { display: block; - @media (min-width: 700px) { + @media (min-width: 1080px) { display: none; } } From b3ec3de9e1366171997af14322bf141488c0d8a2 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Fri, 25 Jan 2019 16:40:53 -0600 Subject: [PATCH 0030/1466] More responsiveness stuff --- .../features/Dashboard/components/ActionTile.scss | 13 ++++++------- .../Dashboard/components/WalletBreakdown.scss | 10 +++++++--- .../Dashboard/components/WalletBreakdown.tsx | 8 ++++---- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/common/v2/features/Dashboard/components/ActionTile.scss b/common/v2/features/Dashboard/components/ActionTile.scss index bfdd61297..0ad9bbf7e 100644 --- a/common/v2/features/Dashboard/components/ActionTile.scss +++ b/common/v2/features/Dashboard/components/ActionTile.scss @@ -1,20 +1,19 @@ .ActionTile { - flex: 0 0 105px; + flex: 0 0 115px; display: flex; align-items: center; justify-content: center; - min-width: 105px; - height: 105px; + height: 125px; margin-right: 15px; margin-bottom: 15px; background: #fff; box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.07); - @media (min-width: 640px) { - flex: 1 0 105px; + @media (min-width: 680px) { + flex: 1 0 115px; } @media (min-width: 1080px) { - flex: 0 0 105px; + flex: 0 0 115px; } @media (min-width: 1370px) { width: 100%; @@ -46,7 +45,7 @@ &-title { margin: 0; margin-bottom: 9px; - font-size: 12px; + font-size: 16px; font-weight: bold; color: #163150; word-spacing: 9999px; diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.scss b/common/v2/features/Dashboard/components/WalletBreakdown.scss index 3ff8d186e..02f2a2d9f 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.scss +++ b/common/v2/features/Dashboard/components/WalletBreakdown.scss @@ -10,7 +10,11 @@ } &-select { width: 100%; - margin-bottom: 10px; + margin-bottom: 15px; + + &:first-of-type { + margin-right: 15px; + } } } &-panel { @@ -66,7 +70,7 @@ } &-label { margin: 0; - font-size: 12px; + font-size: 16px; } } } @@ -105,7 +109,7 @@ margin: 0; a { - font-size: 12px; + color: #1eb8e7; } } } diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.tsx b/common/v2/features/Dashboard/components/WalletBreakdown.tsx index d1448231a..5668d86d2 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.tsx +++ b/common/v2/features/Dashboard/components/WalletBreakdown.tsx @@ -37,15 +37,15 @@ export default function WalletBreakdown() {
{}} - items={new Set(['3 of 9 Accounts'])} + items={new Set(['US Dollars'])} /> {}} - items={new Set(['US Dollars'])} + items={new Set(['3 of 9 Accounts'])} />
From 66b029ebaef2d458b779dfbf01896110d0a35ca0 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Fri, 25 Jan 2019 20:16:24 -0600 Subject: [PATCH 0031/1466] Add account dropdown --- common/v2/features/Dashboard/Dashboard.scss | 2 + .../Dashboard/components/AccountDropdown.scss | 49 +++++++ .../Dashboard/components/AccountDropdown.tsx | 130 ++++++++++++++++++ .../Dashboard/components/WalletBreakdown.tsx | 10 +- .../v2/features/Dashboard/components/index.ts | 1 + 5 files changed, 186 insertions(+), 6 deletions(-) create mode 100644 common/v2/features/Dashboard/components/AccountDropdown.scss create mode 100644 common/v2/features/Dashboard/components/AccountDropdown.tsx diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index c13b133dc..0901014d8 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -1,6 +1,7 @@ .Dashboard-mobile { margin-top: 20px; background: #e8eaed; + font-weight: 300; @media (min-width: 700px) { margin-top: 60px; @@ -59,6 +60,7 @@ .Dashboard-desktop { display: none; background: #e8eaed; + font-weight: 300; @media (min-width: 1080px) { display: block; diff --git a/common/v2/features/Dashboard/components/AccountDropdown.scss b/common/v2/features/Dashboard/components/AccountDropdown.scss new file mode 100644 index 000000000..2321b21a6 --- /dev/null +++ b/common/v2/features/Dashboard/components/AccountDropdown.scss @@ -0,0 +1,49 @@ +.AccountDropdown { + position: relative; + display: flex; + align-items: center; + height: 48px; + padding: 9px 15px; + border: 0.125em solid #e5ecf3; + border-radius: 2px; + box-shadow: 0 1px 1px 0 rgba(232, 234, 237, 0.5), inset 0 1px 3px 0 rgba(232, 234, 237, 0.5); + background-color: #ffffff; + color: #1d2732; + cursor: pointer; + + &-menu { + position: absolute; + top: 100%; + left: 0; + width: 100%; + padding: 0 20px 14px 20px; + background: #ffffff; + border: 1px solid #e5ecf3; + + label { + display: flex; + align-items: center; + margin: 0; + padding: 16px 0; + font-weight: 300; + + &:first-of-type, + &:last-of-type { + border-bottom: 1px solid #e5ecf3; + } + } + input[type='checkbox'] { + margin: 0; + margin-right: 15px; + } + &-identicon { + width: 30px; + height: 30px; + margin-right: 15px; + } + &-apply { + width: 100%; + margin-top: 15px; + } + } +} diff --git a/common/v2/features/Dashboard/components/AccountDropdown.tsx b/common/v2/features/Dashboard/components/AccountDropdown.tsx new file mode 100644 index 000000000..9c61b18b9 --- /dev/null +++ b/common/v2/features/Dashboard/components/AccountDropdown.tsx @@ -0,0 +1,130 @@ +import React, { Component } from 'react'; +import onClickOutside from 'react-onclickoutside'; +import { Button, Identicon } from '@mycrypto/ui'; + +import './AccountDropdown.scss'; + +interface AccountDropdownEntry { + uuid: string; + name: string; + address: string; + visible: boolean; +} + +interface Props { + accounts: AccountDropdownEntry[]; + visibleCount: number; + allVisible: boolean; + onSelectAll(): void; + onSelect(uuid: string): void; +} + +export class AccountDropdown extends Component { + public state = { + open: false + }; + + public handleClickOutside = () => this.toggleOpen(); + + public render() { + const { accounts, visibleCount, allVisible, onSelectAll, onSelect } = this.props; + const { open } = this.state; + const label = allVisible + ? 'All Accounts' + : `Viewing ${visibleCount} of ${accounts.length} Accounts`; + + return ( +
+ {label} + {open && ( +
e.stopPropagation()}> + + {accounts.map(({ uuid, name, address, visible }) => ( + + ))} + +
+ )} +
+ ); + } + + private toggleOpen = () => + this.setState(prevState => ({ + open: !prevState.open + })); +} + +const ModifiedAccountDropdown = onClickOutside(AccountDropdown); + +// tslint:disable-next-line +export default class MockContext extends Component { + public state = { + accountsById: { + '1': { + uuid: '1', + name: 'Example account one', + address: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d' + }, + '2': { + uuid: '2', + name: 'An account with a really, really, really, really, really, really long name', + address: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d' + } + }, + allAccounts: ['1', '2'], + visibleAccounts: ['1', '2'] + }; + + public render() { + const { accountsById, allAccounts, visibleAccounts } = this.state; + const accounts = allAccounts.map(uuid => ({ + ...accountsById[uuid], + visible: visibleAccounts.includes(uuid) + })); + + return ( + + ); + } + + private toggleAllAccounts = () => + this.setState(prevState => ({ + visibleAccounts: + prevState.visibleAccounts.length < prevState.allAccounts.length + ? [...prevState.allAccounts] + : [] + })); + + private toggleSingleAccount = uuid => + this.setState(prevState => ({ + visibleAccounts: prevState.visibleAccounts.includes(uuid) + ? prevState.visibleAccounts.filter(entry => entry !== uuid) + : prevState.visibleAccounts.concat(uuid) + })); +} diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.tsx b/common/v2/features/Dashboard/components/WalletBreakdown.tsx index 5668d86d2..c05eb2519 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.tsx +++ b/common/v2/features/Dashboard/components/WalletBreakdown.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { ComboBox, Heading, Panel, Typography } from '@mycrypto/ui'; +import AccountDropdown from './AccountDropdown'; import './WalletBreakdown.scss'; // Legacy @@ -41,12 +42,9 @@ export default function WalletBreakdown() { onChange={() => {}} items={new Set(['US Dollars'])} /> - {}} - items={new Set(['3 of 9 Accounts'])} - /> +
+ +
diff --git a/common/v2/features/Dashboard/components/index.ts b/common/v2/features/Dashboard/components/index.ts index 5feee4452..b79a6fa4c 100644 --- a/common/v2/features/Dashboard/components/index.ts +++ b/common/v2/features/Dashboard/components/index.ts @@ -1,3 +1,4 @@ +export { default as AccountDropdown } from './AccountDropdown'; export { default as AccountList } from './AccountList'; export { default as ActionTile } from './ActionTile'; export { default as Amount } from './Amount'; From b00583cc8845e9598ba8e538762303311a07a505 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 28 Jan 2019 17:04:13 -0600 Subject: [PATCH 0032/1466] Initial rendition of pre-advanced options SendAssets --- .../Dashboard/SendAssets/SendAssets.scss | 230 ++++++++++++++++++ .../Dashboard/SendAssets/SendAssets.tsx | 141 +++++++++++ .../v2/features/Dashboard/SendAssets/index.ts | 1 + common/v2/features/Dashboard/routes.ts | 7 + 4 files changed, 379 insertions(+) create mode 100644 common/v2/features/Dashboard/SendAssets/SendAssets.scss create mode 100644 common/v2/features/Dashboard/SendAssets/SendAssets.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/index.ts diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.scss b/common/v2/features/Dashboard/SendAssets/SendAssets.scss new file mode 100644 index 000000000..c8eae7098 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.scss @@ -0,0 +1,230 @@ +.SendAssets { + &-panel { + &-heading { + margin-top: 0; + margin-bottom: 22px; + font-size: 25px; + font-weight: bold; + } + &-fieldset { + margin-bottom: 15px; + + label { + margin-bottom: 8px; + color: #333333; + font-weight: normal; + } + &-input { + width: 100%; + } + &-youllSend { + margin-top: 32px; + + &-box { + padding: 12px 0; + background: #f6f8fa; + text-align: center; + + &-crypto { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 1px; + font-weight: bold; + + img { + width: 30px; + height: 30px; + margin-right: 8px; + } + } + &-fiat { + margin-bottom: 13px; + color: #7b8695; + font-size: 13px; + } + &-conversion { + margin-top: 13px; + } + } + } + &-transactionFee { + display: flex; + align-items: center; + justify-content: space-between; + } + &-rangeWrapper { + position: relative; + margin-top: 14px; + + > div { + position: absolute; + top: -35%; + width: 20px; + height: 20px; + background: #ffffff; + border: 1px solid #66aae5; + border-radius: 50%; + cursor: pointer; + } + &-cheap { + left: -2px; + } + &-fast { + right: -2px; + } + } + &-cheapFast { + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 11px; + color: #9b9b9b; + } + } + &-amountAsset { + display: flex; + align-items: center; + + &-amount { + flex: 2; + margin-right: 15px; + + &-label { + display: flex; + align-items: center; + justify-content: space-between; + + &-sendMax { + color: #1eb8e7; + } + } + } + &-asset { + flex: 1; + } + } + &-advancedOptions { + margin-bottom: 12px; + + &-button { + width: 100%; + color: #1eb8e7; + text-align: center; + } + } + &-next { + width: 100%; + } + } +} + +// Custom Range +input[type='range'] { + -webkit-appearance: none; /* Hides the slider so that custom slider can be made */ + width: 100%; /* Specific width is required for Firefox. */ + background: transparent; /* Otherwise white in Chrome */ +} + +input[type='range']::-webkit-slider-thumb { + -webkit-appearance: none; +} + +input[type='range']:focus { + outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */ +} + +input[type='range']::-ms-track { + width: 100%; + cursor: pointer; + + /* Hides the slider so custom styles can be added */ + background: transparent; + border-color: transparent; + color: transparent; +} + +/* Thumb */ +/* Special styling for WebKit/Blink */ +input[type='range']::-webkit-slider-thumb { + position: relative; + -webkit-appearance: none; + border: 1px solid #66aae5; + width: 30px; + height: 30px; + border-radius: 50%; + background: #ffffff; + cursor: pointer; + margin-top: -10px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */ + z-index: 1; +} + +/* All the same stuff for Firefox */ +input[type='range']::-moz-range-thumb { + position: relative; + z-index: 1; + border: 1px solid #66aae5; + width: 30px; + height: 30px; + border-radius: 50%; + background: #ffffff; + cursor: pointer; +} + +/* All the same stuff for IE */ +input[type='range']::-ms-thumb { + position: relative; + z-index: 1; + border: 1px solid #66aae5; + width: 30px; + height: 30px; + border-radius: 50%; + background: #ffffff; + cursor: pointer; +} + +/* Track */ +input[type='range']::-webkit-slider-runnable-track { + width: 100%; + height: 12px; + cursor: pointer; + background: #2db9e5; + border-radius: 1.3px; +} + +input[type='range']:focus::-webkit-slider-runnable-track { + background: #2db9e5; +} + +input[type='range']::-moz-range-track { + width: 100%; + height: 12px; + cursor: pointer; + background: #2db9e5; + border-radius: 1.3px; +} + +input[type='range']::-ms-track { + width: 100%; + height: 12px; + cursor: pointer; + background: #2db9e5; + border-radius: 1.3px; + border-color: transparent; + border-width: 16px 0; + color: transparent; +} +input[type='range']::-ms-fill-lower { + background: #2db9e5; + border-radius: 2.6px; +} +input[type='range']:focus::-ms-fill-lower { + background: #2db9e5; +} +input[type='range']::-ms-fill-upper { + background: #2db9e5; + border-radius: 2.6px; +} +input[type='range']:focus::-ms-fill-upper { + background: #2db9e5; +} diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx new file mode 100644 index 000000000..043ceadb9 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -0,0 +1,141 @@ +import React from 'react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { Formik, Form, Field } from 'formik'; +import { Button, ComboBox, Heading, Input, Typography } from '@mycrypto/ui'; + +import { ContentPanel, Layout } from 'v2/components'; +import './SendAssets.scss'; + +// Legacy +import sendIcon from 'common/assets/images/icn-send.svg'; + +export function SendAssets({ history }: RouteComponentProps<{}>) { + return ( + + + Send Assets + ( +
+
+ + ( + + )} + /> +
+
+ + ( + form.setFieldValue(field.name, value)} + placeholder="Enter an Address or Contact" + className="SendAssets-panel-fieldset-input" + /> + )} + /> +
+
+
+ + ( + form.setFieldValue(field.name, value)} + placeholder="0.00" + className="SendAssets-panel-fieldset-input" + /> + )} + /> +
+
+ + ( + + )} + /> +
+
+
+ +
+ + Send 13.233333 ETH + + + ≈ $1440.00 USD + +
+ + Conversion Rate
+ 1 ETH ≈ $109.41 USD +
+
+
+
+
+ +
+
+ +
+
+
+
Cheap
+
Fast
+
+
+
+ +
+ +
+ )} + /> +
+
+ ); +} + +export default withRouter(SendAssets); diff --git a/common/v2/features/Dashboard/SendAssets/index.ts b/common/v2/features/Dashboard/SendAssets/index.ts new file mode 100644 index 000000000..3bcdae3ef --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/index.ts @@ -0,0 +1 @@ +export { default as SendAssets } from './SendAssets'; diff --git a/common/v2/features/Dashboard/routes.ts b/common/v2/features/Dashboard/routes.ts index a0b814fe4..9948bc63e 100644 --- a/common/v2/features/Dashboard/routes.ts +++ b/common/v2/features/Dashboard/routes.ts @@ -1,4 +1,5 @@ import Dashboard from './Dashboard'; +import { SendAssets } from './SendAssets'; export default [ { @@ -6,5 +7,11 @@ export default [ path: '/dashboard', exact: true, component: Dashboard + }, + { + name: 'Send Assets', + path: '/dashboard/send', + exact: true, + component: SendAssets } ]; From 79149b56aac10914306206bee635ef435d85a707 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 28 Jan 2019 18:36:02 -0600 Subject: [PATCH 0033/1466] Move out processing logic up a step --- common/v2/components/ContentPanel.scss | 16 +- common/v2/components/ContentPanel.tsx | 26 +- .../CreateWallet/components/SteppedPanel.scss | 25 +- .../CreateWallet/components/SteppedPanel.tsx | 16 +- .../Dashboard/SendAssets/SendAssets.scss | 228 --------------- .../Dashboard/SendAssets/SendAssets.tsx | 208 +++++--------- .../components/ConfirmTransaction.tsx | 5 + .../SendAssets/components/SendAssetsForm.scss | 270 ++++++++++++++++++ .../SendAssets/components/SendAssetsForm.tsx | 206 +++++++++++++ .../components/TransactionComplete.tsx | 5 + .../Dashboard/SendAssets/components/index.ts | 3 + .../Dashboard/SendAssets/constants.js | 5 + 12 files changed, 618 insertions(+), 395 deletions(-) create mode 100644 common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.scss create mode 100644 common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/index.ts create mode 100644 common/v2/features/Dashboard/SendAssets/constants.js diff --git a/common/v2/components/ContentPanel.scss b/common/v2/components/ContentPanel.scss index 42cd4ad89..a5cac6f18 100644 --- a/common/v2/components/ContentPanel.scss +++ b/common/v2/components/ContentPanel.scss @@ -1,13 +1,19 @@ .ContentPanel { - &-back { + max-width: 560px; + + &-top { display: flex; align-items: center; + justify-content: space-between; margin-bottom: 10px; - color: #007a99; - font-weight: bold; - img { - margin-right: 13px; + &-back { + color: #007a99; + font-weight: bold; + + img { + margin-right: 13px; + } } } } diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index aace18dd7..4d1da1530 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Button, Panel } from '@mycrypto/ui'; +import Stepper from './Stepper'; import './ContentPanel.scss'; // Legacy @@ -9,16 +10,31 @@ import backArrowIcon from 'common/assets/images/icn-back-arrow.svg'; interface Props { children: any; className: string; + stepper?: { + current: number; + total: number; + }; onBack?(): void; } -export default function ContentPanel({ onBack, children, className = '', ...rest }: Props) { +export default function ContentPanel({ + onBack, + children, + className = '', + stepper, + ...rest +}: Props) { return (
- {onBack && ( - + {(onBack || stepper) && ( +
+ {onBack && ( + + )} + {stepper && } +
)} {children} diff --git a/common/v2/features/CreateWallet/components/SteppedPanel.scss b/common/v2/features/CreateWallet/components/SteppedPanel.scss index d597ff907..9896c2eb5 100644 --- a/common/v2/features/CreateWallet/components/SteppedPanel.scss +++ b/common/v2/features/CreateWallet/components/SteppedPanel.scss @@ -1,25 +1,10 @@ .SteppedPanel { - max-width: 560px; + width: 100%; padding: 42px 71px 50px 71px; - &-top { - display: flex; - flex-direction: column; - align-items: center; - - @media (min-width: 700px) { - flex-direction: row; - justify-content: space-between; - } - &-heading { - margin-top: 0; - font-size: 32px; - font-weight: bold; - } - &-stepper { - @media (min-width: 700px) { - order: 2; - } - } + &-heading { + margin-top: 0; + font-size: 32px; + font-weight: bold; } } diff --git a/common/v2/features/CreateWallet/components/SteppedPanel.tsx b/common/v2/features/CreateWallet/components/SteppedPanel.tsx index 1ec615829..24960a752 100644 --- a/common/v2/features/CreateWallet/components/SteppedPanel.tsx +++ b/common/v2/features/CreateWallet/components/SteppedPanel.tsx @@ -2,7 +2,7 @@ import React from 'react'; import classnames from 'classnames'; import { Heading, Typography } from '@mycrypto/ui'; -import { ContentPanel, Stepper } from 'v2/components'; +import { ContentPanel } from 'v2/components'; import './SteppedPanel.scss'; interface Props { @@ -27,11 +27,15 @@ export default function SteppedPanel({ const steppedPanelClassName = classnames('SteppedPanel', className); return ( - -
- - {heading} -
+ + {heading} {description} {children} diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.scss b/common/v2/features/Dashboard/SendAssets/SendAssets.scss index c8eae7098..c8c7f9228 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.scss +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.scss @@ -1,230 +1,2 @@ .SendAssets { - &-panel { - &-heading { - margin-top: 0; - margin-bottom: 22px; - font-size: 25px; - font-weight: bold; - } - &-fieldset { - margin-bottom: 15px; - - label { - margin-bottom: 8px; - color: #333333; - font-weight: normal; - } - &-input { - width: 100%; - } - &-youllSend { - margin-top: 32px; - - &-box { - padding: 12px 0; - background: #f6f8fa; - text-align: center; - - &-crypto { - display: flex; - align-items: center; - justify-content: center; - margin-bottom: 1px; - font-weight: bold; - - img { - width: 30px; - height: 30px; - margin-right: 8px; - } - } - &-fiat { - margin-bottom: 13px; - color: #7b8695; - font-size: 13px; - } - &-conversion { - margin-top: 13px; - } - } - } - &-transactionFee { - display: flex; - align-items: center; - justify-content: space-between; - } - &-rangeWrapper { - position: relative; - margin-top: 14px; - - > div { - position: absolute; - top: -35%; - width: 20px; - height: 20px; - background: #ffffff; - border: 1px solid #66aae5; - border-radius: 50%; - cursor: pointer; - } - &-cheap { - left: -2px; - } - &-fast { - right: -2px; - } - } - &-cheapFast { - display: flex; - align-items: center; - justify-content: space-between; - margin-top: 11px; - color: #9b9b9b; - } - } - &-amountAsset { - display: flex; - align-items: center; - - &-amount { - flex: 2; - margin-right: 15px; - - &-label { - display: flex; - align-items: center; - justify-content: space-between; - - &-sendMax { - color: #1eb8e7; - } - } - } - &-asset { - flex: 1; - } - } - &-advancedOptions { - margin-bottom: 12px; - - &-button { - width: 100%; - color: #1eb8e7; - text-align: center; - } - } - &-next { - width: 100%; - } - } -} - -// Custom Range -input[type='range'] { - -webkit-appearance: none; /* Hides the slider so that custom slider can be made */ - width: 100%; /* Specific width is required for Firefox. */ - background: transparent; /* Otherwise white in Chrome */ -} - -input[type='range']::-webkit-slider-thumb { - -webkit-appearance: none; -} - -input[type='range']:focus { - outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */ -} - -input[type='range']::-ms-track { - width: 100%; - cursor: pointer; - - /* Hides the slider so custom styles can be added */ - background: transparent; - border-color: transparent; - color: transparent; -} - -/* Thumb */ -/* Special styling for WebKit/Blink */ -input[type='range']::-webkit-slider-thumb { - position: relative; - -webkit-appearance: none; - border: 1px solid #66aae5; - width: 30px; - height: 30px; - border-radius: 50%; - background: #ffffff; - cursor: pointer; - margin-top: -10px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */ - z-index: 1; -} - -/* All the same stuff for Firefox */ -input[type='range']::-moz-range-thumb { - position: relative; - z-index: 1; - border: 1px solid #66aae5; - width: 30px; - height: 30px; - border-radius: 50%; - background: #ffffff; - cursor: pointer; -} - -/* All the same stuff for IE */ -input[type='range']::-ms-thumb { - position: relative; - z-index: 1; - border: 1px solid #66aae5; - width: 30px; - height: 30px; - border-radius: 50%; - background: #ffffff; - cursor: pointer; -} - -/* Track */ -input[type='range']::-webkit-slider-runnable-track { - width: 100%; - height: 12px; - cursor: pointer; - background: #2db9e5; - border-radius: 1.3px; -} - -input[type='range']:focus::-webkit-slider-runnable-track { - background: #2db9e5; -} - -input[type='range']::-moz-range-track { - width: 100%; - height: 12px; - cursor: pointer; - background: #2db9e5; - border-radius: 1.3px; -} - -input[type='range']::-ms-track { - width: 100%; - height: 12px; - cursor: pointer; - background: #2db9e5; - border-radius: 1.3px; - border-color: transparent; - border-width: 16px 0; - color: transparent; -} -input[type='range']::-ms-fill-lower { - background: #2db9e5; - border-radius: 2.6px; -} -input[type='range']:focus::-ms-fill-lower { - background: #2db9e5; -} -input[type='range']::-ms-fill-upper { - background: #2db9e5; - border-radius: 2.6px; -} -input[type='range']:focus::-ms-fill-upper { - background: #2db9e5; } diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx index 043ceadb9..06d6714f6 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -1,141 +1,87 @@ -import React from 'react'; +import React, { Component } from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { Formik, Form, Field } from 'formik'; -import { Button, ComboBox, Heading, Input, Typography } from '@mycrypto/ui'; +import { Heading } from '@mycrypto/ui'; import { ContentPanel, Layout } from 'v2/components'; +import { headings, steps } from './constants'; import './SendAssets.scss'; -// Legacy -import sendIcon from 'common/assets/images/icn-send.svg'; +export interface Transaction { + senderAddress: string; + recipientAddress: string; + amount: string; + asset: string; + transactionFee: string; + advancedMode: boolean; + automaticallyCalculateGasLimit: boolean; + gasPrice: string; + gasLimit: string; + nonce: string; +} + +interface State { + step: number; + transaction: Transaction; +} + +export class SendAssets extends Component> { + public state: State = { + step: 0, + transaction: { + senderAddress: '', + recipientAddress: '', + amount: '0.00', + asset: 'ETH', + transactionFee: '', + advancedMode: false, + automaticallyCalculateGasLimit: true, + gasPrice: '', + gasLimit: '', + nonce: '' + } + }; -export function SendAssets({ history }: RouteComponentProps<{}>) { - return ( - - - Send Assets - + ( -
-
- - ( - - )} - /> -
-
- - ( - form.setFieldValue(field.name, value)} - placeholder="Enter an Address or Contact" - className="SendAssets-panel-fieldset-input" - /> - )} - /> -
-
-
- - ( - form.setFieldValue(field.name, value)} - placeholder="0.00" - className="SendAssets-panel-fieldset-input" - /> - )} - /> -
-
- - ( - - )} - /> -
-
-
- -
- - Send 13.233333 ETH - - - ≈ $1440.00 USD - -
- - Conversion Rate
- 1 ETH ≈ $109.41 USD -
-
-
-
-
- -
-
- -
-
-
-
Cheap
-
Fast
-
-
-
- -
- -
- )} - /> -
-
- ); + > + {headings[step]} + +
+ + ); + } + + private advanceStep = () => + this.setState((prevState: State) => ({ + step: Math.min(prevState.step + 1, steps.length - 1) + })); + + private regressStep = () => + this.setState((prevState: State) => ({ + step: Math.min(0, prevState.step - 1) + })); + + private updateTransaction = (transaction: Transaction) => + this.setState({ + transaction + }); } export default withRouter(SendAssets); diff --git a/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx b/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx new file mode 100644 index 000000000..7869f6be5 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function ConfirmTransaction() { + return

Confirm Transaction

; +} diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.scss b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.scss new file mode 100644 index 000000000..9c43a4bde --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.scss @@ -0,0 +1,270 @@ +.SendAssetsForm { + label { + margin-bottom: 8px; + color: #333333; + font-weight: normal; + } + &-heading { + margin-top: 0; + margin-bottom: 22px; + font-size: 25px; + font-weight: bold; + } + &-fieldset { + margin-bottom: 15px; + + &-input { + width: 100%; + } + &-youllSend { + margin-top: 32px; + + &-box { + padding: 12px 0; + background: #f6f8fa; + text-align: center; + + &-crypto { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 1px; + font-weight: bold; + + img { + width: 30px; + height: 30px; + margin-right: 8px; + } + } + &-fiat { + margin-bottom: 13px; + color: #7b8695; + font-size: 13px; + } + &-conversion { + margin-top: 13px; + } + } + } + &-transactionFee { + display: flex; + align-items: center; + justify-content: space-between; + } + &-rangeWrapper { + position: relative; + margin-top: 14px; + + > div { + position: absolute; + top: -35%; + width: 20px; + height: 20px; + background: #ffffff; + border: 1px solid #66aae5; + border-radius: 50%; + cursor: pointer; + } + &-cheap { + left: -3px; + } + &-fast { + right: -3px; + } + } + &-cheapFast { + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 11px; + color: #9b9b9b; + } + } + &-amountAsset { + display: flex; + align-items: center; + + &-amount { + flex: 2; + margin-right: 15px; + + &-label { + display: flex; + align-items: center; + justify-content: space-between; + + &-sendMax { + color: #1eb8e7; + } + } + } + &-asset { + flex: 1; + } + } + &-advancedOptions { + margin-bottom: 12px; + + &-button { + width: 100%; + color: #1eb8e7; + text-align: center; + } + &-content { + margin-top: 32px; + + &-automaticallyCalculate { + display: flex; + align-items: center; + margin-bottom: 20px; + + input[type='checkbox'] { + margin: 0; + margin-right: 8px; + } + label { + margin: 0; + color: #163150; + font-weight: 300; + } + } + &-priceLimitNonce { + display: flex; + align-items: center; + margin-bottom: 15px; + + &-price { + flex: 2; + margin-right: 15px; + } + &-limit { + flex: 2; + margin-right: 15px; + } + &-nonce { + flex: 1; + } + } + &-output { + margin-bottom: 25px; + padding: 24px 18px; + background: #f6f8fa; + text-align: center; + } + } + } + &-next { + width: 100%; + } +} + +// Custom Range +input[type='range'] { + -webkit-appearance: none; /* Hides the slider so that custom slider can be made */ + width: 100%; /* Specific width is required for Firefox. */ + background: transparent; /* Otherwise white in Chrome */ +} + +input[type='range']::-webkit-slider-thumb { + -webkit-appearance: none; +} + +input[type='range']:focus { + outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */ +} + +input[type='range']::-ms-track { + width: 100%; + cursor: pointer; + + /* Hides the slider so custom styles can be added */ + background: transparent; + border-color: transparent; + color: transparent; +} + +/* Thumb */ +/* Special styling for WebKit/Blink */ +input[type='range']::-webkit-slider-thumb { + position: relative; + -webkit-appearance: none; + border: 1px solid #66aae5; + width: 30px; + height: 30px; + border-radius: 50%; + background: #ffffff; + cursor: pointer; + margin-top: -10px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */ + z-index: 1; +} + +/* All the same stuff for Firefox */ +input[type='range']::-moz-range-thumb { + position: relative; + z-index: 1; + border: 1px solid #66aae5; + width: 30px; + height: 30px; + border-radius: 50%; + background: #ffffff; + cursor: pointer; +} + +/* All the same stuff for IE */ +input[type='range']::-ms-thumb { + position: relative; + z-index: 1; + border: 1px solid #66aae5; + width: 30px; + height: 30px; + border-radius: 50%; + background: #ffffff; + cursor: pointer; +} + +/* Track */ +input[type='range']::-webkit-slider-runnable-track { + width: 100%; + height: 12px; + cursor: pointer; + background: #2db9e5; + border-radius: 1.3px; +} + +input[type='range']:focus::-webkit-slider-runnable-track { + background: #2db9e5; +} + +input[type='range']::-moz-range-track { + width: 100%; + height: 12px; + cursor: pointer; + background: #2db9e5; + border-radius: 1.3px; +} + +input[type='range']::-ms-track { + width: 100%; + height: 12px; + cursor: pointer; + background: #2db9e5; + border-radius: 1.3px; + border-color: transparent; + border-width: 16px 0; + color: transparent; +} +input[type='range']::-ms-fill-lower { + background: #2db9e5; + border-radius: 2.6px; +} +input[type='range']:focus::-ms-fill-lower { + background: #2db9e5; +} +input[type='range']::-ms-fill-upper { + background: #2db9e5; + border-radius: 2.6px; +} +input[type='range']:focus::-ms-fill-upper { + background: #2db9e5; +} diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx new file mode 100644 index 000000000..5cffecc00 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx @@ -0,0 +1,206 @@ +import React from 'react'; +import { Formik, Form, Field } from 'formik'; +import { Button, ComboBox, Heading, Input, Typography } from '@mycrypto/ui'; + +import { Transaction } from '../SendAssets'; +import './SendAssetsForm.scss'; + +// Legacy +import sendIcon from 'common/assets/images/icn-send.svg'; + +interface Props { + transaction: Transaction; + onNext(): void; + onSubmit(values: Transaction): void; +} + +export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) { + return ( + { + onSubmit(values); + onNext(); + }} + render={({ handleSubmit, setFieldValue, values: { advancedMode } }) => { + const toggleAdvancedOptions = () => setFieldValue('advancedMode', !advancedMode); + + return ( +
+ {/* Sender Address */} +
+ + ( + + )} + /> +
+ {/* Recipient Address */} +
+ + ( + form.setFieldValue(field.name, value)} + placeholder="Enter an Address or Contact" + className="SendAssetsForm-fieldset-input" + /> + )} + /> +
+ {/* Amount / Asset */} +
+
+ + ( + form.setFieldValue(field.name, value)} + placeholder="0.00" + className="SendAssetsForm-fieldset-input" + /> + )} + /> +
+
+ + ( + + )} + /> +
+
+ {/* You'll Send */} +
+ +
+ + Send 13.233333 ETH + + ≈ $1440.00 USD +
+ + Conversion Rate
+ 1 ETH ≈ $109.41 USD +
+
+
+
+ {/* Transaction Fee */} +
+ +
+
+ +
+
+
+
Cheap
+
Fast
+
+
+ {/* Advanced Options */} +
+ + {advancedMode && ( +
+
+ + +
+
+
+ + ( + + form.setFieldValue(field.name, value) + } + placeholder="0" + className="SendAssetsForm-fieldset-input" + /> + )} + /> +
+
+ + ( + + form.setFieldValue(field.name, value) + } + placeholder="150000000" + className="SendAssetsForm-fieldset-input" + /> + )} + /> +
+
+ + ( + + form.setFieldValue(field.name, value) + } + placeholder="0" + className="SendAssetsForm-fieldset-input" + /> + )} + /> +
+
+
+ 0 + 13000000000 * 1500000 + 20000000000 * (180000 + 53000) = 0.02416 ETH ~= + $2.67 USD +
+
+ )} +
+ +
+ ); + }} + /> + ); +} diff --git a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx new file mode 100644 index 000000000..2369d4216 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function TransactionComplete() { + return

Transaction Complete

; +} diff --git a/common/v2/features/Dashboard/SendAssets/components/index.ts b/common/v2/features/Dashboard/SendAssets/components/index.ts new file mode 100644 index 000000000..d1913f753 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/index.ts @@ -0,0 +1,3 @@ +export { default as ConfirmTransaction } from './ConfirmTransaction'; +export { default as SendAssetsForm } from './SendAssetsForm'; +export { default as TransactionComplete } from './TransactionComplete'; diff --git a/common/v2/features/Dashboard/SendAssets/constants.js b/common/v2/features/Dashboard/SendAssets/constants.js new file mode 100644 index 000000000..087eed523 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/constants.js @@ -0,0 +1,5 @@ +import { ConfirmTransaction, SendAssetsForm, TransactionComplete } from './components'; + +export const steps = [SendAssetsForm, ConfirmTransaction, TransactionComplete]; + +export const headings = ['Send Assets', 'Confirm Transaction', 'Transaction Complete']; From 10cb0493f3d022f6697fe56032491800c6cb4fc8 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Mon, 28 Jan 2019 20:44:35 -0600 Subject: [PATCH 0034/1466] Add data field --- .../features/Dashboard/SendAssets/SendAssets.tsx | 4 +++- .../SendAssets/components/SendAssetsForm.tsx | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx index 06d6714f6..055045e40 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -17,6 +17,7 @@ export interface Transaction { gasPrice: string; gasLimit: string; nonce: string; + data: string; } interface State { @@ -37,7 +38,8 @@ export class SendAssets extends Component> { automaticallyCalculateGasLimit: true, gasPrice: '', gasLimit: '', - nonce: '' + nonce: '', + data: '' } }; diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx index 5cffecc00..a762081ac 100644 --- a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx @@ -188,6 +188,22 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) />
+
+ + ( + + form.setFieldValue(field.name, value) + } + placeholder="0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520" + className="SendAssetsForm-fieldset-input" + /> + )} + /> +
0 + 13000000000 * 1500000 + 20000000000 * (180000 + 53000) = 0.02416 ETH ~= $2.67 USD From 3a16d2da076792cba63df7166a4f3a330a433f9a Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Tue, 29 Jan 2019 16:40:39 -0600 Subject: [PATCH 0035/1466] Make ConfirmTransaction screen --- common/assets/images/icn-fee.svg | 27 ++++ .../Dashboard => }/components/Amount.scss | 3 +- .../Dashboard => }/components/Amount.tsx | 0 common/v2/components/ContentPanel.scss | 6 + common/v2/components/ContentPanel.tsx | 5 +- common/v2/components/index.ts | 1 + .../Dashboard/SendAssets/SendAssets.tsx | 7 +- .../components/ConfirmTransaction.scss | 64 +++++++++ .../components/ConfirmTransaction.tsx | 128 +++++++++++++++++- .../components/RecentTransactionList.tsx | 2 +- .../v2/features/Dashboard/components/index.ts | 1 - 11 files changed, 233 insertions(+), 11 deletions(-) create mode 100644 common/assets/images/icn-fee.svg rename common/v2/{features/Dashboard => }/components/Amount.scss (89%) rename common/v2/{features/Dashboard => }/components/Amount.tsx (100%) create mode 100644 common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.scss diff --git a/common/assets/images/icn-fee.svg b/common/assets/images/icn-fee.svg new file mode 100644 index 000000000..3f78a7306 --- /dev/null +++ b/common/assets/images/icn-fee.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/v2/features/Dashboard/components/Amount.scss b/common/v2/components/Amount.scss similarity index 89% rename from common/v2/features/Dashboard/components/Amount.scss rename to common/v2/components/Amount.scss index 10b533c39..0fd9d724d 100644 --- a/common/v2/features/Dashboard/components/Amount.scss +++ b/common/v2/components/Amount.scss @@ -9,8 +9,9 @@ &-asset { margin: 0; margin-right: 11px; + color: #282d32; font-size: 20px; - color: #424242; + font-weight: bold; @media (min-width: 1000px) { margin-right: 0; diff --git a/common/v2/features/Dashboard/components/Amount.tsx b/common/v2/components/Amount.tsx similarity index 100% rename from common/v2/features/Dashboard/components/Amount.tsx rename to common/v2/components/Amount.tsx diff --git a/common/v2/components/ContentPanel.scss b/common/v2/components/ContentPanel.scss index a5cac6f18..2f97a0c5b 100644 --- a/common/v2/components/ContentPanel.scss +++ b/common/v2/components/ContentPanel.scss @@ -16,4 +16,10 @@ } } } + &-heading { + margin-bottom: 20px; + color: #303030; + font-size: 25px; + font-weight: bold; + } } diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index 4d1da1530..67b02540a 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Button, Panel } from '@mycrypto/ui'; +import { Button, Heading, Panel } from '@mycrypto/ui'; import Stepper from './Stepper'; import './ContentPanel.scss'; @@ -10,6 +10,7 @@ import backArrowIcon from 'common/assets/images/icn-back-arrow.svg'; interface Props { children: any; className: string; + heading: string; stepper?: { current: number; total: number; @@ -18,6 +19,7 @@ interface Props { } export default function ContentPanel({ + heading, onBack, children, className = '', @@ -37,6 +39,7 @@ export default function ContentPanel({
)} + {heading} {children}
diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index 86e2306c4..8ca2517fa 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -1,3 +1,4 @@ +export { default as Amount } from './Amount'; export { default as ContentPanel } from './ContentPanel'; export { default as Layout } from './Layout'; export { default as Stepper } from './Stepper'; diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx index 055045e40..156220ca6 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -1,6 +1,5 @@ import React, { Component } from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { Heading } from '@mycrypto/ui'; import { ContentPanel, Layout } from 'v2/components'; import { headings, steps } from './constants'; @@ -29,8 +28,8 @@ export class SendAssets extends Component> { public state: State = { step: 0, transaction: { - senderAddress: '', - recipientAddress: '', + senderAddress: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + recipientAddress: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', amount: '0.00', asset: 'ETH', transactionFee: '', @@ -54,12 +53,12 @@ export class SendAssets extends Component> { - {headings[step]} Confirm Transaction

; +import { Amount } from 'v2/components'; +import { Transaction } from '../SendAssets'; +import './ConfirmTransaction.scss'; + +// Legacy +import sendIcon from 'common/assets/images/icn-send.svg'; +import feeIcon from 'common/assets/images/icn-fee.svg'; + +interface Props { + transaction: Transaction; + onNext(): void; +} + +interface State { + showingDetails: boolean; +} + +const truncate = (children: string) => { + return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); +}; + +export default class ConfirmTransaction extends Component { + public state: State = { + showingDetails: false + }; + + public render() { + const { transaction: { senderAddress, recipientAddress }, onNext } = this.props; + const { showingDetails } = this.state; + + return ( +
+
+
+ To: +
+
+
+
+
+ From: +
+
+
+
+
+
+
+ Send Send Amount: +
+
+ +
+
+
+
+ Fee Transaction Fee: +
+
+ +
+
+
+
+
+ Total You'll Send: +
+
+ +
+
+ + {showingDetails && ( +
+
+
Account Balance:
+
0.231935129 ETH
+
+
+
Network:
+
+ Ethereum +
+
+
+
Gas Limit:
+
21000
+
+
+
Gas Price:
+
10 GWEI (0.00000001 ETH)
+
+
+
Max TX Fee:
+
0.00021 ETH (21000 GWEI)
+
+
+
Nonce:
+
57
+
+
+
Data:
+
(none)
+
+
+ )} + +
+ ); + } + + private toggleShowingDetails = () => + this.setState((prevState: State) => ({ + showingDetails: !prevState.showingDetails + })); } diff --git a/common/v2/features/Dashboard/components/RecentTransactionList.tsx b/common/v2/features/Dashboard/components/RecentTransactionList.tsx index 81a887367..6b99d2b61 100644 --- a/common/v2/features/Dashboard/components/RecentTransactionList.tsx +++ b/common/v2/features/Dashboard/components/RecentTransactionList.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { Address, CollapsibleTable } from '@mycrypto/ui'; -import Amount from './Amount'; +import { Amount } from 'v2/components'; import DashboardPanel from './DashboardPanel'; import TransactionLabel from './TransactionLabel'; import './RecentTransactionList.scss'; diff --git a/common/v2/features/Dashboard/components/index.ts b/common/v2/features/Dashboard/components/index.ts index b79a6fa4c..aaf95b0cc 100644 --- a/common/v2/features/Dashboard/components/index.ts +++ b/common/v2/features/Dashboard/components/index.ts @@ -1,7 +1,6 @@ export { default as AccountDropdown } from './AccountDropdown'; export { default as AccountList } from './AccountList'; export { default as ActionTile } from './ActionTile'; -export { default as Amount } from './Amount'; export { default as DashboardPanel } from './DashboardPanel'; export { default as RecentTransactionList } from './RecentTransactionList'; export { default as TokenList } from './TokenList'; From 5751200f598449d2faadbb25cf79415867eb74bf Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Tue, 29 Jan 2019 16:58:29 -0600 Subject: [PATCH 0036/1466] Add TransactionComplete --- common/assets/images/icn-sent.svg | 23 ++++++ .../components/TransactionComplete.scss | 74 +++++++++++++++++++ .../components/TransactionComplete.tsx | 74 ++++++++++++++++++- 3 files changed, 168 insertions(+), 3 deletions(-) create mode 100644 common/assets/images/icn-sent.svg create mode 100644 common/v2/features/Dashboard/SendAssets/components/TransactionComplete.scss diff --git a/common/assets/images/icn-sent.svg b/common/assets/images/icn-sent.svg new file mode 100644 index 000000000..d28f83d2a --- /dev/null +++ b/common/assets/images/icn-sent.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.scss b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.scss new file mode 100644 index 000000000..a568d0b4e --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.scss @@ -0,0 +1,74 @@ +.TransactionComplete { + &-row { + display: flex; + flex-direction: column; + + @media (min-width: 550px) { + flex-direction: row; + align-items: center; + margin-bottom: 24px; + } + &-column { + flex: 1; + margin-right: 13px; + margin-bottom: 24px; + + @media (min-width: 550px) { + margin-bottom: 0; + } + img { + width: 30px; + height: 30px; + margin-right: 10px; + } + } + } + &-addressWrapper { + margin-top: 10px; + padding: 12px; + background: #f8f8f8; + } + &-divider { + height: 1px; + margin-bottom: 20px; + background: #e3edff; + } + &-details { + margin-bottom: 25px; + + &-row { + display: flex; + flex-direction: column; + margin-bottom: 10px; + + @media (min-width: 500px) { + flex-direction: row; + align-items: center; + } + &-column { + &:first-child { + font-weight: bold; + + @media (min-width: 500px) { + flex: 1; + } + } + &:nth-child(2) { + @media (min-width: 500px) { + flex: 2; + text-align: right; + } + } + } + } + } + &-back { + width: 100%; + margin-top: 20px; + margin-bottom: 15px; + } + &-another { + width: 100%; + margin-bottom: 25px; + } +} diff --git a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx index 2369d4216..dd7d883f1 100644 --- a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx @@ -1,5 +1,73 @@ -import React from 'react'; +import React, { Component } from 'react'; +import { Address, Button, Copyable, Network } from '@mycrypto/ui'; -export default function TransactionComplete() { - return

Transaction Complete

; +import { Amount } from 'v2/components'; +import { Transaction } from '../SendAssets'; +import './TransactionComplete.scss'; + +// Legacy +import sentIcon from 'common/assets/images/icn-sent.svg'; + +interface Props { + transaction: Transaction; + onNext(): void; +} + +const truncate = (children: string) => { + return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); +}; + +export default function TransactionComplete({ + transaction: { recipientAddress, senderAddress } +}: Props) { + return ( +
+
+
+ To: +
+
+
+
+
+ From: +
+
+
+
+
+
+
+ Sent You Sent: +
+
+ +
+
+
+
+
+
Transaction ID:
+
+ +
+
+
+
Receipt Status:
+
Success
+
+
+
Timestamp:
+
+ 1 minute ago
+ (Dec-30-2018 03:17:10 AM +UTC) +
+
+
+ + +
+ ); } From 5be341467918b0546d9134ba67739f128ac2e60d Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Tue, 29 Jan 2019 17:12:07 -0600 Subject: [PATCH 0037/1466] Wire up TransactionComplete actions --- common/v2/components/ContentPanel.scss | 3 ++ common/v2/components/ContentPanel.tsx | 9 +++- .../Dashboard/SendAssets/SendAssets.tsx | 41 +++++++++++-------- .../components/TransactionComplete.tsx | 16 +++++--- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/common/v2/components/ContentPanel.scss b/common/v2/components/ContentPanel.scss index 2f97a0c5b..5d2a6ec3f 100644 --- a/common/v2/components/ContentPanel.scss +++ b/common/v2/components/ContentPanel.scss @@ -7,6 +7,9 @@ justify-content: space-between; margin-bottom: 10px; + &.ContentPanel-stepperOnly { + justify-content: flex-end; + } &-back { color: #007a99; font-weight: bold; diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index 67b02540a..54c253316 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import classnames from 'classnames'; import { Button, Heading, Panel } from '@mycrypto/ui'; import Stepper from './Stepper'; @@ -15,7 +16,7 @@ interface Props { current: number; total: number; }; - onBack?(): void; + onBack(): void; } export default function ContentPanel({ @@ -26,10 +27,14 @@ export default function ContentPanel({ stepper, ...rest }: Props) { + const topClassName = classnames('ContentPanel-top', { + 'ContentPanel-stepperOnly': stepper && !onBack + }); + return (
{(onBack || stepper) && ( -
+
{onBack && (
- - + +
From 4413936b7485168b5575e901322a435269ca31ff Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Tue, 29 Jan 2019 18:03:43 -0600 Subject: [PATCH 0038/1466] Minor stylistic changes --- common/v2/components/ContentPanel.scss | 17 ++- common/v2/components/ContentPanel.tsx | 7 +- common/v2/components/Layout.scss | 8 +- .../RequestAssets/RequestAssets.scss | 38 +++++++ .../Dashboard/RequestAssets/RequestAssets.tsx | 104 ++++++++++++++++++ .../features/Dashboard/RequestAssets/index.ts | 1 + .../Dashboard/SendAssets/SendAssets.tsx | 4 + .../SendAssets/components/SendAssetsForm.tsx | 4 +- common/v2/features/Dashboard/routes.ts | 7 ++ 9 files changed, 183 insertions(+), 7 deletions(-) create mode 100644 common/v2/features/Dashboard/RequestAssets/RequestAssets.scss create mode 100644 common/v2/features/Dashboard/RequestAssets/RequestAssets.tsx create mode 100644 common/v2/features/Dashboard/RequestAssets/index.ts diff --git a/common/v2/components/ContentPanel.scss b/common/v2/components/ContentPanel.scss index 5d2a6ec3f..8650fa296 100644 --- a/common/v2/components/ContentPanel.scss +++ b/common/v2/components/ContentPanel.scss @@ -1,12 +1,17 @@ .ContentPanel { - max-width: 560px; - + @media (min-width: 700px) { + max-width: 560px; + } &-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; + padding: 0 30px; + @media (min-width: 700px) { + padding: 0; + } &.ContentPanel-stepperOnly { justify-content: flex-end; } @@ -20,9 +25,17 @@ } } &-heading { + display: flex; + align-items: center; + justify-content: space-between; margin-bottom: 20px; color: #303030; font-size: 25px; font-weight: bold; + + &-icon { + width: 45px; + height: 45px; + } } } diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index 54c253316..cb6e95c7b 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -12,6 +12,7 @@ interface Props { children: any; className: string; heading: string; + icon?: string; stepper?: { current: number; total: number; @@ -21,6 +22,7 @@ interface Props { export default function ContentPanel({ heading, + icon, onBack, children, className = '', @@ -44,7 +46,10 @@ export default function ContentPanel({
)} - {heading} + + {heading} + {icon && Icon} + {children}
diff --git a/common/v2/components/Layout.scss b/common/v2/components/Layout.scss index 801a31215..cb6dd53b5 100644 --- a/common/v2/components/Layout.scss +++ b/common/v2/components/Layout.scss @@ -1,11 +1,12 @@ .Layout { + min-width: 350px; background: #f6f8fa; &-content { - padding: 100px 30px 50px 30px; + padding: 100px 0 50px 0; @media (min-width: 700px) { - padding: 50px 80px; + padding: 150px 80px 50px 80px; &.centered { display: flex; @@ -13,6 +14,9 @@ justify-content: center; } } + @media (min-width: 1000px) { + padding: 50px 80px; + } &.fluid { padding-left: 0; padding-right: 0; diff --git a/common/v2/features/Dashboard/RequestAssets/RequestAssets.scss b/common/v2/features/Dashboard/RequestAssets/RequestAssets.scss new file mode 100644 index 000000000..2ec58e9bd --- /dev/null +++ b/common/v2/features/Dashboard/RequestAssets/RequestAssets.scss @@ -0,0 +1,38 @@ +.RequestAssets { + label { + margin-bottom: 8px; + color: #333333; + font-weight: normal; + } + &-panel { + &-fieldset { + margin-bottom: 15px; + + &-input { + width: 100%; + } + &-box { + padding: 12px 0; + background: #f6f8fa; + text-align: center; + } + } + &-amountAsset { + display: flex; + align-items: center; + + &-amount { + flex: 2; + margin-right: 15px; + } + &-asset { + flex: 1; + } + } + &-divider { + height: 1px; + margin: 30px 0; + background: #e3edff; + } + } +} diff --git a/common/v2/features/Dashboard/RequestAssets/RequestAssets.tsx b/common/v2/features/Dashboard/RequestAssets/RequestAssets.tsx new file mode 100644 index 000000000..d783cb4e4 --- /dev/null +++ b/common/v2/features/Dashboard/RequestAssets/RequestAssets.tsx @@ -0,0 +1,104 @@ +import React from 'react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { Formik, Form, Field } from 'formik'; +import { ComboBox, Copyable, Input } from '@mycrypto/ui'; + +import { ContentPanel, Layout } from 'v2/components'; +import './RequestAssets.scss'; + +// Legacy +import receiveIcon from 'common/assets/images/icn-receive.svg'; + +const truncate = (children: string) => { + return [children.substring(0, 15), '…', children.substring(children.length - 10)].join(''); +}; + +export function RequestAssets({ history }: RouteComponentProps<{}>) { + return ( + + + {}} + render={({ values: { amount } }) => ( +
+
+ + ( + + )} + /> +
+
+
+ + ( + form.setFieldValue(field.name, value)} + placeholder="0.00" + className="SendAssetsForm-fieldset-input" + /> + )} + /> +
+
+ + ( + + )} + /> +
+
+ {parseFloat(amount) > 0 && ( + <> +
+
+ +
+ +
+
+
+ +
(QR code goes here)
+
+ + )} + + )} + /> + + + ); +} + +export default withRouter(RequestAssets); diff --git a/common/v2/features/Dashboard/RequestAssets/index.ts b/common/v2/features/Dashboard/RequestAssets/index.ts new file mode 100644 index 000000000..57224a207 --- /dev/null +++ b/common/v2/features/Dashboard/RequestAssets/index.ts @@ -0,0 +1 @@ +export { default as RequestAssets } from './RequestAssets'; diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx index 7a6d48c98..e2acae575 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -5,6 +5,9 @@ import { ContentPanel, Layout } from 'v2/components'; import { headings, steps } from './constants'; import './SendAssets.scss'; +// Legacy +import sendIcon from 'common/assets/images/icn-send.svg'; + export interface Transaction { senderAddress: string; recipientAddress: string; @@ -58,6 +61,7 @@ export class SendAssets extends Component> { onBack={onBack} className="SendAssets-panel" heading={headings[step]} + icon={sendIcon} stepper={{ current: step + 1, total: steps.length diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx index a762081ac..032f723c2 100644 --- a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx @@ -22,11 +22,11 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) onSubmit(values); onNext(); }} - render={({ handleSubmit, setFieldValue, values: { advancedMode } }) => { + render={({ setFieldValue, values: { advancedMode } }) => { const toggleAdvancedOptions = () => setFieldValue('advancedMode', !advancedMode); return ( -
+ {/* Sender Address */}
diff --git a/common/v2/features/Dashboard/routes.ts b/common/v2/features/Dashboard/routes.ts index 9948bc63e..25d63245a 100644 --- a/common/v2/features/Dashboard/routes.ts +++ b/common/v2/features/Dashboard/routes.ts @@ -1,4 +1,5 @@ import Dashboard from './Dashboard'; +import { RequestAssets } from './RequestAssets'; import { SendAssets } from './SendAssets'; export default [ @@ -8,6 +9,12 @@ export default [ exact: true, component: Dashboard }, + { + name: 'Request Assets', + path: '/dashboard/request', + exact: true, + component: RequestAssets + }, { name: 'Send Assets', path: '/dashboard/send', From 5a313ef76ede494466b50230a9931df2bea4831b Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Tue, 29 Jan 2019 18:19:17 -0600 Subject: [PATCH 0039/1466] Remove SteppedPanel --- common/v2/components/ContentPanel.scss | 6 ++- common/v2/components/ContentPanel.tsx | 9 ++-- .../components/ConfirmPhrasePanel.tsx | 16 ++++--- .../components/GeneratePhrasePanel.tsx | 14 +++--- .../components/SelectMethodPanel.tsx | 14 +++--- .../components/SelectNetworkPanel.tsx | 14 +++--- .../CreateWallet/components/SteppedPanel.scss | 10 ----- .../CreateWallet/components/SteppedPanel.tsx | 43 ------------------- 8 files changed, 44 insertions(+), 82 deletions(-) delete mode 100644 common/v2/features/CreateWallet/components/SteppedPanel.scss delete mode 100644 common/v2/features/CreateWallet/components/SteppedPanel.tsx diff --git a/common/v2/components/ContentPanel.scss b/common/v2/components/ContentPanel.scss index 8650fa296..345a08c21 100644 --- a/common/v2/components/ContentPanel.scss +++ b/common/v2/components/ContentPanel.scss @@ -28,7 +28,7 @@ display: flex; align-items: center; justify-content: space-between; - margin-bottom: 20px; + margin-bottom: 15px; color: #303030; font-size: 25px; font-weight: bold; @@ -38,4 +38,8 @@ height: 45px; } } + &-description { + margin: 0; + margin-bottom: 15px; + } } diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index cb6e95c7b..6674153c4 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -1,6 +1,6 @@ import React from 'react'; import classnames from 'classnames'; -import { Button, Heading, Panel } from '@mycrypto/ui'; +import { Button, Heading, Panel, Typography } from '@mycrypto/ui'; import Stepper from './Stepper'; import './ContentPanel.scss'; @@ -13,6 +13,7 @@ interface Props { className: string; heading: string; icon?: string; + description?: string; stepper?: { current: number; total: number; @@ -21,12 +22,13 @@ interface Props { } export default function ContentPanel({ + onBack, + stepper, heading, icon, - onBack, + description, children, className = '', - stepper, ...rest }: Props) { const topClassName = classnames('ContentPanel-top', { @@ -50,6 +52,7 @@ export default function ContentPanel({ {heading} {icon && Icon} + {description && {description}} {children}
diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx index 60568f408..0b66f54a5 100644 --- a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx @@ -2,10 +2,10 @@ import React, { Component } from 'react'; import classnames from 'classnames'; import chunk from 'lodash/chunk'; import shuffle from 'lodash/shuffle'; -import { Button } from '@mycrypto/ui'; +import { Button, Typography } from '@mycrypto/ui'; +import { ContentPanel } from 'v2/components'; import { PanelProps } from '../CreateWallet'; -import SteppedPanel from './SteppedPanel'; import './ConfirmPhrasePanel.scss'; interface Props { @@ -31,12 +31,14 @@ export default class ConfirmPhrasePanel extends Component { const { confirmedWords, shuffledWords, wrongWord } = this.state; return ( -
@@ -75,7 +77,7 @@ export default class ConfirmPhrasePanel extends Component { > Confirm Phrase - + ); } diff --git a/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx index 06779e52a..4d362677a 100644 --- a/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx +++ b/common/v2/features/CreateWallet/components/GeneratePhrasePanel.tsx @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import { Button, Typography } from '@mycrypto/ui'; +import { ContentPanel } from 'v2/components'; import { PanelProps } from '../CreateWallet'; -import SteppedPanel from './SteppedPanel'; import './GeneratePhrasePanel.scss'; // Legacy @@ -24,12 +24,14 @@ export default class GeneratePhrasePanel extends Component { const { words, generateWords, onBack, onNext } = this.props; return ( - {words.join(' ')} @@ -45,7 +47,7 @@ export default class GeneratePhrasePanel extends Component { Reload Regenerate Phrase
-
+
); } } diff --git a/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx b/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx index 410bac0a4..4ed06b6cc 100644 --- a/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectMethodPanel.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { Button, Typography } from '@mycrypto/ui'; +import { ContentPanel } from 'v2/components'; import { PanelProps } from '../CreateWallet'; -import SteppedPanel from './SteppedPanel'; import './SelectMethodPanel.scss'; // Legacy @@ -10,12 +10,14 @@ import newWalletIcon from 'common/assets/images/icn-new-wallet.svg'; export default function SelectMethodPanel({ onBack, onNext }: PanelProps) { return ( -
@@ -30,6 +32,6 @@ export default function SelectMethodPanel({ onBack, onNext }: PanelProps) { Already have a wallet? Unlock it now.
-
+
); } diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx index 51a4971d6..c78e160c8 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -1,18 +1,20 @@ import React from 'react'; import { Button, ComboBox } from '@mycrypto/ui'; +import { ContentPanel } from 'v2/components'; import { PanelProps } from '../CreateWallet'; -import SteppedPanel from './SteppedPanel'; import './SelectNetworkPanel.scss'; export default function SelectNetworkPanel({ onBack, onNext }: PanelProps) { return ( - @@ -22,6 +24,6 @@ export default function SelectNetworkPanel({ onBack, onNext }: PanelProps) { - + ); } diff --git a/common/v2/features/CreateWallet/components/SteppedPanel.scss b/common/v2/features/CreateWallet/components/SteppedPanel.scss deleted file mode 100644 index 9896c2eb5..000000000 --- a/common/v2/features/CreateWallet/components/SteppedPanel.scss +++ /dev/null @@ -1,10 +0,0 @@ -.SteppedPanel { - width: 100%; - padding: 42px 71px 50px 71px; - - &-heading { - margin-top: 0; - font-size: 32px; - font-weight: bold; - } -} diff --git a/common/v2/features/CreateWallet/components/SteppedPanel.tsx b/common/v2/features/CreateWallet/components/SteppedPanel.tsx deleted file mode 100644 index 24960a752..000000000 --- a/common/v2/features/CreateWallet/components/SteppedPanel.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react'; -import classnames from 'classnames'; -import { Heading, Typography } from '@mycrypto/ui'; - -import { ContentPanel } from 'v2/components'; -import './SteppedPanel.scss'; - -interface Props { - children: any; - currentStep: number; - description: string; - heading: string; - totalSteps: number; - className?: string; - onBack(): void; -} - -export default function SteppedPanel({ - heading, - description, - currentStep, - totalSteps, - onBack, - className = '', - children -}: Props) { - const steppedPanelClassName = classnames('SteppedPanel', className); - - return ( - - {heading} - {description} - {children} - - ); -} From b69dddd263a65f684dbb9d5e4fbe351b32cf0aa3 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Tue, 29 Jan 2019 18:34:47 -0600 Subject: [PATCH 0040/1466] Fix small bug with AccountDropdown --- common/v2/features/Dashboard/components/AccountDropdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/features/Dashboard/components/AccountDropdown.tsx b/common/v2/features/Dashboard/components/AccountDropdown.tsx index 9c61b18b9..711355952 100644 --- a/common/v2/features/Dashboard/components/AccountDropdown.tsx +++ b/common/v2/features/Dashboard/components/AccountDropdown.tsx @@ -24,7 +24,7 @@ export class AccountDropdown extends Component { open: false }; - public handleClickOutside = () => this.toggleOpen(); + public handleClickOutside = () => this.state.open && this.toggleOpen(); public render() { const { accounts, visibleCount, allVisible, onSelectAll, onSelect } = this.props; From 81d551b34c547dace8ed7cef37d6bd7791356add Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Thu, 31 Jan 2019 17:02:42 -0600 Subject: [PATCH 0041/1466] Initial rendition of Drawer --- common/assets/images/icn-close.svg | 5 ++ common/v2/components/Layout.tsx | 23 ++++---- common/v2/features/Drawer/Drawer.scss | 54 +++++++++++++++++++ common/v2/features/Drawer/Drawer.tsx | 48 +++++++++++++++++ .../Drawer/components/DrawerAction.scss | 24 +++++++++ .../Drawer/components/DrawerAction.tsx | 19 +++++++ common/v2/features/Drawer/components/index.ts | 1 + common/v2/features/Drawer/index.ts | 1 + common/v2/features/index.ts | 1 + common/v2/providers/DrawerProvider.tsx | 53 ++++++++++++++++++ common/v2/providers/index.ts | 1 + 11 files changed, 220 insertions(+), 10 deletions(-) create mode 100644 common/assets/images/icn-close.svg create mode 100644 common/v2/features/Drawer/Drawer.scss create mode 100644 common/v2/features/Drawer/Drawer.tsx create mode 100644 common/v2/features/Drawer/components/DrawerAction.scss create mode 100644 common/v2/features/Drawer/components/DrawerAction.tsx create mode 100644 common/v2/features/Drawer/components/index.ts create mode 100644 common/v2/features/Drawer/index.ts create mode 100644 common/v2/providers/DrawerProvider.tsx create mode 100644 common/v2/providers/index.ts diff --git a/common/assets/images/icn-close.svg b/common/assets/images/icn-close.svg new file mode 100644 index 000000000..81b3d850a --- /dev/null +++ b/common/assets/images/icn-close.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/common/v2/components/Layout.tsx b/common/v2/components/Layout.tsx index 8594408e7..1ab6f0df1 100644 --- a/common/v2/components/Layout.tsx +++ b/common/v2/components/Layout.tsx @@ -1,6 +1,7 @@ import React from 'react'; import classnames from 'classnames'; +import { DrawerProvider } from 'v2/providers'; import './Layout.scss'; // Legacy @@ -23,15 +24,17 @@ export default function Layout({ centered, fluid, className = '', children }: Pr }); return ( -
- ( - - )} - /> -
{children}
- -
+ +
+ ( + + )} + /> +
{children}
+ +
+
); } diff --git a/common/v2/features/Drawer/Drawer.scss b/common/v2/features/Drawer/Drawer.scss new file mode 100644 index 000000000..7adbe6b26 --- /dev/null +++ b/common/v2/features/Drawer/Drawer.scss @@ -0,0 +1,54 @@ +.DrawerOverlay { + position: fixed; + top: 0; + right: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.15); +} + +.Drawer { + position: fixed; + top: 0; + right: 0; + z-index: 2; + display: flex; + flex-direction: column; + + width: 379px; + height: 100vh; + min-height: 480px; + background: #ffffff; + + &-top { + display: flex; + align-items: center; + justify-content: space-between; + margin: 26px 0; + padding: 0 21px; + + &-heading { + margin: 0; + text-transform: uppercase; + font-size: 18px; + font-weight: bold; + color: #424242; + } + } + &-content { + flex: 1; + display: flex; + flex-direction: column; + + &-inside { + flex: 2; + padding: 0 21px; + } + &-actions { + flex: 1; + display: flex; + flex-direction: column; + justify-content: flex-end; + } + } +} diff --git a/common/v2/features/Drawer/Drawer.tsx b/common/v2/features/Drawer/Drawer.tsx new file mode 100644 index 000000000..d38377169 --- /dev/null +++ b/common/v2/features/Drawer/Drawer.tsx @@ -0,0 +1,48 @@ +import React from 'react'; +import { Button, Heading } from '@mycrypto/ui'; + +import { DrawerAction } from './components'; +import './Drawer.scss'; + +// Legacy +import closeIcon from 'common/assets/images/icn-close.svg'; + +interface Action { + icon: string; + title: string; + onClick(): void; +} + +interface Props { + style: any; + title?: string; + content?: any; + actions?: Action[]; + onClose(): void; +} + +export default function Drawer({ style, title, content, actions, onClose }: Props) { + return ( + <> +
+
+
+ + {title} + +
+ +
+
+
+
{content}
+
+ {actions && actions.map(action => )} +
+
+
+ + ); +} diff --git a/common/v2/features/Drawer/components/DrawerAction.scss b/common/v2/features/Drawer/components/DrawerAction.scss new file mode 100644 index 000000000..ff5fb649e --- /dev/null +++ b/common/v2/features/Drawer/components/DrawerAction.scss @@ -0,0 +1,24 @@ +.DrawerAction { + display: flex; + align-items: center; + padding: 27px 24px; + + &:first-of-type { + border-top: 1px solid #d7dadc; + } + &:not(:last-of-type) { + border-bottom: 1px solid #d7dadc; + } + &-icon { + width: 34px; + height: 34px; + margin-right: 14px; + } + &-text { + margin: 0; + font-size: 18px; + font-weight: bold; + text-transform: uppercase; + color: #1d2732; + } +} diff --git a/common/v2/features/Drawer/components/DrawerAction.tsx b/common/v2/features/Drawer/components/DrawerAction.tsx new file mode 100644 index 000000000..1e5fac82c --- /dev/null +++ b/common/v2/features/Drawer/components/DrawerAction.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { Button, Typography } from '@mycrypto/ui'; + +import './DrawerAction.scss'; + +interface Props { + icon: string; + title: string; + onClick(): void; +} + +export default function DrawerAction({ icon, title, onClick }: Props) { + return ( + + ); +} diff --git a/common/v2/features/Drawer/components/index.ts b/common/v2/features/Drawer/components/index.ts new file mode 100644 index 000000000..cce2cf6ed --- /dev/null +++ b/common/v2/features/Drawer/components/index.ts @@ -0,0 +1 @@ +export { default as DrawerAction } from './DrawerAction'; diff --git a/common/v2/features/Drawer/index.ts b/common/v2/features/Drawer/index.ts new file mode 100644 index 000000000..26a0c394d --- /dev/null +++ b/common/v2/features/Drawer/index.ts @@ -0,0 +1 @@ +export { default as Drawer } from './Drawer'; diff --git a/common/v2/features/index.ts b/common/v2/features/index.ts index 842fd498d..2fc8e7e13 100644 --- a/common/v2/features/index.ts +++ b/common/v2/features/index.ts @@ -1,5 +1,6 @@ export * from './BuyAndExchange'; export * from './CreateWallet'; export * from './Dashboard'; +export * from './Drawer'; export * from './Home'; export * from './ImportWallet'; diff --git a/common/v2/providers/DrawerProvider.tsx b/common/v2/providers/DrawerProvider.tsx new file mode 100644 index 000000000..34715b6e7 --- /dev/null +++ b/common/v2/providers/DrawerProvider.tsx @@ -0,0 +1,53 @@ +import React, { Component } from 'react'; +import { Transition } from 'react-spring'; + +import { Drawer } from 'v2/features'; + +export interface Action { + icon: string; + title: string; + onClick(): void; +} + +export interface Screen { + title?: string; + content?: any; + actions?: Action[]; +} + +interface State { + visible: boolean; + screen: Screen | null; + toggleVisible(): void; + setScreen(screen: Screen): void; +} + +export const DrawerContext = React.createContext(); + +export default class DrawerProvider extends Component { + public state: State = { + visible: false, + screen: {}, + toggleVisible: () => + this.setState((prevState: State) => ({ + visible: !prevState.visible + })), + setScreen: (screen: Screen) => this.setState({ screen }) + }; + + public render() { + const { children } = this.props; + const { visible, screen, toggleVisible } = this.state; + + return ( + + {children} + + {visible && + ((style: any) => + screen && )} + + + ); + } +} diff --git a/common/v2/providers/index.ts b/common/v2/providers/index.ts new file mode 100644 index 000000000..e9b12f260 --- /dev/null +++ b/common/v2/providers/index.ts @@ -0,0 +1 @@ +export { DrawerContext, default as DrawerProvider } from './DrawerProvider'; From da36ac07f35c02cf45a1fc19ef82c3ef7dbbd85a Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Thu, 31 Jan 2019 17:15:54 -0600 Subject: [PATCH 0042/1466] Move out Overlay --- common/v2/components/Overlay.scss | 13 +++++++++ common/v2/components/Overlay.tsx | 11 ++++++++ common/v2/components/index.ts | 1 + common/v2/features/Drawer/Drawer.scss | 21 ++++++--------- common/v2/features/Drawer/Drawer.tsx | 37 ++++++++++++-------------- common/v2/providers/DrawerProvider.tsx | 7 ++--- 6 files changed, 54 insertions(+), 36 deletions(-) create mode 100644 common/v2/components/Overlay.scss create mode 100644 common/v2/components/Overlay.tsx diff --git a/common/v2/components/Overlay.scss b/common/v2/components/Overlay.scss new file mode 100644 index 000000000..b9c518209 --- /dev/null +++ b/common/v2/components/Overlay.scss @@ -0,0 +1,13 @@ +.Overlay { + position: fixed; + top: 81px; + right: 0; + z-index: 2; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.15); + + @media (min-width: 1000px) { + top: 123px; + } +} diff --git a/common/v2/components/Overlay.tsx b/common/v2/components/Overlay.tsx new file mode 100644 index 000000000..d2d4b00f1 --- /dev/null +++ b/common/v2/components/Overlay.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +import './Overlay.scss'; + +interface Props { + onClick(): void; +} + +export default function Overlay({ onClick }: Props) { + return
; +} diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index 8ca2517fa..de0f4c238 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -1,4 +1,5 @@ export { default as Amount } from './Amount'; export { default as ContentPanel } from './ContentPanel'; export { default as Layout } from './Layout'; +export { default as Overlay } from './Overlay'; export { default as Stepper } from './Stepper'; diff --git a/common/v2/features/Drawer/Drawer.scss b/common/v2/features/Drawer/Drawer.scss index 7adbe6b26..dcd2e3ec1 100644 --- a/common/v2/features/Drawer/Drawer.scss +++ b/common/v2/features/Drawer/Drawer.scss @@ -1,25 +1,20 @@ -.DrawerOverlay { - position: fixed; - top: 0; - right: 0; - width: 100vw; - height: 100vh; - background-color: rgba(0, 0, 0, 0.15); -} - .Drawer { position: fixed; - top: 0; + top: 81px; right: 0; - z-index: 2; + z-index: 3; display: flex; flex-direction: column; - - width: 379px; + width: 100vw; height: 100vh; min-height: 480px; background: #ffffff; + box-shadow: -2px 0 6px 0 rgba(0, 0, 0, 0.1); + @media (min-width: 1000px) { + top: 123px; + width: 379px; + } &-top { display: flex; align-items: center; diff --git a/common/v2/features/Drawer/Drawer.tsx b/common/v2/features/Drawer/Drawer.tsx index d38377169..da677aab9 100644 --- a/common/v2/features/Drawer/Drawer.tsx +++ b/common/v2/features/Drawer/Drawer.tsx @@ -23,26 +23,23 @@ interface Props { export default function Drawer({ style, title, content, actions, onClose }: Props) { return ( - <> -
-
-
- - {title} - -
- -
-
-
-
{content}
-
- {actions && actions.map(action => )} -
+
+
+ + {title} + +
+
-
- + +
+
{content}
+
+ {actions && actions.map(action => )} +
+
+
); } diff --git a/common/v2/providers/DrawerProvider.tsx b/common/v2/providers/DrawerProvider.tsx index 34715b6e7..0f998d2c4 100644 --- a/common/v2/providers/DrawerProvider.tsx +++ b/common/v2/providers/DrawerProvider.tsx @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import { Transition } from 'react-spring'; +import { Overlay } from 'v2/components'; import { Drawer } from 'v2/features'; export interface Action { @@ -26,7 +27,7 @@ export const DrawerContext = React.createContext(); export default class DrawerProvider extends Component { public state: State = { - visible: false, + visible: true, screen: {}, toggleVisible: () => this.setState((prevState: State) => ({ @@ -42,10 +43,10 @@ export default class DrawerProvider extends Component { return ( {children} + {visible && } {visible && - ((style: any) => - screen && )} + ((style: any) => )} ); From 380ddc1dddb09f0d38ce59853a88c3d8c6e0a93a Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Thu, 31 Jan 2019 17:27:11 -0600 Subject: [PATCH 0043/1466] Migrate out Header/Footer to v2 --- common/v2/components/index.ts | 1 - .../v2/features/CreateWallet/CreateWallet.tsx | 2 +- .../components/ConfirmPhrasePanel.tsx | 2 +- common/v2/features/Dashboard/Dashboard.tsx | 2 +- .../Dashboard/RequestAssets/RequestAssets.tsx | 3 +- .../Dashboard/SendAssets/SendAssets.tsx | 3 +- common/v2/features/Home/Home.tsx | 2 +- common/v2/features/Layout/Footer/Footer.scss | 98 ++++++++ common/v2/features/Layout/Footer/Footer.tsx | 66 ++++++ .../Footer/components/DonateAndSubscribe.scss | 200 ++++++++++++++++ .../Footer/components/DonateAndSubscribe.tsx | 86 +++++++ .../Layout/Footer/components/Linkset.scss | 76 ++++++ .../Layout/Footer/components/Linkset.tsx | 86 +++++++ .../Layout/Footer/components/LogoBox.scss | 72 ++++++ .../Layout/Footer/components/LogoBox.tsx | 29 +++ .../Footer/components/SocialsAndLegal.scss | 48 ++++ .../Footer/components/SocialsAndLegal.tsx | 64 +++++ .../Layout/Footer/components/Subscribe.tsx | 47 ++++ .../Layout/Footer/components/index.ts | 4 + common/v2/features/Layout/Footer/index.ts | 1 + common/v2/features/Layout/Header/Header.scss | 15 ++ common/v2/features/Layout/Header/Header.tsx | 21 ++ .../Header/components/DesktopHeader.scss | 133 +++++++++++ .../Header/components/DesktopHeader.tsx | 202 ++++++++++++++++ .../Header/components/MobileHeader.scss | 108 +++++++++ .../Layout/Header/components/MobileHeader.tsx | 222 ++++++++++++++++++ .../Layout/Header/components/index.ts | 2 + common/v2/features/Layout/Header/constants.ts | 59 +++++ common/v2/features/Layout/Header/helpers.ts | 13 + common/v2/features/Layout/Header/index.ts | 1 + .../Layout}/Layout.scss | 0 .../Layout}/Layout.tsx | 8 +- common/v2/features/Layout/index.ts | 1 + common/v2/features/index.ts | 1 + common/v2/providers/DrawerProvider.tsx | 2 +- 35 files changed, 1668 insertions(+), 12 deletions(-) create mode 100644 common/v2/features/Layout/Footer/Footer.scss create mode 100644 common/v2/features/Layout/Footer/Footer.tsx create mode 100644 common/v2/features/Layout/Footer/components/DonateAndSubscribe.scss create mode 100644 common/v2/features/Layout/Footer/components/DonateAndSubscribe.tsx create mode 100644 common/v2/features/Layout/Footer/components/Linkset.scss create mode 100644 common/v2/features/Layout/Footer/components/Linkset.tsx create mode 100644 common/v2/features/Layout/Footer/components/LogoBox.scss create mode 100644 common/v2/features/Layout/Footer/components/LogoBox.tsx create mode 100644 common/v2/features/Layout/Footer/components/SocialsAndLegal.scss create mode 100644 common/v2/features/Layout/Footer/components/SocialsAndLegal.tsx create mode 100644 common/v2/features/Layout/Footer/components/Subscribe.tsx create mode 100644 common/v2/features/Layout/Footer/components/index.ts create mode 100644 common/v2/features/Layout/Footer/index.ts create mode 100644 common/v2/features/Layout/Header/Header.scss create mode 100644 common/v2/features/Layout/Header/Header.tsx create mode 100644 common/v2/features/Layout/Header/components/DesktopHeader.scss create mode 100644 common/v2/features/Layout/Header/components/DesktopHeader.tsx create mode 100644 common/v2/features/Layout/Header/components/MobileHeader.scss create mode 100644 common/v2/features/Layout/Header/components/MobileHeader.tsx create mode 100644 common/v2/features/Layout/Header/components/index.ts create mode 100644 common/v2/features/Layout/Header/constants.ts create mode 100644 common/v2/features/Layout/Header/helpers.ts create mode 100644 common/v2/features/Layout/Header/index.ts rename common/v2/{components => features/Layout}/Layout.scss (100%) rename common/v2/{components => features/Layout}/Layout.tsx (78%) create mode 100644 common/v2/features/Layout/index.ts diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index de0f4c238..a0406709c 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -1,5 +1,4 @@ export { default as Amount } from './Amount'; export { default as ContentPanel } from './ContentPanel'; -export { default as Layout } from './Layout'; export { default as Overlay } from './Overlay'; export { default as Stepper } from './Stepper'; diff --git a/common/v2/features/CreateWallet/CreateWallet.tsx b/common/v2/features/CreateWallet/CreateWallet.tsx index 7b6dd5700..7d7d34bb1 100644 --- a/common/v2/features/CreateWallet/CreateWallet.tsx +++ b/common/v2/features/CreateWallet/CreateWallet.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { RouteComponentProps } from 'react-router-dom'; -import { Layout } from 'v2/components'; +import { Layout } from 'v2/features'; import { isDesktop } from 'v2/utils'; import { MnemonicProvider, MnemonicContext } from './components'; import { diff --git a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx index 0b66f54a5..7b038c47d 100644 --- a/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx +++ b/common/v2/features/CreateWallet/components/ConfirmPhrasePanel.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import classnames from 'classnames'; import chunk from 'lodash/chunk'; import shuffle from 'lodash/shuffle'; -import { Button, Typography } from '@mycrypto/ui'; +import { Button } from '@mycrypto/ui'; import { ContentPanel } from 'v2/components'; import { PanelProps } from '../CreateWallet'; diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index f9e71ce6b..36c491ee7 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Heading } from '@mycrypto/ui'; -import { Layout } from 'v2/components'; +import { Layout } from 'v2/features'; import { AccountList, ActionTile, diff --git a/common/v2/features/Dashboard/RequestAssets/RequestAssets.tsx b/common/v2/features/Dashboard/RequestAssets/RequestAssets.tsx index d783cb4e4..691f5aeeb 100644 --- a/common/v2/features/Dashboard/RequestAssets/RequestAssets.tsx +++ b/common/v2/features/Dashboard/RequestAssets/RequestAssets.tsx @@ -3,7 +3,8 @@ import { withRouter, RouteComponentProps } from 'react-router-dom'; import { Formik, Form, Field } from 'formik'; import { ComboBox, Copyable, Input } from '@mycrypto/ui'; -import { ContentPanel, Layout } from 'v2/components'; +import { ContentPanel } from 'v2/components'; +import { Layout } from 'v2/features'; import './RequestAssets.scss'; // Legacy diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx index e2acae575..9ee5c5a26 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -1,7 +1,8 @@ import React, { Component } from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { ContentPanel, Layout } from 'v2/components'; +import { ContentPanel } from 'v2/components'; +import { Layout } from 'v2/features'; import { headings, steps } from './constants'; import './SendAssets.scss'; diff --git a/common/v2/features/Home/Home.tsx b/common/v2/features/Home/Home.tsx index 5140ae3b7..7ef7d07fa 100644 --- a/common/v2/features/Home/Home.tsx +++ b/common/v2/features/Home/Home.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Layout } from 'v2/components'; +import { Layout } from 'v2/features'; import { GetStartedPanel } from './components'; import './Home.scss'; diff --git a/common/v2/features/Layout/Footer/Footer.scss b/common/v2/features/Layout/Footer/Footer.scss new file mode 100644 index 000000000..77dc7baca --- /dev/null +++ b/common/v2/features/Layout/Footer/Footer.scss @@ -0,0 +1,98 @@ +@mixin perfectly-centered { + display: flex; + align-items: center; + justify-content: center; +} + +$footer-background: #163150; +$footer-text-color: #fff; + +.mobile-only { + display: block; + + @media (min-width: 800px) { + display: none; + } +} + +.tablet-only { + display: none; + + @media (min-width: 800px) { + display: block; + } + @media (min-width: 1050px) { + display: none; + } +} + +.desktop-only { + display: none; + + @media (min-width: 1050px) { + display: block; + } +} + +.HorizontalRule { + @include perfectly-centered; + + margin: 30px 0; + + &-line { + width: 150px; + height: 2px; + background: #3f546c; + } + + @media (min-width: 800px) { + display: none; + } +} + +.VerticalRule { + display: none; + margin: 0 20px; + + &-line { + width: 2px; + height: 220px; + background: #3f546c; + } + + @media (min-width: 800px) { + display: block; + } + @media (min-width: 1050px) { + margin: 0 30px; + } +} + +.Footer-wrapper { + display: flex; + align-items: center; + justify-content: center; + background: $footer-background; + border-top: 1px solid #3e546d; +} + +.Footer { + display: flex; + flex-direction: column; + min-width: 320px; + padding: 41px 33px; + background: $footer-background; + + &-socials-legal { + @media (min-width: 800px) { + display: none; + } + } + + @media (min-width: 800px) { + flex-direction: row; + } + @media (min-width: 1050px) { + padding-bottom: 0; + } +} diff --git a/common/v2/features/Layout/Footer/Footer.tsx b/common/v2/features/Layout/Footer/Footer.tsx new file mode 100644 index 000000000..e65514b9e --- /dev/null +++ b/common/v2/features/Layout/Footer/Footer.tsx @@ -0,0 +1,66 @@ +import React from 'react'; + +import { DonateAndSubscribe, Linkset, LogoBox, SocialsAndLegal } from './components'; +import './Footer.scss'; + +const HorizontalRule = () => ( +
+
+
+); + +const VerticalRule = () => ( +
+
+
+); + +const MobileFooter = () => ( +
+
+ + + + + + +
+
+); + +const TabletFooter = () => ( +
+
+ + +
+ + +
+
+
+); + +const DesktopFooter = () => ( +
+
+
+ + + + + +
+
+
+); + +export default function Footer() { + return ( + <> + + + + + ); +} diff --git a/common/v2/features/Layout/Footer/components/DonateAndSubscribe.scss b/common/v2/features/Layout/Footer/components/DonateAndSubscribe.scss new file mode 100644 index 000000000..da8f520ae --- /dev/null +++ b/common/v2/features/Layout/Footer/components/DonateAndSubscribe.scss @@ -0,0 +1,200 @@ +@mixin no-margin-padding { + margin: 0; + padding: 0; +} + +@mixin heading { + font-family: Lato; + font-size: 16px; + font-weight: 500; + color: #fff; +} + +@mixin text { + font-family: Lato; + font-size: 14px; + font-weight: 300; + color: #bbc2cb; +} + +@mixin perfectly-centered { + display: flex; + align-items: center; + justify-content: center; +} + +$spacing-sm: 7px; +$spacing-md: 15px; +$spacing-lg: 57px; +$input-height: 40px; +$input-border-radius: 3px; + +.visible { + visibility: visible !important; +} + +.DonationButton { + display: flex; + align-items: center; + justify-content: center; + min-width: 110px; + height: 32px; + box-shadow: 0 1px 1px 0 rgba(232, 234, 237, 0.5), inset 0 1px 3px 0 rgba(232, 234, 237, 0.5); + background-color: #344b64; + border: 1px solid #4a5d75; + border-radius: 6px; + color: #fff; + + &:not(:last-of-type) { + margin-bottom: $spacing-md; + + @media (min-width: 1050px) { + margin-bottom: 0; + } + } + span { + display: flex; + align-items: center; + } + img { + width: 20px; + height: 20px; + margin-right: 5px; + } + + @media (min-width: 800px) { + margin-right: $spacing-md; + } +} + +.Donate { + display: flex; + flex-direction: column; + margin-bottom: 40px; + text-align: center; + + h2 { + @include heading; + @include no-margin-padding; + + margin-bottom: $spacing-sm; + } + &-buttons { + display: flex; + flex-direction: column; + align-items: center; + + &-message { + @include text; + @include no-margin-padding; + + margin-top: $spacing-md; + visibility: hidden; + + .check { + width: 14px; + height: 14px; + margin-right: $spacing-sm; + font-size: 14px; + color: #7ad832; + } + + @media (min-width: 800px) { + margin-top: 0; + } + @media (min-width: 1050px) { + margin-top: 10px; + } + } + + @media (min-width: 800px) { + flex-direction: row; + align-items: flex-start; + } + @media (min-width: 1050px) { + } + } + + @media (min-width: 800px) { + margin-bottom: 0; + text-align: left; + } +} + +.Subscribe { + text-align: center; + + h2 { + @include heading; + @include no-margin-padding; + + margin-bottom: 5px; + } + p { + @include text; + + margin-bottom: 10px; + } + &-input-wrapper { + display: flex; + align-items: center; + justify-content: center; + + &-input { + min-width: 0; + + input { + height: $input-height; + padding: $spacing-sm; + background: #142c46; + border: 1px solid #4d5f74; + border-radius: $input-border-radius; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: none; + color: #fff; + } + } + &-button { + button { + height: $input-height; + background: #027796; + border: none; + border-radius: $input-border-radius; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + color: #fff; + } + } + + @media (min-width: 800px) { + justify-content: flex-start; + } + } + + @media (min-width: 800px) { + padding-left: 20px; + text-align: left; + } + @media (min-width: 1050px) { + margin-top: 20px; + padding-left: 0px; + } +} + +.DonateAndSubscribe { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + + @media (min-width: 800px) { + flex-direction: row; + align-items: flex-start; + justify-content: flex-start; + } + @media (min-width: 1050px) { + flex: 1; + flex-direction: column; + } +} diff --git a/common/v2/features/Layout/Footer/components/DonateAndSubscribe.tsx b/common/v2/features/Layout/Footer/components/DonateAndSubscribe.tsx new file mode 100644 index 000000000..09cdf8b37 --- /dev/null +++ b/common/v2/features/Layout/Footer/components/DonateAndSubscribe.tsx @@ -0,0 +1,86 @@ +import React, { Component } from 'react'; +import { CopyToClipboard } from 'react-copy-to-clipboard'; +import classnames from 'classnames'; + +import { donationAddressMap } from 'config'; +import translate from 'translations'; +import ether from 'assets/images/ether.png'; +import bitcoin from 'assets/images/bitcoin.png'; +import Subscribe from './Subscribe'; +import './DonateAndSubscribe.scss'; + +interface DonationButtonProps { + icon: string; + title: string; +} + +function DonationButton({ icon, title, ...rest }: DonationButtonProps) { + return ( + + ); +} + +class Donate extends Component { + public state = { + displayingMessage: false + }; + + private timeout: NodeJS.Timer | null = null; + + public render() { + const { displayingMessage } = this.state; + const messageClassName = classnames({ + 'Donate-buttons-message': true, + visible: displayingMessage + }); + + return ( +
+

{translate('NEW_FOOTER_TEXT_1')}

+
+ + + + + + +
+

+ + {translate('NEW_FOOTER_TEXT_2')} +

+
+ ); + } + + private displayMessage = () => { + clearTimeout(this.timeout as NodeJS.Timer); + + this.setState( + { + displayingMessage: true + }, + () => + (this.timeout = setTimeout( + () => + this.setState({ + displayingMessage: false + }), + 3000 + )) + ); + }; +} + +export default function DonateAndSubscribe() { + return ( +
+ + +
+ ); +} diff --git a/common/v2/features/Layout/Footer/components/Linkset.scss b/common/v2/features/Layout/Footer/components/Linkset.scss new file mode 100644 index 000000000..69fccac6f --- /dev/null +++ b/common/v2/features/Layout/Footer/components/Linkset.scss @@ -0,0 +1,76 @@ +@mixin no-margin-padding { + margin: 0; + padding: 0; +} + +@mixin heading { + font-family: Lato; + font-size: 16px; + font-weight: 500; + color: #fff; +} + +@mixin text { + font-family: Lato; + font-size: 14px; + font-weight: 300; + color: #bbc2cb; +} + +$spacing-sm: 8px; +$spacing-md: 32px; + +.Linkset { + display: flex; + flex-direction: column; + text-align: center; + margin-bottom: $spacing-md; + + &-column { + &:not(:last-child) { + margin-bottom: $spacing-md; + + @media (min-width: 800px) { + margin-right: $spacing-md; + margin-bottom: 0; + } + } + + h2 { + @include heading; + @include no-margin-padding; + + margin-bottom: $spacing-sm; + } + ul { + @include no-margin-padding; + + list-style-type: none; + margin: 0; + padding: 0; + + li { + @include no-margin-padding; + + margin-bottom: $spacing-sm; + + a { + @include text; + } + } + } + + @media (min-width: 1050px) { + padding: $spacing-md 0; + } + } + + @media (min-width: 800px) { + flex: 2; + flex-direction: row; + margin-bottom: 40px; + } + @media (min-width: 1050px) { + justify-content: space-evenly; + } +} diff --git a/common/v2/features/Layout/Footer/components/Linkset.tsx b/common/v2/features/Layout/Footer/components/Linkset.tsx new file mode 100644 index 000000000..062ab90d6 --- /dev/null +++ b/common/v2/features/Layout/Footer/components/Linkset.tsx @@ -0,0 +1,86 @@ +import React from 'react'; + +import { translateRaw } from 'translations'; +import './Linkset.scss'; + +const LINK_COLUMNS = [ + { + heading: translateRaw('NEW_FOOTER_TEXT_6'), + links: [ + { + title: 'MyCrypto.com', + link: 'https://www.mycrypto.com/' + }, + { + title: translateRaw('NEW_FOOTER_TEXT_7'), + link: 'https://support.mycrypto.com/' + }, + { + title: translateRaw('NEW_FOOTER_TEXT_8'), + link: 'https://about.mycrypto.com/' + }, + { + title: translateRaw('NEW_FOOTER_TEXT_9'), + link: 'mailto://press@mycrypto.com' + }, + { + title: translateRaw('NEW_FOOTER_TEXT_10'), + link: 'https://about.mycrypto.com/privacy/' + } + ] + }, + { + heading: translateRaw('NEW_FOOTER_TEXT_11'), + links: [ + { + title: 'Ledger Wallet', + link: 'https://www.ledgerwallet.com/r/1985?path=/products/' + }, + { + title: 'TREZOR', + link: 'https://shop.trezor.io/?offer_id=10&aff_id=1735' + }, + { + title: 'ether.card', + link: 'https://ether.cards/?utm_source=mycrypto&utm_medium=cpm&utm_campaign=site' + } + ] + }, + { + heading: translateRaw('NEW_FOOTER_TEXT_12'), + links: [ + { + title: 'EtherAddressLookup', + link: + 'https://chrome.google.com/webstore/detail/etheraddresslookup/pdknmigbbbhmllnmgdfalmedcmcefdfn' + }, + { + title: 'EtherScamDB', + link: 'https://etherscamdb.info/' + }, + { + title: 'MoneroVision', + link: 'https://monerovision.com/' + } + ] + } +]; + +export default function Linkset() { + return ( +
+ {LINK_COLUMNS.map(({ heading, links }) => ( +
+

{heading}

+
    + {links.map(({ title, link }) => ( +
  • + {title} +
  • + ))} +
+
+ ))} +
+ ); +} diff --git a/common/v2/features/Layout/Footer/components/LogoBox.scss b/common/v2/features/Layout/Footer/components/LogoBox.scss new file mode 100644 index 000000000..7795f3ac4 --- /dev/null +++ b/common/v2/features/Layout/Footer/components/LogoBox.scss @@ -0,0 +1,72 @@ +@mixin logo-text { + font-family: Lato; + font-size: 10px; + color: #fff; +} + +@mixin perfectly-centered { + display: flex; + align-items: center; + justify-content: center; +} + +$logo-text-width: 375px; +$spacing-md: 15px; + +.LogoBox { + text-align: center; + + &-image { + @include perfectly-centered; + margin-bottom: $spacing-md; + + img { + width: 152px; + height: 38px; + } + &-toggle { + display: none; + + @media (min-width: 800px) { + display: block; + } + } + + @media (min-width: 800px) { + justify-content: space-between; + } + } + &-text { + @include perfectly-centered; + + margin-bottom: $spacing-md; + + p { + @include logo-text; + + max-width: $logo-text-width; + } + + @media (min-width: 800px) { + justify-content: flex-start; + } + } + &-toggle { + @media (min-width: 800px) { + display: none; + } + } + &-socials-legal { + display: none; + + @media (min-width: 800px) { + display: block; + } + } + + @media (min-width: 800px) { + flex: 1; + min-width: 240px; + text-align: left; + } +} diff --git a/common/v2/features/Layout/Footer/components/LogoBox.tsx b/common/v2/features/Layout/Footer/components/LogoBox.tsx new file mode 100644 index 000000000..a461f73cd --- /dev/null +++ b/common/v2/features/Layout/Footer/components/LogoBox.tsx @@ -0,0 +1,29 @@ +import React from 'react'; + +import translate from 'translations'; +import logo from 'assets/images/logo-mycrypto.svg'; +import ThemeToggle from 'components/Footer/ThemeToggle'; +import SocialsAndLegal from './SocialsAndLegal'; +import './LogoBox.scss'; + +export default function LogoBox() { + return ( +
+
+ Logo +
+ +
+
+
+

{translate('NEW_FOOTER_TEXT_13')}

+
+
+ +
+
+ +
+
+ ); +} diff --git a/common/v2/features/Layout/Footer/components/SocialsAndLegal.scss b/common/v2/features/Layout/Footer/components/SocialsAndLegal.scss new file mode 100644 index 000000000..97c5abc3f --- /dev/null +++ b/common/v2/features/Layout/Footer/components/SocialsAndLegal.scss @@ -0,0 +1,48 @@ +@mixin no-margin-padding { + margin: 0; + padding: 0; +} + +@mixin text { + font-family: Lato; + font-size: 10px; + color: #fff; +} + +$spacing-md: 15px; + +.Socials { + margin-bottom: $spacing-md; + text-align: center; + + @media (min-width: 800px) { + text-align: left; + } +} + +.Legal { + @include text; + + display: flex; + align-items: center; + justify-content: space-around; + + p, + a { + @include text; + @include no-margin-padding; + } + a, + p:not(:last-of-type) { + @media (min-width: 800px) { + margin-right: $spacing-md; + } + } + + @media (min-width: 800px) { + justify-content: flex-start; + } +} + +.SocialsAndLegal { +} diff --git a/common/v2/features/Layout/Footer/components/SocialsAndLegal.tsx b/common/v2/features/Layout/Footer/components/SocialsAndLegal.tsx new file mode 100644 index 000000000..c20a63ef8 --- /dev/null +++ b/common/v2/features/Layout/Footer/components/SocialsAndLegal.tsx @@ -0,0 +1,64 @@ +import React, { Component } from 'react'; + +import { socialMediaLinks, VERSION } from 'config'; +import { translateRaw } from 'translations'; +import { NewTabLink } from 'components/ui'; +import DisclaimerModal from 'components/DisclaimerModal'; +import './SocialsAndLegal.scss'; + +const SocialMediaLink = ({ link, text }: { link: string; text: string }) => { + return ( + + + + ); +}; + +function Socials() { + return ( +
+ {socialMediaLinks.map((socialMediaItem, idx) => ( + + ))} +
+ ); +} + +interface LegalState { + modalOpen: boolean; +} + +class Legal extends Component { + public state: LegalState = { + modalOpen: false + }; + + public render() { + const { modalOpen } = this.state; + + return ( + +
+

© {new Date().getFullYear()} MyCrypto, Inc.

+ {translateRaw('DISCLAIMER')} +

{VERSION}

+
+ +
+ ); + } + + private toggleModal = () => + this.setState((prevState: LegalState) => ({ + modalOpen: !prevState.modalOpen + })); +} + +export default function SocialsAndLegal() { + return ( +
+ + +
+ ); +} diff --git a/common/v2/features/Layout/Footer/components/Subscribe.tsx b/common/v2/features/Layout/Footer/components/Subscribe.tsx new file mode 100644 index 000000000..2e73dd48f --- /dev/null +++ b/common/v2/features/Layout/Footer/components/Subscribe.tsx @@ -0,0 +1,47 @@ +import React, { Component } from 'react'; + +import translate from 'translations'; +import subscribeToMailingList from 'api/emails'; + +export default class Subscribe extends Component { + public state = { email: '', submitted: false }; + + public render() { + const { email, submitted } = this.state; + + return ( +
+

{translate('NEW_FOOTER_TEXT_3')}

+

{translate('NEW_FOOTER_TEXT_4')}

+ +
+ +
+
+ +
+ + {submitted &&

{translate('NEW_FOOTER_TEXT_14')}

} +
+ ); + } + + private handleChange = ({ target: { value: email } }: React.ChangeEvent) => + this.setState({ email }); + + private subscribe = (e: React.FormEvent) => { + const { email } = this.state; + + e.preventDefault(); + + subscribeToMailingList(email).catch(() => this.setState({ submitted: true })); + }; +} diff --git a/common/v2/features/Layout/Footer/components/index.ts b/common/v2/features/Layout/Footer/components/index.ts new file mode 100644 index 000000000..9c0ec1e69 --- /dev/null +++ b/common/v2/features/Layout/Footer/components/index.ts @@ -0,0 +1,4 @@ +export { default as DonateAndSubscribe } from './DonateAndSubscribe'; +export { default as LogoBox } from './LogoBox'; +export { default as Linkset } from './Linkset'; +export { default as SocialsAndLegal } from './SocialsAndLegal'; diff --git a/common/v2/features/Layout/Footer/index.ts b/common/v2/features/Layout/Footer/index.ts new file mode 100644 index 000000000..be92134c1 --- /dev/null +++ b/common/v2/features/Layout/Footer/index.ts @@ -0,0 +1 @@ +export { default } from './Footer'; diff --git a/common/v2/features/Layout/Header/Header.scss b/common/v2/features/Layout/Header/Header.scss new file mode 100644 index 000000000..fe21cd984 --- /dev/null +++ b/common/v2/features/Layout/Header/Header.scss @@ -0,0 +1,15 @@ +.mobile-only-header { + display: block; + + @media (min-width: 1000px) { + display: none; + } +} + +.desktop-only-header { + display: none; + + @media (min-width: 1000px) { + display: block; + } +} diff --git a/common/v2/features/Layout/Header/Header.tsx b/common/v2/features/Layout/Header/Header.tsx new file mode 100644 index 000000000..1f5d8c8d8 --- /dev/null +++ b/common/v2/features/Layout/Header/Header.tsx @@ -0,0 +1,21 @@ +import React from 'react'; + +import { DesktopHeader, MobileHeader } from './components'; +import './Header.scss'; + +interface Props { + networkParam: string | null; +} + +export default function Header({ networkParam }: Props) { + return ( + <> +
+ +
+
+ +
+ + ); +} diff --git a/common/v2/features/Layout/Header/components/DesktopHeader.scss b/common/v2/features/Layout/Header/components/DesktopHeader.scss new file mode 100644 index 000000000..688ab937b --- /dev/null +++ b/common/v2/features/Layout/Header/components/DesktopHeader.scss @@ -0,0 +1,133 @@ +$header-background-color: #163150; +$header-icon-color: #1eb8e7; +$dropdown-background-color: #0f253f; + +.DesktopHeader { + display: flex; + flex-direction: column; + background: $header-background-color; + color: #fff; + border-bottom: 1px solid #3e546d; + + i { + color: $header-icon-color; + width: 12px; + height: 12px; + } + &-top { + display: flex; + align-items: center; + padding: 12px 50px; + border-bottom: 1px solid #3e546d; + font-size: 14px; + text-transform: uppercase; + + ul > li:first-of-type { + margin-right: 38px; + } + &-links { + margin: 0; + padding: 0; + list-style-type: none; + + li { + display: inline; + font-weight: bold; + letter-spacing: 1px; + + a { + color: #fff; + } + } + } + &-left { + flex: 1; + } + &-center { + display: flex; + align-items: center; + justify-content: center; + + img { + width: 160px; + height: 39px; + } + } + &-right { + flex: 1; + display: flex; + justify-content: flex-end; + } + } + &-bottom { + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + text-transform: uppercase; + letter-spacing: 1px; + + &-links { + margin: 0; + padding: 0; + list-style-type: none; + + & > li { + display: inline-flex; + height: 58px; + margin: 0; + font-weight: bold; + letter-spacing: 1px; + } + &-item { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + padding: 0 22px; + height: 58px; + + a { + color: #fff; + } + i { + margin-left: 5px; + + &.create-icon { + margin-right: 5px; + margin-left: 0; + } + } + } + &-dropdown { + position: absolute; + z-index: 200; + top: 100%; + width: 200px; + margin: 0; + padding: 0; + background: $dropdown-background-color; + border: 1px solid #3e546d; + text-transform: initial; + list-style-type: none; + cursor: initial; + + li { + margin: 0; + font-size: 12px; + + a { + display: block; + color: #fff; + font-weight: normal; + padding: 12px 8px; + + &:hover { + background: #293f59; + } + } + } + } + } + } +} diff --git a/common/v2/features/Layout/Header/components/DesktopHeader.tsx b/common/v2/features/Layout/Header/components/DesktopHeader.tsx new file mode 100644 index 000000000..aa06984c0 --- /dev/null +++ b/common/v2/features/Layout/Header/components/DesktopHeader.tsx @@ -0,0 +1,202 @@ +import React, { Component } from 'react'; +import { connect } from 'react-redux'; +import { Link } from 'react-router-dom'; + +import { languages } from 'config'; +import { translateRaw } from 'translations'; +import { AppState } from 'features/reducers'; +import { + configSelectors, + configMetaSelectors, + configNodesStaticSelectors, + configNodesSelectedActions +} from 'features/config'; +import { sidebarActions } from 'features/sidebar'; +import { walletActions } from 'features/wallet'; +import logo from 'assets/images/logo-mycrypto.svg'; +import { LINKSET } from '../constants'; +import { generateCaretIcon } from '../helpers'; +import './DesktopHeader.scss'; + +interface OwnProps { + networkParam: string | null; +} + +interface StateProps { + shouldSetNodeFromQS: boolean; + nodeLabel: ReturnType; + languageSelection: ReturnType; +} + +interface DispatchProps { + openSidebar: sidebarActions.TOpenSidebar; + changeNodeRequestedOneTime: configNodesSelectedActions.TChangeNodeRequestedOneTime; + setAccessMessage: walletActions.TSetAccessMessage; +} + +type Props = OwnProps & StateProps & DispatchProps; + +interface State { + visibleDropdowns: { + [dropdown: string]: boolean; + }; +} + +class DesktopHeader extends Component { + public state: State = { + visibleDropdowns: { + sendAndReceive: false, + buyAndExchange: false, + tools: false + } + }; + + public componentDidMount() { + this.attemptSetNodeFromQueryParameter(); + } + + public render() { + const { nodeLabel, openSidebar, languageSelection, setAccessMessage } = this.props; + const { visibleDropdowns: { sendAndReceive, buyAndExchange, tools } } = this.state; + const sendAndReceiveIcon = generateCaretIcon(sendAndReceive); + const buyAndExchangeIcon = generateCaretIcon(buyAndExchange); + const toolsIcon = generateCaretIcon(tools); + + return ( +
+
+
+
+ +
+
+ setAccessMessage('')}> + Our logo + +
+
+
    +
  • openSidebar('selectLanguage')}> + {languages[languageSelection]} +
  • +
  • openSidebar('selectNetworkAndNode')}> + {nodeLabel.network} ({nodeLabel.info}) +
  • +
+
+
+
+
    +
  • + {translateRaw('NEW_HEADER_TEXT_3')} + {sendAndReceive && ( +
      + {LINKSET.SEND_AND_RECEIVE.map(item => ( +
    • + setAccessMessage(item.accessMessage)}> + {item.title} + +
    • + ))} +
    + )} +
  • +
  • + {translateRaw('NEW_HEADER_TEXT_4')} + {buyAndExchange && ( +
      + {LINKSET.BUY_AND_EXCHANGE.map(item => ( +
    • + setAccessMessage('')}> + {item.title} + +
    • + ))} +
    + )} +
  • +
  • + {translateRaw('NEW_HEADER_TEXT_5')} + {tools && ( +
      + {LINKSET.TOOLS.map(item => ( +
    • + setAccessMessage('')}> + {item.title} + +
    • + ))} +
    + )} +
  • +
  • + + {translateRaw('NEW_HEADER_TEXT_6')} + +
  • +
+
+
+
+ ); + } + + private toggleDropdown = (dropdown: string) => + this.setState((prevState: State) => ({ + visibleDropdowns: { + ...prevState.visibleDropdowns, + [dropdown]: !prevState.visibleDropdowns[dropdown] + } + })); + + private toggleSendAndReceive = () => this.toggleDropdown('sendAndReceive'); + private toggleBuyAndExchange = () => this.toggleDropdown('buyAndExchange'); + private toggleTools = () => this.toggleDropdown('tools'); + + private attemptSetNodeFromQueryParameter = () => { + const { shouldSetNodeFromQS, networkParam, changeNodeRequestedOneTime } = this.props; + + if (shouldSetNodeFromQS) { + changeNodeRequestedOneTime(networkParam!); + } + }; +} + +const mapStateToProps = (state: AppState, { networkParam }: any) => ({ + shouldSetNodeFromQS: !!( + networkParam && configNodesStaticSelectors.isStaticNodeId(state, networkParam) + ), + nodeLabel: configSelectors.getSelectedNodeLabel(state), + languageSelection: configMetaSelectors.getLanguageSelection(state) +}); + +const mapDispatchToProps = { + openSidebar: sidebarActions.openSidebar, + changeNodeRequestedOneTime: configNodesSelectedActions.changeNodeRequestedOneTime, + setAccessMessage: walletActions.setAccessMessage +}; + +export default connect(mapStateToProps, mapDispatchToProps)(DesktopHeader); diff --git a/common/v2/features/Layout/Header/components/MobileHeader.scss b/common/v2/features/Layout/Header/components/MobileHeader.scss new file mode 100644 index 000000000..3485d6fad --- /dev/null +++ b/common/v2/features/Layout/Header/components/MobileHeader.scss @@ -0,0 +1,108 @@ +$header-background-color: #163150; +$header-icon-color: #1eb8e7; +$dropdown-background-color: #0f253f; + +@mixin mobile-header-menu-segment { + margin: 0; + padding: 25px 35px; + text-transform: uppercase; + font-size: 14px; + font-weight: bold; + letter-spacing: 1px; + + li { + margin: 0; + } + li:not(:last-of-type) { + margin-bottom: 22px; + } +} + +.MobileHeader { + position: fixed; + top: 0; + z-index: 200; + width: 100%; + min-width: 340px; + padding: 19px 40px; + background: $header-background-color; + border-bottom: 1px solid #3e546d; + color: #fff; + + &-top { + display: flex; + align-items: center; + justify-content: space-between; + + &-menu-button { + position: relative; + font-size: 30px; + } + &-logo { + display: flex; + align-items: center; + justify-content: center; + + img { + width: 160px; + height: 39px; + } + } + div { + width: 20px; + } + } + &-menu { + position: fixed; + top: 80px; + left: 0; + width: 320px; + height: calc(100vh - 80px); + border-top: 1px solid #3e546d; + border-right: 1px solid #3e546d; + background: $header-background-color; + color: #fff; + overflow: auto; + + i { + color: $header-icon-color; + } + a { + color: #fff; + } + ul { + list-style-type: none; + } + &-top { + @include mobile-header-menu-segment; + + border-bottom: 1px solid #3e546d; + } + &-mid { + @include mobile-header-menu-segment; + + border-bottom: 1px solid #3e546d; + } + &-bottom { + @include mobile-header-menu-segment; + } + &-subitems { + margin: 15px 0; + padding: 0; + text-transform: initial; + + li { + margin-bottom: 0 !important; + + a { + display: block; + padding: 10px; + + &:hover { + background: #293f59; + } + } + } + } + } +} diff --git a/common/v2/features/Layout/Header/components/MobileHeader.tsx b/common/v2/features/Layout/Header/components/MobileHeader.tsx new file mode 100644 index 000000000..b3dcc0d5c --- /dev/null +++ b/common/v2/features/Layout/Header/components/MobileHeader.tsx @@ -0,0 +1,222 @@ +import React, { Component } from 'react'; +import { connect } from 'react-redux'; +import { Link } from 'react-router-dom'; +import { Transition } from 'react-spring'; + +import { languages } from 'config'; +import { translateRaw } from 'translations'; +import { AppState } from 'features/reducers'; +import { + configSelectors, + configMetaSelectors, + configNodesStaticSelectors, + configNodesSelectedActions +} from 'features/config'; +import { sidebarActions } from 'features/sidebar'; +import { walletActions } from 'features/wallet'; +import logo from 'assets/images/logo-mycrypto.svg'; +import { LINKSET } from '../constants'; +import { generateMenuIcon, generateCaretIcon } from '../helpers'; +import './MobileHeader.scss'; + +interface OwnProps { + networkParam: string | null; +} + +interface StateProps { + shouldSetNodeFromQS: boolean; + nodeLabel: ReturnType; + languageSelection: ReturnType; +} + +interface DispatchProps { + openSidebar: sidebarActions.TOpenSidebar; + changeNodeRequestedOneTime: configNodesSelectedActions.TChangeNodeRequestedOneTime; + setAccessMessage: walletActions.TSetAccessMessage; +} + +type Props = OwnProps & StateProps & DispatchProps; + +interface State { + menuVisible: boolean; + visibleDropdowns: { + [dropdown: string]: boolean; + }; +} + +class MobileHeader extends Component { + public state: State = { + menuVisible: false, + visibleDropdowns: { + sendAndReceive: false, + buyAndExchange: false, + tools: false + } + }; + + public componentDidMount() { + this.attemptSetNodeFromQueryParameter(); + } + + public render() { + const { nodeLabel, openSidebar, languageSelection, setAccessMessage } = this.props; + const { menuVisible, visibleDropdowns: { sendAndReceive, buyAndExchange, tools } } = this.state; + const menuIcon = generateMenuIcon(menuVisible); + const sendAndReceiveIcon = generateCaretIcon(sendAndReceive); + const buyAndExchangeIcon = generateCaretIcon(buyAndExchange); + const toolsIcon = generateCaretIcon(tools); + + return ( +
+
+
+ +
+
+ setAccessMessage('')}> + Our logo + +
+ {/* Dummy
for flex spacing */} +
+
+ + {menuVisible && + (props => ( +
+
    +
  • + {translateRaw('NEW_HEADER_TEXT_3')} + {sendAndReceive && ( +
      + {LINKSET.SEND_AND_RECEIVE.map(item => ( +
    • + setAccessMessage(item.accessMessage)}> + {item.title} + +
    • + ))} +
    + )} +
  • +
  • + {translateRaw('NEW_HEADER_TEXT_4')} + {buyAndExchange && ( +
      + {LINKSET.BUY_AND_EXCHANGE.map(item => ( +
    • + setAccessMessage('')}> + {item.title} + +
    • + ))} +
    + )} +
  • +
  • + {translateRaw('NEW_HEADER_TEXT_5')} + + {tools && ( +
      + {LINKSET.TOOLS.map(item => ( +
    • + setAccessMessage('')}> + {item.title} + +
    • + ))} +
    + )} +
  • +
  • + + {translateRaw('NEW_HEADER_TEXT_6')} + +
  • +
+
    +
  • { + openSidebar('selectLanguage'); + this.toggleMenu(); + }} + > + {languages[languageSelection]} +
  • +
  • { + openSidebar('selectNetworkAndNode'); + this.toggleMenu(); + }} + > + {nodeLabel.network} ({nodeLabel.info}) +
  • +
+ +
+ ))} +
+
+ ); + } + + private toggleMenu = () => + this.setState((prevState: State) => ({ + menuVisible: !prevState.menuVisible + })); + + private toggleDropdown = (dropdown: string) => + this.setState((prevState: State) => ({ + visibleDropdowns: { + ...prevState.visibleDropdowns, + [dropdown]: !prevState.visibleDropdowns[dropdown] + } + })); + + private toggleSendAndReceive = () => this.toggleDropdown('sendAndReceive'); + private toggleBuyAndExchange = () => this.toggleDropdown('buyAndExchange'); + private toggleTools = () => this.toggleDropdown('tools'); + + private attemptSetNodeFromQueryParameter = () => { + const { shouldSetNodeFromQS, networkParam, changeNodeRequestedOneTime } = this.props; + + if (shouldSetNodeFromQS) { + changeNodeRequestedOneTime(networkParam!); + } + }; +} + +const mapStateToProps = (state: AppState, { networkParam }: any) => ({ + shouldSetNodeFromQS: !!( + networkParam && configNodesStaticSelectors.isStaticNodeId(state, networkParam) + ), + nodeLabel: configSelectors.getSelectedNodeLabel(state), + languageSelection: configMetaSelectors.getLanguageSelection(state) +}); + +const mapDispatchToProps = { + openSidebar: sidebarActions.openSidebar, + changeNodeRequestedOneTime: configNodesSelectedActions.changeNodeRequestedOneTime, + setAccessMessage: walletActions.setAccessMessage +}; + +export default connect(mapStateToProps, mapDispatchToProps)(MobileHeader); diff --git a/common/v2/features/Layout/Header/components/index.ts b/common/v2/features/Layout/Header/components/index.ts new file mode 100644 index 000000000..d0c17e63c --- /dev/null +++ b/common/v2/features/Layout/Header/components/index.ts @@ -0,0 +1,2 @@ +export { default as DesktopHeader } from './DesktopHeader'; +export { default as MobileHeader } from './MobileHeader'; diff --git a/common/v2/features/Layout/Header/constants.ts b/common/v2/features/Layout/Header/constants.ts new file mode 100644 index 000000000..e5774a188 --- /dev/null +++ b/common/v2/features/Layout/Header/constants.ts @@ -0,0 +1,59 @@ +import { translateRaw } from 'translations'; + +export const LINKSET = { + SEND_AND_RECEIVE: [ + { + to: '/account', + title: translateRaw('NEW_HEADER_TEXT_7'), + accessMessage: translateRaw('ACCESS_MESSAGE_1') + }, + { + to: '/account/request', + title: translateRaw('NEW_HEADER_TEXT_8'), + accessMessage: translateRaw('ACCESS_MESSAGE_2') + }, + { + to: '/account/info', + title: translateRaw('NEW_HEADER_TEXT_9'), + accessMessage: translateRaw('ACCESS_MESSAGE_3') + }, + { + to: '/account/recent-txs', + title: translateRaw('NEW_HEADER_TEXT_10'), + accessMessage: translateRaw('ACCESS_MESSAGE_4') + }, + { + to: '/account/address-book', + title: translateRaw('NEW_HEADER_TEXT_11'), + accessMessage: translateRaw('ACCESS_MESSAGE_5') + } + ], + BUY_AND_EXCHANGE: [ + { + to: '/swap', + title: translateRaw('NEW_HEADER_TEXT_12') + } + ], + TOOLS: [ + { + to: '/sign-and-verify-message', + title: translateRaw('NEW_HEADER_TEXT_13') + }, + { + to: '/contracts', + title: translateRaw('NEW_HEADER_TEXT_14') + }, + { + to: '/tx-status', + title: translateRaw('NEW_HEADER_TEXT_15') + }, + { + to: '/pushTx', + title: translateRaw('NEW_HEADER_TEXT_16') + }, + { + to: '/ens', + title: translateRaw('NEW_HEADER_TEXT_17') + } + ] +}; diff --git a/common/v2/features/Layout/Header/helpers.ts b/common/v2/features/Layout/Header/helpers.ts new file mode 100644 index 000000000..2827166d3 --- /dev/null +++ b/common/v2/features/Layout/Header/helpers.ts @@ -0,0 +1,13 @@ +import classnames from 'classnames'; + +export const generateMenuIcon = (condition: boolean): string => + classnames('fa', { + 'fa-bars': !condition, + 'fa-close': condition + }); + +export const generateCaretIcon = (condition: boolean): string => + classnames('fa', { + 'fa-caret-down': !condition, + 'fa-caret-right': condition + }); diff --git a/common/v2/features/Layout/Header/index.ts b/common/v2/features/Layout/Header/index.ts new file mode 100644 index 000000000..579f1ac23 --- /dev/null +++ b/common/v2/features/Layout/Header/index.ts @@ -0,0 +1 @@ +export { default } from './Header'; diff --git a/common/v2/components/Layout.scss b/common/v2/features/Layout/Layout.scss similarity index 100% rename from common/v2/components/Layout.scss rename to common/v2/features/Layout/Layout.scss diff --git a/common/v2/components/Layout.tsx b/common/v2/features/Layout/Layout.tsx similarity index 78% rename from common/v2/components/Layout.tsx rename to common/v2/features/Layout/Layout.tsx index 1ab6f0df1..5cb224a99 100644 --- a/common/v2/components/Layout.tsx +++ b/common/v2/features/Layout/Layout.tsx @@ -2,13 +2,13 @@ import React from 'react'; import classnames from 'classnames'; import { DrawerProvider } from 'v2/providers'; +import Header from './Header'; +import Footer from './Footer'; import './Layout.scss'; // Legacy import { makeAutoNodeName } from 'libs/nodes'; import { Query } from 'components/renderCbs'; -import NewHeader from 'components/Header/NewHeader/NewHeader'; -import NewFooter from 'components/Footer/NewFooter/NewFooter'; interface Props { className?: string; @@ -29,11 +29,11 @@ export default function Layout({ centered, fluid, className = '', children }: Pr ( - +
)} />
{children}
- +
); diff --git a/common/v2/features/Layout/index.ts b/common/v2/features/Layout/index.ts new file mode 100644 index 000000000..6c48faec7 --- /dev/null +++ b/common/v2/features/Layout/index.ts @@ -0,0 +1 @@ +export { default as Layout } from './Layout'; diff --git a/common/v2/features/index.ts b/common/v2/features/index.ts index 2fc8e7e13..8288638be 100644 --- a/common/v2/features/index.ts +++ b/common/v2/features/index.ts @@ -4,3 +4,4 @@ export * from './Dashboard'; export * from './Drawer'; export * from './Home'; export * from './ImportWallet'; +export * from './Layout'; diff --git a/common/v2/providers/DrawerProvider.tsx b/common/v2/providers/DrawerProvider.tsx index 0f998d2c4..d70d4666b 100644 --- a/common/v2/providers/DrawerProvider.tsx +++ b/common/v2/providers/DrawerProvider.tsx @@ -27,7 +27,7 @@ export const DrawerContext = React.createContext(); export default class DrawerProvider extends Component { public state: State = { - visible: true, + visible: false, screen: {}, toggleVisible: () => this.setState((prevState: State) => ({ From 7bb71401b89abd2499b043e464ca2b94f5e954ca Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Thu, 31 Jan 2019 18:27:04 -0600 Subject: [PATCH 0044/1466] Add Recent Accounts drawer screen --- common/assets/images/icn-settings.svg | 3 + common/assets/images/icn-unlock.svg | 3 + common/v2/features/Drawer/Drawer.scss | 2 +- .../Drawer/components/DrawerAction.scss | 2 + common/v2/features/Drawer/index.ts | 1 + .../Drawer/screens/AccountScreen.scss | 31 ++++ .../features/Drawer/screens/AccountScreen.tsx | 57 +++++++ common/v2/features/Drawer/screens/index.ts | 1 + .../Header/components/DesktopHeader.scss | 16 +- .../Header/components/DesktopHeader.tsx | 155 ++++++------------ .../Header/components/MobileHeader.scss | 17 +- .../Layout/Header/components/MobileHeader.tsx | 130 ++++----------- common/v2/features/Layout/Header/constants.ts | 8 +- common/v2/features/index.ts | 1 + common/v2/providers/DrawerProvider.tsx | 2 +- 15 files changed, 218 insertions(+), 211 deletions(-) create mode 100644 common/assets/images/icn-settings.svg create mode 100644 common/assets/images/icn-unlock.svg create mode 100644 common/v2/features/Drawer/screens/AccountScreen.scss create mode 100644 common/v2/features/Drawer/screens/AccountScreen.tsx create mode 100644 common/v2/features/Drawer/screens/index.ts diff --git a/common/assets/images/icn-settings.svg b/common/assets/images/icn-settings.svg new file mode 100644 index 000000000..243ec0c37 --- /dev/null +++ b/common/assets/images/icn-settings.svg @@ -0,0 +1,3 @@ + + + diff --git a/common/assets/images/icn-unlock.svg b/common/assets/images/icn-unlock.svg new file mode 100644 index 000000000..83affbf59 --- /dev/null +++ b/common/assets/images/icn-unlock.svg @@ -0,0 +1,3 @@ + + + diff --git a/common/v2/features/Drawer/Drawer.scss b/common/v2/features/Drawer/Drawer.scss index dcd2e3ec1..dd5d45f0a 100644 --- a/common/v2/features/Drawer/Drawer.scss +++ b/common/v2/features/Drawer/Drawer.scss @@ -12,7 +12,7 @@ box-shadow: -2px 0 6px 0 rgba(0, 0, 0, 0.1); @media (min-width: 1000px) { - top: 123px; + top: 0; width: 379px; } &-top { diff --git a/common/v2/features/Drawer/components/DrawerAction.scss b/common/v2/features/Drawer/components/DrawerAction.scss index ff5fb649e..80015caa3 100644 --- a/common/v2/features/Drawer/components/DrawerAction.scss +++ b/common/v2/features/Drawer/components/DrawerAction.scss @@ -1,6 +1,8 @@ .DrawerAction { + flex-shrink: 0; display: flex; align-items: center; + height: 78px; padding: 27px 24px; &:first-of-type { diff --git a/common/v2/features/Drawer/index.ts b/common/v2/features/Drawer/index.ts index 26a0c394d..70f4e80cf 100644 --- a/common/v2/features/Drawer/index.ts +++ b/common/v2/features/Drawer/index.ts @@ -1 +1,2 @@ export { default as Drawer } from './Drawer'; +export { AccountScreen } from './screens'; diff --git a/common/v2/features/Drawer/screens/AccountScreen.scss b/common/v2/features/Drawer/screens/AccountScreen.scss new file mode 100644 index 000000000..e1bbe830b --- /dev/null +++ b/common/v2/features/Drawer/screens/AccountScreen.scss @@ -0,0 +1,31 @@ +.AccountScreen { + &-current { + margin-bottom: 30px; + padding: 15px; + background: rgba(0, 122, 153, 0.05); + border: 2px solid #007a99; + border-radius: 4px; + } + &-heading { + margin-bottom: 15px; + font-size: 18px; + font-weight: bold; + text-transform: uppercase; + color: #424242; + } + &-recent { + padding: 15px 40px; + border: 1px solid #b5bfc7; + border-radius: 4px; + text-align: center; + + &-heading { + font-size: 18px; + font-weight: 900; + } + &-button { + margin-top: 15px; + width: 100%; + } + } +} diff --git a/common/v2/features/Drawer/screens/AccountScreen.tsx b/common/v2/features/Drawer/screens/AccountScreen.tsx new file mode 100644 index 000000000..36abc4540 --- /dev/null +++ b/common/v2/features/Drawer/screens/AccountScreen.tsx @@ -0,0 +1,57 @@ +import React from 'react'; +import { Address, Button, Heading, Typography } from '@mycrypto/ui'; + +import './AccountScreen.scss'; + +// Legacy +import addIcon from 'common/assets/images/icn-add.svg'; +import settingsIcon from 'common/assets/images/icn-settings.svg'; +import unlockIcon from 'common/assets/images/icn-unlock.svg'; + +const truncate = (children: string) => { + return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); +}; + +export default { + title: 'Current Account', + content: ( +
+
+
+
+ + Recent Accounts + +
+ + You only have one account at the moment + + + To organize your funds into more than one account, create another account now. + + +
+
+ ), + actions: [ + { + icon: addIcon, + title: 'Add New Account', + onClick: () => {} + }, + { + icon: settingsIcon, + title: 'Settings', + onClick: () => {} + }, + { + icon: unlockIcon, + title: 'Lock Wallet', + onClick: () => {} + } + ] +}; diff --git a/common/v2/features/Drawer/screens/index.ts b/common/v2/features/Drawer/screens/index.ts new file mode 100644 index 000000000..33c6cbf84 --- /dev/null +++ b/common/v2/features/Drawer/screens/index.ts @@ -0,0 +1 @@ +export { default as AccountScreen } from './AccountScreen'; diff --git a/common/v2/features/Layout/Header/components/DesktopHeader.scss b/common/v2/features/Layout/Header/components/DesktopHeader.scss index 688ab937b..7a02cba23 100644 --- a/common/v2/features/Layout/Header/components/DesktopHeader.scss +++ b/common/v2/features/Layout/Header/components/DesktopHeader.scss @@ -2,7 +2,7 @@ $header-background-color: #163150; $header-icon-color: #1eb8e7; $dropdown-background-color: #0f253f; -.DesktopHeader { +._DesktopHeader { display: flex; flex-direction: column; background: $header-background-color; @@ -17,7 +17,8 @@ $dropdown-background-color: #0f253f; &-top { display: flex; align-items: center; - padding: 12px 50px; + height: 64px; + padding: 0 50px; border-bottom: 1px solid #3e546d; font-size: 14px; text-transform: uppercase; @@ -38,6 +39,17 @@ $dropdown-background-color: #0f253f; a { color: #fff; } + &:nth-child(2) { + margin-right: 30px; + } + } + &-account { + img { + width: 30px; + height: 30px; + margin-right: 8px; + border: 2px solid #ffffff; + } } } &-left { diff --git a/common/v2/features/Layout/Header/components/DesktopHeader.tsx b/common/v2/features/Layout/Header/components/DesktopHeader.tsx index aa06984c0..3591b2b0e 100644 --- a/common/v2/features/Layout/Header/components/DesktopHeader.tsx +++ b/common/v2/features/Layout/Header/components/DesktopHeader.tsx @@ -1,40 +1,15 @@ import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; +import { Identicon } from '@mycrypto/ui'; -import { languages } from 'config'; -import { translateRaw } from 'translations'; -import { AppState } from 'features/reducers'; -import { - configSelectors, - configMetaSelectors, - configNodesStaticSelectors, - configNodesSelectedActions -} from 'features/config'; -import { sidebarActions } from 'features/sidebar'; -import { walletActions } from 'features/wallet'; -import logo from 'assets/images/logo-mycrypto.svg'; -import { LINKSET } from '../constants'; +import { AccountScreen } from 'v2/features'; +import { DrawerContext } from 'v2/providers'; +import { linkset } from '../constants'; import { generateCaretIcon } from '../helpers'; import './DesktopHeader.scss'; -interface OwnProps { - networkParam: string | null; -} - -interface StateProps { - shouldSetNodeFromQS: boolean; - nodeLabel: ReturnType; - languageSelection: ReturnType; -} - -interface DispatchProps { - openSidebar: sidebarActions.TOpenSidebar; - changeNodeRequestedOneTime: configNodesSelectedActions.TChangeNodeRequestedOneTime; - setAccessMessage: walletActions.TSetAccessMessage; -} - -type Props = OwnProps & StateProps & DispatchProps; +// Legacy +import logo from 'assets/images/logo-mycrypto.svg'; interface State { visibleDropdowns: { @@ -42,7 +17,7 @@ interface State { }; } -class DesktopHeader extends Component { +export default class DesktopHeader extends Component { public state: State = { visibleDropdowns: { sendAndReceive: false, @@ -51,12 +26,7 @@ class DesktopHeader extends Component { } }; - public componentDidMount() { - this.attemptSetNodeFromQueryParameter(); - } - public render() { - const { nodeLabel, openSidebar, languageSelection, setAccessMessage } = this.props; const { visibleDropdowns: { sendAndReceive, buyAndExchange, tools } } = this.state; const sendAndReceiveIcon = generateCaretIcon(sendAndReceive); const buyAndExchangeIcon = generateCaretIcon(buyAndExchange); @@ -64,97 +34,102 @@ class DesktopHeader extends Component { return (
-
-
-
-
    +
    +
    +
    +
    -
    - setAccessMessage('')}> +
    + Our logo
    -
    -
      -
    • openSidebar('selectLanguage')}> - {languages[languageSelection]} +
      +
        +
      • + English
      • -
      • openSidebar('selectNetworkAndNode')}> - {nodeLabel.network} ({nodeLabel.info}) +
      • + Ethereum (Auto)
      • + + {({ setScreen }) => ( +
      • setScreen(AccountScreen)} + className="_DesktopHeader-top-links-account" + > + + Example #1 +
      • + )} +
    -
    -
      +
      +
      • - {translateRaw('NEW_HEADER_TEXT_3')} + Send & Receive {sendAndReceive && ( -
          - {LINKSET.SEND_AND_RECEIVE.map(item => ( +
            + {linkset.sendAndReceive.map(item => (
          • - setAccessMessage(item.accessMessage)}> - {item.title} - + {item.title}
          • ))}
          )}
        • - {translateRaw('NEW_HEADER_TEXT_4')} + Buy & Exchange {buyAndExchange && ( -
            - {LINKSET.BUY_AND_EXCHANGE.map(item => ( -
          • - setAccessMessage('')}> - {item.title} - +
              + {linkset.buyAndExchange.map(item => ( +
            • + {item.title}
            • ))}
            )}
          • - {translateRaw('NEW_HEADER_TEXT_5')} + Tools {tools && ( -
              - {LINKSET.TOOLS.map(item => ( +
                + {linkset.tools.map(item => (
              • - setAccessMessage('')}> - {item.title} - + {item.title}
              • ))}
              )} -
            • - - {translateRaw('NEW_HEADER_TEXT_6')} +
            • + + Create Wallet
            @@ -175,28 +150,4 @@ class DesktopHeader extends Component { private toggleSendAndReceive = () => this.toggleDropdown('sendAndReceive'); private toggleBuyAndExchange = () => this.toggleDropdown('buyAndExchange'); private toggleTools = () => this.toggleDropdown('tools'); - - private attemptSetNodeFromQueryParameter = () => { - const { shouldSetNodeFromQS, networkParam, changeNodeRequestedOneTime } = this.props; - - if (shouldSetNodeFromQS) { - changeNodeRequestedOneTime(networkParam!); - } - }; } - -const mapStateToProps = (state: AppState, { networkParam }: any) => ({ - shouldSetNodeFromQS: !!( - networkParam && configNodesStaticSelectors.isStaticNodeId(state, networkParam) - ), - nodeLabel: configSelectors.getSelectedNodeLabel(state), - languageSelection: configMetaSelectors.getLanguageSelection(state) -}); - -const mapDispatchToProps = { - openSidebar: sidebarActions.openSidebar, - changeNodeRequestedOneTime: configNodesSelectedActions.changeNodeRequestedOneTime, - setAccessMessage: walletActions.setAccessMessage -}; - -export default connect(mapStateToProps, mapDispatchToProps)(DesktopHeader); diff --git a/common/v2/features/Layout/Header/components/MobileHeader.scss b/common/v2/features/Layout/Header/components/MobileHeader.scss index 3485d6fad..51d8e9e19 100644 --- a/common/v2/features/Layout/Header/components/MobileHeader.scss +++ b/common/v2/features/Layout/Header/components/MobileHeader.scss @@ -18,7 +18,7 @@ $dropdown-background-color: #0f253f; } } -.MobileHeader { +._MobileHeader { position: fixed; top: 0; z-index: 200; @@ -32,13 +32,15 @@ $dropdown-background-color: #0f253f; &-top { display: flex; align-items: center; - justify-content: space-between; + justify-content: space-evenly; &-menu-button { + flex: 1; position: relative; font-size: 30px; } &-logo { + flex: 2; display: flex; align-items: center; justify-content: center; @@ -48,8 +50,15 @@ $dropdown-background-color: #0f253f; height: 39px; } } - div { - width: 20px; + &-menu-account { + flex: 1; + text-align: right; + + img { + width: 34px; + height: 34px; + border: 2px solid #ffffff; + } } } &-menu { diff --git a/common/v2/features/Layout/Header/components/MobileHeader.tsx b/common/v2/features/Layout/Header/components/MobileHeader.tsx index b3dcc0d5c..2b61c155a 100644 --- a/common/v2/features/Layout/Header/components/MobileHeader.tsx +++ b/common/v2/features/Layout/Header/components/MobileHeader.tsx @@ -1,42 +1,13 @@ import React, { Component } from 'react'; -import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { Transition } from 'react-spring'; +import { Identicon } from '@mycrypto/ui'; -import { languages } from 'config'; -import { translateRaw } from 'translations'; -import { AppState } from 'features/reducers'; -import { - configSelectors, - configMetaSelectors, - configNodesStaticSelectors, - configNodesSelectedActions -} from 'features/config'; -import { sidebarActions } from 'features/sidebar'; -import { walletActions } from 'features/wallet'; import logo from 'assets/images/logo-mycrypto.svg'; -import { LINKSET } from '../constants'; +import { linkset } from '../constants'; import { generateMenuIcon, generateCaretIcon } from '../helpers'; import './MobileHeader.scss'; -interface OwnProps { - networkParam: string | null; -} - -interface StateProps { - shouldSetNodeFromQS: boolean; - nodeLabel: ReturnType; - languageSelection: ReturnType; -} - -interface DispatchProps { - openSidebar: sidebarActions.TOpenSidebar; - changeNodeRequestedOneTime: configNodesSelectedActions.TChangeNodeRequestedOneTime; - setAccessMessage: walletActions.TSetAccessMessage; -} - -type Props = OwnProps & StateProps & DispatchProps; - interface State { menuVisible: boolean; visibleDropdowns: { @@ -44,7 +15,7 @@ interface State { }; } -class MobileHeader extends Component { +export default class MobileHeader extends Component { public state: State = { menuVisible: false, visibleDropdowns: { @@ -54,12 +25,7 @@ class MobileHeader extends Component { } }; - public componentDidMount() { - this.attemptSetNodeFromQueryParameter(); - } - public render() { - const { nodeLabel, openSidebar, languageSelection, setAccessMessage } = this.props; const { menuVisible, visibleDropdowns: { sendAndReceive, buyAndExchange, tools } } = this.state; const menuIcon = generateMenuIcon(menuVisible); const sendAndReceiveIcon = generateCaretIcon(sendAndReceive); @@ -67,99 +33,93 @@ class MobileHeader extends Component { const toolsIcon = generateCaretIcon(tools); return ( -
            -
            -
            +
            +
            +
            -
            - setAccessMessage('')}> +
            + Our logo
            - {/* Dummy
            for flex spacing */} +
            + +
            {menuVisible && (props => ( -
            -
              +
              +
              • - {translateRaw('NEW_HEADER_TEXT_3')} + Send & Receive {sendAndReceive && ( -
                  - {LINKSET.SEND_AND_RECEIVE.map(item => ( +
                    + {linkset.sendAndReceive.map(item => (
                  • - setAccessMessage(item.accessMessage)}> - {item.title} - + {item.title}
                  • ))}
                  )}
                • - {translateRaw('NEW_HEADER_TEXT_4')} + Buy & Exchange {buyAndExchange && ( -
                    - {LINKSET.BUY_AND_EXCHANGE.map(item => ( +
                      + {linkset.buyAndExchange.map(item => (
                    • - setAccessMessage('')}> - {item.title} - + {item.title}
                    • ))}
                    )}
                  • - {translateRaw('NEW_HEADER_TEXT_5')} + Tools {tools && ( -
                      - {LINKSET.TOOLS.map(item => ( +
                        + {linkset.tools.map(item => (
                      • - setAccessMessage('')}> - {item.title} - + {item.title}
                      • ))}
                      )}
                    • - - {translateRaw('NEW_HEADER_TEXT_6')} + + Create Wallet
                    -
                      +
                      • { - openSidebar('selectLanguage'); this.toggleMenu(); }} > - {languages[languageSelection]} + English
                      • { - openSidebar('selectNetworkAndNode'); this.toggleMenu(); }} > - {nodeLabel.network} ({nodeLabel.info}) + Ethereum (Auto)
                      -
                        + @@ -195,28 +155,4 @@ class MobileHeader extends Component { private toggleSendAndReceive = () => this.toggleDropdown('sendAndReceive'); private toggleBuyAndExchange = () => this.toggleDropdown('buyAndExchange'); private toggleTools = () => this.toggleDropdown('tools'); - - private attemptSetNodeFromQueryParameter = () => { - const { shouldSetNodeFromQS, networkParam, changeNodeRequestedOneTime } = this.props; - - if (shouldSetNodeFromQS) { - changeNodeRequestedOneTime(networkParam!); - } - }; } - -const mapStateToProps = (state: AppState, { networkParam }: any) => ({ - shouldSetNodeFromQS: !!( - networkParam && configNodesStaticSelectors.isStaticNodeId(state, networkParam) - ), - nodeLabel: configSelectors.getSelectedNodeLabel(state), - languageSelection: configMetaSelectors.getLanguageSelection(state) -}); - -const mapDispatchToProps = { - openSidebar: sidebarActions.openSidebar, - changeNodeRequestedOneTime: configNodesSelectedActions.changeNodeRequestedOneTime, - setAccessMessage: walletActions.setAccessMessage -}; - -export default connect(mapStateToProps, mapDispatchToProps)(MobileHeader); diff --git a/common/v2/features/Layout/Header/constants.ts b/common/v2/features/Layout/Header/constants.ts index e5774a188..3244f14a7 100644 --- a/common/v2/features/Layout/Header/constants.ts +++ b/common/v2/features/Layout/Header/constants.ts @@ -1,7 +1,7 @@ import { translateRaw } from 'translations'; -export const LINKSET = { - SEND_AND_RECEIVE: [ +export const linkset = { + sendAndReceive: [ { to: '/account', title: translateRaw('NEW_HEADER_TEXT_7'), @@ -28,13 +28,13 @@ export const LINKSET = { accessMessage: translateRaw('ACCESS_MESSAGE_5') } ], - BUY_AND_EXCHANGE: [ + buyAndExchange: [ { to: '/swap', title: translateRaw('NEW_HEADER_TEXT_12') } ], - TOOLS: [ + tools: [ { to: '/sign-and-verify-message', title: translateRaw('NEW_HEADER_TEXT_13') diff --git a/common/v2/features/index.ts b/common/v2/features/index.ts index 8288638be..d1cfec5dd 100644 --- a/common/v2/features/index.ts +++ b/common/v2/features/index.ts @@ -2,6 +2,7 @@ export * from './BuyAndExchange'; export * from './CreateWallet'; export * from './Dashboard'; export * from './Drawer'; +export { AccountScreen } from './Drawer'; export * from './Home'; export * from './ImportWallet'; export * from './Layout'; diff --git a/common/v2/providers/DrawerProvider.tsx b/common/v2/providers/DrawerProvider.tsx index d70d4666b..850ad2c13 100644 --- a/common/v2/providers/DrawerProvider.tsx +++ b/common/v2/providers/DrawerProvider.tsx @@ -33,7 +33,7 @@ export default class DrawerProvider extends Component { this.setState((prevState: State) => ({ visible: !prevState.visible })), - setScreen: (screen: Screen) => this.setState({ screen }) + setScreen: (screen: Screen) => this.setState({ visible: true, screen }) }; public render() { From 890f006a6e02910c904208a7ae5165c301a3797e Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Thu, 31 Jan 2019 20:45:18 -0600 Subject: [PATCH 0045/1466] Add link support to Drawer --- common/v2/features/Drawer/Drawer.scss | 9 +++++++++ common/v2/features/Drawer/Drawer.tsx | 10 ++++++++-- .../Drawer/components/DrawerAction.scss | 6 ------ .../Drawer/components/DrawerAction.tsx | 18 +++++++++++++++--- .../features/Drawer/screens/AccountScreen.tsx | 2 +- 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/common/v2/features/Drawer/Drawer.scss b/common/v2/features/Drawer/Drawer.scss index dd5d45f0a..2dc9727de 100644 --- a/common/v2/features/Drawer/Drawer.scss +++ b/common/v2/features/Drawer/Drawer.scss @@ -44,6 +44,15 @@ display: flex; flex-direction: column; justify-content: flex-end; + + &-action { + &:first-of-type { + border-top: 1px solid #d7dadc; + } + &:not(:last-of-type) { + border-bottom: 1px solid #d7dadc; + } + } } } } diff --git a/common/v2/features/Drawer/Drawer.tsx b/common/v2/features/Drawer/Drawer.tsx index da677aab9..da8f4f5c7 100644 --- a/common/v2/features/Drawer/Drawer.tsx +++ b/common/v2/features/Drawer/Drawer.tsx @@ -10,7 +10,8 @@ import closeIcon from 'common/assets/images/icn-close.svg'; interface Action { icon: string; title: string; - onClick(): void; + link?: string; + onClick?(): void; } interface Props { @@ -37,7 +38,12 @@ export default function Drawer({ style, title, content, actions, onClose }: Prop
                        {content}
                        - {actions && actions.map(action => )} + {actions && + actions.map(action => ( +
                        + +
                        + ))}
              diff --git a/common/v2/features/Drawer/components/DrawerAction.scss b/common/v2/features/Drawer/components/DrawerAction.scss index 80015caa3..12963e865 100644 --- a/common/v2/features/Drawer/components/DrawerAction.scss +++ b/common/v2/features/Drawer/components/DrawerAction.scss @@ -5,12 +5,6 @@ height: 78px; padding: 27px 24px; - &:first-of-type { - border-top: 1px solid #d7dadc; - } - &:not(:last-of-type) { - border-bottom: 1px solid #d7dadc; - } &-icon { width: 34px; height: 34px; diff --git a/common/v2/features/Drawer/components/DrawerAction.tsx b/common/v2/features/Drawer/components/DrawerAction.tsx index 1e5fac82c..9d99aaa4e 100644 --- a/common/v2/features/Drawer/components/DrawerAction.tsx +++ b/common/v2/features/Drawer/components/DrawerAction.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { Link } from 'react-router-dom'; import { Button, Typography } from '@mycrypto/ui'; import './DrawerAction.scss'; @@ -6,14 +7,25 @@ import './DrawerAction.scss'; interface Props { icon: string; title: string; + link?: string; onClick(): void; } -export default function DrawerAction({ icon, title, onClick }: Props) { +export default function DrawerAction({ icon, title, link, onClick }: Props) { + const Render = link ? Link : Button; + const props = link + ? { + to: link + } + : { + basic: true, + onClick + }; + return ( - + ); } diff --git a/common/v2/features/Drawer/screens/AccountScreen.tsx b/common/v2/features/Drawer/screens/AccountScreen.tsx index 36abc4540..781b19b36 100644 --- a/common/v2/features/Drawer/screens/AccountScreen.tsx +++ b/common/v2/features/Drawer/screens/AccountScreen.tsx @@ -46,7 +46,7 @@ export default { { icon: settingsIcon, title: 'Settings', - onClick: () => {} + link: '/dashboard/settings' }, { icon: unlockIcon, From 94b88a1149cbf539aa7250a22b184dce9476714e Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Thu, 31 Jan 2019 21:11:28 -0600 Subject: [PATCH 0046/1466] Initial rendition of Settings --- .../features/Dashboard/Settings/Settings.scss | 12 ++++ .../features/Dashboard/Settings/Settings.tsx | 22 +++++++ .../Settings/components/AddressBook.tsx | 54 ++++++++++++++++ .../Settings/components/YourAccounts.tsx | 61 +++++++++++++++++++ .../Dashboard/Settings/components/index.ts | 2 + .../v2/features/Dashboard/Settings/index.ts | 1 + .../Dashboard/components/DashboardPanel.tsx | 15 +++-- common/v2/features/Dashboard/routes.ts | 7 +++ 8 files changed, 168 insertions(+), 6 deletions(-) create mode 100644 common/v2/features/Dashboard/Settings/Settings.scss create mode 100644 common/v2/features/Dashboard/Settings/Settings.tsx create mode 100644 common/v2/features/Dashboard/Settings/components/AddressBook.tsx create mode 100644 common/v2/features/Dashboard/Settings/components/YourAccounts.tsx create mode 100644 common/v2/features/Dashboard/Settings/components/index.ts create mode 100644 common/v2/features/Dashboard/Settings/index.ts diff --git a/common/v2/features/Dashboard/Settings/Settings.scss b/common/v2/features/Dashboard/Settings/Settings.scss new file mode 100644 index 000000000..bd9f7fe0d --- /dev/null +++ b/common/v2/features/Dashboard/Settings/Settings.scss @@ -0,0 +1,12 @@ +.Settings { + &-heading { + display: flex; + align-items: center; + margin-bottom: 22px; + color: #163150; + + &-icon { + margin-right: 12px; + } + } +} diff --git a/common/v2/features/Dashboard/Settings/Settings.tsx b/common/v2/features/Dashboard/Settings/Settings.tsx new file mode 100644 index 000000000..daab422af --- /dev/null +++ b/common/v2/features/Dashboard/Settings/Settings.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import { Heading } from '@mycrypto/ui'; + +import { Layout } from 'v2/features'; +import { AddressBook, YourAccounts } from './components'; +import './Settings.scss'; + +// Legacy +import settingsIcon from 'common/assets/images/icn-settings.svg'; + +export default function Settings() { + return ( + + + Settings + Settings + + + + + ); +} diff --git a/common/v2/features/Dashboard/Settings/components/AddressBook.tsx b/common/v2/features/Dashboard/Settings/components/AddressBook.tsx new file mode 100644 index 000000000..ff58b77e2 --- /dev/null +++ b/common/v2/features/Dashboard/Settings/components/AddressBook.tsx @@ -0,0 +1,54 @@ +import React, { Component } from 'react'; +import { Address, Icon, CollapsibleTable, Network, Typography } from '@mycrypto/ui'; + +import { DashboardPanel } from '../../components'; + +// Fake Data +const accounts = [ + { + name: 'Wallet #1', + address: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + notes: 'foo bar baz', + favorite: false + }, + { + name: 'Wallet #2', + address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe', + notes: 'foo bar baz', + favorite: false + } +]; +const truncate = (children: string) => { + return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); +}; +const addressBookTable = { + head: ['Favorite', 'Address', 'Notes', 'Delete'], + body: accounts.map(({ address, name, notes }) => [ + , +
              {}} truncate={truncate} />, + {notes}, + + ]), + config: { + primaryColumn: 'Address', + sortableColumn: 'Address', + sortFunction: (a: any, b: any) => { + const aLabel = a.props.title; + const bLabel = b.props.title; + + return aLabel.localeCompare(bLabel); + }, + hiddenHeadings: ['Favorite', 'Delete'], + iconColumns: ['Favorite', 'Delete'] + } +}; + +export default class AddressBook extends Component { + public render() { + return ( + + + + ); + } +} diff --git a/common/v2/features/Dashboard/Settings/components/YourAccounts.tsx b/common/v2/features/Dashboard/Settings/components/YourAccounts.tsx new file mode 100644 index 000000000..0759dcfde --- /dev/null +++ b/common/v2/features/Dashboard/Settings/components/YourAccounts.tsx @@ -0,0 +1,61 @@ +import React, { Component } from 'react'; +import { Address, Icon, CollapsibleTable, Network, Typography } from '@mycrypto/ui'; + +import { DashboardPanel } from '../../components'; + +// Fake Data +const accounts = [ + { + name: 'Wallet #1', + address: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d', + network: 'Ethereum', + node: 'Epool.io', + value: '$2,203.12', + favorite: false + }, + { + name: 'Wallet #2', + address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe', + network: 'Ethereum', + node: 'MyCrypto', + value: '$1337.42', + favorite: false + } +]; +const truncate = (children: string) => { + return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); +}; +const accountTable = { + head: ['Favorite', 'Address', 'Network', 'Value', 'Delete'], + body: accounts.map(({ address, name, network, value }) => [ + , +
              {}} truncate={truncate} />, + + {network} + , + {value}, + + ]), + config: { + primaryColumn: 'Address', + sortableColumn: 'Address', + sortFunction: (a: any, b: any) => { + const aLabel = a.props.title; + const bLabel = b.props.title; + + return aLabel.localeCompare(bLabel); + }, + hiddenHeadings: ['Favorite', 'Delete'], + iconColumns: ['Favorite', 'Delete'] + } +}; + +export default class YourAccounts extends Component { + public render() { + return ( + + + + ); + } +} diff --git a/common/v2/features/Dashboard/Settings/components/index.ts b/common/v2/features/Dashboard/Settings/components/index.ts new file mode 100644 index 000000000..2aeec66fc --- /dev/null +++ b/common/v2/features/Dashboard/Settings/components/index.ts @@ -0,0 +1,2 @@ +export { default as AddressBook } from './AddressBook'; +export { default as YourAccounts } from './YourAccounts'; diff --git a/common/v2/features/Dashboard/Settings/index.ts b/common/v2/features/Dashboard/Settings/index.ts new file mode 100644 index 000000000..1f16002f1 --- /dev/null +++ b/common/v2/features/Dashboard/Settings/index.ts @@ -0,0 +1 @@ +export { default as Settings } from './Settings'; diff --git a/common/v2/features/Dashboard/components/DashboardPanel.tsx b/common/v2/features/Dashboard/components/DashboardPanel.tsx index c977d0d02..92d8e18ed 100644 --- a/common/v2/features/Dashboard/components/DashboardPanel.tsx +++ b/common/v2/features/Dashboard/components/DashboardPanel.tsx @@ -7,10 +7,10 @@ import './DashboardPanel.scss'; interface Props { heading: string; - action: string; - actionLink: string; - className?: string; children: any; + action?: string; + actionLink?: string; + className?: string; } export default function DashboardPanel({ @@ -25,9 +25,12 @@ export default function DashboardPanel({
              {heading} - - - + {action && + actionLink && ( + + + + )}
              {children}
              diff --git a/common/v2/features/Dashboard/routes.ts b/common/v2/features/Dashboard/routes.ts index 25d63245a..e9c271643 100644 --- a/common/v2/features/Dashboard/routes.ts +++ b/common/v2/features/Dashboard/routes.ts @@ -1,6 +1,7 @@ import Dashboard from './Dashboard'; import { RequestAssets } from './RequestAssets'; import { SendAssets } from './SendAssets'; +import { Settings } from './Settings'; export default [ { @@ -20,5 +21,11 @@ export default [ path: '/dashboard/send', exact: true, component: SendAssets + }, + { + name: 'Settings', + path: '/dashboard/settings', + exact: true, + component: Settings } ]; From 88cb60e1905749972860a0b656388a59910de9c4 Mon Sep 17 00:00:00 2001 From: Connor Bryan Date: Thu, 31 Jan 2019 23:46:45 -0600 Subject: [PATCH 0047/1466] Further flesh out settings --- common/v2/components/FlippablePanel.scss | 3 + common/v2/components/FlippablePanel.tsx | 37 +++++++++ common/v2/components/index.ts | 1 + .../features/Dashboard/Settings/Settings.tsx | 30 +++++++- .../Settings/components/AddAccount.tsx | 9 +++ .../Settings/components/AddToAddressBook.scss | 34 +++++++++ .../Settings/components/AddToAddressBook.tsx | 75 +++++++++++++++++++ .../Settings/components/AddressBook.tsx | 11 ++- .../Settings/components/GeneralSettings.scss | 23 ++++++ .../Settings/components/GeneralSettings.tsx | 30 ++++++++ .../Settings/components/YourAccounts.tsx | 21 +++--- .../Dashboard/Settings/components/index.ts | 3 + .../Dashboard/components/DashboardPanel.tsx | 2 +- 13 files changed, 264 insertions(+), 15 deletions(-) create mode 100644 common/v2/components/FlippablePanel.scss create mode 100644 common/v2/components/FlippablePanel.tsx create mode 100644 common/v2/features/Dashboard/Settings/components/AddAccount.tsx create mode 100644 common/v2/features/Dashboard/Settings/components/AddToAddressBook.scss create mode 100644 common/v2/features/Dashboard/Settings/components/AddToAddressBook.tsx create mode 100644 common/v2/features/Dashboard/Settings/components/GeneralSettings.scss create mode 100644 common/v2/features/Dashboard/Settings/components/GeneralSettings.tsx diff --git a/common/v2/components/FlippablePanel.scss b/common/v2/components/FlippablePanel.scss new file mode 100644 index 000000000..106ab7b1c --- /dev/null +++ b/common/v2/components/FlippablePanel.scss @@ -0,0 +1,3 @@ +.FlippablePanel { + // +} diff --git a/common/v2/components/FlippablePanel.tsx b/common/v2/components/FlippablePanel.tsx new file mode 100644 index 000000000..32c877a9e --- /dev/null +++ b/common/v2/components/FlippablePanel.tsx @@ -0,0 +1,37 @@ +import { Component } from 'react'; + +import './FlippablePanel.scss'; + +interface RenderProps { + flipped: boolean; + toggleFlipped(): void; +} + +interface Props { + children(props: RenderProps): any; +} + +interface State { + flipped: boolean; +} + +export default class FlippablePanel extends Component { + public state: State = { + flipped: false + }; + + public render() { + const { children } = this.props; + const { flipped } = this.state; + + return children({ + flipped, + toggleFlipped: this.toggleFlipped + }); + } + + private toggleFlipped = () => + this.setState((prevState: State) => ({ + flipped: !prevState.flipped + })); +} diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index a0406709c..49c39bf08 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -1,4 +1,5 @@ export { default as Amount } from './Amount'; export { default as ContentPanel } from './ContentPanel'; +export { default as FlippablePanel } from './FlippablePanel'; export { default as Overlay } from './Overlay'; export { default as Stepper } from './Stepper'; diff --git a/common/v2/features/Dashboard/Settings/Settings.tsx b/common/v2/features/Dashboard/Settings/Settings.tsx index daab422af..f4b08463a 100644 --- a/common/v2/features/Dashboard/Settings/Settings.tsx +++ b/common/v2/features/Dashboard/Settings/Settings.tsx @@ -1,8 +1,15 @@ import React from 'react'; import { Heading } from '@mycrypto/ui'; +import { FlippablePanel } from 'v2/components'; import { Layout } from 'v2/features'; -import { AddressBook, YourAccounts } from './components'; +import { + AddAccount, + AddressBook, + YourAccounts, + AddToAddressBook, + GeneralSettings +} from './components'; import './Settings.scss'; // Legacy @@ -15,8 +22,25 @@ export default function Settings() { Settings Settings - - + + {({ flipped, toggleFlipped }) => + flipped ? ( + + ) : ( + + ) + } + + + {({ flipped, toggleFlipped }) => + flipped ? ( + + ) : ( + + ) + } + + ); } diff --git a/common/v2/features/Dashboard/Settings/components/AddAccount.tsx b/common/v2/features/Dashboard/Settings/components/AddAccount.tsx new file mode 100644 index 000000000..775fae10d --- /dev/null +++ b/common/v2/features/Dashboard/Settings/components/AddAccount.tsx @@ -0,0 +1,9 @@ +import React from 'react'; + +interface Props { + toggleFlipped(): void; +} + +export default function AddAccount({ toggleFlipped }: Props) { + return

              Add Account

              ; +} diff --git a/common/v2/features/Dashboard/Settings/components/AddToAddressBook.scss b/common/v2/features/Dashboard/Settings/components/AddToAddressBook.scss new file mode 100644 index 000000000..1fe571d36 --- /dev/null +++ b/common/v2/features/Dashboard/Settings/components/AddToAddressBook.scss @@ -0,0 +1,34 @@ +.AddToAddressBook { + padding: 24px 30px; + + &-back { + margin-right: 16px; + } + &-form { + margin-bottom: 45px; + + &-fieldset { + margin-bottom: 15px; + + label { + display: block; + margin-bottom: 9px; + color: #163150; + } + input, + textarea { + display: block; + width: 100%; + } + } + } + &-buttons { + button { + height: 50px; + + &:first-of-type { + margin-right: 12px; + } + } + } +} diff --git a/common/v2/features/Dashboard/Settings/components/AddToAddressBook.tsx b/common/v2/features/Dashboard/Settings/components/AddToAddressBook.tsx new file mode 100644 index 000000000..954e834a5 --- /dev/null +++ b/common/v2/features/Dashboard/Settings/components/AddToAddressBook.tsx @@ -0,0 +1,75 @@ +import React from 'react'; +import { Formik, Form, Field } from 'formik'; +import { Button, Input, Textarea } from '@mycrypto/ui'; + +import { DashboardPanel } from '../../components'; +import './AddToAddressBook.scss'; + +// Legacy +import backArrowIcon from 'common/assets/images/icn-back-arrow.svg'; + +interface Props { + toggleFlipped(): void; +} + +export default function AddToAddressBook({ toggleFlipped }: Props) { + return ( + + + Add Address + + } + className="AddToAddressBook" + > +
              + ( +
              +
              + + } + /> +
              +
              + + ( + + )} + /> +
              +
              + + ( + ); } diff --git a/common/v2/features/Dashboard/Settings/Import/components/ImportSuccess.tsx b/common/v2/features/Dashboard/Settings/Import/components/ImportSuccess.tsx new file mode 100644 index 000000000..2474a36f7 --- /dev/null +++ b/common/v2/features/Dashboard/Settings/Import/components/ImportSuccess.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import styled from 'styled-components'; +import { Button } from '@mycrypto/ui'; + +const ImportSuccessContainer = styled.div` + display: flex; + flex-direction: column; + align-items: center; +`; + +const FullWidthButton = styled(Button)` + width: 100%; + margin-top: 1rem; +`; + +const FullWidthLink = styled(Link)` + width: 100%; +`; + +export default function ImportSuccess(props) { + return ( + + You will see the imported files in settings! + + Back To Settings + + + ); +} diff --git a/common/v2/features/Dashboard/Settings/Import/components/index.ts b/common/v2/features/Dashboard/Settings/Import/components/index.ts index 57c9fae58..669fcd6cf 100644 --- a/common/v2/features/Dashboard/Settings/Import/components/index.ts +++ b/common/v2/features/Dashboard/Settings/Import/components/index.ts @@ -1 +1,2 @@ export { default as ImportBox } from './ImportBox'; +export { default as ImportSuccess } from './ImportSuccess'; \ No newline at end of file diff --git a/common/v2/features/Dashboard/Settings/Settings.tsx b/common/v2/features/Dashboard/Settings/Settings.tsx index a7dfdcd7e..ee9db15fd 100644 --- a/common/v2/features/Dashboard/Settings/Settings.tsx +++ b/common/v2/features/Dashboard/Settings/Settings.tsx @@ -9,7 +9,7 @@ import { AddAccount, AddressBook, AddToAddressBook, GeneralSettings } from './co // Legacy import settingsIcon from 'common/assets/images/icn-settings.svg'; import { AccountList } from '../components'; -import { AccountContext, AddressMetadataContext } from 'v2/providers'; +import { AccountContext, AddressMetadataContext, GlobalSettingsContext } from 'v2/providers'; const SettingsHeading = styled(Heading)` display: flex; @@ -62,7 +62,13 @@ export default function Settings() { )} - + + {({ updateGlobalSettings }) => ( + + )} + ); } diff --git a/common/v2/features/Dashboard/Settings/components/AddToAddressBook.tsx b/common/v2/features/Dashboard/Settings/components/AddToAddressBook.tsx index 27468c3e0..b81d6e2c0 100644 --- a/common/v2/features/Dashboard/Settings/components/AddToAddressBook.tsx +++ b/common/v2/features/Dashboard/Settings/components/AddToAddressBook.tsx @@ -34,7 +34,6 @@ const AddressFieldset = styled.fieldset` const AddressBookButtons = styled.div` button { - height: 50px; &:first-of-type { margin-right: 12px; diff --git a/common/v2/features/Dashboard/Settings/components/AddressBook.tsx b/common/v2/features/Dashboard/Settings/components/AddressBook.tsx index d5bcbaf49..3625370ab 100644 --- a/common/v2/features/Dashboard/Settings/components/AddressBook.tsx +++ b/common/v2/features/Dashboard/Settings/components/AddressBook.tsx @@ -16,6 +16,16 @@ const DeleteButton = styled(Button)` margin-left: 1em; `; +const AddAccountButton = styled(Button)` + color: #1eb8e7; + font-weight: bold; +`; + +const BottomRow = styled.div` + margin-top: 0.875rem; + text-align: center; +`; + export default function AddressBook({ addressMetadata, toggleFlipped, @@ -47,7 +57,11 @@ export default function AddressBook({ return ( - + + + + Add Address + + ); } diff --git a/common/v2/features/Dashboard/Settings/components/GeneralSettings.tsx b/common/v2/features/Dashboard/Settings/components/GeneralSettings.tsx index 569ac28c4..021a621b8 100644 --- a/common/v2/features/Dashboard/Settings/components/GeneralSettings.tsx +++ b/common/v2/features/Dashboard/Settings/components/GeneralSettings.tsx @@ -27,13 +27,20 @@ const SettingsControl = styled.div` button { margin-left: 15px; } +`; + +const SelectContainer = styled.div` + border: 0.125em solid #007896; + padding: 0.6rem; select { + border: none; height: 2em; + background: none; } `; - -export default function GeneralSettings() { +export default function GeneralSettings(props) { + const { updateGlobalSettings } = props; return ( @@ -43,11 +50,13 @@ export default function GeneralSettings() { - + + + - Account Settings + Paper Wallet @@ -56,13 +65,15 @@ export default function GeneralSettings() { Inactivity Timer - + + + diff --git a/common/v2/features/Dashboard/components/AccountList.tsx b/common/v2/features/Dashboard/components/AccountList.tsx index 0329b0837..6dca5f8c5 100644 --- a/common/v2/features/Dashboard/components/AccountList.tsx +++ b/common/v2/features/Dashboard/components/AccountList.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { Link } from 'react-router-dom'; import { Address, CollapsibleTable, Icon, Network, Typography, Button } from '@mycrypto/ui'; import DashboardPanel from './DashboardPanel'; @@ -17,6 +18,16 @@ const DeleteButton = styled(Button)` margin-left: 1em; `; +const AddAccountButton = styled(Button)` + color: #1eb8e7; + font-weight: bold; +`; + +const BottomRow = styled.div` + margin-top: 0.875rem; + text-align: center; +`; + export default function AccountList({ accounts, deleteAccount, className = '' }: Props) { const truncate = (children: string) => { return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); @@ -59,6 +70,11 @@ export default function AccountList({ accounts, deleteAccount, className = '' }: className={`AccountList ${className}`} > + + + + Add Account + + ); } diff --git a/common/v2/features/Dashboard/routes.ts b/common/v2/features/Dashboard/routes.ts index 92e1c4173..61378a302 100644 --- a/common/v2/features/Dashboard/routes.ts +++ b/common/v2/features/Dashboard/routes.ts @@ -3,6 +3,7 @@ import { RequestAssets } from './RequestAssets'; import { SendAssets } from './SendAssets'; import { Settings } from './Settings'; import { Import } from './Settings/Import'; +import {Export} from './Settings/Export'; export default [ { @@ -34,5 +35,11 @@ export default [ path: '/dashboard/settings/import', exact: true, component: Import + }, + { + name: 'Export', + path: '/dashboard/settings/export', + exact: true, + component: Export } ]; diff --git a/common/v2/providers/GlobalSettingsProvider/GlobalSettingsProvider.tsx b/common/v2/providers/GlobalSettingsProvider/GlobalSettingsProvider.tsx index 1eb5b1b56..cdca0e71e 100644 --- a/common/v2/providers/GlobalSettingsProvider/GlobalSettingsProvider.tsx +++ b/common/v2/providers/GlobalSettingsProvider/GlobalSettingsProvider.tsx @@ -4,8 +4,11 @@ import { GlobalSettings } from 'v2/services/GlobalSettings'; interface ProviderState { globalSettings: GlobalSettings; + localCache: string; updateGlobalSettings(globalSettingsData: GlobalSettings): void; readGlobalSettings(): void; + readCache(): void; + importCache(importedCache: string): void; } export const GlobalSettingsContext = createContext({} as ProviderState); @@ -15,13 +18,24 @@ const GlobalSettings = new GlobalSettingsServiceBase(); export class GlobalSettingsProvider extends Component { public readonly state: ProviderState = { globalSettings: GlobalSettings.readGlobalSettings() || [], + localCache: GlobalSettings.readCache() || '[]', updateGlobalSettings: (globalSettingsData: GlobalSettings) => { GlobalSettings.updateGlobalSettings(globalSettingsData); this.getGlobalSettings(); + this.getCache(); }, readGlobalSettings: () => { GlobalSettings.readGlobalSettings(); this.getGlobalSettings(); + this.getCache(); + }, + readCache: () => { + this.getCache(); + }, + importCache: (importedCache: string) => { + GlobalSettings.importCache(importedCache); + this.getGlobalSettings(); + this.getCache(); } }; @@ -35,4 +49,9 @@ export class GlobalSettingsProvider extends Component { const globalSettings: GlobalSettings = GlobalSettings.readGlobalSettings() || []; this.setState({ globalSettings }); }; + + private getCache = () => { + const localCache: String = GlobalSettings.readCache() || '[]'; + this.setState({ localCache }); + }; } diff --git a/common/v2/services/GlobalSettings/GlobalSettings.ts b/common/v2/services/GlobalSettings/GlobalSettings.ts index 12e2e939e..94bf103b1 100644 --- a/common/v2/services/GlobalSettings/GlobalSettings.ts +++ b/common/v2/services/GlobalSettings/GlobalSettings.ts @@ -18,7 +18,17 @@ export default class GlobalSettingsServiceBase { public readGlobalSettings = (): GlobalSettings => { this.init(); const parsedLocalCache: LocalCache = JSON.parse(localStorage.getItem('MyCryptoCache') || '[]'); - return parsedLocalCache.globalSettings; }; + + public readCache = () => { + this.init(); + const localCache: string = localStorage.getItem('MyCryptoCache') || '[]'; + return localCache; + }; + + public importCache = (importedCache: string) => { + this.init(); + localStorage.setItem('MyCryptoCache', importedCache); + } } From ab67a331847c904642d5a973cafaadb7a9fad5c1 Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Fri, 12 Apr 2019 11:27:39 +0200 Subject: [PATCH 0342/1466] Use Typography instead of p --- common/v2/components/NewAppReleaseModal.tsx | 28 ++++++++------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/common/v2/components/NewAppReleaseModal.tsx b/common/v2/components/NewAppReleaseModal.tsx index 1b6090319..075c340c2 100644 --- a/common/v2/components/NewAppReleaseModal.tsx +++ b/common/v2/components/NewAppReleaseModal.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Panel, Button, Icon } from '@mycrypto/ui'; +import { Panel, Button, Icon, Typography } from '@mycrypto/ui'; import styled from 'styled-components'; import semver from 'semver'; @@ -54,7 +54,7 @@ const UpdateImg = styled.img` margin-bottom: 15px; `; -const Header = styled.p` +const Header = styled(Typography)` font-size: 32px; font-weight: bold; line-height: normal; @@ -69,10 +69,9 @@ interface DescriptionProps { } // prettier-ignore -const Description = styled.p` - font-size: 18px; +const Description = styled(Typography)` + margin-top: 5px; font-weight: normal; - line-height: 27px; padding: ${props => (props.warning ? '0 30px 20px 30px' : '0 30px')}; color: ${props => (props.warning ? PASTEL_RED : props.theme.text)}; ${props => props.noMargin && 'margin: 0;'}; @@ -108,15 +107,8 @@ const SecondaryActionButton = styled(ActionButton)` } `; -const ReleaseLink = styled.a` - font-size: 18px; +const ReleaseLink = styled(Typography)` word-break: break-all; - color: ${props => props.theme.link}; - text-decoration: none; - - :hover { - color: ${props => props.theme.linkHover}; - } `; const WarningIcon = styled(Icon)` @@ -191,7 +183,7 @@ export default class NewAppReleaseModal extends React.PureComponent<{}, State> { Close -
              {translate('APP_UPDATE_TITLE')}
              +
              {translate('APP_UPDATE_TITLE')}
              {translate('APP_UPDATE_BODY')} @@ -211,13 +203,15 @@ export default class NewAppReleaseModal extends React.PureComponent<{}, State> { return ( <> -
              {translate('APP_UPDATE_TITLE_CRITICAL')}
              +
              {translate('APP_UPDATE_TITLE_CRITICAL')}
              {translate('APP_UPDATE_WARNING')} {translate('APP_UPDATE_BODY_CRITICAL')} - - {GITHUB_RELEASE_NOTES_URL}. + + + {GITHUB_RELEASE_NOTES_URL}. + From 3984f06f4ce6ca877360a926b15ace8d028d3390 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Sun, 14 Apr 2019 15:45:56 -0400 Subject: [PATCH 0343/1466] fix type errs --- common/v2/features/AddAccount/AddAccount.tsx | 45 +++++++++----------- common/v2/features/DevTools/DevTools.tsx | 5 ++- common/v2/services/Account/types.ts | 8 ++-- common/v2/services/LocalCache/constants.ts | 3 +- 4 files changed, 31 insertions(+), 30 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 326bfc10a..7c02da0cb 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -80,11 +80,11 @@ type Props = OwnProps & StateProps & DispatchProps & RouteComponentProps<{}>; type UnlockParams = {} | PrivateKeyValue; interface AddAccountData { - address: string | null; - accountType: WalletName | null; + address: string; + accountType: WalletName; label: string | null; network: string; - derivationPath: string | null; + derivationPath: string; } interface State { @@ -237,11 +237,11 @@ const WalletDecrypt = withRouter( hasSelectedNetwork: false, hasSelectedAddress: false, accountData: { - address: null, + address: '', network: 'Ethereum', label: 'New Account', - accountType: null, - derivationPath: null + accountType: MiscWalletName.VIEW_ONLY, + derivationPath: '' } }; @@ -251,7 +251,7 @@ const WalletDecrypt = withRouter( // Reset state when unlock is hidden / revealed if (nextProps.hidden !== this.props.hidden) { this.setState({ - value: null, + value: 0, selectedWalletKey: null }); } @@ -292,19 +292,15 @@ const WalletDecrypt = withRouter( {({ createAccount }) => (
              - - You're trying to add an {accountData.network} address {accountData.address} to your - dashboard.{
              } -
              - + {`You're trying to add an ${accountData.network} address ${ + accountData.address + } to your + dashboard.`} + + +
              )}
              @@ -536,7 +532,8 @@ const WalletDecrypt = withRouter( if (web3Available) { // timeout is only the maximum wait time before secondary view is shown // send view will be shown immediately on web3 resolve - timeout = 1500; + timeout = 1000; + console.log('got here?'); wallet.unlock(); } } catch (e) { @@ -558,7 +555,7 @@ const WalletDecrypt = withRouter( public clearWalletChoice = () => { this.setState({ selectedWalletKey: null, - value: null, + value: 0, hasSelectedNetwork: false, accountData: { ...this.state.accountData, @@ -572,8 +569,8 @@ const WalletDecrypt = withRouter( hasSelectedAddress: false, accountData: { ...this.state.accountData, - address: null, - derivationPath: null + address: '', + derivationPath: '' } }); }; diff --git a/common/v2/features/DevTools/DevTools.tsx b/common/v2/features/DevTools/DevTools.tsx index 2334d75e8..41a9bd545 100644 --- a/common/v2/features/DevTools/DevTools.tsx +++ b/common/v2/features/DevTools/DevTools.tsx @@ -7,6 +7,7 @@ import { Account, ExtendedAccount } from 'v2/services/Account'; import { AccountContext } from 'v2/providers/AccountProvider'; import ToolsAccountList from './ToolsAccountList'; +import { SecureWalletName } from 'config'; const DevToolsContainer = styled.div` position: absolute; @@ -35,8 +36,8 @@ const DevTools = () => { network: 'Ethereum', localSettings: '17ed6f49-ff23-4bef-a676-69174c266b37', assets: '12d3cbf2-de3a-4050-a0c6-521592e4b85a', - accountType: 'MetaMask', - value: 1e18, + accountType: SecureWalletName.WEB3, + value: 0, transactionHistory: '76b50f76-afb2-4185-ab7d-4d62c0654882', uuid: '61d84f5e-0efa-46b9-915c-aed6ebe5a4dc' }} diff --git a/common/v2/services/Account/types.ts b/common/v2/services/Account/types.ts index 90bbd05b8..3f828a522 100644 --- a/common/v2/services/Account/types.ts +++ b/common/v2/services/Account/types.ts @@ -1,10 +1,12 @@ +import { WalletName } from 'config/data'; + export interface Account { - label: string | null; - address: string | null; + label: string; + address: string; network: string; localSettings: string; assets: string; - accountType: string | null; + accountType: WalletName; value: number; transactionHistory: string; } diff --git a/common/v2/services/LocalCache/constants.ts b/common/v2/services/LocalCache/constants.ts index 3734d6901..077ac16ee 100644 --- a/common/v2/services/LocalCache/constants.ts +++ b/common/v2/services/LocalCache/constants.ts @@ -1,4 +1,5 @@ import * as serviceTypes from 'v2/services/types'; +import { SecureWalletName } from 'config/data'; export const CACHE_KEY = 'MyCryptoCache'; @@ -40,7 +41,7 @@ export const CACHE_INIT_DEV: LocalCache = { network: 'Ethereum', localSettings: '17ed6f49-ff23-4bef-a676-69174c266b37', assets: '12d3cbf2-de3a-4050-a0c6-521592e4b85a', - accountType: 'MetaMask', + accountType: SecureWalletName.WEB3, value: 1e18, transactionHistory: '76b50f76-afb2-4185-ab7d-4d62c0654882' } From 819bd87600c5fe5aaab83e2f6c34b6b26d1f1e80 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Sun, 14 Apr 2019 19:22:03 -0400 Subject: [PATCH 0344/1466] Fix rename --- ...sticWalletsModal.scss => DeterministicWallets.scss} | 0 .../AddAccount/components/DeterministicWallets.tsx | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) rename common/v2/features/AddAccount/components/{DeterministicWalletsModal.scss => DeterministicWallets.scss} (100%) diff --git a/common/v2/features/AddAccount/components/DeterministicWalletsModal.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss similarity index 100% rename from common/v2/features/AddAccount/components/DeterministicWalletsModal.scss rename to common/v2/features/AddAccount/components/DeterministicWallets.scss diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 2b2af3ba7..af392c457 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -14,7 +14,7 @@ import { } from 'features/deterministicWallets'; import { addressBookSelectors } from 'features/addressBook'; import { UnitDisplay, Input } from 'components/ui'; -import './DeterministicWalletsModal.scss'; +import './DeterministicWallets.scss'; import { truncate } from 'v2/libs'; const WALLETS_PER_PAGE = 5; @@ -61,7 +61,7 @@ const customDPath: DPath = { value: 'custom' }; -class DeterministicWalletsModalClass extends React.PureComponent { +class DeterministicWalletsClass extends React.PureComponent { public state: State = { selectedAddress: '', selectedAddrIndex: 0, @@ -311,9 +311,9 @@ function mapStateToProps(state: AppState): StateProps { }; } -const DeterministicWalletsModal = connect(mapStateToProps, { +const DeterministicWallets = connect(mapStateToProps, { getDeterministicWallets: deterministicWalletsActions.getDeterministicWallets, setDesiredToken: deterministicWalletsActions.setDesiredToken -})(DeterministicWalletsModalClass); +})(DeterministicWalletsClass); -export default DeterministicWalletsModal; +export default DeterministicWallets; From addcc8fc7cd1af512dd75d1cbdf9d2bea3a13e8f Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Sun, 14 Apr 2019 20:08:18 -0400 Subject: [PATCH 0345/1466] Use Copyable with addresses --- .../AddAccount/components/DeterministicWallets.scss | 5 +++++ .../AddAccount/components/DeterministicWallets.tsx | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index c031278b8..e3605774d 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -71,6 +71,11 @@ &-text { font-size: 10px; } + + &-select { + display: flex; + align-items: center; + } } &-more { diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index af392c457..31336b01e 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Select, { Option } from 'react-select'; import { connect } from 'react-redux'; -import { Table } from '@mycrypto/ui'; +import { Table, Copyable } from '@mycrypto/ui'; import translate, { translateRaw } from 'translations'; import { isValidPath } from 'libs/validators'; @@ -263,7 +263,7 @@ class DeterministicWalletsClass extends React.PureComponent { // tslint:disable:jsx-key return [ wallet.index + 1, - <> +
              { onClick={this.selectAddress.bind(this, wallet.address, wallet.index)} /> {label && } - {truncate(wallet.address)} - , + + + +
              , Date: Mon, 15 Apr 2019 17:22:44 +0200 Subject: [PATCH 0346/1466] Added notifications panel to dashboard, wallet created notification --- .../assets/images/icn-don-t-lose-crypto.svg | 21 ++++ .../assets/images/icn-how-do-i-buy-crypto.svg | 30 +++++ common/assets/images/icn-questions.svg | 9 ++ common/v2/features/Dashboard/Dashboard.scss | 7 -- common/v2/features/Dashboard/Dashboard.tsx | 3 + .../NotificationsPanel/NotificationsPanel.tsx | 62 ++++++++++ .../components/WalletCreatedNotification.tsx | 112 ++++++++++++++++++ .../NotificationsPanel/components/index.ts | 1 + .../Dashboard/NotificationsPanel/index.ts | 1 + 9 files changed, 239 insertions(+), 7 deletions(-) create mode 100644 common/assets/images/icn-don-t-lose-crypto.svg create mode 100644 common/assets/images/icn-how-do-i-buy-crypto.svg create mode 100644 common/assets/images/icn-questions.svg create mode 100644 common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx create mode 100644 common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx create mode 100644 common/v2/features/Dashboard/NotificationsPanel/components/index.ts create mode 100644 common/v2/features/Dashboard/NotificationsPanel/index.ts diff --git a/common/assets/images/icn-don-t-lose-crypto.svg b/common/assets/images/icn-don-t-lose-crypto.svg new file mode 100644 index 000000000..7ff164513 --- /dev/null +++ b/common/assets/images/icn-don-t-lose-crypto.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/common/assets/images/icn-how-do-i-buy-crypto.svg b/common/assets/images/icn-how-do-i-buy-crypto.svg new file mode 100644 index 000000000..17f1c0c22 --- /dev/null +++ b/common/assets/images/icn-how-do-i-buy-crypto.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/assets/images/icn-questions.svg b/common/assets/images/icn-questions.svg new file mode 100644 index 000000000..3d493452a --- /dev/null +++ b/common/assets/images/icn-questions.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/common/v2/features/Dashboard/Dashboard.scss b/common/v2/features/Dashboard/Dashboard.scss index 0901014d8..292181ee9 100644 --- a/common/v2/features/Dashboard/Dashboard.scss +++ b/common/v2/features/Dashboard/Dashboard.scss @@ -1,14 +1,7 @@ .Dashboard-mobile { - margin-top: 20px; background: #e8eaed; font-weight: 300; - @media (min-width: 700px) { - margin-top: 60px; - } - @media (min-width: 1000px) { - margin-top: 0; - } @media (min-width: 1080px) { display: none; } diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index 9dab9b5a2..bbbb1b9f2 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -9,6 +9,7 @@ import { TokenList, WalletBreakdown } from './components'; +import { NotificationsPanel } from './NotificationsPanel'; import { actions } from './constants'; import './Dashboard.scss'; import { @@ -25,6 +26,7 @@ export default function Dashboard() { {({ accounts, deleteAccount }) => ( +
              {actions.map(action => )}
              @@ -70,6 +72,7 @@ export default function Dashboard() { {({ accounts, deleteAccount }) => ( +
              diff --git a/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx new file mode 100644 index 000000000..58372eeb8 --- /dev/null +++ b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx @@ -0,0 +1,62 @@ +import React, { Component } from 'react'; +import { Panel, Button } from '@mycrypto/ui'; +import styled from 'styled-components'; + +import { WalletCreatedNotification } from './components'; +import { BREAK_POINTS } from 'v2/features/constants'; + +// Legacy +import closeIcon from 'common/assets/images/icn-close.svg'; + +const { SCREEN_MD } = BREAK_POINTS; + +const MainPanel = styled(Panel)` + position: relative; + margin-left: 15px; + margin-right: 15px; + + @media (min-width: ${SCREEN_MD}) { + margin: 0 0 50px 0; + } +`; + +const CloseButton = styled(Button)` + position: absolute; + right: 17px; + top: 6px; + img { + width: 13px; + height: 13px; + } +`; + +class NotificationsPanel extends Component { + public state = { + isOpen: true + }; + + public render() { + const { isOpen } = this.state; + + return ( + isOpen && ( + + + Close + + {this.getFirstVisibleNotification()} + + ) + ); + } + + private onClose = () => { + this.setState({ isOpen: false }); + }; + + private getFirstVisibleNotification() { + return ; + } +} + +export default NotificationsPanel; diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx new file mode 100644 index 000000000..e1e25da19 --- /dev/null +++ b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx @@ -0,0 +1,112 @@ +import React from 'react'; +import { Typography } from '@mycrypto/ui'; +import styled from 'styled-components'; + +import { BREAK_POINTS } from 'v2/features/constants'; + +// Legacy +import champagneIcon from 'common/assets/images/icn-champagne-2.svg'; +import howBuyIcon from 'common/assets/images/icn-how-do-i-buy-crypto.svg'; +import dontLoseCryptoIcon from 'common/assets/images/icn-don-t-lose-crypto.svg'; +import questionsIcon from 'common/assets/images/icn-questions.svg'; + +const { SCREEN_MD } = BREAK_POINTS; + +const NotificationWrapper = styled.div` + display: flex; + align-items: center; + justify-content: space-between; + text-align: left; + + @media (max-width: ${SCREEN_MD}) { + flex-direction: column; + text-align: center; + } +`; + +const Info = styled.div` + display: flex; + align-items: center; + max-width: 700px; +`; + +const Content = styled.div` + display: flex; + flex-direction: column; +`; + +const ChampagneImage = styled.img` + width: 71px; + height: 70px; + transform: rotateY(180deg); + margin-right: 30px; + + @media (max-width: ${SCREEN_MD}) { + display: none; + } +`; + +const Resources = styled.div` + display: flex; +`; + +const ResourceItemWrapper = styled.a` + display: flex; + flex-direction: column; + text-align: center; + justify-content: center; + align-items: center; + max-width: 140px; + font-size: 16px; +`; + +const Image = styled.img` + width: 50px; + height: 51px; + margin-bottom: 10px; +`; + +interface ResourceItemProps { + src: string; + title: string; + link: string; +} + +const ResourceItem: React.SFC = ({ src, title, link }) => { + return ( + + + {title} + + ); +}; + +export default function WalletCreatedNotification() { + return ( + + + + + Your wallet has been created. + + The address of your new MyCrypto wallet account is: + 0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520. + + + You can now add funds to your wallet and start using MyCrypto. Need help getting + started? Check out our resources. + + + + + + + + + + ); +} diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/index.ts b/common/v2/features/Dashboard/NotificationsPanel/components/index.ts new file mode 100644 index 000000000..22b25e29a --- /dev/null +++ b/common/v2/features/Dashboard/NotificationsPanel/components/index.ts @@ -0,0 +1 @@ +export { default as WalletCreatedNotification } from './WalletCreatedNotification'; diff --git a/common/v2/features/Dashboard/NotificationsPanel/index.ts b/common/v2/features/Dashboard/NotificationsPanel/index.ts new file mode 100644 index 000000000..4571fe81d --- /dev/null +++ b/common/v2/features/Dashboard/NotificationsPanel/index.ts @@ -0,0 +1 @@ +export { default as NotificationsPanel } from './NotificationsPanel'; From 87d4fa2b75207ad9d253dd3a0199399dc4977907 Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Mon, 15 Apr 2019 18:59:41 +0200 Subject: [PATCH 0347/1466] Updated description font style --- .../components/WalletCreatedNotification.tsx | 53 ++++++++++++++----- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx index e1e25da19..65e46cb56 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { Typography } from '@mycrypto/ui'; import styled from 'styled-components'; import { BREAK_POINTS } from 'v2/features/constants'; @@ -10,7 +9,7 @@ import howBuyIcon from 'common/assets/images/icn-how-do-i-buy-crypto.svg'; import dontLoseCryptoIcon from 'common/assets/images/icn-don-t-lose-crypto.svg'; import questionsIcon from 'common/assets/images/icn-questions.svg'; -const { SCREEN_MD } = BREAK_POINTS; +const { SCREEN_XS, SCREEN_MD } = BREAK_POINTS; const NotificationWrapper = styled.div` display: flex; @@ -35,6 +34,25 @@ const Content = styled.div` flex-direction: column; `; +const Title = styled.p` + font-weight: bold; + font-size: 24px; + + @media (max-width: ${SCREEN_XS}) { + font-size: 20px; + } +`; + +const Description = styled.p` + font-weight: normal; + word-break: break-word; + font-size: 16px; + + @media (max-width: ${SCREEN_XS}) { + font-size: 14px; + } +`; + const ChampagneImage = styled.img` width: 71px; height: 70px; @@ -48,6 +66,11 @@ const ChampagneImage = styled.img` const Resources = styled.div` display: flex; + align-items: baseline; + + @media (max-width: ${SCREEN_MD}) { + margin-top: 20px; + } `; const ResourceItemWrapper = styled.a` @@ -56,8 +79,14 @@ const ResourceItemWrapper = styled.a` text-align: center; justify-content: center; align-items: center; - max-width: 140px; + width: 140px; + font-weight: normal; font-size: 16px; + + @media (max-width: ${SCREEN_XS}) { + font-size: 12px; + max-width: 105px; + } `; const Image = styled.img` @@ -87,15 +116,15 @@ export default function WalletCreatedNotification() { - Your wallet has been created. - - The address of your new MyCrypto wallet account is: - 0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520. - - - You can now add funds to your wallet and start using MyCrypto. Need help getting - started? Check out our resources. - + Your wallet has been created. + + Your account with the address 0x06A85356DCb5b307096726FB86A78c59D38e08ee has been + successfully created! + + + Your dashboard now shows all your accounts and their balances. Use the “All Accounts” + dropdown to filter your accounts. Or, check out some other helpful resources. + From cd2a19c3b3edd2c3ea0919a9249cd342940a1a45 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Tue, 16 Apr 2019 01:19:28 -0400 Subject: [PATCH 0348/1466] Remove Addresses label --- .../AddAccount/components/DeterministicWallets.scss | 6 ------ .../features/AddAccount/components/DeterministicWallets.tsx | 1 - 2 files changed, 7 deletions(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index e3605774d..28d8fcad1 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -5,12 +5,6 @@ &-path { margin-bottom: 20px; - &-label { - font-size: $font-size-medium; - margin-right: $space-md; - line-height: $input-height-base; - } - &-select { flex: 1; diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 31336b01e..dc566afb6 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -98,7 +98,6 @@ class DeterministicWalletsClass extends React.PureComponent { className="DWModal-path form-group-sm flex-wrapper" onSubmit={this.handleSubmitCustomPath} > - {translate('DECRYPT_DROPDOWN_LABEL')}
              -
              +
              + {translate('DECRYPT_PROMPT_SELECT_ADDRESS')} +
              + {
              {this.state.currentDPath.label === customDPath.label && ( -
              +
              { />
              -
              @@ -264,7 +261,7 @@ class DeterministicWalletsClass extends React.PureComponent { // tslint:disable:jsx-key return [ wallet.index + 1, -
              +
              { checkOffline={true} /> ) : ( - N/A + N/A ), - + ]; // tslint:enable:jsx-key From 1fe5b849173b6b2ee7062b58a27d44b9b6a867fa Mon Sep 17 00:00:00 2001 From: blurpesec Date: Wed, 17 Apr 2019 14:48:18 -0400 Subject: [PATCH 0361/1466] initial addition of createWithID --- common/v2/services/LocalCache/LocalCache.ts | 14 ++++++++++++++ common/v2/services/NodeOptions/NodeOptions.ts | 3 ++- common/v2/services/NodeOptions/types.ts | 8 ++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/common/v2/services/LocalCache/LocalCache.ts b/common/v2/services/LocalCache/LocalCache.ts index 5be3affe2..0a8d96c1e 100644 --- a/common/v2/services/LocalCache/LocalCache.ts +++ b/common/v2/services/LocalCache/LocalCache.ts @@ -199,6 +199,20 @@ export const create = (key: K) => ( setCache(newCache); }; +export const createWithID = (key: K) => ( + value: LocalCache[K][keyof LocalCache[K]], + id: string +) => { + const uuid = id; + if (getCache()[key][uuid] === undefined) { + const newCache = getCache(); + newCache[key][uuid] = value; + setCache(newCache); + } else { + console.log('Error: key already exists in createWithID'); + } +}; + export const read = (key: K) => (uuid: string): LocalCache[K][string] => { return getCache()[key][uuid]; }; diff --git a/common/v2/services/NodeOptions/NodeOptions.ts b/common/v2/services/NodeOptions/NodeOptions.ts index c275932a4..3c2418434 100644 --- a/common/v2/services/NodeOptions/NodeOptions.ts +++ b/common/v2/services/NodeOptions/NodeOptions.ts @@ -1,6 +1,7 @@ -import { create, read, update, destroy, readAll } from 'v2/services/LocalCache'; +import { create, read, update, destroy, readAll, createWithID } from 'v2/services/LocalCache'; export const createNodeOptions = create('nodeOptions'); +export const createNodeOptionsWithID = createWithID('nodeOptions'); export const readNodeOptions = read('nodeOptions'); export const updateNodeOptions = update('nodeOptions'); export const deleteNodeOptions = destroy('nodeOptions'); diff --git a/common/v2/services/NodeOptions/types.ts b/common/v2/services/NodeOptions/types.ts index 4761b0ed4..a3e424dd2 100644 --- a/common/v2/services/NodeOptions/types.ts +++ b/common/v2/services/NodeOptions/types.ts @@ -2,9 +2,13 @@ import { StaticNetworkIds } from 'shared/types/network'; export interface NodeOptions { name: string; - type: 'rpc' | 'etherscan' | 'infura' | 'web3' | 'myccustom'; + type?: 'rpc' | 'etherscan' | 'infura' | 'web3' | 'myccustom'; service: string; - url: string; + url?: string; + hidden?: boolean; + isCustom?: boolean; + isAuto?: boolean; + network?: string; } export interface ExtendedNodeOptions extends NodeOptions { From d51b1e3a4d7c25ea37fef39b7ee8359e8b880817 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Wed, 17 Apr 2019 14:49:40 -0400 Subject: [PATCH 0362/1466] testing --- common/v2/features/AddAccount/AddAccount.tsx | 46 ++++++++---- .../features/AddAccount/components/Web3.tsx | 61 ++++++++++------ common/v2/features/Wallets/web3/types.ts | 3 + common/v2/features/Wallets/web3/web3.ts | 71 +++++++++++-------- common/v2/libs/nodes/web3/index.ts | 8 ++- 5 files changed, 121 insertions(+), 68 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 6ae79d922..961e20102 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -36,7 +36,7 @@ import { PrivateKeyValue, TrezorDecrypt, SafeTminiDecrypt, - Web3Decrypt, + Web3DecryptClass, WalletButton, ParitySignerDecrypt, InsecureWalletWarning, @@ -63,7 +63,7 @@ interface DispatchProps { unlockKeystore: WalletActions.TUnlockKeystore; unlockMnemonic: WalletActions.TUnlockMnemonic; unlockPrivateKey: WalletActions.TUnlockPrivateKey; - unlockWeb3: walletActions.TUnlockWeb3; + unlockWeb3: WalletActions.TUnlockWeb3; setWallet: walletActions.TSetWallet; resetTransactionRequested: transactionFieldsActions.TResetTransactionRequested; showNotification: notificationsActions.TShowNotification; @@ -146,7 +146,7 @@ const WalletDecrypt = withRouter( lid: web3info.lid, icon: web3info.icon, description: 'ADD_WEB3DESC', - component: Web3Decrypt, + component: Web3DecryptClass, initialParams: {}, unlock: this.props.unlockWeb3, attemptUnlock: true, @@ -660,24 +660,41 @@ const WalletDecrypt = withRouter( }; public onUnlock = (payload: any) => { + console.log('got here?!@?!?@') + console.log(payload); const { value, selectedWalletKey } = this.state; if (!selectedWalletKey) { return; } - // some components (TrezorDecrypt) don't take an onChange prop, and thus // this.state.value will remain unpopulated. in this case, we can expect // the payload to contain the unlocked wallet info. const unlockValue = value && !isEmpty(value) ? value : payload; - this.WALLETS[selectedWalletKey].unlock(unlockValue); - this.setState({ - hasSelectedAddress: true, - accountData: { - ...this.state.accountData, - derivationPath: unlockValue.path, - address: unlockValue.address - } - }); + + console.log('this.state.accountType ' + this.state.accountData.accountType) + if (this.state.accountData.accountType === 'web3') { + const x = this.WALLETS[selectedWalletKey].unlock(unlockValue); + console.log('went web3 route') + console.log(x); + this.setState({ + hasSelectedAddress: true, + accountData: { + ...this.state.accountData, + derivationPath: '', + address: x.getAddressString() + } + }); + } else { + this.WALLETS[selectedWalletKey].unlock(unlockValue); + this.setState({ + hasSelectedAddress: true, + accountData: { + ...this.state.accountData, + derivationPath: unlockValue.path, + address: unlockValue.address + } + }); + } //this.props.resetTransactionRequested(); }; @@ -719,8 +736,7 @@ export default connect(mapStateToProps, { unlockKeystore: WalletActions.unlockKeystore, unlockMnemonic: WalletActions.unlockMnemonic, unlockPrivateKey: WalletActions.unlockPrivateKey, - unlockWeb3: walletActions.unlockWeb3, - setWallet: walletActions.setWallet, + unlockWeb3: WalletActions.unlockWeb3, resetTransactionRequested: transactionFieldsActions.resetTransactionRequested, showNotification: notificationsActions.showNotification })(WalletDecrypt) as React.ComponentClass; diff --git a/common/v2/features/AddAccount/components/Web3.tsx b/common/v2/features/AddAccount/components/Web3.tsx index b29e84443..6a6826ea2 100644 --- a/common/v2/features/AddAccount/components/Web3.tsx +++ b/common/v2/features/AddAccount/components/Web3.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { PureComponent } from 'react'; import translate from 'translations'; import { NewTabLink } from 'components/ui'; @@ -7,25 +7,42 @@ import './Web3.scss'; interface Props { onUnlock(): void; } +interface State { + address: string; +} + +export class Web3DecryptClass extends PureComponent { + public state: State = { + address: '' + }; + + + public render () { + return( +
              +
              + +
              -export const Web3Decrypt: React.SFC = ({ onUnlock }) => ( -
              -
              - -
              - -
              - -
              - -

              - In order to use MetaMask with MyCrypto, your ad blocker must be disabled. -

              -
              -); +
              + +
              + +

              + In order to use MetaMask with MyCrypto, your ad blocker must be disabled. +

              +
              + ) + }; + + private handleUnlock = () => { + const x = this.props.onUnlock(); + console.log(x); + } +} diff --git a/common/v2/features/Wallets/web3/types.ts b/common/v2/features/Wallets/web3/types.ts index e69de29bb..b2250836e 100644 --- a/common/v2/features/Wallets/web3/types.ts +++ b/common/v2/features/Wallets/web3/types.ts @@ -0,0 +1,3 @@ +import { Web3Wallet } from "v2/libs/wallet"; + +export type TUnlockWeb3 = () => Promise; \ No newline at end of file diff --git a/common/v2/features/Wallets/web3/web3.ts b/common/v2/features/Wallets/web3/web3.ts index a50d12b47..7f736d975 100644 --- a/common/v2/features/Wallets/web3/web3.ts +++ b/common/v2/features/Wallets/web3/web3.ts @@ -1,5 +1,5 @@ -import { isWeb3Node, setupWeb3Node, Web3Service } from 'libs/nodes/web3'; -import { Web3Wallet } from 'libs/wallet'; +import { isWeb3Node, setupWeb3Node, Web3Service } from 'v2/libs/nodes/web3'; +import { Web3Wallet } from 'v2/libs/wallet'; import { stripWeb3Network, makeWeb3Network, @@ -7,67 +7,73 @@ import { shepherd, makeProviderConfig } from 'libs/nodes'; -import { configNodesSelectedActions, configNodesStaticActions } from 'features/config'; -import { StaticNodeConfig, CustomNodeConfig } from 'v2/services/NodeOptions/types'; +import { StaticNodeConfig, CustomNodeConfig, NodeOptions } from 'v2/services/NodeOptions/types'; import { getNetworkByChainId, NetworkSelect } from 'v2/libs'; import { translateRaw } from 'translations'; -import { LocalCache } from 'v2/services/LocalCache/constants'; -import { createNodeOptions } from 'v2/services/NodeOptions/NodeOptions'; - +import { createNodeOptions, readNodeOptions, createNodeOptionsWithID } from 'v2/services/NodeOptions/NodeOptions'; +import { updateCurrents, readCurrents } from 'v2/services/Currents/Currents'; //#region Web3 -let web3Added = false; +let web3Added = true; export const initWeb3Node = async () => { + console.log('got init') const { chainId, lib } = await setupWeb3Node(); + console.log('got init2') const network: NetworkSelect = getNetworkByChainId(chainId); - + console.log('got init3') if (!network) { throw new Error(`MyCrypto doesn’t support the network with chain ID '${chainId}'`); } - + console.log('got init4') const web3Network = makeWeb3Network(network.id); + console.log('got here? ' + JSON.stringify(web3Network, null, 4)) const id = 'web3'; - - const config: StaticNodeConfig = { - id, + console.log('got init5') + const config: NodeOptions = { + name: id, isCustom: false, - network: web3Network as any, service: Web3Service, - hidden: true + hidden: true, + network: web3Network }; - + console.log('got init6') if (getShepherdManualMode()) { shepherd.auto(); } - + console.log('got init7') if (!web3Added) { + console.log('got init 7.5') shepherd.useProvider('web3', id, makeProviderConfig({ network: web3Network })); } - + console.log('got init8') web3Added = true; - - setNode(id, config); + createNodeOptionsWithID(config, id) + console.log('got init9') + updateCurrents({ node: 'web3' }); + console.log('got init10') + console.log(lib) return lib; }; export const unlockWeb3 = async () => { try { + console.log('did i get here?') const nodeLib = await initWeb3Node(); - configNodesSelectedActions.changeNodeRequested('web3'); + console.log('did i get here?1') /*await (action: any) => { action.type === configNodesSelectedTypes.ConfigNodesSelectedActions.CHANGE_SUCCEEDED && action.payload.nodeId === 'web3' }*/ - const web3Node: any | null = getWeb3Node(); - + const web3Node: any | null = await getWeb3Node(); + console.log('did i get here?1.1') if (!web3Node) { throw Error('Web3 node config not found!'); } - + console.log(web3Node) const network = web3Node.network; if (!isWeb3Node(nodeLib)) { @@ -75,25 +81,34 @@ export const unlockWeb3 = async () => { } const accounts: string = await nodeLib.getAccounts(); + console.log('accounts: ' + accounts) const address = accounts[0]; - + console.log('did i get here?3') if (!address) { throw new Error('No accounts found in MetaMask / Web3.'); } + console.log('did i get here?4 ' + network) + console.log(new Web3Wallet(address, stripWeb3Network(network))) + console.log('did i get here?6') return new Web3Wallet(address, stripWeb3Network(network)); } catch (err) { console.error(err); // unset web3 node so node dropdown isn't disabled - configNodesStaticActions.web3UnsetNode(); + //configNodesStaticActions.web3UnsetNode(); console.log('Error ' + translateRaw(err.message)); } }; export const getWeb3Node = async () => { const isWeb3Node = (nodeId: string) => nodeId === 'web3'; - const currNode = configNodesStaticSelectors.getStaticNodeConfig(state); - const currNodeId = configNodesSelectedSelectors.getNodeId(state); + console.log('getWeb3 1') + const currNode = readNodeOptions('web3'); + console.log('getWeb3 2') + const currNodeId = readCurrents().node; + console.log('getWeb3 4') + console.log('next - ' + (currNode && currNodeId && isWeb3Node(currNodeId)) + ' - ' + currNode + ' - ' + currNodeId) if (currNode && currNodeId && isWeb3Node(currNodeId)) { + console.log('getWeb3 5') return currNode; } return null; diff --git a/common/v2/libs/nodes/web3/index.ts b/common/v2/libs/nodes/web3/index.ts index 11edb7b63..c4ddd8dda 100644 --- a/common/v2/libs/nodes/web3/index.ts +++ b/common/v2/libs/nodes/web3/index.ts @@ -78,15 +78,17 @@ export async function setupWeb3Node() { // Handle the following MetaMask breaking change: // https://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8 const { ethereum } = window as any; - + console.log('hur1') if (ethereum) { + // Overwrite the legacy Web3 with the newer version. (window as any).web3 = new (window as any).Web3(ethereum); - + console.log('hur2') try { + console.log(ethereum) // Request permission to access MetaMask accounts. await ethereum.enable(); - + console.log('hur3') // Permission was granted; proceed. return getChainIdAndLib(); } catch (e) { From d2ed3246617ad414a70a2e53438ca00ef909ce39 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Wed, 17 Apr 2019 16:02:45 -0400 Subject: [PATCH 0363/1466] testing2 --- common/v2/features/AddAccount/components/Web3.tsx | 5 ----- common/v2/features/Wallets/web3/web3.ts | 11 ++++++----- common/v2/libs/networks/networks.ts | 2 +- common/v2/services/NodeOptions/types.ts | 6 +++++- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/common/v2/features/AddAccount/components/Web3.tsx b/common/v2/features/AddAccount/components/Web3.tsx index 6a6826ea2..f796b9619 100644 --- a/common/v2/features/AddAccount/components/Web3.tsx +++ b/common/v2/features/AddAccount/components/Web3.tsx @@ -40,9 +40,4 @@ export class Web3DecryptClass extends PureComponent {
              ) }; - - private handleUnlock = () => { - const x = this.props.onUnlock(); - console.log(x); - } } diff --git a/common/v2/features/Wallets/web3/web3.ts b/common/v2/features/Wallets/web3/web3.ts index 7f736d975..41b797220 100644 --- a/common/v2/features/Wallets/web3/web3.ts +++ b/common/v2/features/Wallets/web3/web3.ts @@ -7,7 +7,7 @@ import { shepherd, makeProviderConfig } from 'libs/nodes'; -import { StaticNodeConfig, CustomNodeConfig, NodeOptions } from 'v2/services/NodeOptions/types'; +import { CustomNodeConfig, NodeOptions } from 'v2/services/NodeOptions/types'; import { getNetworkByChainId, NetworkSelect } from 'v2/libs'; import { translateRaw } from 'translations'; import { createNodeOptions, readNodeOptions, createNodeOptionsWithID } from 'v2/services/NodeOptions/NodeOptions'; @@ -34,6 +34,7 @@ export const initWeb3Node = async () => { const config: NodeOptions = { name: id, isCustom: false, + type: 'web3', service: Web3Service, hidden: true, network: web3Network @@ -100,20 +101,20 @@ export const unlockWeb3 = async () => { }; export const getWeb3Node = async () => { - const isWeb3Node = (nodeId: string) => nodeId === 'web3'; + console.log('getWeb3 1') const currNode = readNodeOptions('web3'); console.log('getWeb3 2') const currNodeId = readCurrents().node; console.log('getWeb3 4') - console.log('next - ' + (currNode && currNodeId && isWeb3Node(currNodeId)) + ' - ' + currNode + ' - ' + currNodeId) - if (currNode && currNodeId && isWeb3Node(currNodeId)) { + console.log('next - ' + (currNode && currNodeId && isWeb3NodeId(currNodeId)) + ' - ' + currNode + ' - ' + currNodeId) + if (currNode && currNodeId && isWeb3NodeId(currNodeId)) { console.log('getWeb3 5') return currNode; } return null; }; - +export const isWeb3NodeId = (nodeId: string) => nodeId === 'web3'; export const getNodes = async () => {}; export const getCurrentNode = async () => {}; diff --git a/common/v2/libs/networks/networks.ts b/common/v2/libs/networks/networks.ts index f27b13381..bd669e6a4 100644 --- a/common/v2/libs/networks/networks.ts +++ b/common/v2/libs/networks/networks.ts @@ -7,7 +7,7 @@ export const getNetworkByChainId = (chainId: string): NetworkSelect => { let networkToSelect = null; networks.map((network: NetworkOptions) => { - if (network.chainId === parseInt(chainId)) { + if (network.chainId === parseInt(chainId, 16)) { networkToSelect = network; } }); diff --git a/common/v2/services/NodeOptions/types.ts b/common/v2/services/NodeOptions/types.ts index 4761b0ed4..7fbbd5996 100644 --- a/common/v2/services/NodeOptions/types.ts +++ b/common/v2/services/NodeOptions/types.ts @@ -4,7 +4,11 @@ export interface NodeOptions { name: string; type: 'rpc' | 'etherscan' | 'infura' | 'web3' | 'myccustom'; service: string; - url: string; + url?: string; + isCustom?: boolean; + isAuto?: boolean; + network?: string; + hidden?: boolean; } export interface ExtendedNodeOptions extends NodeOptions { From a32afd4b3872619abf2a067c7df5ebf9025ac177 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 17 Apr 2019 16:50:14 -0400 Subject: [PATCH 0364/1466] Fix select button positioning --- .../features/AddAccount/components/DeterministicWallets.scss | 5 +++++ .../features/AddAccount/components/DeterministicWallets.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index c0c77542c..b6baef190 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -68,6 +68,11 @@ &-select { display: flex; align-items: center; + + input[type='radio'] { + margin-top: 0; + margin-left: 0.5em; + } } } diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 7ad4d39b9..b60bf91c6 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -260,8 +260,8 @@ class DeterministicWalletsClass extends React.PureComponent { // tslint:disable:jsx-key return [ - wallet.index + 1,
              + {wallet.index + 1} { readOnly={true} onClick={this.selectAddress.bind(this, wallet.address, wallet.index)} /> -
              , +
              , Date: Wed, 17 Apr 2019 16:59:59 -0400 Subject: [PATCH 0365/1466] Fix tslint / tscheck / prettier issues --- common/v2/features/AddAccount/AddAccount.tsx | 6 +- .../features/AddAccount/components/Web3.tsx | 14 ++-- common/v2/features/Wallets/index.ts | 6 +- common/v2/features/Wallets/keystore/index.ts | 2 +- .../v2/features/Wallets/keystore/keystore.ts | 18 +++-- common/v2/features/Wallets/keystore/types.ts | 4 +- common/v2/features/Wallets/ledger/index.ts | 2 - common/v2/features/Wallets/ledger/ledger.ts | 0 common/v2/features/Wallets/ledger/types.ts | 0 common/v2/features/Wallets/mnemonic/index.ts | 2 +- .../v2/features/Wallets/mnemonic/mnemonic.ts | 19 ++--- common/v2/features/Wallets/mnemonic/types.ts | 4 +- .../v2/features/Wallets/paritysigner/index.ts | 2 - .../Wallets/paritysigner/paritysigner.ts | 0 .../v2/features/Wallets/paritysigner/types.ts | 0 .../v2/features/Wallets/privatekey/index.ts | 2 +- .../features/Wallets/privatekey/privatekey.ts | 15 ++-- .../v2/features/Wallets/privatekey/types.ts | 6 +- common/v2/features/Wallets/safet/index.ts | 2 - common/v2/features/Wallets/safet/safet.ts | 0 common/v2/features/Wallets/safet/types.ts | 0 common/v2/features/Wallets/trezor/index.ts | 2 - common/v2/features/Wallets/trezor/trezor.ts | 0 common/v2/features/Wallets/trezor/types.ts | 0 common/v2/features/Wallets/web3/index.ts | 2 +- common/v2/features/Wallets/web3/types.ts | 4 +- common/v2/features/Wallets/web3/web3.ts | 73 ++++++++++--------- common/v2/libs/nodes/web3/index.ts | 9 +-- 28 files changed, 100 insertions(+), 94 deletions(-) delete mode 100644 common/v2/features/Wallets/ledger/index.ts delete mode 100644 common/v2/features/Wallets/ledger/ledger.ts delete mode 100644 common/v2/features/Wallets/ledger/types.ts delete mode 100644 common/v2/features/Wallets/paritysigner/index.ts delete mode 100644 common/v2/features/Wallets/paritysigner/paritysigner.ts delete mode 100644 common/v2/features/Wallets/paritysigner/types.ts delete mode 100644 common/v2/features/Wallets/safet/index.ts delete mode 100644 common/v2/features/Wallets/safet/safet.ts delete mode 100644 common/v2/features/Wallets/safet/types.ts delete mode 100644 common/v2/features/Wallets/trezor/index.ts delete mode 100644 common/v2/features/Wallets/trezor/trezor.ts delete mode 100644 common/v2/features/Wallets/trezor/types.ts diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index e168fd36d..061070da6 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -678,7 +678,7 @@ const WalletDecrypt = withRouter( }; public onUnlock = (payload: any) => { - console.log('got here?!@?!?@') + console.log('got here?!@?!?@'); console.log(payload); const { value, selectedWalletKey } = this.state; if (!selectedWalletKey) { @@ -689,10 +689,10 @@ const WalletDecrypt = withRouter( // the payload to contain the unlocked wallet info. const unlockValue = value && !isEmpty(value) ? value : payload; - console.log('this.state.accountType ' + this.state.accountData.accountType) + console.log('this.state.accountType ' + this.state.accountData.accountType); if (this.state.accountData.accountType === 'web3') { const x = this.WALLETS[selectedWalletKey].unlock(unlockValue); - console.log('went web3 route') + console.log('went web3 route'); console.log(x); this.setState({ hasSelectedAddress: true, diff --git a/common/v2/features/AddAccount/components/Web3.tsx b/common/v2/features/AddAccount/components/Web3.tsx index f796b9619..47996848d 100644 --- a/common/v2/features/AddAccount/components/Web3.tsx +++ b/common/v2/features/AddAccount/components/Web3.tsx @@ -16,12 +16,14 @@ export class Web3DecryptClass extends PureComponent { address: '' }; - - public render () { - return( + public render() { + return (
              -
              @@ -38,6 +40,6 @@ export class Web3DecryptClass extends PureComponent { In order to use MetaMask with MyCrypto, your ad blocker must be disabled.

              - ) - }; + ); + } } diff --git a/common/v2/features/Wallets/index.ts b/common/v2/features/Wallets/index.ts index 1b000c575..580116569 100644 --- a/common/v2/features/Wallets/index.ts +++ b/common/v2/features/Wallets/index.ts @@ -1,9 +1,5 @@ -export * from './ledger'; export * from './mnemonic'; -export * from './paritysigner' export * from './privatekey'; -export * from './safet'; -export * from './trezor' export * from './web3'; export * from './keystore'; -export * from './wallets'; \ No newline at end of file +export * from './wallets'; diff --git a/common/v2/features/Wallets/keystore/index.ts b/common/v2/features/Wallets/keystore/index.ts index 626c569cc..2a6dddf8e 100644 --- a/common/v2/features/Wallets/keystore/index.ts +++ b/common/v2/features/Wallets/keystore/index.ts @@ -1,2 +1,2 @@ export * from './keystore'; -export * from './types'; \ No newline at end of file +export * from './types'; diff --git a/common/v2/features/Wallets/keystore/keystore.ts b/common/v2/features/Wallets/keystore/keystore.ts index c1b335bf0..3dab297ec 100644 --- a/common/v2/features/Wallets/keystore/keystore.ts +++ b/common/v2/features/Wallets/keystore/keystore.ts @@ -1,7 +1,13 @@ -import { KeystoreUnlockParams } from "./types"; -import { determineKeystoreType, KeystoreTypes, signWrapper, getKeystoreWallet, getUtcWallet, IWallet } from "libs/wallet"; -import { translateRaw } from "translations"; - +import { KeystoreUnlockParams } from './types'; +import { + determineKeystoreType, + KeystoreTypes, + signWrapper, + getKeystoreWallet, + getUtcWallet, + IWallet +} from 'libs/wallet'; +import { translateRaw } from 'translations'; export const unlockKeystore = async (payload: KeystoreUnlockParams) => { const { file, password } = payload; @@ -25,5 +31,5 @@ export const unlockKeystore = async (payload: KeystoreUnlockParams) => { } // TODO: provide a more descriptive error than the two 'ERROR_6' (invalid pass) messages above - return(wallet); -} \ No newline at end of file + return wallet; +}; diff --git a/common/v2/features/Wallets/keystore/types.ts b/common/v2/features/Wallets/keystore/types.ts index 6bf4082ff..5baf31d7e 100644 --- a/common/v2/features/Wallets/keystore/types.ts +++ b/common/v2/features/Wallets/keystore/types.ts @@ -1,8 +1,8 @@ -import { IFullWallet } from "libs/wallet"; +import { IFullWallet } from 'libs/wallet'; export interface KeystoreUnlockParams { file: string; password: string; } -export type TUnlockKeystore = (payload: KeystoreUnlockParams) => Promise; \ No newline at end of file +export type TUnlockKeystore = (payload: KeystoreUnlockParams) => Promise; diff --git a/common/v2/features/Wallets/ledger/index.ts b/common/v2/features/Wallets/ledger/index.ts deleted file mode 100644 index 185a01cb9..000000000 --- a/common/v2/features/Wallets/ledger/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ledger'; -export * from './types'; \ No newline at end of file diff --git a/common/v2/features/Wallets/ledger/ledger.ts b/common/v2/features/Wallets/ledger/ledger.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/common/v2/features/Wallets/ledger/types.ts b/common/v2/features/Wallets/ledger/types.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/common/v2/features/Wallets/mnemonic/index.ts b/common/v2/features/Wallets/mnemonic/index.ts index b03e82e1f..4d6559dbf 100644 --- a/common/v2/features/Wallets/mnemonic/index.ts +++ b/common/v2/features/Wallets/mnemonic/index.ts @@ -1,2 +1,2 @@ export * from './mnemonic'; -export * from './types'; \ No newline at end of file +export * from './types'; diff --git a/common/v2/features/Wallets/mnemonic/mnemonic.ts b/common/v2/features/Wallets/mnemonic/mnemonic.ts index d2c90ff7c..760c8a73c 100644 --- a/common/v2/features/Wallets/mnemonic/mnemonic.ts +++ b/common/v2/features/Wallets/mnemonic/mnemonic.ts @@ -1,19 +1,20 @@ -import { MnemonicUnlockParams } from "./types"; -import { MnemonicWallet } from "libs/wallet/deterministic/mnemonic"; -import { translateRaw } from "translations"; -import { WrappedWallet } from "libs/wallet"; +import { MnemonicUnlockParams } from './types'; +import { MnemonicWallet } from 'libs/wallet/deterministic/mnemonic'; +import { translateRaw } from 'translations'; +import { WrappedWallet } from 'libs/wallet'; - -export const unlockMnemonic = async (payload: MnemonicUnlockParams): Promise => { +export const unlockMnemonic = async ( + payload: MnemonicUnlockParams +): Promise => { let wallet; const { phrase, pass, path, address } = payload; - + try { wallet = MnemonicWallet(phrase, pass, path, address); } catch (err) { // TODO: use better error than 'ERROR_14' (wallet not found) - console.log('Error: ' , translateRaw('ERROR_14')); + console.log('Error: ', translateRaw('ERROR_14')); return; } return wallet; -} \ No newline at end of file +}; diff --git a/common/v2/features/Wallets/mnemonic/types.ts b/common/v2/features/Wallets/mnemonic/types.ts index 1928f3603..60d81a5cc 100644 --- a/common/v2/features/Wallets/mnemonic/types.ts +++ b/common/v2/features/Wallets/mnemonic/types.ts @@ -1,4 +1,4 @@ -import { WrappedWallet } from "libs/wallet"; +import { WrappedWallet } from 'libs/wallet'; export interface MnemonicUnlockParams { phrase: string; @@ -7,4 +7,4 @@ export interface MnemonicUnlockParams { address: string; } -export type TUnlockMnemonic = (payload: MnemonicUnlockParams) => Promise; \ No newline at end of file +export type TUnlockMnemonic = (payload: MnemonicUnlockParams) => Promise; diff --git a/common/v2/features/Wallets/paritysigner/index.ts b/common/v2/features/Wallets/paritysigner/index.ts deleted file mode 100644 index 9ee8b00a3..000000000 --- a/common/v2/features/Wallets/paritysigner/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './paritysigner'; -export * from './types'; \ No newline at end of file diff --git a/common/v2/features/Wallets/paritysigner/paritysigner.ts b/common/v2/features/Wallets/paritysigner/paritysigner.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/common/v2/features/Wallets/paritysigner/types.ts b/common/v2/features/Wallets/paritysigner/types.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/common/v2/features/Wallets/privatekey/index.ts b/common/v2/features/Wallets/privatekey/index.ts index 9b1ef90c5..4a406009a 100644 --- a/common/v2/features/Wallets/privatekey/index.ts +++ b/common/v2/features/Wallets/privatekey/index.ts @@ -1,2 +1,2 @@ export * from './privatekey'; -export * from './types'; \ No newline at end of file +export * from './types'; diff --git a/common/v2/features/Wallets/privatekey/privatekey.ts b/common/v2/features/Wallets/privatekey/privatekey.ts index 1854aedd9..e36fa3abe 100644 --- a/common/v2/features/Wallets/privatekey/privatekey.ts +++ b/common/v2/features/Wallets/privatekey/privatekey.ts @@ -1,9 +1,10 @@ -import { IWallet, getPrivKeyWallet, IFullWallet } from "libs/wallet"; -import { translateRaw } from "translations"; -import { PrivateKeyUnlockParams } from "./types"; +import { IWallet, getPrivKeyWallet, IFullWallet } from 'libs/wallet'; +import { translateRaw } from 'translations'; +import { PrivateKeyUnlockParams } from './types'; - -export const unlockPrivateKey = async (payload: PrivateKeyUnlockParams): Promise => { +export const unlockPrivateKey = async ( + payload: PrivateKeyUnlockParams +): Promise => { let wallet: IWallet | null = null; const { key, password } = payload; @@ -13,5 +14,5 @@ export const unlockPrivateKey = async (payload: PrivateKeyUnlockParams): Promise console.log('Error: ' + translateRaw('INVALID_PKEY')); return; } - return(wallet); -} \ No newline at end of file + return wallet; +}; diff --git a/common/v2/features/Wallets/privatekey/types.ts b/common/v2/features/Wallets/privatekey/types.ts index ec964ccbb..12db2feaf 100644 --- a/common/v2/features/Wallets/privatekey/types.ts +++ b/common/v2/features/Wallets/privatekey/types.ts @@ -1,8 +1,10 @@ -import { IFullWallet } from "libs/wallet"; +import { IFullWallet } from 'libs/wallet'; export interface PrivateKeyUnlockParams { key: string; password: string; } -export type TUnlockPrivateKey = (payload: PrivateKeyUnlockParams) => Promise; \ No newline at end of file +export type TUnlockPrivateKey = ( + payload: PrivateKeyUnlockParams +) => Promise; diff --git a/common/v2/features/Wallets/safet/index.ts b/common/v2/features/Wallets/safet/index.ts deleted file mode 100644 index 017d75bf5..000000000 --- a/common/v2/features/Wallets/safet/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './safet'; -export * from './types'; \ No newline at end of file diff --git a/common/v2/features/Wallets/safet/safet.ts b/common/v2/features/Wallets/safet/safet.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/common/v2/features/Wallets/safet/types.ts b/common/v2/features/Wallets/safet/types.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/common/v2/features/Wallets/trezor/index.ts b/common/v2/features/Wallets/trezor/index.ts deleted file mode 100644 index 7709b8cd6..000000000 --- a/common/v2/features/Wallets/trezor/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './trezor'; -export * from './types'; \ No newline at end of file diff --git a/common/v2/features/Wallets/trezor/trezor.ts b/common/v2/features/Wallets/trezor/trezor.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/common/v2/features/Wallets/trezor/types.ts b/common/v2/features/Wallets/trezor/types.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/common/v2/features/Wallets/web3/index.ts b/common/v2/features/Wallets/web3/index.ts index 691046c01..df584afdb 100644 --- a/common/v2/features/Wallets/web3/index.ts +++ b/common/v2/features/Wallets/web3/index.ts @@ -1,2 +1,2 @@ export * from './web3'; -export * from './types'; \ No newline at end of file +export * from './types'; diff --git a/common/v2/features/Wallets/web3/types.ts b/common/v2/features/Wallets/web3/types.ts index b2250836e..f257bb149 100644 --- a/common/v2/features/Wallets/web3/types.ts +++ b/common/v2/features/Wallets/web3/types.ts @@ -1,3 +1,3 @@ -import { Web3Wallet } from "v2/libs/wallet"; +import { Web3Wallet } from 'v2/libs/wallet'; -export type TUnlockWeb3 = () => Promise; \ No newline at end of file +export type TUnlockWeb3 = () => Promise; diff --git a/common/v2/features/Wallets/web3/web3.ts b/common/v2/features/Wallets/web3/web3.ts index 41b797220..8497b556f 100644 --- a/common/v2/features/Wallets/web3/web3.ts +++ b/common/v2/features/Wallets/web3/web3.ts @@ -10,7 +10,11 @@ import { import { CustomNodeConfig, NodeOptions } from 'v2/services/NodeOptions/types'; import { getNetworkByChainId, NetworkSelect } from 'v2/libs'; import { translateRaw } from 'translations'; -import { createNodeOptions, readNodeOptions, createNodeOptionsWithID } from 'v2/services/NodeOptions/NodeOptions'; +import { + createNodeOptions, + readNodeOptions, + createNodeOptionsWithID +} from 'v2/services/NodeOptions/NodeOptions'; import { updateCurrents, readCurrents } from 'v2/services/Currents/Currents'; //#region Web3 @@ -18,19 +22,19 @@ import { updateCurrents, readCurrents } from 'v2/services/Currents/Currents'; let web3Added = true; export const initWeb3Node = async () => { - console.log('got init') + console.log('got init'); const { chainId, lib } = await setupWeb3Node(); - console.log('got init2') + console.log('got init2'); const network: NetworkSelect = getNetworkByChainId(chainId); - console.log('got init3') + console.log('got init3'); if (!network) { throw new Error(`MyCrypto doesn’t support the network with chain ID '${chainId}'`); } - console.log('got init4') + console.log('got init4'); const web3Network = makeWeb3Network(network.id); - console.log('got here? ' + JSON.stringify(web3Network, null, 4)) + console.log('got here? ' + JSON.stringify(web3Network, null, 4)); const id = 'web3'; - console.log('got init5') + console.log('got init5'); const config: NodeOptions = { name: id, isCustom: false, @@ -39,42 +43,42 @@ export const initWeb3Node = async () => { hidden: true, network: web3Network }; - console.log('got init6') + console.log('got init6'); if (getShepherdManualMode()) { shepherd.auto(); } - console.log('got init7') + console.log('got init7'); if (!web3Added) { - console.log('got init 7.5') + console.log('got init 7.5'); shepherd.useProvider('web3', id, makeProviderConfig({ network: web3Network })); } - console.log('got init8') + console.log('got init8'); web3Added = true; - createNodeOptionsWithID(config, id) - console.log('got init9') + createNodeOptionsWithID(config, id); + console.log('got init9'); updateCurrents({ node: 'web3' }); - console.log('got init10') - console.log(lib) + console.log('got init10'); + console.log(lib); return lib; }; export const unlockWeb3 = async () => { try { - console.log('did i get here?') + console.log('did i get here?'); const nodeLib = await initWeb3Node(); - console.log('did i get here?1') + console.log('did i get here?1'); /*await (action: any) => { action.type === configNodesSelectedTypes.ConfigNodesSelectedActions.CHANGE_SUCCEEDED && action.payload.nodeId === 'web3' }*/ const web3Node: any | null = await getWeb3Node(); - console.log('did i get here?1.1') + console.log('did i get here?1.1'); if (!web3Node) { throw Error('Web3 node config not found!'); } - console.log(web3Node) + console.log(web3Node); const network = web3Node.network; if (!isWeb3Node(nodeLib)) { @@ -82,15 +86,15 @@ export const unlockWeb3 = async () => { } const accounts: string = await nodeLib.getAccounts(); - console.log('accounts: ' + accounts) + console.log('accounts: ' + accounts); const address = accounts[0]; - console.log('did i get here?3') + console.log('did i get here?3'); if (!address) { throw new Error('No accounts found in MetaMask / Web3.'); } - console.log('did i get here?4 ' + network) - console.log(new Web3Wallet(address, stripWeb3Network(network))) - console.log('did i get here?6') + console.log('did i get here?4 ' + network); + console.log(new Web3Wallet(address, stripWeb3Network(network))); + console.log('did i get here?6'); return new Web3Wallet(address, stripWeb3Network(network)); } catch (err) { console.error(err); @@ -101,23 +105,26 @@ export const unlockWeb3 = async () => { }; export const getWeb3Node = async () => { - - console.log('getWeb3 1') + console.log('getWeb3 1'); const currNode = readNodeOptions('web3'); - console.log('getWeb3 2') + console.log('getWeb3 2'); const currNodeId = readCurrents().node; - console.log('getWeb3 4') - console.log('next - ' + (currNode && currNodeId && isWeb3NodeId(currNodeId)) + ' - ' + currNode + ' - ' + currNodeId) + console.log('getWeb3 4'); + console.log( + 'next - ' + + (currNode && currNodeId && isWeb3NodeId(currNodeId)) + + ' - ' + + currNode + + ' - ' + + currNodeId + ); if (currNode && currNodeId && isWeb3NodeId(currNodeId)) { - console.log('getWeb3 5') + console.log('getWeb3 5'); return currNode; } return null; }; export const isWeb3NodeId = (nodeId: string) => nodeId === 'web3'; -export const getNodes = async () => {}; - -export const getCurrentNode = async () => {}; export const createNewWeb3Node = async (id: string, newNode: CustomNodeConfig) => { createNodeOptions({ ...newNode, name: id, type: 'web3' }); diff --git a/common/v2/libs/nodes/web3/index.ts b/common/v2/libs/nodes/web3/index.ts index c4ddd8dda..b53e65ed1 100644 --- a/common/v2/libs/nodes/web3/index.ts +++ b/common/v2/libs/nodes/web3/index.ts @@ -78,17 +78,16 @@ export async function setupWeb3Node() { // Handle the following MetaMask breaking change: // https://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8 const { ethereum } = window as any; - console.log('hur1') + console.log('hur1'); if (ethereum) { - // Overwrite the legacy Web3 with the newer version. (window as any).web3 = new (window as any).Web3(ethereum); - console.log('hur2') + console.log('hur2'); try { - console.log(ethereum) + console.log(ethereum); // Request permission to access MetaMask accounts. await ethereum.enable(); - console.log('hur3') + console.log('hur3'); // Permission was granted; proceed. return getChainIdAndLib(); } catch (e) { From a520c76ba14765d036a5994154ade6bf4482b979 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 17 Apr 2019 17:15:07 -0400 Subject: [PATCH 0366/1466] Fix Panel background height for select address --- common/v2/features/AddAccount/AddAccountStyles.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index 079177c56..d85a78093 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -31,7 +31,7 @@ $speed: 500ms; display: flex; } &-content { - height: 629px; + min-height: 629px; border-radius: 3px; box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 1px 4px 0 rgba(0, 0, 0, 0.12); background-color: #ffffff; From 49f540350c026899317c8c9d9b70da892075aeae Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 17 Apr 2019 17:29:51 -0400 Subject: [PATCH 0367/1466] Add full select address padding --- .../features/AddAccount/components/DeterministicWallets.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index b6baef190..a2f95d531 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -2,10 +2,11 @@ @import 'common/sass/mixins'; .DW { + padding: 1.5em; + header { font-size: 32px; font-weight: bold; - padding: 1em; width: 100%; } From 24ab1d9814534002137510150b50b08d1de6f18f Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 17 Apr 2019 19:25:21 -0400 Subject: [PATCH 0368/1466] Fix button styling and layout --- common/assets/images/next-page-button.svg | 26 ++++ common/assets/images/previous-page-button.svg | 26 ++++ .../components/DeterministicWallets.scss | 48 ++----- .../components/DeterministicWallets.tsx | 127 ++++++++---------- 4 files changed, 123 insertions(+), 104 deletions(-) create mode 100644 common/assets/images/next-page-button.svg create mode 100644 common/assets/images/previous-page-button.svg diff --git a/common/assets/images/next-page-button.svg b/common/assets/images/next-page-button.svg new file mode 100644 index 000000000..94e074e94 --- /dev/null +++ b/common/assets/images/next-page-button.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/assets/images/previous-page-button.svg b/common/assets/images/previous-page-button.svg new file mode 100644 index 000000000..6968cd110 --- /dev/null +++ b/common/assets/images/previous-page-button.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index a2f95d531..d52459e4d 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -49,31 +49,13 @@ margin: auto; margin-bottom: 10px; - &-token { - width: 82px; - background: color(control-bg); - color: control(control-color); - } - - &-address { - font-size: 13px; - text-align: left; - font-family: $font-family-monospace; + &-address-select { display: flex; align-items: center; - input { - margin-right: 10px; - } - - &-select { - display: flex; - align-items: center; - - input[type='radio'] { - margin-top: 0; - margin-left: 0.5em; - } + input[type='radio'] { + margin-top: 0; + margin-left: 0.5em; } } @@ -85,7 +67,6 @@ } &-na { - font-size: $font-size-xs; opacity: 0.3; } @@ -107,19 +88,14 @@ } &-nav { - &-btn { - display: inline-block; - margin: 0; - width: 49.9%; - width: calc(50% - 5px); - margin: 0 5px; - - &:first-child { - margin-left: 0; - } - &:last-child { - margin-right: 0; - } + display: flex; + align-items: center; + justify-content: space-between; + padding-top: 1.5em; + + &-page { + color: #9a978a; + font-size: 12px; } } } diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index b60bf91c6..b21a1ddbc 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -16,6 +16,8 @@ import { addressBookSelectors } from 'features/addressBook'; import { UnitDisplay, Input } from 'components/ui'; import './DeterministicWallets.scss'; import { truncate } from 'v2/libs'; +import nextIcon from 'assets/images/next-page-button.svg'; +import prevIcon from 'assets/images/previous-page-button.svg'; const WALLETS_PER_PAGE = 5; @@ -92,77 +94,66 @@ class DeterministicWalletsClass extends React.PureComponent { const { selectedAddress, customPath, page } = this.state; return ( - <> -
              - -
              - {translate('DECRYPT_PROMPT_SELECT_ADDRESS')} -
              - +
              +
              + {this.state.currentDPath.label === customDPath.label && ( + +
              +
              - - {this.state.currentDPath.label === customDPath.label && ( - -
              - -
              - -
              - )} - - - this.renderWalletRow(wallet))} - config={{ hiddenHeadings: ['#', translateRaw('ACTION_5')] }} - /> -
              - - -
              - + + + )} + + +
              this.renderWalletRow(wallet))} + config={{ hiddenHeadings: ['#', translateRaw('ACTION_5')] }} + /> - - - +
              + + PAGE {page + 1} OF ∞ + + + + +
              + ); } From 42e6bb30dfab13484b652606c613cb51b57bc95d Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Thu, 18 Apr 2019 10:50:16 +0200 Subject: [PATCH 0369/1466] Decreased icon size and paddings --- common/v2/components/ExtendedContentPanel.tsx | 2 +- .../features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx | 2 +- common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/v2/components/ExtendedContentPanel.tsx b/common/v2/components/ExtendedContentPanel.tsx index 3a557a0af..bb0ee1561 100644 --- a/common/v2/components/ExtendedContentPanel.tsx +++ b/common/v2/components/ExtendedContentPanel.tsx @@ -74,7 +74,7 @@ const ContentPanelDescription = styled.p` `; const ImgIcon = styled.img` - width: 150px; + width: 125px; height: auto; margin: 21px 0 28px 0; `; diff --git a/common/v2/features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx b/common/v2/features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx index adc9d46af..7e71ee840 100644 --- a/common/v2/features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx +++ b/common/v2/features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx @@ -30,7 +30,7 @@ const PrimaryButton = styled(Button)` `; const FormWrapper = styled.form` - margin-top: 14px; + margin-top: 15px; max-width: 320px; @media (min-width: 700px) { diff --git a/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx b/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx index 356463abd..f666258a9 100644 --- a/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx +++ b/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx @@ -31,7 +31,7 @@ const ActionButton = styled(Button)` `; const FormWrapper = styled.form` - margin-top: 35px; + margin-top: 15px; max-width: 420px; `; From c646058c2820afd90f04224e5409aca423262434 Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Thu, 18 Apr 2019 13:05:54 +0200 Subject: [PATCH 0370/1466] Changed support url --- .../components/PrintPaperWalletNotification.tsx | 1 + .../NotificationsPanel/components/WalletAddedNotification.tsx | 4 ++-- .../components/WalletCreatedNotification.tsx | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/PrintPaperWalletNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/PrintPaperWalletNotification.tsx index 27142cb7c..cd44638ab 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/PrintPaperWalletNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/PrintPaperWalletNotification.tsx @@ -40,6 +40,7 @@ const ResourceItem = styled(Button)` font-size: 15px; } + &:focus, &:hover { embed { filter: brightness(0) invert(1); diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx index d923c10ea..eb389f96d 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx @@ -54,7 +54,7 @@ interface ResourceItemProps { const ResourceItem: React.SFC = ({ src, title, link }) => { return ( - + {title} @@ -77,7 +77,7 @@ const getResources = () => { ); diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx index ee56a75a0..ba61e7a8a 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx @@ -54,7 +54,7 @@ interface ResourceItemProps { const ResourceItem: React.SFC = ({ src, title, link }) => { return ( - + {title} @@ -77,7 +77,7 @@ const getResources = () => { ); From 92434049f9610f9c9fc723b22fbd534589c2c46b Mon Sep 17 00:00:00 2001 From: Azarielle Date: Thu, 18 Apr 2019 11:21:44 -0400 Subject: [PATCH 0371/1466] inital styling of no-accounts page --- common/assets/images/icn-sad-wallet.svg | 27 +++++++ common/v2/features/NoAccounts/NoAccounts.tsx | 83 +++++++++++++++++++- 2 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 common/assets/images/icn-sad-wallet.svg diff --git a/common/assets/images/icn-sad-wallet.svg b/common/assets/images/icn-sad-wallet.svg new file mode 100644 index 000000000..7e8681a83 --- /dev/null +++ b/common/assets/images/icn-sad-wallet.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/v2/features/NoAccounts/NoAccounts.tsx b/common/v2/features/NoAccounts/NoAccounts.tsx index 3886f8936..c8ab8cff7 100644 --- a/common/v2/features/NoAccounts/NoAccounts.tsx +++ b/common/v2/features/NoAccounts/NoAccounts.tsx @@ -1,12 +1,89 @@ import React, { Component } from 'react'; -//import styled from 'styled-components'; +import styled from 'styled-components'; import { Layout } from 'v2/features'; +import sadWallet from 'common/assets/images/icn-sad-wallet.svg'; +import { Button } from '@mycrypto/ui'; + +const NoAccountsContainer = styled.div` + width: 1245px; + height: 505px; + border-radius: 3px; + box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.07); + background-color: #ffffff; + justify-content: center, + align-content:center, +`; + +const NoAccountsContent = styled.div` + display: flex; + flex-direction: column; + align-items: center; + padding: 18px 4px 26px 4px; + text-align: center; +`; +const Header = styled.p` + font-size: 32px; + font-weight: bold; + line-height: normal; + margin-top: 0; + margin-bottom: 15px; + color: ${props => props.theme.headline}; +`; + +const Description = styled.p` + font-size: 18px; + font-weight: normal; + line-height: 1.5; + padding: 0 30px 0 30px; + color: ${props => props.theme.text}; +`; + +const ImgIcon = styled.img` + width: 135px; + height: 135px; + margin: 21px 0 28px 0; +`; + +const PrimaryButton = styled(Button)` + width: 320px; + margin-bottom: 15px; + font-size: 18px; + + @media (min-width: 700px) { + width: 420px; + } +`; + +const WhiteButton = styled(Button)` + width: 320px; + margin-bottom: 15px; + font-size: 17px; + + @media (min-width: 700px) { + width: 200px; + + &:first-of-type { + margin-right: 20px; + } + } +`; export default class NoAccounts extends Component { public render() { return ( - -
              You Have no accounts! please add one
              + + + + +
              You dont have any accounts in your wallet.
              + + To access your funds add one of your existing accounts or create a new accounts now. + + Add Existing Account + Import MyCrypto Settings + Create New Account +
              +
              ); } From 523612f9c4299b60954497d1dab5b1b9e84b1b8f Mon Sep 17 00:00:00 2001 From: Azarielle Date: Thu, 18 Apr 2019 12:22:30 -0400 Subject: [PATCH 0372/1466] styling of no-accounts web views complete --- common/translations/lang/en.json | 4 +- common/v2/features/NoAccounts/NoAccounts.tsx | 67 ++++++++++++++------ 2 files changed, 49 insertions(+), 22 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index cadd511ec..174d4e896 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -787,6 +787,8 @@ "DOWNLOAD_APP_DESCRIPTION": "Please download the MyCrypto Desktop app so you can securely complete creating your new account and start managing your funds.", "DOWNLOAD_APP_DOWNLOAD_BUTTON": "Download for", "DOWNLOAD_APP_FOOTER_INFO": "Not sure what this is?", - "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app." + "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app.", + "NO_ACCOUNTS_HEADER":"You dont have any accounts in your wallet.", + "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now." } } diff --git a/common/v2/features/NoAccounts/NoAccounts.tsx b/common/v2/features/NoAccounts/NoAccounts.tsx index c8ab8cff7..1678dcc6f 100644 --- a/common/v2/features/NoAccounts/NoAccounts.tsx +++ b/common/v2/features/NoAccounts/NoAccounts.tsx @@ -3,26 +3,29 @@ import styled from 'styled-components'; import { Layout } from 'v2/features'; import sadWallet from 'common/assets/images/icn-sad-wallet.svg'; import { Button } from '@mycrypto/ui'; +import translate from 'translations'; const NoAccountsContainer = styled.div` + display: flex; + justify-content: center; + align-content: center; width: 1245px; height: 505px; border-radius: 3px; box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.07); background-color: #ffffff; - justify-content: center, - align-content:center, `; const NoAccountsContent = styled.div` - display: flex; + margin-top: 45px; + width: 503px; flex-direction: column; align-items: center; padding: 18px 4px 26px 4px; text-align: center; `; const Header = styled.p` - font-size: 32px; + font-size: 24px; font-weight: bold; line-height: normal; margin-top: 0; @@ -39,48 +42,70 @@ const Description = styled.p` `; const ImgIcon = styled.img` - width: 135px; - height: 135px; + width: 130px; + height: 99px; margin: 21px 0 28px 0; `; const PrimaryButton = styled(Button)` - width: 320px; + width: 230px; margin-bottom: 15px; - font-size: 18px; + font-size: 17px; + text-align: center; + white-space: nowrap; @media (min-width: 700px) { - width: 420px; + width: 230px; } `; -const WhiteButton = styled(Button)` - width: 320px; +const WhiteButtonFirst = styled(Button)` + width: 230px; margin-bottom: 15px; font-size: 17px; + white-space: nowrap; + text-align: center; + padding-left: 1.25; @media (min-width: 700px) { - width: 200px; + width: 230px; &:first-of-type { - margin-right: 20px; - } + margin-right: 20px; } `; +const WhiteButtonSecond = styled(Button)` + width: 230px; + margin-bottom: 15px; + font-size: 17px; + white-space: nowrap; + text-align: center; + padding-left: 1.1rem; + + @media (min-width: 700px) { + width: 230px; + +`; + +const ButtonGroup = styled.div` + justify-content: center; + width: 503px; +`; + export default class NoAccounts extends Component { public render() { return ( - + -
              You dont have any accounts in your wallet.
              - - To access your funds add one of your existing accounts or create a new accounts now. - - Add Existing Account - Import MyCrypto Settings +
              {translate('NO_ACCOUNTS_HEADER')}
              + {translate('NO_ACCOUNTS_DESCRIPTION')} + + Add Existing Account + Import MyCrypto Settings + Create New Account
              From 559a52bcebb2fe8608ddb07e4821a68dc245a368 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Thu, 18 Apr 2019 12:40:39 -0400 Subject: [PATCH 0373/1466] Use UI prerelease with updated Address --- package.json | 32 +++++++++++--------------------- yarn.lock | 8 ++++---- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index d7eec3ad5..680dddee5 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@ledgerhq/hw-app-eth": "4.48.0", "@ledgerhq/hw-transport-node-hid-noevents": "4.48.0", "@ledgerhq/hw-transport-u2f": "4.46.0", - "@mycrypto/ui": "0.13.0", + "@mycrypto/ui": "^0.15.0-optional-address-title", "@parity/qr-signer": "0.3.1", "@types/react-slick": "0.23.3", "axios": "0.18.0", @@ -24,8 +24,7 @@ "classnames": "2.2.5", "electron-updater": "2.21.10", "ethereum-blockies-base64": "1.0.2", - "ethereumjs-abi": - "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", + "ethereumjs-abi": "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", "ethereumjs-tx": "1.3.4", "ethereumjs-util": "5.1.5", "ethereumjs-wallet": "0.6.0", @@ -181,19 +180,13 @@ "prebuild": "check-node-version --package", "build:downloadable": "webpack --mode=production --config webpack_config/webpack.html.js", "prebuild:downloadable": "check-node-version --package", - "build:electron": - "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", - "build:electron:osx": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=osx node webpack_config/buildElectron.js", - "build:electron:windows": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=windows node webpack_config/buildElectron.js", - "build:electron:linux": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=linux node webpack_config/buildElectron.js", + "build:electron": "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", + "build:electron:osx": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=osx node webpack_config/buildElectron.js", + "build:electron:windows": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=windows node webpack_config/buildElectron.js", + "build:electron:linux": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=linux node webpack_config/buildElectron.js", "prebuild:electron": "check-node-version --package", - "jenkins:build:linux": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", - "jenkins:build:mac": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", + "jenkins:build:linux": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", + "jenkins:build:mac": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", "jenkins:upload": "node jenkins/upload", "test:coverage": "jest --config=jest_config/jest.config.json --coverage", "test": "jest --config=jest_config/jest.config.json", @@ -206,16 +199,13 @@ "predev": "check-node-version --package", "dev:https": "cross-env HTTPS=true node webpack_config/devServer.js", "predev:https": "check-node-version --package", - "dev:electron": - "concurrently --kill-others --names \"webpack,electron\" \"cross-env BUILD_ELECTRON=true node webpack_config/devServer.js\" \"webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js\"", + "dev:electron": "concurrently --kill-others --names \"webpack,electron\" \"cross-env BUILD_ELECTRON=true node webpack_config/devServer.js\" \"webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js\"", "tslint": "tslint --project . --exclude common/vendor/**/*", "tscheck": "tsc --noEmit", "start": "npm run dev", "precommit": "lint-staged", - "formatAll": - "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", - "prettier:diff": - "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", + "formatAll": "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", + "prettier:diff": "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", "update:tokens": "ts-node scripts/update-tokens", "postinstall": "electron-builder install-app-deps" }, diff --git a/yarn.lock b/yarn.lock index ddcc0d2ec..c7e55037f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -149,10 +149,10 @@ "@ledgerhq/errors" "^4.48.0" events "^3.0.0" -"@mycrypto/ui@0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.13.0.tgz#73a6b901b21dc8d3d4930ab817413d2bd9c5e4a7" - integrity sha512-gUZxcUU+ZOQuEeX6vFKgO3FyiX8Q+OABjvNCPJ5/bvq8k9HYjsfe+jJdzq+be5h+zCHMZk9wx1R0YjBB2UB2/Q== +"@mycrypto/ui@^0.15.0-optional-address-title": + version "0.15.0-optional-address-title" + resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.15.0-optional-address-title.tgz#a8984af4b2b8d986dae3b48b0e00accf896ac5bc" + integrity sha512-VdW5tR12l39sZ6oM897DmZVOa8A2KSEj5z147r/m4lS6iJ+3XcYVfWUcICDOegtvA833ruZOmCzR6F55rkQfuA== dependencies: "@types/dom-clipboard-api" "^1.0.1" "@types/lodash.throttle" "^4.1.4" From 3c1b564bfce849f52a876b5f63224287116bb7ab Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Thu, 18 Apr 2019 13:19:18 -0400 Subject: [PATCH 0374/1466] Fix package range --- package.json | 32 +++++++++++++++++++++----------- yarn.lock | 2 +- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 680dddee5..8b82fecf6 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@ledgerhq/hw-app-eth": "4.48.0", "@ledgerhq/hw-transport-node-hid-noevents": "4.48.0", "@ledgerhq/hw-transport-u2f": "4.46.0", - "@mycrypto/ui": "^0.15.0-optional-address-title", + "@mycrypto/ui": "0.15.0-optional-address-title", "@parity/qr-signer": "0.3.1", "@types/react-slick": "0.23.3", "axios": "0.18.0", @@ -24,7 +24,8 @@ "classnames": "2.2.5", "electron-updater": "2.21.10", "ethereum-blockies-base64": "1.0.2", - "ethereumjs-abi": "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", + "ethereumjs-abi": + "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", "ethereumjs-tx": "1.3.4", "ethereumjs-util": "5.1.5", "ethereumjs-wallet": "0.6.0", @@ -180,13 +181,19 @@ "prebuild": "check-node-version --package", "build:downloadable": "webpack --mode=production --config webpack_config/webpack.html.js", "prebuild:downloadable": "check-node-version --package", - "build:electron": "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", - "build:electron:osx": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=osx node webpack_config/buildElectron.js", - "build:electron:windows": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=windows node webpack_config/buildElectron.js", - "build:electron:linux": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=linux node webpack_config/buildElectron.js", + "build:electron": + "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", + "build:electron:osx": + "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=osx node webpack_config/buildElectron.js", + "build:electron:windows": + "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=windows node webpack_config/buildElectron.js", + "build:electron:linux": + "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=linux node webpack_config/buildElectron.js", "prebuild:electron": "check-node-version --package", - "jenkins:build:linux": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", - "jenkins:build:mac": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", + "jenkins:build:linux": + "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", + "jenkins:build:mac": + "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", "jenkins:upload": "node jenkins/upload", "test:coverage": "jest --config=jest_config/jest.config.json --coverage", "test": "jest --config=jest_config/jest.config.json", @@ -199,13 +206,16 @@ "predev": "check-node-version --package", "dev:https": "cross-env HTTPS=true node webpack_config/devServer.js", "predev:https": "check-node-version --package", - "dev:electron": "concurrently --kill-others --names \"webpack,electron\" \"cross-env BUILD_ELECTRON=true node webpack_config/devServer.js\" \"webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js\"", + "dev:electron": + "concurrently --kill-others --names \"webpack,electron\" \"cross-env BUILD_ELECTRON=true node webpack_config/devServer.js\" \"webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js\"", "tslint": "tslint --project . --exclude common/vendor/**/*", "tscheck": "tsc --noEmit", "start": "npm run dev", "precommit": "lint-staged", - "formatAll": "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", - "prettier:diff": "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", + "formatAll": + "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", + "prettier:diff": + "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", "update:tokens": "ts-node scripts/update-tokens", "postinstall": "electron-builder install-app-deps" }, diff --git a/yarn.lock b/yarn.lock index c7e55037f..50abe7c18 100644 --- a/yarn.lock +++ b/yarn.lock @@ -149,7 +149,7 @@ "@ledgerhq/errors" "^4.48.0" events "^3.0.0" -"@mycrypto/ui@^0.15.0-optional-address-title": +"@mycrypto/ui@0.15.0-optional-address-title": version "0.15.0-optional-address-title" resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.15.0-optional-address-title.tgz#a8984af4b2b8d986dae3b48b0e00accf896ac5bc" integrity sha512-VdW5tR12l39sZ6oM897DmZVOa8A2KSEj5z147r/m4lS6iJ+3XcYVfWUcICDOegtvA833ruZOmCzR6F55rkQfuA== From 9627d0f114857dda9acb30ffcda006c1b3c35de6 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Thu, 18 Apr 2019 16:22:00 -0400 Subject: [PATCH 0375/1466] add viewonly wallet handling --- common/v2/features/AddAccount/AddAccount.tsx | 35 ++++++++----------- .../AddAccount/components/ViewOnly.tsx | 15 ++++---- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 061070da6..440008cae 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -36,7 +36,6 @@ import { PrivateKeyValue, TrezorDecrypt, SafeTminiDecrypt, - Web3DecryptClass, WalletButton, ParitySignerDecrypt, InsecureWalletWarning, @@ -51,7 +50,7 @@ import * as WalletActions from 'v2/features/Wallets'; import { NetworkOptionsContext, AccountContext } from 'v2/providers'; import { Link } from 'react-router-dom'; import { Account } from 'v2/services/Account/types'; -//import { fieldsReducer } from 'features/transaction/fields/reducer'; +import { Web3Decrypt } from 'components/WalletDecrypt/components/Web3'; interface OwnProps { hidden?: boolean; @@ -147,7 +146,7 @@ const WalletDecrypt = withRouter( lid: web3info.lid, icon: web3info.icon, description: 'ADD_WEB3DESC', - component: Web3DecryptClass, + component: Web3Decrypt, initialParams: {}, unlock: this.props.unlockWeb3, attemptUnlock: true, @@ -227,8 +226,7 @@ const WalletDecrypt = withRouter( initialParams: {}, unlock: this.props.setWallet, helpLink: '', - isReadOnly: true, - redirect: '/account/info' + isReadOnly: true } }; @@ -242,7 +240,7 @@ const WalletDecrypt = withRouter( address: '', network: 'Ethereum', label: 'New Account', - accountType: MiscWalletName.VIEW_ONLY, + accountType: InsecureWalletName.PRIVATE_KEY, derivationPath: '' } }; @@ -284,7 +282,6 @@ const WalletDecrypt = withRouter( localSettings: '', transactionHistory: '' }; - console.log('handling Create Account'); createAccount(newAccount); }; @@ -552,7 +549,6 @@ const WalletDecrypt = withRouter( // timeout is only the maximum wait time before secondary view is shown // send view will be shown immediately on web3 resolve timeout = 1000; - console.log('got here?'); wallet.unlock(); } } catch (e) { @@ -617,9 +613,7 @@ const WalletDecrypt = withRouter( const decryptionComponent = this.getDecryptionComponent(); const selectNetworkComponent = this.selectNetworkComponent(); const confirmComponent = this.handleCompleteFlow(); - console.log('state: ' + JSON.stringify(this.state, null, 2)); let componentToRender: JSX.Element; - console.log('state: ' + JSON.stringify(this.state, null, 2)); if (!hidden && decryptionComponent && selectedWallet && !this.state.hasSelectedNetwork) { componentToRender = ( @@ -678,8 +672,6 @@ const WalletDecrypt = withRouter( }; public onUnlock = (payload: any) => { - console.log('got here?!@?!?@'); - console.log(payload); const { value, selectedWalletKey } = this.state; if (!selectedWalletKey) { return; @@ -689,31 +681,34 @@ const WalletDecrypt = withRouter( // the payload to contain the unlocked wallet info. const unlockValue = value && !isEmpty(value) ? value : payload; - console.log('this.state.accountType ' + this.state.accountData.accountType); if (this.state.accountData.accountType === 'web3') { - const x = this.WALLETS[selectedWalletKey].unlock(unlockValue); - console.log('went web3 route'); - console.log(x); this.setState({ hasSelectedAddress: true, accountData: { ...this.state.accountData, derivationPath: '', - address: x.getAddressString() + address: unlockValue.getAddressString() + } + }); + } else if (this.state.accountData.accountType === 'viewOnly') { + this.setState({ + hasSelectedAddress: true, + accountData: { + ...this.state.accountData, + address: unlockValue.getAddressString() } }); } else { - this.WALLETS[selectedWalletKey].unlock(unlockValue); this.setState({ hasSelectedAddress: true, accountData: { ...this.state.accountData, - derivationPath: unlockValue.path, + derivationPath: + unlockValue.path || unlockValue.dPath + '/' + unlockValue.index.toString(), address: unlockValue.address } }); } - //this.props.resetTransactionRequested(); }; private isWalletDisabled = (walletKey: WalletName) => { diff --git a/common/v2/features/AddAccount/components/ViewOnly.tsx b/common/v2/features/AddAccount/components/ViewOnly.tsx index b3c993866..bc9d1a0ff 100644 --- a/common/v2/features/AddAccount/components/ViewOnly.tsx +++ b/common/v2/features/AddAccount/components/ViewOnly.tsx @@ -12,7 +12,7 @@ import { AddressField } from 'components'; import './ViewOnly.scss'; interface OwnProps { - onUnlock(param: any): void; + onUnlock(param: any): AddressOnlyWallet; } interface StateProps { @@ -40,7 +40,7 @@ class ViewOnlyDecryptClass extends PureComponent { return (
              -
              +
              { private handleSelectAddressFromBook = (ev: React.FormEvent) => { const { currentTarget: { value: addressFromBook } } = ev; - this.setState({ addressFromBook }, this.openWallet); + this.setState({ addressFromBook }); }; - private openWallet = () => { - const { isValidAddress, currentAddress, resolvedAddress, onUnlock } = this.props; + private handleSubmit = (e: React.SyntheticEvent) => { + const { isValidAddress, currentAddress, resolvedAddress } = this.props; const { addressFromBook } = this.state; - let wallet; if (isValidAddress(addressFromBook)) { @@ -97,7 +96,9 @@ class ViewOnlyDecryptClass extends PureComponent { } if (wallet) { - onUnlock(new AddressOnlyWallet(wallet)); + e.preventDefault(); + e.stopPropagation(); + this.props.onUnlock(new AddressOnlyWallet(wallet)); } }; } From 6807223472ddb2b36a1b585b803ef9044865ebce Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Thu, 18 Apr 2019 19:59:23 -0400 Subject: [PATCH 0376/1466] Update MyCrypto UI to fix packaging issue --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8b82fecf6..8befad219 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@ledgerhq/hw-app-eth": "4.48.0", "@ledgerhq/hw-transport-node-hid-noevents": "4.48.0", "@ledgerhq/hw-transport-u2f": "4.46.0", - "@mycrypto/ui": "0.15.0-optional-address-title", + "@mycrypto/ui": "0.15.0-optional-address-title.2", "@parity/qr-signer": "0.3.1", "@types/react-slick": "0.23.3", "axios": "0.18.0", diff --git a/yarn.lock b/yarn.lock index 50abe7c18..b2aecaa3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -149,10 +149,10 @@ "@ledgerhq/errors" "^4.48.0" events "^3.0.0" -"@mycrypto/ui@0.15.0-optional-address-title": - version "0.15.0-optional-address-title" - resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.15.0-optional-address-title.tgz#a8984af4b2b8d986dae3b48b0e00accf896ac5bc" - integrity sha512-VdW5tR12l39sZ6oM897DmZVOa8A2KSEj5z147r/m4lS6iJ+3XcYVfWUcICDOegtvA833ruZOmCzR6F55rkQfuA== +"@mycrypto/ui@0.15.0-optional-address-title.2": + version "0.15.0-optional-address-title.2" + resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.15.0-optional-address-title.2.tgz#861a59c7c56e6f02b9b636b0aa90dccf1d082e82" + integrity sha512-9Aa7j63AG0A1AdS2Vk4mL6oWBO7p6F2mH6WvGQ6MPoblxOd03CCH/OJoYEkjGPZhm4wxdCpGsKZ7slj11Xuglg== dependencies: "@types/dom-clipboard-api" "^1.0.1" "@types/lodash.throttle" "^4.1.4" From aed01037dc12252671c2f7502ce7b2b7ba77b485 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Thu, 18 Apr 2019 23:17:51 -0400 Subject: [PATCH 0377/1466] Add Derivation Path label and help link --- .../AddAccount/components/DeterministicWallets.scss | 8 ++++++-- .../AddAccount/components/DeterministicWallets.tsx | 11 +++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index d52459e4d..984687e63 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -5,14 +5,18 @@ padding: 1.5em; header { - font-size: 32px; - font-weight: bold; width: 100%; } &-path { margin-bottom: 20px; + &-title { + font-size: 32px; + font-weight: bold; + margin-bottom: 20px; + } + &-select { flex: 1; diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index b21a1ddbc..4abd0884e 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Select, { Option } from 'react-select'; import { connect } from 'react-redux'; -import { Table, Address } from '@mycrypto/ui'; +import { Table, Address, IconLink, Typography } from '@mycrypto/ui'; import translate, { translateRaw } from 'translations'; import { isValidPath } from 'libs/validators'; @@ -97,7 +97,14 @@ class DeterministicWalletsClass extends React.PureComponent {
              - {translate('DECRYPT_PROMPT_SELECT_ADDRESS')} +
              {translate('DECRYPT_PROMPT_SELECT_ADDRESS')}
              + + Derivation Path{' '} + +
              this.renderWalletRow(wallet))} config={{ hiddenHeadings: ['#', translateRaw('ACTION_5')] }} /> @@ -238,7 +234,7 @@ class DeterministicWalletsClass extends React.PureComponent { } private renderWalletRow(wallet: deterministicWalletsTypes.DeterministicWalletData) { - const { desiredToken, network, addressLabels } = this.props; + const { network, addressLabels } = this.props; const { selectedAddress } = this.state; const label = addressLabels[wallet.address.toLowerCase()]; @@ -253,9 +249,6 @@ class DeterministicWalletsClass extends React.PureComponent { }; } - // Get renderable values, but keep 'em short - const token = desiredToken ? wallet.tokenValues[desiredToken] : null; - // tslint:disable:jsx-key return [
              @@ -277,17 +270,6 @@ class DeterministicWalletsClass extends React.PureComponent { displayShortBalance={true} checkOffline={true} />, - desiredToken ? ( - - ) : ( - N/A - ), @@ -300,15 +282,12 @@ function mapStateToProps(state: AppState): StateProps { return { addressLabels: addressBookSelectors.getAddressLabels(state), wallets: state.deterministicWallets.wallets, - desiredToken: state.deterministicWallets.desiredToken, - network: configSelectors.getNetworkConfig(state), - tokens: selectors.getTokens(state) + network: configSelectors.getNetworkConfig(state) }; } const DeterministicWallets = connect(mapStateToProps, { - getDeterministicWallets: deterministicWalletsActions.getDeterministicWallets, - setDesiredToken: deterministicWalletsActions.setDesiredToken + getDeterministicWallets: deterministicWalletsActions.getDeterministicWallets })(DeterministicWalletsClass); export default DeterministicWallets; From 07ce115063ef31a1a9d7fb3f734e7d1c427b4bfb Mon Sep 17 00:00:00 2001 From: Jonathan Chhabra Date: Mon, 22 Apr 2019 05:21:04 -0700 Subject: [PATCH 0380/1466] Add settings download functionality --- .../Dashboard/Settings/Export/Export.tsx | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/common/v2/features/Dashboard/Settings/Export/Export.tsx b/common/v2/features/Dashboard/Settings/Export/Export.tsx index 4db89ac83..ba5066123 100644 --- a/common/v2/features/Dashboard/Settings/Export/Export.tsx +++ b/common/v2/features/Dashboard/Settings/Export/Export.tsx @@ -8,6 +8,8 @@ import { ContentPanel } from 'v2/components'; import { GlobalSettingsContext } from 'v2/providers'; +import { makeBlob } from 'utils/blob'; + const CenteredContentPanel = styled(ContentPanel)` width: 35rem; `; @@ -27,15 +29,34 @@ const FullWidthLink = styled(Link)` width: 100%; `; +const FullWidthDownloadLink = styled.a` + width: 100%; +`; + const CacheDisplay = styled.code` overflow: auto; width: 100%; height: 10rem; `; -export class Import extends React.Component> { - public state = { step: 0 }; +class Downloader extends React.Component<{ cache: string }> { + public state = { blob: '', name: '' }; + componentDidMount() { + const settingsBlob = makeBlob('text/json;charset=UTF-8', this.props.cache); + this.setState({ blob: settingsBlob, name: 'MyCryptoSettings.json' }); + } + + public render() { + const { blob, name } = this.state; + return ( + + Download + + ); + } +} +export class Export extends React.Component> { public render() { const { history } = this.props; const onBack = history.goBack; @@ -45,11 +66,12 @@ export class Import extends React.Component> { {({ localCache }) => ( - Your exported CSV file has been downloaded. + Your MyCrypto settings file is ready. {localCache} Back To Settings + )} @@ -59,4 +81,4 @@ export class Import extends React.Component> { } } -export default withRouter(Import); +export default withRouter(Export); From d9eb9cada72a58c527bf2260003c3412d17d55fc Mon Sep 17 00:00:00 2001 From: miagx Date: Mon, 22 Apr 2019 10:13:46 -0700 Subject: [PATCH 0381/1466] ci trigger From c3d238664d20cc0062bdb5747ed9aa5752d50d6b Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Mon, 22 Apr 2019 19:01:00 -0400 Subject: [PATCH 0382/1466] Use monospace font for addresses --- .../AddAccount/components/DeterministicWallets.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 3cd189936..34e921d81 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -1,6 +1,7 @@ import React from 'react'; import Select, { Option } from 'react-select'; import { connect } from 'react-redux'; +import styled from 'styled-components'; import { Table, Address, IconLink, Typography } from '@mycrypto/ui'; import translate, { translateRaw } from 'translations'; @@ -20,6 +21,12 @@ import prevIcon from 'assets/images/previous-page-button.svg'; const WALLETS_PER_PAGE = 5; +const MonospaceAddress = styled(Address)` + * { + font-family: 'Roboto Mono', Menlo, Monaco, Consolas, 'Courier New', monospace; + } +`; + interface OwnProps { dPath: DPath; dPaths: DPath[]; @@ -262,7 +269,7 @@ class DeterministicWalletsClass extends React.PureComponent { onClick={this.selectAddress.bind(this, wallet.address, wallet.index)} />
              , -
              , + , Date: Mon, 22 Apr 2019 21:42:35 -0400 Subject: [PATCH 0383/1466] PrivateRouting Dashboard --- common/Root.tsx | 9 ++++--- .../v2/features/NoAccounts/NoAccountAuth.tsx | 24 +++++++++++++++++++ common/v2/features/NoAccounts/index.ts | 1 + 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 common/v2/features/NoAccounts/NoAccountAuth.tsx diff --git a/common/Root.tsx b/common/Root.tsx index 055622984..f96f5fe1c 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -32,13 +32,15 @@ import { Theme } from 'config'; import 'what-input'; // v2 -import { gatherFeatureRoutes } from 'v2'; +// import { gatherFeatureRoutes } from 'v2'; import DevTools from 'v2/features/DevTools'; import { AccountProvider } from 'v2/providers/AccountProvider'; import { AddressMetadataProvider } from 'v2/providers/AddressMetadataProvider'; import { NetworkOptionsProvider } from 'v2/providers/NetworkOptionsProvider'; import { TransactionProvider } from 'v2/providers/TransactionProvider'; import { TransactionHistoryProvider } from 'v2/providers/TransactionHistoryProvider'; +import PrivateRoute from 'v2/features/NoAccounts/NoAccountAuth'; +import Dashboard from 'v2/features/Dashboard'; interface OwnProps { store: Store; @@ -90,11 +92,12 @@ class RootClass extends Component { if (error) { return ; } - const routes = ( - {gatherFeatureRoutes().map((config, i) => )} + {/* {gatherFeatureRoutes().map((config, i) => )} */} + + diff --git a/common/v2/features/NoAccounts/NoAccountAuth.tsx b/common/v2/features/NoAccounts/NoAccountAuth.tsx new file mode 100644 index 000000000..dbae0765c --- /dev/null +++ b/common/v2/features/NoAccounts/NoAccountAuth.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +// import { AccountContext } from 'v2/providers'; +import { readAll } from 'v2/services'; +import { Route, Redirect } from 'react-router-dom'; + +interface PrivateRouteProps { + [key: string]: any; +} + +export default function PrivateRoute({ component: Component, ...rest }: PrivateRouteProps) { + const allAccounts = readAll('accounts')(); + return ( + + allAccounts === undefined || allAccounts.length === 0 ? ( + + ) : ( + + ) + } + /> + ); +} diff --git a/common/v2/features/NoAccounts/index.ts b/common/v2/features/NoAccounts/index.ts index 79fffe35d..daa6a4bd1 100644 --- a/common/v2/features/NoAccounts/index.ts +++ b/common/v2/features/NoAccounts/index.ts @@ -1,2 +1,3 @@ export { default } from './NoAccounts'; export { default as noAccountsRoutes } from './routes'; +export { default as NoAccountAuth } from './NoAccountAuth'; From 5d7985ad2027e022685ba62054d60777826adfa2 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Mon, 22 Apr 2019 21:58:01 -0400 Subject: [PATCH 0384/1466] Move monospace font style to UI --- .../AddAccount/components/DeterministicWallets.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 34e921d81..3cd189936 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -1,7 +1,6 @@ import React from 'react'; import Select, { Option } from 'react-select'; import { connect } from 'react-redux'; -import styled from 'styled-components'; import { Table, Address, IconLink, Typography } from '@mycrypto/ui'; import translate, { translateRaw } from 'translations'; @@ -21,12 +20,6 @@ import prevIcon from 'assets/images/previous-page-button.svg'; const WALLETS_PER_PAGE = 5; -const MonospaceAddress = styled(Address)` - * { - font-family: 'Roboto Mono', Menlo, Monaco, Consolas, 'Courier New', monospace; - } -`; - interface OwnProps { dPath: DPath; dPaths: DPath[]; @@ -269,7 +262,7 @@ class DeterministicWalletsClass extends React.PureComponent { onClick={this.selectAddress.bind(this, wallet.address, wallet.index)} /> , - , +
              , Date: Mon, 22 Apr 2019 22:01:23 -0400 Subject: [PATCH 0385/1466] redirects to no-accounts from PrivateRoute --- common/Root.tsx | 7 +++---- common/v2/features/NoAccounts/NoAccounts.tsx | 14 +++++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/common/Root.tsx b/common/Root.tsx index f96f5fe1c..eae15df64 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -32,7 +32,7 @@ import { Theme } from 'config'; import 'what-input'; // v2 -// import { gatherFeatureRoutes } from 'v2'; +import { gatherFeatureRoutes } from 'v2'; import DevTools from 'v2/features/DevTools'; import { AccountProvider } from 'v2/providers/AccountProvider'; import { AddressMetadataProvider } from 'v2/providers/AddressMetadataProvider'; @@ -95,10 +95,9 @@ class RootClass extends Component { const routes = ( - {/* {gatherFeatureRoutes().map((config, i) => )} */} - - + {gatherFeatureRoutes().map((config, i) => )} + diff --git a/common/v2/features/NoAccounts/NoAccounts.tsx b/common/v2/features/NoAccounts/NoAccounts.tsx index 1678dcc6f..5fc49b931 100644 --- a/common/v2/features/NoAccounts/NoAccounts.tsx +++ b/common/v2/features/NoAccounts/NoAccounts.tsx @@ -4,6 +4,7 @@ import { Layout } from 'v2/features'; import sadWallet from 'common/assets/images/icn-sad-wallet.svg'; import { Button } from '@mycrypto/ui'; import translate from 'translations'; +import { Redirect } from 'react-router-dom'; const NoAccountsContainer = styled.div` display: flex; @@ -94,7 +95,16 @@ const ButtonGroup = styled.div` `; export default class NoAccounts extends Component { + public state = { + redirect: false + }; + public handleClick() { + this.setState({ redirect: true }); + } public render() { + if (this.state.redirect) { + return ; + } return ( @@ -103,7 +113,9 @@ export default class NoAccounts extends Component {
              {translate('NO_ACCOUNTS_HEADER')}
              {translate('NO_ACCOUNTS_DESCRIPTION')} - Add Existing Account + + Add Existing Account + Import MyCrypto Settings Create New Account From 273998dc02bb9ee9985c04c7f815f32a83086354 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 22 Apr 2019 22:09:52 -0400 Subject: [PATCH 0386/1466] redirect to add-account from no-account view, set up for routing history --- common/v2/features/NoAccounts/NoAccounts.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/v2/features/NoAccounts/NoAccounts.tsx b/common/v2/features/NoAccounts/NoAccounts.tsx index 5fc49b931..fa5a234b7 100644 --- a/common/v2/features/NoAccounts/NoAccounts.tsx +++ b/common/v2/features/NoAccounts/NoAccounts.tsx @@ -4,7 +4,7 @@ import { Layout } from 'v2/features'; import sadWallet from 'common/assets/images/icn-sad-wallet.svg'; import { Button } from '@mycrypto/ui'; import translate from 'translations'; -import { Redirect } from 'react-router-dom'; +import { Link } from 'react-router-dom'; const NoAccountsContainer = styled.div` display: flex; @@ -102,9 +102,6 @@ export default class NoAccounts extends Component { this.setState({ redirect: true }); } public render() { - if (this.state.redirect) { - return ; - } return ( @@ -114,7 +111,7 @@ export default class NoAccounts extends Component { {translate('NO_ACCOUNTS_DESCRIPTION')} - Add Existing Account + Add Existing Account Import MyCrypto Settings From df2f825f8556020af7b94c8ac93e0b1e2689271c Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Tue, 23 Apr 2019 02:13:29 -0400 Subject: [PATCH 0387/1466] Update UI for some style fixes --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8befad219..17f4076e6 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@ledgerhq/hw-app-eth": "4.48.0", "@ledgerhq/hw-transport-node-hid-noevents": "4.48.0", "@ledgerhq/hw-transport-u2f": "4.46.0", - "@mycrypto/ui": "0.15.0-optional-address-title.2", + "@mycrypto/ui": "0.16.0-optional-address-title", "@parity/qr-signer": "0.3.1", "@types/react-slick": "0.23.3", "axios": "0.18.0", diff --git a/yarn.lock b/yarn.lock index b2aecaa3d..9da3929d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -149,10 +149,10 @@ "@ledgerhq/errors" "^4.48.0" events "^3.0.0" -"@mycrypto/ui@0.15.0-optional-address-title.2": - version "0.15.0-optional-address-title.2" - resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.15.0-optional-address-title.2.tgz#861a59c7c56e6f02b9b636b0aa90dccf1d082e82" - integrity sha512-9Aa7j63AG0A1AdS2Vk4mL6oWBO7p6F2mH6WvGQ6MPoblxOd03CCH/OJoYEkjGPZhm4wxdCpGsKZ7slj11Xuglg== +"@mycrypto/ui@0.16.0-optional-address-title": + version "0.16.0-optional-address-title" + resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.16.0-optional-address-title.tgz#5cea8c0fd856d57951e5ea5e1e3a73ca8199f2ea" + integrity sha512-szzbbX7N/wCQ14Jm2/9fFlrM+Matw+fVK9LI+gQQkn59QhCuzKGP/2qHF40u1aFbi3hmFTOGP/jtLzceUnR1cQ== dependencies: "@types/dom-clipboard-api" "^1.0.1" "@types/lodash.throttle" "^4.1.4" From 3233ea6065f22941cfd5bcec1efd54d96b8d582d Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Tue, 23 Apr 2019 02:25:49 -0400 Subject: [PATCH 0388/1466] Update Jest to fix error on Windows 10 --- jest_config/jest.config.json | 7 +- jest_config/jest.int.config.json | 7 +- package.json | 4 +- yarn.lock | 1775 +++++++++++++++++++----------- 4 files changed, 1160 insertions(+), 633 deletions(-) diff --git a/jest_config/jest.config.json b/jest_config/jest.config.json index 86eada770..a1bb3a8dd 100644 --- a/jest_config/jest.config.json +++ b/jest_config/jest.config.json @@ -22,5 +22,10 @@ "automock": false, "snapshotSerializers": ["enzyme-to-json/serializer"], "browser": true, - "collectCoverage": true + "collectCoverage": true, + "globals": { + "ts-jest": { + "diagnostics": false + } + } } diff --git a/jest_config/jest.int.config.json b/jest_config/jest.int.config.json index cbf50fa9d..cc7510549 100644 --- a/jest_config/jest.int.config.json +++ b/jest_config/jest.int.config.json @@ -20,5 +20,10 @@ "automock": false, "snapshotSerializers": ["enzyme-to-json/serializer"], "browser": true, - "collectCoverage": true + "collectCoverage": true, + "globals": { + "ts-jest": { + "diagnostics": false + } + } } diff --git a/package.json b/package.json index d7eec3ad5..64ce746e0 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "husky": "1.3.1", "image-webpack-loader": "4.2.0", "isomorphic-fetch": "2.2.1", - "jest": "23.6.0", + "jest": "24.1.0", "jquery": "3.3.1", "klaw-sync": "3.0.2", "lint-staged": "7.0.5", @@ -148,7 +148,7 @@ "sass-loader": "6.0.7", "style-loader": "0.20.3", "thread-loader": "1.1.5", - "ts-jest": "22.0.3", + "ts-jest": "24.0.0", "ts-loader": "4.1.0", "ts-node": "5.0.1", "tslint": "5.11.0", diff --git a/yarn.lock b/yarn.lock index ddcc0d2ec..607183915 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26,24 +26,99 @@ version "4.0.2" resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-4.0.2.tgz#6abbdc22f33cab742053777a26db2e25ca527179" +"@babel/code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== + dependencies: + "@babel/highlight" "^7.0.0" + "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" dependencies: "@babel/highlight" "7.0.0-beta.44" +"@babel/core@^7.1.0": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.3.tgz#198d6d3af4567be3989550d97e068de94503074f" + integrity sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.4.0" + "@babel/helpers" "^7.4.3" + "@babel/parser" "^7.4.3" + "@babel/template" "^7.4.0" + "@babel/traverse" "^7.4.3" + "@babel/types" "^7.4.0" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.11" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.0.0", "@babel/generator@^7.4.0": + version "7.4.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.0.tgz#c230e79589ae7a729fd4631b9ded4dc220418196" + integrity sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ== + dependencies: + "@babel/types" "^7.4.0" + jsesc "^2.5.1" + lodash "^4.17.11" + source-map "^0.5.0" + trim-right "^1.0.1" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" dependencies: "@babel/types" "^7.0.0" +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== + dependencies: + "@babel/types" "^7.0.0" + "@babel/helper-module-imports@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" dependencies: "@babel/types" "^7.0.0" +"@babel/helper-plugin-utils@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" + integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== + +"@babel/helper-split-export-declaration@^7.4.0": + version "7.4.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz#571bfd52701f492920d63b7f735030e9a3e10b55" + integrity sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw== + dependencies: + "@babel/types" "^7.4.0" + +"@babel/helpers@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.3.tgz#7b1d354363494b31cb9a2417ae86af32b7853a3b" + integrity sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q== + dependencies: + "@babel/template" "^7.4.0" + "@babel/traverse" "^7.4.3" + "@babel/types" "^7.4.0" + "@babel/highlight@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5" @@ -52,6 +127,27 @@ esutils "^2.0.2" js-tokens "^3.0.0" +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.0", "@babel/parser@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.3.tgz#eb3ac80f64aa101c907d4ce5406360fe75b7895b" + integrity sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ== + +"@babel/plugin-syntax-object-rest-spread@^7.0.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" + integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/polyfill@^7.0.0-beta.42": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0-beta.44.tgz#6bbcddebd8f28f1040b9a78fdac7dc515356e5dc" @@ -65,6 +161,30 @@ dependencies: regenerator-runtime "^0.12.0" +"@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.4.0": + version "7.4.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.0.tgz#12474e9c077bae585c5d835a95c0b0b790c25c8b" + integrity sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.4.0" + "@babel/types" "^7.4.0" + +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.3.tgz#1a01f078fc575d589ff30c0f71bf3c3d9ccbad84" + integrity sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.4.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.0" + "@babel/parser" "^7.4.3" + "@babel/types" "^7.4.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.11" + "@babel/types@^7.0.0": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" @@ -73,6 +193,23 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" +"@babel/types@^7.3.0", "@babel/types@^7.4.0": + version "7.4.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.0.tgz#670724f77d24cce6cc7d8cf64599d511d164894c" + integrity sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA== + dependencies: + esutils "^2.0.2" + lodash "^4.17.11" + to-fast-properties "^2.0.0" + +"@cnakazawa/watch@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" + integrity sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA== + dependencies: + exec-sh "^0.3.2" + minimist "^1.2.0" + "@emotion/is-prop-valid@^0.6.8": version "0.6.8" resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.6.8.tgz#68ad02831da41213a2089d2cab4e8ac8b30cbd85" @@ -85,6 +222,150 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.6.tgz#004b98298d04c7ca3b4f50ca2035d4f60d2eed1b" integrity sha512-h4t4jFjtm1YV7UirAFuSuFGyLa+NNxjdkq6DpFLANNQY5rHueFZHVY+8Cu1HYVP6DrheB0kv4m5xPjo7eKT7yQ== +"@jest/console@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.7.1.tgz#32a9e42535a97aedfe037e725bd67e954b459545" + integrity sha512-iNhtIy2M8bXlAOULWVTUxmnelTLFneTNEkHCgPmgd+zNwy9zVddJ6oS5rZ9iwoscNdT5mMwUd0C51v/fSlzItg== + dependencies: + "@jest/source-map" "^24.3.0" + chalk "^2.0.1" + slash "^2.0.0" + +"@jest/core@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-24.7.1.tgz#6707f50db238d0c5988860680e2e414df0032024" + integrity sha512-ivlZ8HX/FOASfHcb5DJpSPFps8ydfUYzLZfgFFqjkLijYysnIEOieg72YRhO4ZUB32xu40hsSMmaw+IGYeKONA== + dependencies: + "@jest/console" "^24.7.1" + "@jest/reporters" "^24.7.1" + "@jest/test-result" "^24.7.1" + "@jest/transform" "^24.7.1" + "@jest/types" "^24.7.0" + ansi-escapes "^3.0.0" + chalk "^2.0.1" + exit "^0.1.2" + graceful-fs "^4.1.15" + jest-changed-files "^24.7.0" + jest-config "^24.7.1" + jest-haste-map "^24.7.1" + jest-message-util "^24.7.1" + jest-regex-util "^24.3.0" + jest-resolve-dependencies "^24.7.1" + jest-runner "^24.7.1" + jest-runtime "^24.7.1" + jest-snapshot "^24.7.1" + jest-util "^24.7.1" + jest-validate "^24.7.0" + jest-watcher "^24.7.1" + micromatch "^3.1.10" + p-each-series "^1.0.0" + pirates "^4.0.1" + realpath-native "^1.1.0" + rimraf "^2.5.4" + strip-ansi "^5.0.0" + +"@jest/environment@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-24.7.1.tgz#9b9196bc737561f67ac07817d4c5ece772e33135" + integrity sha512-wmcTTYc4/KqA+U5h1zQd5FXXynfa7VGP2NfF+c6QeGJ7c+2nStgh65RQWNX62SC716dTtqheTRrZl0j+54oGHw== + dependencies: + "@jest/fake-timers" "^24.7.1" + "@jest/transform" "^24.7.1" + "@jest/types" "^24.7.0" + jest-mock "^24.7.0" + +"@jest/fake-timers@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.7.1.tgz#56e5d09bdec09ee81050eaff2794b26c71d19db2" + integrity sha512-4vSQJDKfR2jScOe12L9282uiwuwQv9Lk7mgrCSZHA9evB9efB/qx8i0KJxsAKtp8fgJYBJdYY7ZU6u3F4/pyjA== + dependencies: + "@jest/types" "^24.7.0" + jest-message-util "^24.7.1" + jest-mock "^24.7.0" + +"@jest/reporters@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-24.7.1.tgz#38ac0b096cd691bbbe3051ddc25988d42e37773a" + integrity sha512-bO+WYNwHLNhrjB9EbPL4kX/mCCG4ZhhfWmO3m4FSpbgr7N83MFejayz30kKjgqr7smLyeaRFCBQMbXpUgnhAJw== + dependencies: + "@jest/environment" "^24.7.1" + "@jest/test-result" "^24.7.1" + "@jest/transform" "^24.7.1" + "@jest/types" "^24.7.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.2" + istanbul-api "^2.1.1" + istanbul-lib-coverage "^2.0.2" + istanbul-lib-instrument "^3.0.1" + istanbul-lib-source-maps "^3.0.1" + jest-haste-map "^24.7.1" + jest-resolve "^24.7.1" + jest-runtime "^24.7.1" + jest-util "^24.7.1" + jest-worker "^24.6.0" + node-notifier "^5.2.1" + slash "^2.0.0" + source-map "^0.6.0" + string-length "^2.0.0" + +"@jest/source-map@^24.3.0": + version "24.3.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.3.0.tgz#563be3aa4d224caf65ff77edc95cd1ca4da67f28" + integrity sha512-zALZt1t2ou8le/crCeeiRYzvdnTzaIlpOWaet45lNSqNJUnXbppUUFR4ZUAlzgDmKee4Q5P/tKXypI1RiHwgag== + dependencies: + callsites "^3.0.0" + graceful-fs "^4.1.15" + source-map "^0.6.0" + +"@jest/test-result@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.7.1.tgz#19eacdb29a114300aed24db651e5d975f08b6bbe" + integrity sha512-3U7wITxstdEc2HMfBX7Yx3JZgiNBubwDqQMh+BXmZXHa3G13YWF3p6cK+5g0hGkN3iufg/vGPl3hLxQXD74Npg== + dependencies: + "@jest/console" "^24.7.1" + "@jest/types" "^24.7.0" + "@types/istanbul-lib-coverage" "^2.0.0" + +"@jest/test-sequencer@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-24.7.1.tgz#9c18e428e1ad945fa74f6233a9d35745ca0e63e0" + integrity sha512-84HQkCpVZI/G1zq53gHJvSmhUer4aMYp9tTaffW28Ih5OxfCg8hGr3nTSbL1OhVDRrFZwvF+/R9gY6JRkDUpUA== + dependencies: + "@jest/test-result" "^24.7.1" + jest-haste-map "^24.7.1" + jest-runner "^24.7.1" + jest-runtime "^24.7.1" + +"@jest/transform@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-24.7.1.tgz#872318f125bcfab2de11f53b465ab1aa780789c2" + integrity sha512-EsOUqP9ULuJ66IkZQhI5LufCHlTbi7hrcllRMUEV/tOgqBVQi93+9qEvkX0n8mYpVXQ8VjwmICeRgg58mrtIEw== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^24.7.0" + babel-plugin-istanbul "^5.1.0" + chalk "^2.0.1" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.1.15" + jest-haste-map "^24.7.1" + jest-regex-util "^24.3.0" + jest-util "^24.7.1" + micromatch "^3.1.10" + realpath-native "^1.1.0" + slash "^2.0.0" + source-map "^0.6.1" + write-file-atomic "2.4.1" + +"@jest/types@^24.7.0": + version "24.7.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.7.0.tgz#c4ec8d1828cdf23234d9b4ee31f5482a3f04f48b" + integrity sha512-ipJUa2rFWiKoBqMKP63Myb6h9+iT3FHRTF2M8OR6irxWzItisa8i4dcSg14IbvmXUnBlHBlUQPYUHWyX3UPpYA== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/yargs" "^12.0.9" + "@ledgerhq/devices@^4.46.0": version "4.46.0" resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-4.46.0.tgz#1ac2df240b081b8ae3ac7ac30ae21699019b8a76" @@ -178,6 +459,39 @@ version "0.7.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" +"@types/babel__core@^7.1.0": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.1.tgz#ce9a9e5d92b7031421e1d0d74ae59f572ba48be6" + integrity sha512-+hjBtgcFPYyCTo0A15+nxrCVJL7aC6Acg87TXd5OW3QhHswdrOLoles+ldL2Uk8q++7yIfl4tURtztccdeeyOw== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.0.2.tgz#d2112a6b21fad600d7674274293c85dce0cb47fc" + integrity sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" + integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.0.6" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.6.tgz#328dd1a8fc4cfe3c8458be9477b219ea158fd7b2" + integrity sha512-XYVgHF2sQ0YblLRMLNPB3CkFMewzFmlDsH/TneZFHUXDlABQgh88uOxuez7ZcXxayLFrqLwtDH1t+FmlFwNZxw== + dependencies: + "@babel/types" "^7.3.0" + "@types/bip39@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/bip39/-/bip39-2.4.0.tgz#eee31a14abc8ebbb41a1ff14575c447b18346cbc" @@ -231,6 +545,11 @@ dependencies: "@types/jquery" "*" +"@types/istanbul-lib-coverage@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.0.tgz#1eb8c033e98cf4e1a4cedcaf8bcafe8cb7591e85" + integrity sha512-eAtOAFZefEnfJiRFQBGw1eYqa5GTLCZ1y86N0XSI/D6EB+E8z6VPV/UL7Gi5UEclFqoQk+6NRqEDsfmDLXn8sg== + "@types/jest@23.3.14": version "23.3.14" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.14.tgz#37daaf78069e7948520474c87b80092ea912520a" @@ -398,6 +717,11 @@ version "5.5.0" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" +"@types/stack-utils@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" + integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== + "@types/styled-components@4.0.3": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-4.0.3.tgz#8287e54e446302369eecc521243a2f32cf9122ee" @@ -420,6 +744,11 @@ version "1.13.4" resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.13.4.tgz#ca3578299323f4fbec770bb32ed581198f0a8ed9" +"@types/yargs@^12.0.2", "@types/yargs@^12.0.9": + version "12.0.12" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" + integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== + "@types/zxcvbn@4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@types/zxcvbn/-/zxcvbn-4.4.0.tgz#fbc1d941cc6d9d37d18405c513ba6b294f89b609" @@ -551,6 +880,11 @@ ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" +ansi-regex@^4.0.0, ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + ansi-styles@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de" @@ -577,13 +911,6 @@ any-observable@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -619,11 +946,12 @@ app-root-path@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" +append-transform@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" + integrity sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw== dependencies: - default-require-extensions "^1.0.0" + default-require-extensions "^2.0.0" aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" @@ -674,10 +1002,6 @@ array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" -array-filter@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -686,14 +1010,6 @@ array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" -array-map@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - -array-reduce@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -797,18 +1113,19 @@ async@^1.5.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.1.4, async@^2.5.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" - dependencies: - lodash "^4.17.11" - async@^2.3.0, async@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" dependencies: lodash "^4.14.0" +async@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" + integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== + dependencies: + lodash "^4.17.11" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -888,30 +1205,6 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-core@^6.0.0, babel-core@^6.24.1: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - babel-core@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" @@ -936,7 +1229,7 @@ babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.6" -babel-generator@^6.18.0, babel-generator@^6.26.0: +babel-generator@^6.26.0: version "6.26.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" dependencies: @@ -1067,12 +1360,18 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" - dependencies: - babel-plugin-istanbul "^4.1.6" - babel-preset-jest "^23.2.0" +babel-jest@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.7.1.tgz#73902c9ff15a7dfbdc9994b0b17fcefd96042178" + integrity sha512-GPnLqfk8Mtt0i4OemjWkChi73A3ALs4w2/QbG64uAj8b5mmwzxc7jbJVRZt8NJkxi6FopVHog9S3xX6UJKb2qg== + dependencies: + "@jest/transform" "^24.7.1" + "@jest/types" "^24.7.0" + "@types/babel__core" "^7.1.0" + babel-plugin-istanbul "^5.1.0" + babel-preset-jest "^24.6.0" + chalk "^2.4.2" + slash "^2.0.0" babel-messages@^6.23.0: version "6.23.0" @@ -1086,22 +1385,21 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-istanbul@^4.1.4, babel-plugin-istanbul@^4.1.6: - version "4.1.6" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" +babel-plugin-istanbul@^5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.2.tgz#d8c2e2e83f72695d6bfdcd297719c66161d5f0f9" + integrity sha512-U3ZVajC+Z69Gim7ZzmD4Wcsq76i/1hqDamBfowc1tWzWjybRy70iWfngP2ME+1CrgcgZ/+muIbPY/Yi0dxdIkQ== dependencies: - babel-plugin-syntax-object-rest-spread "^6.13.0" - find-up "^2.1.0" - istanbul-lib-instrument "^1.10.1" - test-exclude "^4.2.1" - -babel-plugin-jest-hoist@^22.4.4: - version "22.4.4" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.4.tgz#b9851906eab34c7bf6f8c895a2b08bea1a844c0b" + find-up "^3.0.0" + istanbul-lib-instrument "^3.2.0" + test-exclude "^5.2.2" -babel-plugin-jest-hoist@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" +babel-plugin-jest-hoist@^24.6.0: + version "24.6.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.6.0.tgz#f7f7f7ad150ee96d7a5e8e2c5da8319579e78019" + integrity sha512-3pKNH6hMt9SbOv0F3WVmy5CWQ4uogS3k0GY5XLyQHJ9EGpAT9XWkFd2ZiXXtkwFHdAHa5j7w7kfxSP5lAIwu7w== + dependencies: + "@types/babel__traverse" "^7.0.6" "babel-plugin-styled-components@>= 1": version "1.10.0" @@ -1152,7 +1450,7 @@ babel-plugin-syntax-jsx@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" -babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: +babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" @@ -1450,19 +1748,13 @@ babel-preset-es2015@^6.9.0: babel-plugin-transform-es2015-unicode-regex "^6.24.1" babel-plugin-transform-regenerator "^6.24.1" -babel-preset-jest@^22.0.1: - version "22.4.4" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.4.4.tgz#ec9fbd8bcd7dfd24b8b5320e0e688013235b7c39" - dependencies: - babel-plugin-jest-hoist "^22.4.4" - babel-plugin-syntax-object-rest-spread "^6.13.0" - -babel-preset-jest@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" +babel-preset-jest@^24.6.0: + version "24.6.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.6.0.tgz#66f06136eefce87797539c0d63f1769cc3915984" + integrity sha512-pdZqLEdmy1ZK5kyRUfvBb2IfTPb2BUvIJczlPspS8fWmBQslNNDBqVfh7BW5leOVJMDZKzjD8XEyABTk6gQ5yw== dependencies: - babel-plugin-jest-hoist "^23.2.0" - babel-plugin-syntax-object-rest-spread "^6.13.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + babel-plugin-jest-hoist "^24.6.0" babel-preset-stage-1@^6.5.0: version "6.24.1" @@ -1503,14 +1795,14 @@ babel-register@^6.26.0, babel-register@^6.9.0: mkdirp "^0.5.1" source-map-support "^0.4.15" -babel-runtime@6.x, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0, babel-runtime@^6.9.2: +babel-runtime@6.x, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: +babel-template@^6.24.1, babel-template@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" dependencies: @@ -1520,7 +1812,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babylon "^6.18.0" lodash "^4.17.4" -babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: +babel-traverse@^6.24.1, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: @@ -1534,7 +1826,7 @@ babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-tra invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: @@ -1962,6 +2254,13 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: caniuse-db "^1.0.30000639" electron-to-chromium "^1.2.7" +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + bs58@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" @@ -2043,6 +2342,11 @@ buffer-fill@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= +buffer-from@1.x: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + buffer-from@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.2.tgz#15f4b9bcef012044df31142c14333caf6e0260d0" @@ -2221,6 +2525,11 @@ callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + camel-case@3.0.x: version "3.0.0" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" @@ -2270,11 +2579,12 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: version "1.0.30000830" resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000830.tgz#6e45255b345649fd15ff59072da1e12bb3de2f13" -capture-exit@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" +capture-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" + integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== dependencies: - rsvp "^3.3.3" + rsvp "^4.8.4" capture-stack-trace@^1.0.0: version "1.0.0" @@ -2348,6 +2658,15 @@ chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" @@ -2405,21 +2724,6 @@ cheerio@^1.0.0-rc.2: lodash "^4.15.0" parse5 "^3.0.1" -chokidar@^1.6.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - chokidar@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.3.tgz#dcbd4f6cbb2a55b4799ba8a840ac527e5f4b1176" @@ -2751,6 +3055,11 @@ compare-version@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/compare-version/-/compare-version-0.1.2.tgz#0162ec2d9351f5ddd59a9202cba935366a725080" +compare-versions@^3.2.1: + version "3.4.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.4.0.tgz#e0747df5c9cb7f054d6d3dc3e1dbc444f9e92b26" + integrity sha512-tK69D7oNXXqUW3ZNo/z7NXTEz22TCF0pTE+YF9cxvaAM9XnkLo1fV621xCLrRR6aevJlKxExkss0vWqUCUpqdg== + component-classes@^1.2.5: version "1.2.6" resolved "https://registry.yarnpkg.com/component-classes/-/component-classes-1.2.6.tgz#c642394c3618a4d8b0b8919efccbbd930e5cd691" @@ -2847,16 +3156,17 @@ content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" -convert-source-map@^1.1.1, convert-source-map@^1.4.0, convert-source-map@^1.5.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - -convert-source-map@^1.5.1: +convert-source-map@^1.1.0: version "1.6.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== dependencies: safe-buffer "~5.1.1" +convert-source-map@^1.1.1, convert-source-map@^1.4.0, convert-source-map@^1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" @@ -2941,22 +3251,6 @@ coveralls@3.0.0: minimist "^1.2.0" request "^2.79.0" -cpx@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/cpx/-/cpx-1.5.0.tgz#185be018511d87270dedccc293171e37655ab88f" - dependencies: - babel-runtime "^6.9.2" - chokidar "^1.6.0" - duplexer "^0.1.1" - glob "^7.0.5" - glob2base "^0.0.12" - minimatch "^3.0.2" - mkdirp "^0.5.1" - resolve "^1.1.7" - safe-buffer "^5.0.1" - shell-quote "^1.6.1" - subarg "^1.0.0" - create-ecdh@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.1.tgz#44223dfed533193ba5ba54e0df5709b89acf1f82" @@ -3305,7 +3599,7 @@ dateformat@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" -debug@2.6.9, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: +debug@2.6.9, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -3317,7 +3611,14 @@ debug@^3.0.0, debug@^3.1.0: dependencies: ms "2.0.0" -decamelize@^1.1.1, decamelize@^1.1.2: +debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -3463,11 +3764,12 @@ deepmerge@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" +default-require-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" + integrity sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc= dependencies: - strip-bom "^2.0.0" + strip-bom "^3.0.0" define-properties@^1.1.2: version "1.1.2" @@ -3566,6 +3868,11 @@ detective@^4.3.1: acorn "^5.2.1" defined "^1.0.0" +diff-sequences@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.3.0.tgz#0f20e8a1df1abddaf4d9c226680952e64118b975" + integrity sha512-xLqpez+Zj9GKSnPWS0WZw1igGocZ+uua8+y+5dDNTT934N3QuY1sp2LkHzwiaYQGz60hMq0pjAshdeXm5VUOEw== + diff@^3.1.0, diff@^3.2.0, diff@^3.3.1, diff@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" @@ -3767,7 +4074,7 @@ duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" -duplexer@^0.1.1, duplexer@~0.1.1: +duplexer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" @@ -4318,11 +4625,10 @@ exec-series@^1.0.0: async-each-series "^1.1.0" object-assign "^4.1.0" -exec-sh@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" - dependencies: - merge "^1.1.3" +exec-sh@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" + integrity sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg== execa@^0.10.0: version "0.10.0" @@ -4438,7 +4744,7 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^22.4.0, expect@^22.4.3: +expect@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/expect/-/expect-22.4.3.tgz#d5a29d0a0e1fb2153557caef2674d4547e914674" dependencies: @@ -4449,16 +4755,17 @@ expect@^22.4.0, expect@^22.4.3: jest-message-util "^22.4.3" jest-regex-util "^22.4.3" -expect@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" +expect@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-24.7.1.tgz#d91defbab4e627470a152feaf35b3c31aa1c7c14" + integrity sha512-mGfvMTPduksV3xoI0xur56pQsg2vJjNf5+a+bXOjqCkiCBbmCayrBbHS/75y9K430cfqyocPr2ZjiNiRx4SRKw== dependencies: + "@jest/types" "^24.7.0" ansi-styles "^3.2.0" - jest-diff "^23.6.0" - jest-get-type "^22.1.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" + jest-get-type "^24.3.0" + jest-matcher-utils "^24.7.0" + jest-message-util "^24.7.1" + jest-regex-util "^24.3.0" express@4.16.2: version "4.16.2" @@ -4585,7 +4892,7 @@ fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" -fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -4722,9 +5029,10 @@ filenamify@^2.0.0: strip-outer "^1.0.0" trim-repeated "^1.0.0" -fileset@^2.0.2: +fileset@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + integrity sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA= dependencies: glob "^7.0.3" minimatch "^3.0.3" @@ -4768,10 +5076,6 @@ find-cache-dir@^1.0.0: make-dir "^1.0.0" pkg-dir "^2.0.0" -find-index@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" - find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" @@ -4953,14 +5257,6 @@ fs-extra-p@^4.6.0: bluebird-lst "^1.0.5" fs-extra "^6.0.0" -fs-extra@4.0.3, fs-extra@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^0.30.0: version "0.30.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" @@ -4979,6 +5275,14 @@ fs-extra@^1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" +fs-extra@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b" @@ -5006,13 +5310,6 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.0.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - fsevents@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" @@ -5020,12 +5317,13 @@ fsevents@^1.1.2: nan "^2.3.0" node-pre-gyp "^0.6.39" -fsevents@^1.2.3: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.7.tgz#4851b664a3783e52003b3c66eb0eee1074933aa4" +fsevents@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.8.tgz#57ea5320f762cd4696e5e8e87120eccc8b11cacf" + integrity sha512-tPvHgPGB7m40CZ68xqFGkKuzN+RnpGmSV+hgeKxhRpbxdqKXUFJGC3yonBOLzQBcJyGpdZFDfCsdOC2KFsXzeA== dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" + nan "^2.12.1" + node-pre-gyp "^0.12.0" fstream-ignore@^1.0.5: version "1.0.5" @@ -5212,12 +5510,6 @@ glob-stream@^5.3.2: to-absolute-glob "^0.1.1" unique-stream "^2.0.2" -glob2base@^0.0.12: - version "0.0.12" - resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" - dependencies: - find-index "^0.1.1" - glob@^5.0.15, glob@^5.0.3: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -5249,6 +5541,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -5280,6 +5584,11 @@ global@^4.3.0, global@~4.3.0: min-document "^2.19.0" process "~0.5.1" +globals@^11.1.0: + version "11.11.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.11.0.tgz#dcf93757fa2de5486fbeed7118538adf789e9c2e" + integrity sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw== + globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -5400,6 +5709,11 @@ graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2 version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" +graceful-fs@^4.1.15: + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== + "graceful-readlink@>= 1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" @@ -5470,11 +5784,12 @@ gulplog@^1.0.0: dependencies: glogg "^1.0.0" -handlebars@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.0.tgz#0d6a6f34ff1f63cecec8423aa4169827bf787c3a" +handlebars@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" + integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw== dependencies: - async "^2.5.0" + neo-async "^2.6.0" optimist "^0.6.1" source-map "^0.6.1" optionalDependencies: @@ -6024,11 +6339,12 @@ import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" -import-local@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" +import-local@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" + integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== dependencies: - pkg-dir "^2.0.0" + pkg-dir "^3.0.0" resolve-cwd "^2.0.0" imurmurhash@^0.1.4: @@ -6138,6 +6454,11 @@ invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + ip-regex@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd" @@ -6322,6 +6643,11 @@ is-generator-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + is-gif@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-1.0.0.tgz#a6d2ae98893007bffa97a1d8c01d63205832097e" @@ -6610,84 +6936,76 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul-api@^1.3.1: - version "1.3.7" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa" - dependencies: - async "^2.1.4" - fileset "^2.0.2" - istanbul-lib-coverage "^1.2.1" - istanbul-lib-hook "^1.2.2" - istanbul-lib-instrument "^1.10.2" - istanbul-lib-report "^1.1.5" - istanbul-lib-source-maps "^1.2.6" - istanbul-reports "^1.5.1" - js-yaml "^3.7.0" - mkdirp "^0.5.1" +istanbul-api@^2.1.1: + version "2.1.5" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-2.1.5.tgz#697b95ec69856c278aacafc0f86ee7392338d5b5" + integrity sha512-meYk1BwDp59Pfse1TvPrkKYgVqAufbdBLEVoqvu/hLLKSaQ054ZTksbNepyc223tMnWdm6AdK2URIJJRqdP87g== + dependencies: + async "^2.6.1" + compare-versions "^3.2.1" + fileset "^2.0.3" + istanbul-lib-coverage "^2.0.4" + istanbul-lib-hook "^2.0.6" + istanbul-lib-instrument "^3.2.0" + istanbul-lib-report "^2.0.7" + istanbul-lib-source-maps "^3.0.5" + istanbul-reports "^2.2.3" + js-yaml "^3.13.0" + make-dir "^2.1.0" + minimatch "^3.0.4" once "^1.4.0" -istanbul-lib-coverage@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" - -istanbul-lib-coverage@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" +istanbul-lib-coverage@^2.0.2, istanbul-lib-coverage@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#927a354005d99dd43a24607bb8b33fd4e9aca1ad" + integrity sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug== -istanbul-lib-hook@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" +istanbul-lib-hook@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.6.tgz#5baa6067860a38290aef038b389068b225b01b7d" + integrity sha512-829DKONApZ7UCiPXcOYWSgkFXa4+vNYoNOt3F+4uDJLKL1OotAoVwvThoEj1i8jmOj7odbYcR3rnaHu+QroaXg== dependencies: - append-transform "^0.4.0" + append-transform "^1.0.0" -istanbul-lib-instrument@^1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" +istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.2.0.tgz#c549208da8a793f6622257a2da83e0ea96ae6a93" + integrity sha512-06IM3xShbNW4NgZv5AP4QH0oHqf1/ivFo8eFys0ZjPXHGldHJQWb3riYOKXqmOqfxXBfxu4B+g/iuhOPZH0RJg== dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.0" - semver "^5.3.0" + "@babel/generator" "^7.0.0" + "@babel/parser" "^7.0.0" + "@babel/template" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@babel/types" "^7.0.0" + istanbul-lib-coverage "^2.0.4" + semver "^6.0.0" -istanbul-lib-instrument@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" +istanbul-lib-report@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.7.tgz#370d80d433c4dbc7f58de63618f49599c74bd954" + integrity sha512-wLH6beJBFbRBLiTlMOBxmb85cnVM1Vyl36N48e4e/aTKSM3WbOx7zbVIH1SQ537fhhsPbX0/C5JB4qsmyRXXyA== dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.1" - semver "^5.3.0" + istanbul-lib-coverage "^2.0.4" + make-dir "^2.1.0" + supports-color "^6.0.0" -istanbul-lib-report@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" - dependencies: - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" +istanbul-lib-source-maps@^3.0.1, istanbul-lib-source-maps@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.5.tgz#1d9ee9d94d2633f15611ee7aae28f9cac6d1aeb9" + integrity sha512-eDhZ7r6r1d1zQPVZehLc3D0K14vRba/eBYkz3rw16DLOrrTzve9RmnkcwrrkWVgO1FL3EK5knujVe5S8QHE9xw== dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" + debug "^4.1.1" + istanbul-lib-coverage "^2.0.4" + make-dir "^2.1.0" + rimraf "^2.6.2" + source-map "^0.6.1" -istanbul-reports@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" +istanbul-reports@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.3.tgz#14e0d00ecbfa9387757999cf36599b88e9f2176e" + integrity sha512-T6EbPuc8Cb620LWAYyZ4D8SSn06dY9i1+IgUX2lTH8gbwflMc9Obd33zHTyNX653ybjpamAHS9toKS3E6cGhTw== dependencies: - handlebars "^4.0.3" + handlebars "^4.1.0" istextorbinary@^2.1.0: version "2.2.1" @@ -6704,68 +7022,33 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" -jest-changed-files@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" +jest-changed-files@^24.7.0: + version "24.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-24.7.0.tgz#39d723a11b16ed7b373ac83adc76a69464b0c4fa" + integrity sha512-33BgewurnwSfJrW7T5/ZAXGE44o7swLslwh8aUckzq2e17/2Os1V0QU506ZNik3hjs8MgnEMKNkcud442NCDTw== dependencies: + "@jest/types" "^24.7.0" + execa "^1.0.0" throat "^4.0.0" -jest-cli@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" +jest-cli@^24.1.0: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.7.1.tgz#6093a539073b6f4953145abeeb9709cd621044f1" + integrity sha512-32OBoSCVPzcTslGFl6yVCMzB2SqX3IrWwZCY5mZYkb0D2WsogmU3eV2o8z7+gRQa4o4sZPX/k7GU+II7CxM6WQ== dependencies: - ansi-escapes "^3.0.0" + "@jest/core" "^24.7.1" + "@jest/test-result" "^24.7.1" + "@jest/types" "^24.7.0" chalk "^2.0.1" exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.1.11" - import-local "^1.0.0" - is-ci "^1.0.10" - istanbul-api "^1.3.1" - istanbul-lib-coverage "^1.2.0" - istanbul-lib-instrument "^1.10.1" - istanbul-lib-source-maps "^1.2.4" - jest-changed-files "^23.4.2" - jest-config "^23.6.0" - jest-environment-jsdom "^23.4.0" - jest-get-type "^22.1.0" - jest-haste-map "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - jest-resolve-dependencies "^23.6.0" - jest-runner "^23.6.0" - jest-runtime "^23.6.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - jest-watcher "^23.4.0" - jest-worker "^23.2.0" - micromatch "^2.3.11" - node-notifier "^5.2.1" - prompts "^0.1.9" - realpath-native "^1.0.0" - rimraf "^2.5.4" - slash "^1.0.0" - string-length "^2.0.0" - strip-ansi "^4.0.0" - which "^1.2.12" - yargs "^11.0.0" - -jest-config@^22.0.1, jest-config@^22.4.4: - version "22.4.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.4.tgz#72a521188720597169cd8b4ff86934ef5752d86a" - dependencies: - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^22.4.1" - jest-environment-node "^22.4.1" - jest-get-type "^22.1.0" - jest-jasmine2 "^22.4.4" - jest-regex-util "^22.1.0" - jest-resolve "^22.4.2" - jest-util "^22.4.1" - jest-validate "^22.4.4" - pretty-format "^22.4.0" + import-local "^2.0.0" + is-ci "^2.0.0" + jest-config "^24.7.1" + jest-util "^24.7.1" + jest-validate "^24.7.0" + prompts "^2.0.1" + realpath-native "^1.1.0" + yargs "^12.0.2" jest-config@^22.4.3: version "22.4.3" @@ -6783,26 +7066,30 @@ jest-config@^22.4.3: jest-validate "^22.4.3" pretty-format "^22.4.3" -jest-config@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" +jest-config@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-24.7.1.tgz#6c1dd4db82a89710a3cf66bdba97827c9a1cf052" + integrity sha512-8FlJNLI+X+MU37j7j8RE4DnJkvAghXmBWdArVzypW6WxfGuxiL/CCkzBg0gHtXhD2rxla3IMOSUAHylSKYJ83g== dependencies: - babel-core "^6.0.0" - babel-jest "^23.6.0" + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^24.7.1" + "@jest/types" "^24.7.0" + babel-jest "^24.7.1" chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^23.4.0" - jest-environment-node "^23.4.0" - jest-get-type "^22.1.0" - jest-jasmine2 "^23.6.0" - jest-regex-util "^23.3.0" - jest-resolve "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - micromatch "^2.3.11" - pretty-format "^23.6.0" - -jest-diff@^22.4.0, jest-diff@^22.4.3: + jest-environment-jsdom "^24.7.1" + jest-environment-node "^24.7.1" + jest-get-type "^24.3.0" + jest-jasmine2 "^24.7.1" + jest-regex-util "^24.3.0" + jest-resolve "^24.7.1" + jest-util "^24.7.1" + jest-validate "^24.7.0" + micromatch "^3.1.10" + pretty-format "^24.7.0" + realpath-native "^1.1.0" + +jest-diff@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.3.tgz#e18cc3feff0aeef159d02310f2686d4065378030" dependencies: @@ -6811,29 +7098,35 @@ jest-diff@^22.4.0, jest-diff@^22.4.3: jest-get-type "^22.4.3" pretty-format "^22.4.3" -jest-diff@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" +jest-diff@^24.7.0: + version "24.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.7.0.tgz#5d862899be46249754806f66e5729c07fcb3580f" + integrity sha512-ULQZ5B1lWpH70O4xsANC4tf4Ko6RrpwhE3PtG6ERjMg1TiYTC2Wp4IntJVGro6a8HG9luYHhhmF4grF0Pltckg== dependencies: chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.1.0" - pretty-format "^23.6.0" + diff-sequences "^24.3.0" + jest-get-type "^24.3.0" + pretty-format "^24.7.0" -jest-docblock@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" +jest-docblock@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-24.3.0.tgz#b9c32dac70f72e4464520d2ba4aec02ab14db5dd" + integrity sha512-nlANmF9Yq1dufhFlKG9rasfQlrY7wINJbo3q01tu56Jv5eBU5jirylhF2O5ZBnLxzOVBGRDz/9NAwNyBtG4Nyg== dependencies: detect-newline "^2.1.0" -jest-each@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" +jest-each@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-24.7.1.tgz#fcc7dda4147c28430ad9fb6dc7211cd17ab54e74" + integrity sha512-4fsS8fEfLa3lfnI1Jw6NxjhyRTgfpuOVTeUZZFyVYqeTa4hPhr2YkToUhouuLTrL2eMGOfpbdMyRx0GQ/VooKA== dependencies: + "@jest/types" "^24.7.0" chalk "^2.0.1" - pretty-format "^23.6.0" + jest-get-type "^24.3.0" + jest-util "^24.7.1" + pretty-format "^24.7.0" -jest-environment-jsdom@^22.4.1, jest-environment-jsdom@^22.4.3: +jest-environment-jsdom@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz#d67daa4155e33516aecdd35afd82d4abf0fa8a1e" dependencies: @@ -6841,44 +7134,63 @@ jest-environment-jsdom@^22.4.1, jest-environment-jsdom@^22.4.3: jest-util "^22.4.3" jsdom "^11.5.1" -jest-environment-jsdom@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" +jest-environment-jsdom@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-24.7.1.tgz#a40e004b4458ebeb8a98082df135fd501b9fbbd6" + integrity sha512-Gnhb+RqE2JuQGb3kJsLF8vfqjt3PHKSstq4Xc8ic+ax7QKo4Z0RWGucU3YV+DwKR3T9SYc+3YCUQEJs8r7+Jxg== dependencies: - jest-mock "^23.2.0" - jest-util "^23.4.0" + "@jest/environment" "^24.7.1" + "@jest/fake-timers" "^24.7.1" + "@jest/types" "^24.7.0" + jest-mock "^24.7.0" + jest-util "^24.7.1" jsdom "^11.5.1" -jest-environment-node@^22.4.1, jest-environment-node@^22.4.3: +jest-environment-node@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.3.tgz#54c4eaa374c83dd52a9da8759be14ebe1d0b9129" dependencies: jest-mock "^22.4.3" jest-util "^22.4.3" -jest-environment-node@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" +jest-environment-node@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-24.7.1.tgz#fa2c047a31522a48038d26ee4f7c8fd9c1ecfe12" + integrity sha512-GJJQt1p9/C6aj6yNZMvovZuxTUd+BEJprETdvTKSb4kHcw4mFj8777USQV0FJoJ4V3djpOwA5eWyPwfq//PFBA== dependencies: - jest-mock "^23.2.0" - jest-util "^23.4.0" + "@jest/environment" "^24.7.1" + "@jest/fake-timers" "^24.7.1" + "@jest/types" "^24.7.0" + jest-mock "^24.7.0" + jest-util "^24.7.1" -jest-get-type@^22.1.0, jest-get-type@^22.4.3: +jest-get-type@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" -jest-haste-map@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16" +jest-get-type@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.3.0.tgz#582cfd1a4f91b5cdad1d43d2932f816d543c65da" + integrity sha512-HYF6pry72YUlVcvUx3sEpMRwXEWGEPlJ0bSPVnB3b3n++j4phUEoSPcS6GC0pPJ9rpyPSe4cb5muFo6D39cXow== + +jest-haste-map@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.7.1.tgz#772e215cd84080d4bbcb759cfb668ad649a21471" + integrity sha512-g0tWkzjpHD2qa03mTKhlydbmmYiA2KdcJe762SbfFo/7NIMgBWAA0XqQlApPwkWOF7Cxoi/gUqL0i6DIoLpMBw== dependencies: + "@jest/types" "^24.7.0" + anymatch "^2.0.0" fb-watchman "^2.0.0" - graceful-fs "^4.1.11" + graceful-fs "^4.1.15" invariant "^2.2.4" - jest-docblock "^23.2.0" - jest-serializer "^23.0.1" - jest-worker "^23.2.0" - micromatch "^2.3.11" - sane "^2.0.0" + jest-serializer "^24.4.0" + jest-util "^24.7.1" + jest-worker "^24.6.0" + micromatch "^3.1.10" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^1.2.7" jest-jasmine2@^22.4.3: version "22.4.3" @@ -6896,46 +7208,36 @@ jest-jasmine2@^22.4.3: jest-util "^22.4.3" source-map-support "^0.5.0" -jest-jasmine2@^22.4.4: - version "22.4.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.4.tgz#c55f92c961a141f693f869f5f081a79a10d24e23" +jest-jasmine2@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-24.7.1.tgz#01398686dabe46553716303993f3be62e5d9d818" + integrity sha512-Y/9AOJDV1XS44wNwCaThq4Pw3gBPiOv/s6NcbOAkVRRUEPu+36L2xoPsqQXsDrxoBerqeyslpn2TpCI8Zr6J2w== dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^24.7.1" + "@jest/test-result" "^24.7.1" + "@jest/types" "^24.7.0" chalk "^2.0.1" co "^4.6.0" - expect "^22.4.0" - graceful-fs "^4.1.11" - is-generator-fn "^1.0.0" - jest-diff "^22.4.0" - jest-matcher-utils "^22.4.0" - jest-message-util "^22.4.0" - jest-snapshot "^22.4.0" - jest-util "^22.4.1" - source-map-support "^0.5.0" - -jest-jasmine2@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" - dependencies: - babel-traverse "^6.0.0" - chalk "^2.0.1" - co "^4.6.0" - expect "^23.6.0" - is-generator-fn "^1.0.0" - jest-diff "^23.6.0" - jest-each "^23.6.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - pretty-format "^23.6.0" + expect "^24.7.1" + is-generator-fn "^2.0.0" + jest-each "^24.7.1" + jest-matcher-utils "^24.7.0" + jest-message-util "^24.7.1" + jest-runtime "^24.7.1" + jest-snapshot "^24.7.1" + jest-util "^24.7.1" + pretty-format "^24.7.0" + throat "^4.0.0" -jest-leak-detector@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de" +jest-leak-detector@^24.7.0: + version "24.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-24.7.0.tgz#323ff93ed69be12e898f5b040952f08a94288ff9" + integrity sha512-zV0qHKZGXtmPVVzT99CVEcHE9XDf+8LwiE0Ob7jjezERiGVljmqKFWpV2IkG+rkFIEUHFEkMiICu7wnoPM/RoQ== dependencies: - pretty-format "^23.6.0" + pretty-format "^24.7.0" -jest-matcher-utils@^22.4.0, jest-matcher-utils@^22.4.3: +jest-matcher-utils@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz#4632fe428ebc73ebc194d3c7b65d37b161f710ff" dependencies: @@ -6943,15 +7245,17 @@ jest-matcher-utils@^22.4.0, jest-matcher-utils@^22.4.3: jest-get-type "^22.4.3" pretty-format "^22.4.3" -jest-matcher-utils@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" +jest-matcher-utils@^24.7.0: + version "24.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.7.0.tgz#bbee1ff37bc8b2e4afcaabc91617c1526af4bcd4" + integrity sha512-158ieSgk3LNXeUhbVJYRXyTPSCqNgVXOp/GT7O94mYd3pk/8+odKTyR1JLtNOQSPzNi8NFYVONtvSWA/e1RDXg== dependencies: chalk "^2.0.1" - jest-get-type "^22.1.0" - pretty-format "^23.6.0" + jest-diff "^24.7.0" + jest-get-type "^24.3.0" + pretty-format "^24.7.0" -jest-message-util@^22.4.0, jest-message-util@^22.4.3: +jest-message-util@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.4.3.tgz#cf3d38aafe4befddbfc455e57d65d5239e399eb7" dependencies: @@ -6961,103 +7265,132 @@ jest-message-util@^22.4.0, jest-message-util@^22.4.3: slash "^1.0.0" stack-utils "^1.0.1" -jest-message-util@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" +jest-message-util@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.7.1.tgz#f1dc3a6c195647096a99d0f1dadbc447ae547018" + integrity sha512-dk0gqVtyqezCHbcbk60CdIf+8UHgD+lmRHifeH3JRcnAqh4nEyPytSc9/L1+cQyxC+ceaeP696N4ATe7L+omcg== dependencies: - "@babel/code-frame" "^7.0.0-beta.35" + "@babel/code-frame" "^7.0.0" + "@jest/test-result" "^24.7.1" + "@jest/types" "^24.7.0" + "@types/stack-utils" "^1.0.1" chalk "^2.0.1" - micromatch "^2.3.11" - slash "^1.0.0" + micromatch "^3.1.10" + slash "^2.0.0" stack-utils "^1.0.1" jest-mock@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.4.3.tgz#f63ba2f07a1511772cdc7979733397df770aabc7" -jest-mock@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" +jest-mock@^24.7.0: + version "24.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-24.7.0.tgz#e49ce7262c12d7f5897b0d8af77f6db8e538023b" + integrity sha512-6taW4B4WUcEiT2V9BbOmwyGuwuAFT2G8yghF7nyNW1/2gq5+6aTqSPcS9lS6ArvEkX55vbPAS/Jarx5LSm4Fng== + dependencies: + "@jest/types" "^24.7.0" + +jest-pnp-resolver@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" + integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== -jest-regex-util@^22.1.0, jest-regex-util@^22.4.3: +jest-regex-util@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.4.3.tgz#a826eb191cdf22502198c5401a1fc04de9cef5af" -jest-regex-util@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" +jest-regex-util@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.3.0.tgz#d5a65f60be1ae3e310d5214a0307581995227b36" + integrity sha512-tXQR1NEOyGlfylyEjg1ImtScwMq8Oh3iJbGTjN7p0J23EuVX1MA8rwU69K4sLbCmwzgCUbVkm0FkSF9TdzOhtg== -jest-resolve-dependencies@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d" +jest-resolve-dependencies@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-24.7.1.tgz#cf93bbef26999488a96a2b2012f9fe7375aa378f" + integrity sha512-2Eyh5LJB2liNzfk4eo7bD1ZyBbqEJIyyrFtZG555cSWW9xVHxII2NuOkSl1yUYTAYCAmM2f2aIT5A7HzNmubyg== dependencies: - jest-regex-util "^23.3.0" - jest-snapshot "^23.6.0" + "@jest/types" "^24.7.0" + jest-regex-util "^24.3.0" + jest-snapshot "^24.7.1" -jest-resolve@^22.4.2, jest-resolve@^22.4.3: +jest-resolve@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.3.tgz#0ce9d438c8438229aa9b916968ec6b05c1abb4ea" dependencies: browser-resolve "^1.11.2" chalk "^2.0.1" -jest-resolve@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" +jest-resolve@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-24.7.1.tgz#e4150198299298380a75a9fd55043fa3b9b17fde" + integrity sha512-Bgrc+/UUZpGJ4323sQyj85hV9d+ANyPNu6XfRDUcyFNX1QrZpSoM0kE4Mb2vZMAYTJZsBFzYe8X1UaOkOELSbw== dependencies: + "@jest/types" "^24.7.0" browser-resolve "^1.11.3" chalk "^2.0.1" - realpath-native "^1.0.0" - -jest-runner@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38" - dependencies: + jest-pnp-resolver "^1.2.1" + realpath-native "^1.1.0" + +jest-runner@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-24.7.1.tgz#41c8a02a06aa23ea82d8bffd69d7fa98d32f85bf" + integrity sha512-aNFc9liWU/xt+G9pobdKZ4qTeG/wnJrJna3VqunziDNsWT3EBpmxXZRBMKCsNMyfy+A/XHiV+tsMLufdsNdgCw== + dependencies: + "@jest/console" "^24.7.1" + "@jest/environment" "^24.7.1" + "@jest/test-result" "^24.7.1" + "@jest/types" "^24.7.0" + chalk "^2.4.2" exit "^0.1.2" - graceful-fs "^4.1.11" - jest-config "^23.6.0" - jest-docblock "^23.2.0" - jest-haste-map "^23.6.0" - jest-jasmine2 "^23.6.0" - jest-leak-detector "^23.6.0" - jest-message-util "^23.4.0" - jest-runtime "^23.6.0" - jest-util "^23.4.0" - jest-worker "^23.2.0" + graceful-fs "^4.1.15" + jest-config "^24.7.1" + jest-docblock "^24.3.0" + jest-haste-map "^24.7.1" + jest-jasmine2 "^24.7.1" + jest-leak-detector "^24.7.0" + jest-message-util "^24.7.1" + jest-resolve "^24.7.1" + jest-runtime "^24.7.1" + jest-util "^24.7.1" + jest-worker "^24.6.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082" - dependencies: - babel-core "^6.0.0" - babel-plugin-istanbul "^4.1.6" +jest-runtime@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-24.7.1.tgz#2ffd70b22dd03a5988c0ab9465c85cdf5d25c597" + integrity sha512-0VAbyBy7tll3R+82IPJpf6QZkokzXPIS71aDeqh+WzPRXRCNz6StQ45otFariPdJ4FmXpDiArdhZrzNAC3sj6A== + dependencies: + "@jest/console" "^24.7.1" + "@jest/environment" "^24.7.1" + "@jest/source-map" "^24.3.0" + "@jest/transform" "^24.7.1" + "@jest/types" "^24.7.0" + "@types/yargs" "^12.0.2" chalk "^2.0.1" - convert-source-map "^1.4.0" exit "^0.1.2" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.1.11" - jest-config "^23.6.0" - jest-haste-map "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - jest-resolve "^23.6.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - micromatch "^2.3.11" - realpath-native "^1.0.0" - slash "^1.0.0" - strip-bom "3.0.0" - write-file-atomic "^2.1.0" - yargs "^11.0.0" + glob "^7.1.3" + graceful-fs "^4.1.15" + jest-config "^24.7.1" + jest-haste-map "^24.7.1" + jest-message-util "^24.7.1" + jest-mock "^24.7.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.7.1" + jest-snapshot "^24.7.1" + jest-util "^24.7.1" + jest-validate "^24.7.0" + realpath-native "^1.1.0" + slash "^2.0.0" + strip-bom "^3.0.0" + yargs "^12.0.2" -jest-serializer@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" +jest-serializer@^24.4.0: + version "24.4.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.4.0.tgz#f70c5918c8ea9235ccb1276d232e459080588db3" + integrity sha512-k//0DtglVstc1fv+GY/VHDIjrtNjdYvYjMlbLUed4kxrE92sIUewOi5Hj3vrpB8CXfkJntRPDRjCrCvUhBdL8Q== -jest-snapshot@^22.4.0, jest-snapshot@^22.4.3: +jest-snapshot@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.4.3.tgz#b5c9b42846ffb9faccb76b841315ba67887362d2" dependencies: @@ -7068,22 +7401,25 @@ jest-snapshot@^22.4.0, jest-snapshot@^22.4.3: natural-compare "^1.4.0" pretty-format "^22.4.3" -jest-snapshot@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" +jest-snapshot@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-24.7.1.tgz#bd5a35f74aedff070975e9e9c90024f082099568" + integrity sha512-8Xk5O4p+JsZZn4RCNUS3pxA+ORKpEKepE+a5ejIKrId9CwrVN0NY+vkqEkXqlstA5NMBkNahXkR/4qEBy0t5yA== dependencies: - babel-types "^6.0.0" + "@babel/types" "^7.0.0" + "@jest/types" "^24.7.0" chalk "^2.0.1" - jest-diff "^23.6.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-resolve "^23.6.0" + expect "^24.7.1" + jest-diff "^24.7.0" + jest-matcher-utils "^24.7.0" + jest-message-util "^24.7.1" + jest-resolve "^24.7.1" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.6.0" + pretty-format "^24.7.0" semver "^5.5.0" -jest-util@^22.4.1, jest-util@^22.4.3: +jest-util@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.3.tgz#c70fec8eec487c37b10b0809dc064a7ecf6aafac" dependencies: @@ -7095,17 +7431,22 @@ jest-util@^22.4.1, jest-util@^22.4.3: mkdirp "^0.5.1" source-map "^0.6.0" -jest-util@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" - dependencies: - callsites "^2.0.0" +jest-util@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.7.1.tgz#b4043df57b32a23be27c75a2763d8faf242038ff" + integrity sha512-/KilOue2n2rZ5AnEBYoxOXkeTu6vi7cjgQ8MXEkih0oeAXT6JkS3fr7/j8+engCjciOU1Nq5loMSKe0A1oeX0A== + dependencies: + "@jest/console" "^24.7.1" + "@jest/fake-timers" "^24.7.1" + "@jest/source-map" "^24.3.0" + "@jest/test-result" "^24.7.1" + "@jest/types" "^24.7.0" + callsites "^3.0.0" chalk "^2.0.1" - graceful-fs "^4.1.11" - is-ci "^1.0.10" - jest-message-util "^23.4.0" + graceful-fs "^4.1.15" + is-ci "^2.0.0" mkdirp "^0.5.1" - slash "^1.0.0" + slash "^2.0.0" source-map "^0.6.0" jest-validate@^22.4.0, jest-validate@^22.4.3: @@ -7118,45 +7459,46 @@ jest-validate@^22.4.0, jest-validate@^22.4.3: leven "^2.1.0" pretty-format "^22.4.3" -jest-validate@^22.4.4: - version "22.4.4" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.4.tgz#1dd0b616ef46c995de61810d85f57119dbbcec4d" - dependencies: - chalk "^2.0.1" - jest-config "^22.4.4" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^22.4.0" - -jest-validate@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" +jest-validate@^24.7.0: + version "24.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.7.0.tgz#70007076f338528ee1b1c8a8258b1b0bb982508d" + integrity sha512-cgai/gts9B2chz1rqVdmLhzYxQbgQurh1PEQSvSgPZ8KGa1AqXsqC45W5wKEwzxKrWqypuQrQxnF4+G9VejJJA== dependencies: + "@jest/types" "^24.7.0" + camelcase "^5.0.0" chalk "^2.0.1" - jest-get-type "^22.1.0" + jest-get-type "^24.3.0" leven "^2.1.0" - pretty-format "^23.6.0" + pretty-format "^24.7.0" -jest-watcher@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" +jest-watcher@^24.7.1: + version "24.7.1" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-24.7.1.tgz#e161363d7f3f4e1ef3d389b7b3a0aad247b673f5" + integrity sha512-Wd6TepHLRHVKLNPacEsBwlp9raeBIO+01xrN24Dek4ggTS8HHnOzYSFnvp+6MtkkJ3KfMzy220KTi95e2rRkrw== dependencies: + "@jest/test-result" "^24.7.1" + "@jest/types" "^24.7.0" + "@types/yargs" "^12.0.9" ansi-escapes "^3.0.0" chalk "^2.0.1" + jest-util "^24.7.1" string-length "^2.0.0" -jest-worker@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" +jest-worker@^24.6.0: + version "24.6.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.6.0.tgz#7f81ceae34b7cde0c9827a6980c35b7cdc0161b3" + integrity sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ== dependencies: merge-stream "^1.0.1" + supports-color "^6.1.0" -jest@23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" +jest@24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-24.1.0.tgz#b1e1135caefcf2397950ecf7f90e395fde866fd2" + integrity sha512-+q91L65kypqklvlRFfXfdzUKyngQLOcwGhXQaLmVHv+d09LkNXuBuGxlofTFW42XMzu3giIcChchTsCNUjQ78A== dependencies: - import-local "^1.0.0" - jest-cli "^23.6.0" + import-local "^2.0.0" + jest-cli "^24.1.0" jimp@^0.2.21, jimp@^0.2.28: version "0.2.28" @@ -7209,6 +7551,11 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + js-yaml@^3.11.0, js-yaml@^3.6.1, js-yaml@^3.7.0, js-yaml@^3.9.0: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" @@ -7216,6 +7563,14 @@ js-yaml@^3.11.0, js-yaml@^3.6.1, js-yaml@^3.7.0, js-yaml@^3.9.0: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^3.13.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + js-yaml@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" @@ -7313,6 +7668,11 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -7353,6 +7713,13 @@ json2mq@^0.2.0: dependencies: string-convert "^0.2.0" +json5@2.x, json5@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" + integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== + dependencies: + minimist "^1.2.0" + json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -7476,9 +7843,10 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" -kleur@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-2.0.2.tgz#b704f4944d95e255d038f0cb05fb8a602c55a300" +kleur@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== latest-version@^3.0.0: version "3.1.0" @@ -7506,6 +7874,13 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + lcov-parse@^0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" @@ -7938,6 +8313,19 @@ make-dir@^1.0.0, make-dir@^1.1.0: dependencies: pify "^3.0.0" +make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-error@1.x: + version "1.3.5" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" + integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== + make-error@^1.1.1: version "1.3.4" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535" @@ -7948,6 +8336,13 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -8022,6 +8417,15 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + memoize-one@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.1.0.tgz#a2387c58c03fff27ca390c31b764a79addf3f906" @@ -8064,10 +8468,6 @@ merge-stream@^1.0.0, merge-stream@^1.0.1: dependencies: readable-stream "^2.0.1" -merge@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - merkle-lib@^2.0.10: version "2.0.10" resolved "https://registry.yarnpkg.com/merkle-lib/-/merkle-lib-2.0.10.tgz#82b8dbae75e27a7785388b73f9d7725d0f6f3326" @@ -8076,7 +8476,7 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micromatch@^2.1.5, micromatch@^2.3.11, micromatch@^2.3.7: +micromatch@^2.3.11, micromatch@^2.3.7: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: @@ -8094,9 +8494,10 @@ micromatch@^2.1.5, micromatch@^2.3.11, micromatch@^2.3.7: parse-glob "^3.0.4" regex-cache "^0.4.2" -micromatch@^3.1.4, micromatch@^3.1.8: +micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -8145,6 +8546,11 @@ mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + mimic-response@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.0.tgz#df3d3652a73fded6b9b0b24146e6fd052353458e" @@ -8240,7 +8646,7 @@ mkdirp@0.5.0: dependencies: minimist "0.0.8" -mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@0.5.1, mkdirp@0.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -8279,6 +8685,11 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +ms@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + msgpack-lite@^0.1.26: version "0.1.26" resolved "https://registry.yarnpkg.com/msgpack-lite/-/msgpack-lite-0.1.26.tgz#dd3c50b26f059f25e7edee3644418358e2a9ad89" @@ -8346,10 +8757,6 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== -nan@^2.9.2: - version "2.11.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" - nanomatch@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" @@ -8401,6 +8808,11 @@ neo-async@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" +neo-async@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835" + integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA== + nice-try@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" @@ -8488,6 +8900,11 @@ node-libs-browser@^2.0.0: util "^0.10.3" vm-browserify "0.0.4" +node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + node-notifier@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" @@ -8501,9 +8918,10 @@ node-object-hash@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/node-object-hash/-/node-object-hash-1.3.0.tgz#7f294f5afec6b08d713e40d40a95ec793e05baf3" -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" @@ -8622,7 +9040,7 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: +normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: @@ -8925,6 +9343,15 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" +os-locale@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -8944,6 +9371,11 @@ p-cancelable@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + p-each-series@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" @@ -8964,6 +9396,11 @@ p-is-promise@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + p-lazy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-lazy/-/p-lazy-1.0.0.tgz#ec53c802f2ee3ac28f166cc82d0b2b02de27a835" @@ -9199,6 +9636,11 @@ path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -9279,6 +9721,11 @@ pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -9289,6 +9736,13 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +pirates@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== + dependencies: + node-modules-regexp "^1.0.0" + pixelmatch@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-4.0.2.tgz#8f47dcec5011b477b67db03c243bc1f3085e8854" @@ -9678,21 +10132,24 @@ pretty-error@^2.0.2: renderkid "^2.0.1" utila "~0.4" -pretty-format@^22.4.0, pretty-format@^22.4.3: +pretty-format@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.3.tgz#f873d780839a9c02e9664c8a082e9ee79eaac16f" dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -pretty-format@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" +pretty-format@^24.7.0: + version "24.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.7.0.tgz#d23106bc2edcd776079c2daa5da02bcb12ed0c10" + integrity sha512-apen5cjf/U4dj7tHetpC7UEFCvtAgnNZnBDkfPv3fokzIqyOJckAG9OlAPC1BlFALnqT/lGB2tl9EJjlK6eCsA== dependencies: - ansi-regex "^3.0.0" + "@jest/types" "^24.7.0" + ansi-regex "^4.0.0" ansi-styles "^3.2.0" + react-is "^16.8.4" -private@^0.1.6, private@^0.1.7, private@^0.1.8, private@~0.1.5: +private@^0.1.6, private@^0.1.7, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -9729,12 +10186,13 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prompts@^0.1.9: - version "0.1.14" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2" +prompts@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.0.4.tgz#179f9d4db3128b9933aa35f93a800d8fce76a682" + integrity sha512-HTzM3UWp/99A0gk51gAegwo1QRYA7xjcZufMNe33rCclFszUYAuHe1fIN/3ZmiHeGPkUsNaRyQm1hHOfM0PKxA== dependencies: - kleur "^2.0.1" - sisteransi "^0.1.1" + kleur "^3.0.2" + sisteransi "^1.0.0" prop-types@15.x, prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1: version "15.6.1" @@ -10110,6 +10568,11 @@ react-is@^16.3.2: version "16.3.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.3.2.tgz#f4d3d0e2f5fbb6ac46450641eb2e25bf05d36b22" +react-is@^16.8.4: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" + integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== + react-markdown@3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-3.3.0.tgz#a87cdd822aa9302d6add9687961dd1a82a45d02e" @@ -10301,6 +10764,14 @@ read-pkg-up@^3.0.0: find-up "^2.0.0" read-pkg "^3.0.0" +read-pkg-up@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" + integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== + dependencies: + find-up "^3.0.0" + read-pkg "^3.0.0" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -10382,9 +10853,10 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -realpath-native@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" +realpath-native@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" + integrity sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA== dependencies: util.promisify "^1.0.0" @@ -10752,6 +11224,11 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + resize-img@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/resize-img/-/resize-img-1.1.2.tgz#fad650faf3ef2c53ea63112bc272d95e9d92550e" @@ -10796,18 +11273,19 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" +resolve@1.x: + version "1.10.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" + integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== + dependencies: + path-parse "^1.0.6" + resolve@^1.1.6, resolve@^1.3.2: version "1.7.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" dependencies: path-parse "^1.0.5" -resolve@^1.1.7: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - dependencies: - path-parse "^1.0.5" - responselike@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -10870,9 +11348,10 @@ rst-selector-parser@^2.2.3: lodash.flattendeep "^4.4.0" nearley "^2.7.10" -rsvp@^3.3.3: - version "3.6.2" - resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" +rsvp@^4.8.4: + version "4.8.4" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.4.tgz#b50e6b34583f3dd89329a2f23a8a2be072845911" + integrity sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA== rtcpeerconnection-shim@^1.2.10: version "1.2.11" @@ -10943,20 +11422,20 @@ safe-regex@^1.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" -sane@^2.0.0: - version "2.5.2" - resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" +sane@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" + integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== dependencies: + "@cnakazawa/watch" "^1.0.3" anymatch "^2.0.0" - capture-exit "^1.2.0" - exec-sh "^0.2.0" + capture-exit "^2.0.0" + exec-sh "^0.3.2" + execa "^1.0.0" fb-watchman "^2.0.0" micromatch "^3.1.4" minimist "^1.1.1" walker "~1.0.5" - watch "~0.18.0" - optionalDependencies: - fsevents "^1.2.3" sanitize-filename@^1.6.1: version "1.6.1" @@ -11114,6 +11593,16 @@ semver@^4.0.3: version "4.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" +semver@^5.5, semver@^5.6.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" + integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== + +semver@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65" + integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ== + semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -11228,15 +11717,6 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -shell-quote@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" - dependencies: - array-filter "~0.0.0" - array-map "~0.0.0" - array-reduce "~0.0.0" - jsonify "~0.0.0" - shelljs@^0.8.0: version "0.8.1" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.1.tgz#729e038c413a2254c4078b95ed46e0397154a9f1" @@ -11277,9 +11757,10 @@ single-line-log@^1.1.2: dependencies: string-width "^1.0.1" -sisteransi@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" +sisteransi@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.0.tgz#77d9622ff909080f1c19e5f4a1df0c1b0a27b88c" + integrity sha512-N+z4pHB4AmUv0SjveWRd6q1Nj5w62m5jodv+GD8lvmbY/83T/rpbJGZOnK5T149OldDj4Db07BSv9xY4K6NTPQ== slash@^1.0.0: version "1.0.0" @@ -11415,7 +11896,7 @@ source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0: +source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -11701,6 +12182,13 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + strip-ansi@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" @@ -11719,16 +12207,16 @@ strip-bom-stream@^2.0.0: first-chunk-stream "^2.0.0" strip-bom "^2.0.0" -strip-bom@3.0.0, strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" dependencies: is-utf8 "^0.2.0" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-dirs@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-1.1.1.tgz#960bbd1287844f3975a4558aa103a8255e2456a0" @@ -11801,12 +12289,6 @@ stylis@^3.5.0: version "3.5.4" resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" -subarg@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" - dependencies: - minimist "^1.1.0" - sum-up@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/sum-up/-/sum-up-1.0.3.tgz#1c661f667057f63bcb7875aa1438bc162525156e" @@ -11834,7 +12316,7 @@ supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.1.2, supports-color@^3.2.3: +supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: @@ -11846,6 +12328,13 @@ supports-color@^5.2.0, supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^6.0.0, supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + svg2png@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/svg2png/-/svg2png-3.0.1.tgz#a2644d68b0231ac00af431aa163714ff17106447" @@ -12010,15 +12499,15 @@ term-size@^1.2.0: dependencies: execa "^0.7.0" -test-exclude@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" +test-exclude@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.2.tgz#7322f8ab037b0b93ad2aab35fe9068baf997a4c4" + integrity sha512-N2pvaLpT8guUpb5Fe1GJlmvmzH3x+DAKmmyEQmFP792QcLYoGE1syxztSvPD1V8yPe6VrcCt6YGQVjSRjCASsA== dependencies: - arrify "^1.0.1" - micromatch "^3.1.8" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" + glob "^7.1.3" + minimatch "^3.0.4" + read-pkg-up "^4.0.0" + require-main-filename "^2.0.0" text-table@^0.2.0: version "0.2.0" @@ -12275,20 +12764,20 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" -ts-jest@22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-22.0.3.tgz#4d30f42c1b26a78d438ad908f9b0bcb4b1e6e32b" - dependencies: - babel-core "^6.24.1" - babel-plugin-istanbul "^4.1.4" - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-preset-jest "^22.0.1" - cpx "^1.5.0" - fs-extra "4.0.3" - jest-config "^22.0.1" - pkg-dir "^2.0.0" - source-map-support "^0.5.0" - yargs "^11.0.0" +ts-jest@24.0.0: + version "24.0.0" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-24.0.0.tgz#3f26bf2ec1fa584863a5a9c29bd8717d549efbf6" + integrity sha512-o8BO3TkMREpAATaFTrXkovMsCpBl2z4NDBoLJuWZcJJj1ijI49UnvDMfVpj+iogn/Jl8Pbhuei5nc/Ti+frEHw== + dependencies: + bs-logger "0.x" + buffer-from "1.x" + fast-json-stable-stringify "2.x" + json5 "2.x" + make-error "1.x" + mkdirp "0.x" + resolve "1.x" + semver "^5.5" + yargs-parser "10.x" ts-loader@4.1.0: version "4.1.0" @@ -12920,9 +13409,10 @@ w3c-hr-time@^1.0.1: dependencies: browser-process-hrtime "^0.1.2" -walker@~1.0.5: +walker@^1.0.7, walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= dependencies: makeerror "1.0.x" @@ -12945,13 +13435,6 @@ warning@^3.0.0: dependencies: loose-envify "^1.0.0" -watch@~0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" - dependencies: - exec-sh "^0.2.0" - minimist "^1.2.0" - watchpack@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.5.0.tgz#231e783af830a22f8966f65c4c4bacc814072eed" @@ -13154,7 +13637,7 @@ which-pm-runs@^1.0.0: resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= -which@1, which@^1.2.10, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: +which@1, which@^1.2.10, which@^1.2.14, which@^1.2.9, which@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: @@ -13225,6 +13708,15 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +write-file-atomic@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" + integrity sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + write-file-atomic@^1.2.0: version "1.3.4" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" @@ -13241,14 +13733,6 @@ write-file-atomic@^2.0.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-file-atomic@^2.1.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.2.tgz#a7181706dfba17855d221140a9c06e15fcdd87b9" - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - write-json-file@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" @@ -13346,7 +13830,7 @@ y18n@^3.2.0, y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -y18n@^4.0.0: +"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" @@ -13358,6 +13842,21 @@ yallist@^3.0.0, yallist@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" +yargs-parser@10.x: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== + dependencies: + camelcase "^4.1.0" + +yargs-parser@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" + integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" @@ -13393,6 +13892,24 @@ yargs@^11.0.0: y18n "^3.2.1" yargs-parser "^9.0.2" +yargs@^12.0.2: + version "12.0.5" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" + integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== + dependencies: + cliui "^4.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^1.0.1" + os-locale "^3.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1 || ^4.0.0" + yargs-parser "^11.1.1" + yargs@^3.31.0: version "3.32.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" From dcc703a764ac6f4d113f0574eadcfb4117b10b51 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Tue, 23 Apr 2019 03:41:24 -0400 Subject: [PATCH 0389/1466] Use rem instead of em --- .../AddAccount/components/DeterministicWallets.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index a2ced8f1a..3d3319a88 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -2,7 +2,7 @@ @import 'common/sass/mixins'; .DW { - padding: 1.5em; + padding: 1.5rem; header { width: 100%; @@ -59,7 +59,7 @@ input[type='radio'] { margin-top: 0; - margin-left: 0.5em; + margin-left: 0.5rem; } } @@ -91,7 +91,7 @@ display: flex; align-items: center; justify-content: space-between; - padding-top: 1.5em; + padding-top: 1.5rem; &-page { color: #9a978a; From 3d025d5079fea256a1d572ccf0609e08321c5b56 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Tue, 23 Apr 2019 03:45:53 -0400 Subject: [PATCH 0390/1466] Add suggested padding change to panel --- .../v2/features/AddAccount/components/DeterministicWallets.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index 3d3319a88..2cc0bfd1c 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -2,7 +2,7 @@ @import 'common/sass/mixins'; .DW { - padding: 1.5rem; + padding: 1rem 0.5rem; header { width: 100%; From 288b87b53635a51de063d502ba0f3b4e2d25955b Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Tue, 23 Apr 2019 12:29:45 +0200 Subject: [PATCH 0391/1466] Bolded address in notification --- common/translations/lang/en.json | 4 ++-- .../NotificationsPanel/components/NotificationWrapper.tsx | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 12d6e6d96..236c46687 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -788,13 +788,13 @@ "DOWNLOAD_APP_FOOTER_INFO": "Not sure what this is?", "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app.", "NOTIFICATIONS_WALLET_CREATED_TITLE": "Your wallet has been created.", - "NOTIFICATIONS_WALLET_CREATED_DESCRIPTION": "Your account with the address $address has been successfully created!", + "NOTIFICATIONS_WALLET_CREATED_DESCRIPTION": "Your account with the address **$address** has been successfully created!", "NOTIFICATIONS_WALLET_DESCRIPTION_ADD": "Your dashboard now shows all your accounts and their balances. Use the “All Accounts” dropdown to filter your accounts. Or, check out some other helpful resources.", "NOTIFICATIONS_WALLET_RESOURCE_BUY": "How do I buy crypto?", "NOTIFICATIONS_WALLET_RESOURCE_LOSE": "How do I make sure I don't lose crypto?", "NOTIFICATIONS_WALLET_RESOURCE_SUPPORT": "Support Center", "NOTIFICATIONS_WALLET_ADDED_TITLE": "Your wallet has been added.", - "NOTIFICATIONS_WALLET_ADDED_DESCRIPTION": "Your account with the address $address has been successfully added!", + "NOTIFICATIONS_WALLET_ADDED_DESCRIPTION": "Your account with the address **$address** has been successfully added!", "NOTIFICATIONS_SAVE_DASHBOARD_TITLE": "Save Your Dashboard Settings", "NOTIFICATIONS_SAVE_DASHBOARD_DESCRIPTION": "You've spent a lot of time customizing your dashboard. Make sure to back it up so you don’t lose your settings.", "NOTIFICATIONS_SAVE_DASHBOARD_RESOURCE": "Export Settings Now", diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/NotificationWrapper.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/NotificationWrapper.tsx index 4e0d95bf3..91941ec23 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/NotificationWrapper.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/NotificationWrapper.tsx @@ -53,6 +53,10 @@ const Description = styled.p` @media (max-width: ${SCREEN_XS}) { font-size: 14px; } + + strong { + font-weight: 600; + } `; const Resources = styled.div` From bc8ad396f56938e978bd5bec919fc84ad4f61a9c Mon Sep 17 00:00:00 2001 From: Azarielle Date: Tue, 23 Apr 2019 14:17:01 -0400 Subject: [PATCH 0392/1466] fixed margin and links from no-accounts page --- common/v2/features/NoAccounts/NoAccounts.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/common/v2/features/NoAccounts/NoAccounts.tsx b/common/v2/features/NoAccounts/NoAccounts.tsx index fa5a234b7..ea42cdef9 100644 --- a/common/v2/features/NoAccounts/NoAccounts.tsx +++ b/common/v2/features/NoAccounts/NoAccounts.tsx @@ -15,6 +15,8 @@ const NoAccountsContainer = styled.div` border-radius: 3px; box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.07); background-color: #ffffff; + margin-top: 6.5em; + margin-bottom: 6.5em; `; const NoAccountsContent = styled.div` @@ -103,19 +105,24 @@ export default class NoAccounts extends Component { } public render() { return ( - +
              {translate('NO_ACCOUNTS_HEADER')}
              {translate('NO_ACCOUNTS_DESCRIPTION')} - - Add Existing Account - + + + Add Existing Account + + + {/* Link to import settings page */} Import MyCrypto Settings - Create New Account + + Create New Account +
              From d8e7eab08ab27e10b07ae0ef7314e0a8cd38b8f3 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Tue, 23 Apr 2019 17:16:38 -0400 Subject: [PATCH 0393/1466] mobile views complete --- common/translations/lang/en.json | 2 +- common/v2/features/NoAccounts/NoAccounts.tsx | 50 +++++++++++++++----- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 174d4e896..fe87253c1 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -788,7 +788,7 @@ "DOWNLOAD_APP_DOWNLOAD_BUTTON": "Download for", "DOWNLOAD_APP_FOOTER_INFO": "Not sure what this is?", "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app.", - "NO_ACCOUNTS_HEADER":"You dont have any accounts in your wallet.", + "NO_ACCOUNTS_HEADER":"You don't have any accounts in your wallet.", "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now." } } diff --git a/common/v2/features/NoAccounts/NoAccounts.tsx b/common/v2/features/NoAccounts/NoAccounts.tsx index ea42cdef9..023a88de8 100644 --- a/common/v2/features/NoAccounts/NoAccounts.tsx +++ b/common/v2/features/NoAccounts/NoAccounts.tsx @@ -10,22 +10,35 @@ const NoAccountsContainer = styled.div` display: flex; justify-content: center; align-content: center; - width: 1245px; - height: 505px; + width: 345px; + height: 506px; border-radius: 3px; box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.07); background-color: #ffffff; - margin-top: 6.5em; - margin-bottom: 6.5em; + text-align: center; + margin-left: auto; + margin-right: auto; + + @media (min-width: 700px) { + width: 1245px; + height: 505px; + margin-top: 6.5em; + margin-bottom: 6.5em; + } `; const NoAccountsContent = styled.div` - margin-top: 45px; - width: 503px; + width: 340px; flex-direction: column; align-items: center; padding: 18px 4px 26px 4px; text-align: center; + justify-content: center; + + @media (min-width: 700px) { + width: 503px; + margin-top: 45px; + } `; const Header = styled.p` font-size: 24px; @@ -37,11 +50,16 @@ const Header = styled.p` `; const Description = styled.p` - font-size: 18px; - font-weight: normal; - line-height: 1.5; + height: 48px; + font-size: 16px; padding: 0 30px 0 30px; color: ${props => props.theme.text}; + + @media (min-width: 700px) { + font-size: 18px; + font-weight: normal; + line-height: 1.5; + } `; const ImgIcon = styled.img` @@ -51,7 +69,7 @@ const ImgIcon = styled.img` `; const PrimaryButton = styled(Button)` - width: 230px; + width: 315px; margin-bottom: 15px; font-size: 17px; text-align: center; @@ -63,7 +81,7 @@ const PrimaryButton = styled(Button)` `; const WhiteButtonFirst = styled(Button)` - width: 230px; + width: 315px; margin-bottom: 15px; font-size: 17px; white-space: nowrap; @@ -79,7 +97,7 @@ const WhiteButtonFirst = styled(Button)` `; const WhiteButtonSecond = styled(Button)` - width: 230px; + width: 315px; margin-bottom: 15px; font-size: 17px; white-space: nowrap; @@ -93,7 +111,13 @@ const WhiteButtonSecond = styled(Button)` const ButtonGroup = styled.div` justify-content: center; - width: 503px; + width: 340px; + flex-direction: column; + margin-top: 20px; + + @media (min-width: 700px) { + width: 503px; + } `; export default class NoAccounts extends Component { From 851ca3c68c8aea8d2a9887b9c35eb4c5098aece2 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 24 Apr 2019 00:47:17 -0400 Subject: [PATCH 0394/1466] Fix next and previous buttons in production --- common/assets/images/next-page-button.svg | 27 +------------------ common/assets/images/previous-page-button.svg | 27 +------------------ 2 files changed, 2 insertions(+), 52 deletions(-) diff --git a/common/assets/images/next-page-button.svg b/common/assets/images/next-page-button.svg index 94e074e94..d5cfd092f 100644 --- a/common/assets/images/next-page-button.svg +++ b/common/assets/images/next-page-button.svg @@ -1,26 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - +next-page-button \ No newline at end of file diff --git a/common/assets/images/previous-page-button.svg b/common/assets/images/previous-page-button.svg index 6968cd110..332c2bc6f 100644 --- a/common/assets/images/previous-page-button.svg +++ b/common/assets/images/previous-page-button.svg @@ -1,26 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - +previous-page-button \ No newline at end of file From 4ac3ad980fa9a54dd370c3196bc1c75f7e28852e Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 24 Apr 2019 01:56:40 -0400 Subject: [PATCH 0395/1466] Fix custom dpath form styles --- .../AddAccount/components/DeterministicWallets.scss | 2 +- .../features/AddAccount/components/DeterministicWallets.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index 2cc0bfd1c..c267e2f82 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -6,6 +6,7 @@ header { width: 100%; + margin-bottom: 20px; } &-path { @@ -30,7 +31,6 @@ &-custom { flex: 1; - margin-left: $space-md; .input-group-input { margin: 0; diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 3cd189936..395452b30 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -91,7 +91,7 @@ class DeterministicWalletsClass extends React.PureComponent { return (
              - +
              {translate('DECRYPT_PROMPT_SELECT_ADDRESS')}
              @@ -115,7 +115,7 @@ class DeterministicWalletsClass extends React.PureComponent {
              {this.state.currentDPath.label === customDPath.label && ( - +
              { > - +
              )} From c342b14b4fa8b78fa1c236c9c5789d8977e82fd7 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Wed, 24 Apr 2019 13:21:10 -0400 Subject: [PATCH 0396/1466] Fix ts issue? --- .../config/__snapshots__/sagas.spec.ts.snap | 2 +- common/libs/nodes/configs.ts | 24 +++++++++++++++++++ common/v2/libs/nodes/configs.ts | 24 +++++++++++++++++++ shared/types/network.d.ts | 4 +++- 4 files changed, 52 insertions(+), 2 deletions(-) diff --git a/common/features/config/__snapshots__/sagas.spec.ts.snap b/common/features/config/__snapshots__/sagas.spec.ts.snap index 66049ed40..975b16917 100644 --- a/common/features/config/__snapshots__/sagas.spec.ts.snap +++ b/common/features/config/__snapshots__/sagas.spec.ts.snap @@ -5,7 +5,7 @@ Object { "@@redux-saga/IO": true, "SELECT": Object { "args": Array [ - "THUNDERCORE", + "METADIUM", ], "selector": [Function], }, diff --git a/common/libs/nodes/configs.ts b/common/libs/nodes/configs.ts index fffee0bc0..e94cc78b9 100644 --- a/common/libs/nodes/configs.ts +++ b/common/libs/nodes/configs.ts @@ -334,6 +334,30 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = { service: 'thundercore.com', url: 'https://mainnet-rpc.thundercore.com' } + ], + + WEB: [ + { + name: makeNodeName('WEB', 'node1.webchain.network'), + type: 'rpc', + service: 'node1.webchain.network', + url: 'https://node1.webchain.network' + }, + { + name: makeNodeName('WEB', 'node2.webchain.network'), + type: 'rpc', + service: 'node2.webchain.network', + url: 'https://node2.webchain.network' + } + ], + + METADIUM: [ + { + name: makeNodeName('METADIUM', 'metadium'), + type: 'rpc', + service: 'api.metadium.com', + url: 'https://api.metadium.com/prod' + } ] }; diff --git a/common/v2/libs/nodes/configs.ts b/common/v2/libs/nodes/configs.ts index fffee0bc0..e94cc78b9 100644 --- a/common/v2/libs/nodes/configs.ts +++ b/common/v2/libs/nodes/configs.ts @@ -334,6 +334,30 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = { service: 'thundercore.com', url: 'https://mainnet-rpc.thundercore.com' } + ], + + WEB: [ + { + name: makeNodeName('WEB', 'node1.webchain.network'), + type: 'rpc', + service: 'node1.webchain.network', + url: 'https://node1.webchain.network' + }, + { + name: makeNodeName('WEB', 'node2.webchain.network'), + type: 'rpc', + service: 'node2.webchain.network', + url: 'https://node2.webchain.network' + } + ], + + METADIUM: [ + { + name: makeNodeName('METADIUM', 'metadium'), + type: 'rpc', + service: 'api.metadium.com', + url: 'https://api.metadium.com/prod' + } ] }; diff --git a/shared/types/network.d.ts b/shared/types/network.d.ts index cdbab656a..823193808 100644 --- a/shared/types/network.d.ts +++ b/shared/types/network.d.ts @@ -32,7 +32,9 @@ type StaticNetworkIds = | 'REOSC' | 'ARTIS_SIGMA1' | 'ARTIS_TAU1' - | 'THUNDERCORE'; + | 'THUNDERCORE' + | 'WEB' + | 'METADIUM'; export interface BlockExplorerConfig { name: string; From a117ce970b54b97edc5d7ca5dbe422469d7ea0df Mon Sep 17 00:00:00 2001 From: Michael - Blurpesec Date: Wed, 24 Apr 2019 14:41:43 -0400 Subject: [PATCH 0397/1466] Update AddAccount.tsx --- common/v2/features/AddAccount/AddAccount.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index eaab92a79..15eb54238 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -237,7 +237,7 @@ const WalletDecrypt = withRouter( isInsecureOverridden: false, value: null, hasSelectedNetwork: false, - seed: '' + seed: '', hasSelectedAddress: false, accountData: { address: '', From 83052400c490498173d0266f206c0464f5b1ab8e Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 24 Apr 2019 18:50:25 -0400 Subject: [PATCH 0398/1466] Make Panel and WalletDecrypt the same size --- common/v2/features/AddAccount/AddAccountStyles.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index d85a78093..18331d495 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -23,7 +23,8 @@ $speed: 500ms; } .Panel { - width: 562px; + width: 760px; + min-height: 790px; // display: flex; // flex-direction: column; position: relative; @@ -110,7 +111,7 @@ $speed: 500ms; justify-content: center; box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 1px 4px 0 rgba(0, 0, 0, 0.12); width: 760px; - height: 790px; + min-height: 790px; border-radius: 3px; &-connectWallet { From 2a0ed21dbfd4a8d9b24fd4eea64f905548dd6c26 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 24 Apr 2019 19:46:02 -0400 Subject: [PATCH 0399/1466] Use UI buttons for Cancel/Unlock --- .../AddAccount/components/DeterministicWallets.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 395452b30..c64bc46dc 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Select, { Option } from 'react-select'; import { connect } from 'react-redux'; -import { Table, Address, IconLink, Typography } from '@mycrypto/ui'; +import { Table, Address, IconLink, Typography, Button } from '@mycrypto/ui'; import translate, { translateRaw } from 'translations'; import { isValidPath } from 'libs/validators'; @@ -145,16 +145,12 @@ class DeterministicWalletsClass extends React.PureComponent { PAGE {page + 1} OF ∞ - - + +
              ); From e30b8f5f45ca83354166e347ffa8a7759b0d5585 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Wed, 24 Apr 2019 23:18:29 -0400 Subject: [PATCH 0400/1466] clean up console.logs and fix priv key / keystore --- common/v2/features/AddAccount/AddAccount.tsx | 20 ++++++++--- .../AddAccount/components/Keystore.tsx | 1 - common/v2/features/Wallets/index.ts | 1 - .../v2/features/Wallets/keystore/keystore.ts | 3 +- .../features/Wallets/privatekey/privatekey.ts | 3 +- common/v2/features/Wallets/wallets.ts | 8 ----- common/v2/features/Wallets/web3/web3.ts | 34 ------------------- common/v2/libs/nodes/web3/index.ts | 4 --- .../libs/wallet/non-deterministic/helpers.ts | 1 + common/v2/services/LocalCache/LocalCache.ts | 24 +++++-------- 10 files changed, 27 insertions(+), 72 deletions(-) delete mode 100644 common/v2/features/Wallets/wallets.ts diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 15eb54238..234e47ad3 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -199,7 +199,7 @@ const WalletDecrypt = withRouter( file: '', password: '' }, - unlock: this.props.unlockKeystore, + unlock: WalletActions.unlockKeystore, helpLink: `${knowledgeBaseURL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types` }, [InsecureWalletName.MNEMONIC_PHRASE]: { @@ -218,7 +218,7 @@ const WalletDecrypt = withRouter( key: '', password: '' }, - unlock: this.props.unlockPrivateKey, + unlock: WalletActions.unlockPrivateKey, helpLink: `${knowledgeBaseURL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types` }, [MiscWalletName.VIEW_ONLY]: { @@ -680,7 +680,7 @@ const WalletDecrypt = withRouter( this.setState({ value }); }; - public onUnlock = (payload: any) => { + public onUnlock = async (payload: any) => { const { value, selectedWalletKey } = this.state; if (!selectedWalletKey) { return; @@ -707,6 +707,18 @@ const WalletDecrypt = withRouter( address: unlockValue.getAddressString() } }); + } else if ( + this.state.accountData.accountType === 'keystoreFile' || + this.state.accountData.accountType === 'privateKey' + ) { + const wallet = await this.WALLETS[selectedWalletKey].unlock(unlockValue); + this.setState({ + hasSelectedAddress: true, + accountData: { + ...this.state.accountData, + address: wallet.getAddressString() + } + }); } else { this.setState({ hasSelectedAddress: true, @@ -757,9 +769,7 @@ function mapStateToProps(state: AppState, ownProps: Props) { } export default connect(mapStateToProps, { - unlockKeystore: WalletActions.unlockKeystore, unlockMnemonic: WalletActions.unlockMnemonic, - unlockPrivateKey: WalletActions.unlockPrivateKey, unlockWeb3: WalletActions.unlockWeb3, resetTransactionRequested: transactionFieldsActions.resetTransactionRequested, showNotification: notificationsActions.showNotification diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 5ede44b9f..66e9f56bc 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -120,7 +120,6 @@ export class KeystoreDecrypt extends PureComponent { password: '', filename: fileName } as any); - this.props.onUnlock(); }; if (isValidFile(inputFile)) { fileReader.readAsText(inputFile, 'utf-8'); diff --git a/common/v2/features/Wallets/index.ts b/common/v2/features/Wallets/index.ts index 580116569..039813162 100644 --- a/common/v2/features/Wallets/index.ts +++ b/common/v2/features/Wallets/index.ts @@ -2,4 +2,3 @@ export * from './mnemonic'; export * from './privatekey'; export * from './web3'; export * from './keystore'; -export * from './wallets'; diff --git a/common/v2/features/Wallets/keystore/keystore.ts b/common/v2/features/Wallets/keystore/keystore.ts index 3dab297ec..4a139c3e5 100644 --- a/common/v2/features/Wallets/keystore/keystore.ts +++ b/common/v2/features/Wallets/keystore/keystore.ts @@ -6,7 +6,7 @@ import { getKeystoreWallet, getUtcWallet, IWallet -} from 'libs/wallet'; +} from 'v2/libs/wallet'; import { translateRaw } from 'translations'; export const unlockKeystore = async (payload: KeystoreUnlockParams) => { @@ -29,7 +29,6 @@ export const unlockKeystore = async (payload: KeystoreUnlockParams) => { } return; } - // TODO: provide a more descriptive error than the two 'ERROR_6' (invalid pass) messages above return wallet; }; diff --git a/common/v2/features/Wallets/privatekey/privatekey.ts b/common/v2/features/Wallets/privatekey/privatekey.ts index e36fa3abe..bb0ff1f3a 100644 --- a/common/v2/features/Wallets/privatekey/privatekey.ts +++ b/common/v2/features/Wallets/privatekey/privatekey.ts @@ -1,4 +1,4 @@ -import { IWallet, getPrivKeyWallet, IFullWallet } from 'libs/wallet'; +import { IWallet, getPrivKeyWallet, IFullWallet } from 'v2/libs/wallet'; import { translateRaw } from 'translations'; import { PrivateKeyUnlockParams } from './types'; @@ -7,7 +7,6 @@ export const unlockPrivateKey = async ( ): Promise => { let wallet: IWallet | null = null; const { key, password } = payload; - try { wallet = getPrivKeyWallet(key, password); } catch (e) { diff --git a/common/v2/features/Wallets/wallets.ts b/common/v2/features/Wallets/wallets.ts deleted file mode 100644 index 94c84a656..000000000 --- a/common/v2/features/Wallets/wallets.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const setWallet = async () => { - await updateWalletConfig(); -}; - -export const updateWalletConfig = async () => { - console.log('got here?'); - return; -}; diff --git a/common/v2/features/Wallets/web3/web3.ts b/common/v2/features/Wallets/web3/web3.ts index 8497b556f..496459098 100644 --- a/common/v2/features/Wallets/web3/web3.ts +++ b/common/v2/features/Wallets/web3/web3.ts @@ -22,19 +22,13 @@ import { updateCurrents, readCurrents } from 'v2/services/Currents/Currents'; let web3Added = true; export const initWeb3Node = async () => { - console.log('got init'); const { chainId, lib } = await setupWeb3Node(); - console.log('got init2'); const network: NetworkSelect = getNetworkByChainId(chainId); - console.log('got init3'); if (!network) { throw new Error(`MyCrypto doesn’t support the network with chain ID '${chainId}'`); } - console.log('got init4'); const web3Network = makeWeb3Network(network.id); - console.log('got here? ' + JSON.stringify(web3Network, null, 4)); const id = 'web3'; - console.log('got init5'); const config: NodeOptions = { name: id, isCustom: false, @@ -43,42 +37,31 @@ export const initWeb3Node = async () => { hidden: true, network: web3Network }; - console.log('got init6'); if (getShepherdManualMode()) { shepherd.auto(); } - console.log('got init7'); if (!web3Added) { - console.log('got init 7.5'); shepherd.useProvider('web3', id, makeProviderConfig({ network: web3Network })); } - console.log('got init8'); web3Added = true; createNodeOptionsWithID(config, id); - console.log('got init9'); updateCurrents({ node: 'web3' }); - console.log('got init10'); - console.log(lib); return lib; }; export const unlockWeb3 = async () => { try { - console.log('did i get here?'); const nodeLib = await initWeb3Node(); - console.log('did i get here?1'); /*await (action: any) => { action.type === configNodesSelectedTypes.ConfigNodesSelectedActions.CHANGE_SUCCEEDED && action.payload.nodeId === 'web3' }*/ const web3Node: any | null = await getWeb3Node(); - console.log('did i get here?1.1'); if (!web3Node) { throw Error('Web3 node config not found!'); } - console.log(web3Node); const network = web3Node.network; if (!isWeb3Node(nodeLib)) { @@ -86,15 +69,10 @@ export const unlockWeb3 = async () => { } const accounts: string = await nodeLib.getAccounts(); - console.log('accounts: ' + accounts); const address = accounts[0]; - console.log('did i get here?3'); if (!address) { throw new Error('No accounts found in MetaMask / Web3.'); } - console.log('did i get here?4 ' + network); - console.log(new Web3Wallet(address, stripWeb3Network(network))); - console.log('did i get here?6'); return new Web3Wallet(address, stripWeb3Network(network)); } catch (err) { console.error(err); @@ -105,21 +83,9 @@ export const unlockWeb3 = async () => { }; export const getWeb3Node = async () => { - console.log('getWeb3 1'); const currNode = readNodeOptions('web3'); - console.log('getWeb3 2'); const currNodeId = readCurrents().node; - console.log('getWeb3 4'); - console.log( - 'next - ' + - (currNode && currNodeId && isWeb3NodeId(currNodeId)) + - ' - ' + - currNode + - ' - ' + - currNodeId - ); if (currNode && currNodeId && isWeb3NodeId(currNodeId)) { - console.log('getWeb3 5'); return currNode; } return null; diff --git a/common/v2/libs/nodes/web3/index.ts b/common/v2/libs/nodes/web3/index.ts index b53e65ed1..74b2eb495 100644 --- a/common/v2/libs/nodes/web3/index.ts +++ b/common/v2/libs/nodes/web3/index.ts @@ -78,16 +78,12 @@ export async function setupWeb3Node() { // Handle the following MetaMask breaking change: // https://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8 const { ethereum } = window as any; - console.log('hur1'); if (ethereum) { // Overwrite the legacy Web3 with the newer version. (window as any).web3 = new (window as any).Web3(ethereum); - console.log('hur2'); try { - console.log(ethereum); // Request permission to access MetaMask accounts. await ethereum.enable(); - console.log('hur3'); // Permission was granted; proceed. return getChainIdAndLib(); } catch (e) { diff --git a/common/v2/libs/wallet/non-deterministic/helpers.ts b/common/v2/libs/wallet/non-deterministic/helpers.ts index 26d879519..1fb4211b1 100644 --- a/common/v2/libs/wallet/non-deterministic/helpers.ts +++ b/common/v2/libs/wallet/non-deterministic/helpers.ts @@ -23,6 +23,7 @@ export const signWrapper = (walletToWrap: IFullWallet): WrappedWallet => Object.assign(walletToWrap, { signRawTransaction: (t: Tx) => signRawTxWithPrivKey(walletToWrap.getPrivateKey(), t), signMessage: (msg: string) => signMessageWithPrivKeyV2(walletToWrap.getPrivateKey(), msg), + getPublicKeyString: () => walletToWrap.getPublicKeyString(), unlock: () => Promise.resolve() }); diff --git a/common/v2/services/LocalCache/LocalCache.ts b/common/v2/services/LocalCache/LocalCache.ts index 0a8d96c1e..f5b1f6945 100644 --- a/common/v2/services/LocalCache/LocalCache.ts +++ b/common/v2/services/LocalCache/LocalCache.ts @@ -1,7 +1,6 @@ import * as utils from 'v2/libs'; import * as types from 'v2/services'; -import { CACHE_INIT, CACHE_INIT_DEV, CACHE_KEY, LocalCache } from './constants'; -import { isDevelopment } from 'v2/utils'; +import { CACHE_INIT, CACHE_KEY, LocalCache } from './constants'; import { DPaths, Fiats } from 'config'; import { ContractsData } from 'config/cacheData'; import { ACCOUNTTYPES } from 'v2/config'; @@ -9,29 +8,24 @@ import { NODE_CONFIGS } from 'libs/nodes'; import { STATIC_NETWORKS_INITIAL_STATE } from 'features/config/networks/static/reducer'; // Initialization - export const initializeCache = () => { const check = localStorage.getItem(CACHE_KEY); if (!check || check === '[]' || check === '{}') { - if (isDevelopment) { - setCache(CACHE_INIT_DEV); - } else { - hardRefreshCache(); + hardRefreshCache(); - initDerivationPathOptions(); + initDerivationPathOptions(); - initFiatCurrencies(); + initFiatCurrencies(); - initNetworkOptions(); + initNetworkOptions(); - initNodeOptions(); + initNodeOptions(); - initAccountTypes(); + initAccountTypes(); - initGlobalSettings(); + initGlobalSettings(); - initContractOptions(); - } + initContractOptions(); } }; From 137b69d922cea5fa7a983af25f0b419dd4a61c1e Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Thu, 25 Apr 2019 20:55:16 -0400 Subject: [PATCH 0401/1466] Use stable release of UI --- package.json | 32 +++++++++++--------------------- yarn.lock | 8 ++++---- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 39b0df02b..2cf51273f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@ledgerhq/hw-app-eth": "4.48.0", "@ledgerhq/hw-transport-node-hid-noevents": "4.48.0", "@ledgerhq/hw-transport-u2f": "4.46.0", - "@mycrypto/ui": "0.16.0-optional-address-title", + "@mycrypto/ui": "0.16.0", "@parity/qr-signer": "0.3.1", "@types/react-slick": "0.23.3", "axios": "0.18.0", @@ -24,8 +24,7 @@ "classnames": "2.2.5", "electron-updater": "2.21.10", "ethereum-blockies-base64": "1.0.2", - "ethereumjs-abi": - "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", + "ethereumjs-abi": "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", "ethereumjs-tx": "1.3.4", "ethereumjs-util": "5.1.5", "ethereumjs-wallet": "0.6.0", @@ -181,19 +180,13 @@ "prebuild": "check-node-version --package", "build:downloadable": "webpack --mode=production --config webpack_config/webpack.html.js", "prebuild:downloadable": "check-node-version --package", - "build:electron": - "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", - "build:electron:osx": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=osx node webpack_config/buildElectron.js", - "build:electron:windows": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=windows node webpack_config/buildElectron.js", - "build:electron:linux": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=linux node webpack_config/buildElectron.js", + "build:electron": "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", + "build:electron:osx": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=osx node webpack_config/buildElectron.js", + "build:electron:windows": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=windows node webpack_config/buildElectron.js", + "build:electron:linux": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=linux node webpack_config/buildElectron.js", "prebuild:electron": "check-node-version --package", - "jenkins:build:linux": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", - "jenkins:build:mac": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", + "jenkins:build:linux": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", + "jenkins:build:mac": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", "jenkins:upload": "node jenkins/upload", "test:coverage": "jest --config=jest_config/jest.config.json --coverage", "test": "jest --config=jest_config/jest.config.json", @@ -206,16 +199,13 @@ "predev": "check-node-version --package", "dev:https": "cross-env HTTPS=true node webpack_config/devServer.js", "predev:https": "check-node-version --package", - "dev:electron": - "concurrently --kill-others --names \"webpack,electron\" \"cross-env BUILD_ELECTRON=true node webpack_config/devServer.js\" \"webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js\"", + "dev:electron": "concurrently --kill-others --names \"webpack,electron\" \"cross-env BUILD_ELECTRON=true node webpack_config/devServer.js\" \"webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js\"", "tslint": "tslint --project . --exclude common/vendor/**/*", "tscheck": "tsc --noEmit", "start": "npm run dev", "precommit": "lint-staged", - "formatAll": - "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", - "prettier:diff": - "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", + "formatAll": "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", + "prettier:diff": "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", "update:tokens": "ts-node scripts/update-tokens", "postinstall": "electron-builder install-app-deps" }, diff --git a/yarn.lock b/yarn.lock index 3f564c314..0a93d7d13 100644 --- a/yarn.lock +++ b/yarn.lock @@ -430,10 +430,10 @@ "@ledgerhq/errors" "^4.48.0" events "^3.0.0" -"@mycrypto/ui@0.16.0-optional-address-title": - version "0.16.0-optional-address-title" - resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.16.0-optional-address-title.tgz#5cea8c0fd856d57951e5ea5e1e3a73ca8199f2ea" - integrity sha512-szzbbX7N/wCQ14Jm2/9fFlrM+Matw+fVK9LI+gQQkn59QhCuzKGP/2qHF40u1aFbi3hmFTOGP/jtLzceUnR1cQ== +"@mycrypto/ui@0.16.0": + version "0.16.0" + resolved "https://registry.yarnpkg.com/@mycrypto/ui/-/ui-0.16.0.tgz#45bf9ab2065a8260c299e7b4585d054053b2f55d" + integrity sha512-9033oRz0B4jCk7C134isaDAMP+Mg/n6GR4qjeHk+vdpjN0qwIbrQrZmNpNMFmslV9Q86tl1OK9aKmvnQNimsgg== dependencies: "@types/dom-clipboard-api" "^1.0.1" "@types/lodash.throttle" "^4.1.4" From ec09e36c343a2d8ee24de13f38c5b37d91f10157 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Fri, 26 Apr 2019 12:31:41 -0400 Subject: [PATCH 0402/1466] Changed default new account information --- common/v2/features/AddAccount/AddAccount.tsx | 43 +++++++++++++------- common/v2/features/Wallets/web3/web3.ts | 5 ++- common/v2/libs/networks/index.ts | 1 - common/v2/libs/networks/networks.ts | 41 ++++++++++++++----- common/v2/libs/networks/types.ts | 3 -- common/v2/services/AssetOption/types.ts | 4 +- common/v2/services/LocalCache/LocalCache.ts | 11 ++++- common/v2/services/LocalCache/constants.ts | 6 +-- 8 files changed, 77 insertions(+), 37 deletions(-) delete mode 100644 common/v2/libs/networks/types.ts diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 234e47ad3..8fabf70d1 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -52,6 +52,8 @@ import { NetworkOptionsContext, AccountContext } from 'v2/providers'; import { Link } from 'react-router-dom'; import { Account } from 'v2/services/Account/types'; import { Web3Decrypt } from 'components/WalletDecrypt/components/Web3'; +import { getNetworkByName } from 'v2/libs'; +import { NetworkOptions } from 'v2/services/NetworkOptions/types'; interface OwnProps { hidden?: boolean; @@ -273,19 +275,30 @@ const WalletDecrypt = withRouter( return this.WALLETS[selectedWalletKey]; } - public handleCreateAccount = (createAccount: any) => { + public handleCreateAccount = async (createAccount: any) => { const { accountData } = this.state; - //const network = accountData.network; - //const asset = getBaseAsset(network); - const newAccount: Account = { - ...accountData, - assets: '', - value: 0, - label: 'New Account', - localSettings: '', - transactionHistory: '' - }; - createAccount(newAccount); + try { + const network: NetworkOptions = await getNetworkByName(accountData.network); + const newAccount: Account = { + ...accountData, + assets: network.unit, + value: 0, + label: 'New Account', + localSettings: '', + transactionHistory: '' + }; + createAccount(newAccount); + } catch { + const newAccount: Account = { + ...accountData, + assets: 'DefaultAsset', + value: 0, + label: 'New Account', + localSettings: '', + transactionHistory: '' + }; + createAccount(newAccount); + } }; public handleCompleteFlow() { @@ -522,9 +535,9 @@ const WalletDecrypt = withRouter( className="Panel-dropdown" value={this.state.accountData.network} items={new Set(networkNames.sort())} - onChange={({ target: { value } }) => - this.setState({ accountData: { ...this.state.accountData, network: value } }) - } + onChange={({ target: { value } }) => { + this.setState({ accountData: { ...this.state.accountData, network: value } }); + }} placeholder="Ethereum" /> ); diff --git a/common/v2/features/Wallets/web3/web3.ts b/common/v2/features/Wallets/web3/web3.ts index 496459098..57dcb61f0 100644 --- a/common/v2/features/Wallets/web3/web3.ts +++ b/common/v2/features/Wallets/web3/web3.ts @@ -8,7 +8,7 @@ import { makeProviderConfig } from 'libs/nodes'; import { CustomNodeConfig, NodeOptions } from 'v2/services/NodeOptions/types'; -import { getNetworkByChainId, NetworkSelect } from 'v2/libs'; +import { getNetworkByChainId } from 'v2/libs'; import { translateRaw } from 'translations'; import { createNodeOptions, @@ -16,6 +16,7 @@ import { createNodeOptionsWithID } from 'v2/services/NodeOptions/NodeOptions'; import { updateCurrents, readCurrents } from 'v2/services/Currents/Currents'; +import { NetworkOptions } from 'v2/services/NetworkOptions/types'; //#region Web3 @@ -23,7 +24,7 @@ let web3Added = true; export const initWeb3Node = async () => { const { chainId, lib } = await setupWeb3Node(); - const network: NetworkSelect = getNetworkByChainId(chainId); + const network: NetworkOptions = await getNetworkByChainId(chainId); if (!network) { throw new Error(`MyCrypto doesn’t support the network with chain ID '${chainId}'`); } diff --git a/common/v2/libs/networks/index.ts b/common/v2/libs/networks/index.ts index 5d28a4b73..55d023a32 100644 --- a/common/v2/libs/networks/index.ts +++ b/common/v2/libs/networks/index.ts @@ -1,2 +1 @@ export * from './networks'; -export * from './types'; diff --git a/common/v2/libs/networks/networks.ts b/common/v2/libs/networks/networks.ts index bd669e6a4..1c74407c3 100644 --- a/common/v2/libs/networks/networks.ts +++ b/common/v2/libs/networks/networks.ts @@ -1,19 +1,40 @@ -import { NetworkSelect } from './types'; import { getCache } from 'v2/services/LocalCache'; import { NetworkOptions } from 'v2/services/NetworkOptions/types'; -export const getNetworkByChainId = (chainId: string): NetworkSelect => { - const networks = getAllNetworks(); +export const getAllNetworks = () => { + return Object.values(getCache().networkOptions); +}; - let networkToSelect = null; - networks.map((network: NetworkOptions) => { - if (network.chainId === parseInt(chainId, 16)) { - networkToSelect = network; +export const getNetworkByChainId = (chainId: string): Promise => { + return new Promise((resolve, reject) => { + try { + const networks = getAllNetworks(); + + networks.map((network: NetworkOptions) => { + if (network.chainId === parseInt(chainId, 16)) { + resolve(network); + } + }); + reject(); + } catch (e) { + reject(); } }); - return networkToSelect === null ? null : networkToSelect; }; -export const getAllNetworks = () => { - return Object.values(getCache().networkOptions); +export const getNetworkByName = async (name: string): Promise => { + return new Promise((resolve, reject) => { + try { + const networks = getAllNetworks(); + + networks.map((network: NetworkOptions) => { + if (network.name === name) { + resolve(network); + } + }); + reject(); + } catch (e) { + reject(); + } + }); }; diff --git a/common/v2/libs/networks/types.ts b/common/v2/libs/networks/types.ts deleted file mode 100644 index f74a0b496..000000000 --- a/common/v2/libs/networks/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { NetworkOptions } from 'v2/services/NetworkOptions/types'; - -export type NetworkSelect = NetworkOptions | null; diff --git a/common/v2/services/AssetOption/types.ts b/common/v2/services/AssetOption/types.ts index fe67e89a7..0b196b3f4 100644 --- a/common/v2/services/AssetOption/types.ts +++ b/common/v2/services/AssetOption/types.ts @@ -2,11 +2,11 @@ export interface AssetOption { name: string; network: string; ticker: string; - type: string; + type: assetOptionMethod; decimal: number; contractAddress: null; } - +export type assetOptionMethod = 'base' | 'call'; export interface ExtendedAssetOption extends AssetOption { uuid: string; } diff --git a/common/v2/services/LocalCache/LocalCache.ts b/common/v2/services/LocalCache/LocalCache.ts index f5b1f6945..3957795a7 100644 --- a/common/v2/services/LocalCache/LocalCache.ts +++ b/common/v2/services/LocalCache/LocalCache.ts @@ -80,7 +80,7 @@ export const initNetworkOptions = () => { }); const newLocalNetwork: types.NetworkOptions = { contracts: newContracts, - assets: [], + assets: [STATIC_NETWORKS_INITIAL_STATE[en].id], nodes: [], id: STATIC_NETWORKS_INITIAL_STATE[en].id, name: STATIC_NETWORKS_INITIAL_STATE[en].name, @@ -95,7 +95,16 @@ export const initNetworkOptions = () => { gasPriceSettings: STATIC_NETWORKS_INITIAL_STATE[en].gasPriceSettings, shouldEstimateGasPrice: STATIC_NETWORKS_INITIAL_STATE[en].shouldEstimateGasPrice }; + const newLocalAssetOption: types.AssetOption = { + name: STATIC_NETWORKS_INITIAL_STATE[en].name, + network: en, + ticker: en, + type: 'base', + decimal: 18, + contractAddress: null + }; newStorage.networkOptions[en] = newLocalNetwork; + newStorage.assetOptions[STATIC_NETWORKS_INITIAL_STATE[en].id] = newLocalAssetOption; }); setCache(newStorage); }; diff --git a/common/v2/services/LocalCache/constants.ts b/common/v2/services/LocalCache/constants.ts index d853ece63..02c0b1141 100644 --- a/common/v2/services/LocalCache/constants.ts +++ b/common/v2/services/LocalCache/constants.ts @@ -159,11 +159,11 @@ export const CACHE_INIT_DEV: LocalCache = { } }, assetOptions: { - Ethereum: { + ETH: { name: 'Ethereum', - network: 'Ethereum', + network: 'ETH', ticker: 'ETH', - type: 'coin', + type: 'base', decimal: 18, contractAddress: null } From a0db6a3079656d5ba3388667a70ffecf26c811d4 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Fri, 26 Apr 2019 13:54:51 -0400 Subject: [PATCH 0403/1466] added localsettings --- common/v2/features/AddAccount/AddAccount.tsx | 4 ++-- common/v2/services/LocalCache/LocalCache.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 8fabf70d1..5868e531c 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -284,7 +284,7 @@ const WalletDecrypt = withRouter( assets: network.unit, value: 0, label: 'New Account', - localSettings: '', + localSettings: 'default', transactionHistory: '' }; createAccount(newAccount); @@ -294,7 +294,7 @@ const WalletDecrypt = withRouter( assets: 'DefaultAsset', value: 0, label: 'New Account', - localSettings: '', + localSettings: 'default', transactionHistory: '' }; createAccount(newAccount); diff --git a/common/v2/services/LocalCache/LocalCache.ts b/common/v2/services/LocalCache/LocalCache.ts index 3957795a7..a7353b249 100644 --- a/common/v2/services/LocalCache/LocalCache.ts +++ b/common/v2/services/LocalCache/LocalCache.ts @@ -25,6 +25,8 @@ export const initializeCache = () => { initGlobalSettings(); + initLocalSettings(); + initContractOptions(); } }; @@ -42,6 +44,17 @@ export const initGlobalSettings = () => { setCache(newStorage); }; +export const initLocalSettings = () => { + const newStorage = getCacheRaw(); + newStorage.localSettings = { + default: { + fiatCurrency: 'USD', + favorite: false + } + }; + setCache(newStorage); +}; + export const initAccountTypes = () => { const newStorage = getCacheRaw(); const accountTypes: Record = ACCOUNTTYPES; From 776c036374a973151edb05f41760a354e280c3d5 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Fri, 26 Apr 2019 22:00:58 -0400 Subject: [PATCH 0404/1466] redirect user from dashboard if no account exists --- .../Dashboard/components/AccountList.tsx | 119 +++++++++++------- 1 file changed, 73 insertions(+), 46 deletions(-) diff --git a/common/v2/features/Dashboard/components/AccountList.tsx b/common/v2/features/Dashboard/components/AccountList.tsx index 74f91142c..d45acc309 100644 --- a/common/v2/features/Dashboard/components/AccountList.tsx +++ b/common/v2/features/Dashboard/components/AccountList.tsx @@ -1,11 +1,11 @@ -import React from 'react'; -import { Address, CollapsibleTable, Icon, Network, Typography, Button } from '@mycrypto/ui'; - -import DashboardPanel from './DashboardPanel'; -import './AccountList.scss'; -import { ExtendedAccount } from 'v2/services'; +import { Address, Button, CollapsibleTable, Icon, Network, Typography } from '@mycrypto/ui'; +import React, { Component } from 'react'; +import { Redirect } from 'react-router-dom'; import styled from 'styled-components'; import { truncate } from 'v2/libs'; +import { ExtendedAccount } from 'v2/services'; +import './AccountList.scss'; +import DashboardPanel from './DashboardPanel'; interface Props { accounts: ExtendedAccount[]; @@ -18,45 +18,72 @@ const DeleteButton = styled(Button)` margin-left: 1em; `; -export default function AccountList({ accounts, deleteAccount, className = '' }: Props) { - const accountTable = { - head: ['Favorite', 'Address', 'Network', 'Value', 'Delete'], - body: accounts.map(account => { - return [ - , -
              , - - {account.network} - , - {account.value}, - deleteAccount(account.uuid)} icon="exit" /> - ]; - }), - config: { - primaryColumn: 'Address', - sortableColumn: 'Address', - sortFunction: (a: any, b: any) => { - const aLabel = a.props.label; - const bLabel = b.props.label; - return aLabel === bLabel ? true : aLabel.localeCompare(bLabel); - }, - hiddenHeadings: ['Favorite', 'Delete'], - iconColumns: ['Favorite', 'Delete'] - } +export default class AccountList extends Component { + public handleAccountDelete = (uuid: string) => () => { + const { deleteAccount } = this.props; + deleteAccount(uuid); }; - return ( - - - - ); + + public renderRedirect() { + if ( + this.props.accounts === undefined || + this.props.accounts === null || + this.props.accounts.length === 0 + ) { + return ; + } + } + + public BuildAccountList() { + const { accounts } = this.props; + return { + head: ['Favorite', 'Address', 'Network', 'Value', 'Delete'], + body: accounts.map(account => { + return [ + , +
              , + + {account.network} + , + {account.value}, + + ]; + }), + config: { + primaryColumn: 'Address', + sortableColumn: 'Address', + sortFunction: (a: any, b: any) => { + const aLabel = a.props.label; + const bLabel = b.props.label; + return aLabel === bLabel ? true : aLabel.localeCompare(bLabel); + }, + hiddenHeadings: ['Favorite', 'Delete'], + iconColumns: ['Favorite', 'Delete'] + } + }; + } + public render() { + const { className } = this.props; + + return ( + + + {this.renderRedirect()} + + ); + } } From 835ae883bd302d088cb81c506592b49564d33a62 Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Mon, 29 Apr 2019 15:02:51 +0200 Subject: [PATCH 0405/1466] Notifications provider refactor and basic setup --- .../NotificationsPanel/NotificationsPanel.tsx | 115 +++++++++++++++--- .../ActiveNotificationsProvider.tsx | 51 -------- .../ActiveNotificationsProvider/index.ts | 1 - .../NotificationsProvider.tsx | 102 ++++++++++++++++ .../providers/NotificationsProvider/index.ts | 1 + common/v2/providers/index.ts | 5 +- .../ActiveNotifications.ts | 7 -- .../v2/services/ActiveNotifications/index.ts | 2 - .../v2/services/ActiveNotifications/types.ts | 7 -- common/v2/services/LocalCache/LocalCache.ts | 2 +- common/v2/services/LocalCache/constants.ts | 10 +- .../services/Notifications/Notifications.ts | 7 ++ common/v2/services/Notifications/index.ts | 2 + common/v2/services/Notifications/types.ts | 26 ++++ common/v2/services/types.ts | 2 +- 15 files changed, 243 insertions(+), 97 deletions(-) delete mode 100644 common/v2/providers/ActiveNotificationsProvider/ActiveNotificationsProvider.tsx delete mode 100644 common/v2/providers/ActiveNotificationsProvider/index.ts create mode 100644 common/v2/providers/NotificationsProvider/NotificationsProvider.tsx create mode 100644 common/v2/providers/NotificationsProvider/index.ts delete mode 100644 common/v2/services/ActiveNotifications/ActiveNotifications.ts delete mode 100644 common/v2/services/ActiveNotifications/index.ts delete mode 100644 common/v2/services/ActiveNotifications/types.ts create mode 100644 common/v2/services/Notifications/Notifications.ts create mode 100644 common/v2/services/Notifications/index.ts create mode 100644 common/v2/services/Notifications/types.ts diff --git a/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx index 58372eeb8..96916f6b4 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx @@ -2,8 +2,16 @@ import React, { Component } from 'react'; import { Panel, Button } from '@mycrypto/ui'; import styled from 'styled-components'; -import { WalletCreatedNotification } from './components'; +import { + WalletCreatedNotification, + WalletAddedNotification, + SaveDashboardNotification, + PrintPaperWalletNotification, + GetHardwareWalletNotification +} from './components'; import { BREAK_POINTS } from 'v2/features/constants'; +import { NotificationsContext, NotificationsProvider } from 'v2/providers'; +import { Notification, NotificationTemplates } from 'v2/services/Notifications'; // Legacy import closeIcon from 'common/assets/images/icn-close.svg'; @@ -36,26 +44,101 @@ class NotificationsPanel extends Component { }; public render() { - const { isOpen } = this.state; - return ( - isOpen && ( - - - Close - - {this.getFirstVisibleNotification()} - - ) + + + {({ createNotification, currentNotification, dismissCurrentNotification }) => ( + +
              + {' '} + {' '} + {' '} + {' '} + +
              + {currentNotification && ( + + + Close + + {this.getNotification(currentNotification)} + + )} +
              + )} +
              +
              ); } - private onClose = () => { - this.setState({ isOpen: false }); - }; + private getNotification(currentNotification: Notification) { + const template = currentNotification.template; + const templateData = currentNotification.options.templateData; - private getFirstVisibleNotification() { - return ; + switch (template) { + case NotificationTemplates.walletCreated: + return ; + break; + case NotificationTemplates.walletAdded: + return ; + break; + case NotificationTemplates.saveSettings: + return ; + break; + case NotificationTemplates.printPaperWallet: + return ( + + ); + break; + case NotificationTemplates.getHardwareWallet: + return ; + break; + default: + return ; + break; + } } } diff --git a/common/v2/providers/ActiveNotificationsProvider/ActiveNotificationsProvider.tsx b/common/v2/providers/ActiveNotificationsProvider/ActiveNotificationsProvider.tsx deleted file mode 100644 index be5c3d4e6..000000000 --- a/common/v2/providers/ActiveNotificationsProvider/ActiveNotificationsProvider.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import React, { Component, createContext } from 'react'; -import * as service from 'v2/services/ActiveNotifications/ActiveNotifications'; -import { ExtendedActiveNotifications } from 'v2/services/ActiveNotifications'; - -export interface ProviderState { - activeNotifications: ExtendedActiveNotifications[]; - createActiveNotifications(activeNotificationsData: ExtendedActiveNotifications): void; - deleteActiveNotifications(uuid: string): void; - updateActiveNotifications( - uuid: string, - activeNotificationsData: ExtendedActiveNotifications - ): void; -} - -export const ActiveNotificationsContext = createContext({} as ProviderState); - -export class ActiveNotificationsProvider extends Component { - public readonly state: ProviderState = { - activeNotifications: service.readAllActiveNotifications() || [], - createActiveNotifications: (activeNotificationsData: ExtendedActiveNotifications) => { - service.createActiveNotifications(activeNotificationsData); - this.getActiveNotifications(); - }, - deleteActiveNotifications: (uuid: string) => { - service.deleteActiveNotifications(uuid); - this.getActiveNotifications(); - }, - updateActiveNotifications: ( - uuid: string, - activeNotificationsData: ExtendedActiveNotifications - ) => { - service.updateActiveNotifications(uuid, activeNotificationsData); - this.getActiveNotifications(); - } - }; - - public render() { - const { children } = this.props; - return ( - - {children} - - ); - } - - private getActiveNotifications = () => { - const activeNotifications: ExtendedActiveNotifications[] = - service.readAllActiveNotifications() || []; - this.setState({ activeNotifications }); - }; -} diff --git a/common/v2/providers/ActiveNotificationsProvider/index.ts b/common/v2/providers/ActiveNotificationsProvider/index.ts deleted file mode 100644 index 8b35a2a9e..000000000 --- a/common/v2/providers/ActiveNotificationsProvider/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ActiveNotificationsProvider'; diff --git a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx new file mode 100644 index 000000000..fa70310ee --- /dev/null +++ b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx @@ -0,0 +1,102 @@ +import React, { Component, createContext } from 'react'; + +import * as service from 'v2/services/Notifications/Notifications'; +import { ExtendedNotification, Notification, NotificationOptions } from 'v2/services/Notifications'; + +export interface ProviderState { + currentNotification: ExtendedNotification | undefined; + notifications: ExtendedNotification[]; + createNotification( + templateName: string, + templateData?: object, + options?: NotificationOptions + ): void; + dismissCurrentNotification(): void; +} + +export const NotificationsContext = createContext({} as ProviderState); + +export class NotificationsProvider extends Component { + public state: ProviderState = { + currentNotification: undefined, + notifications: service.readAllNotifications() || [], + createNotification: (templateName: string, options?: NotificationOptions) => + this.createNotification(templateName, options), + dismissCurrentNotification: () => this.dismissCurrentNotification() + }; + + public createNotification = (templateName: string, options?: NotificationOptions) => { + // Dismiss old notifications that need to be dismissed + const notificationsToDismiss = this.state.notifications.filter( + x => x.options.dismissOnOverwrite === true && x.dismissed === false + ); + notificationsToDismiss.forEach(dismissableNotification => { + this.dismissNotification(dismissableNotification); + }); + + // Apply notification options + const defaultNotificationOptions: NotificationOptions = { + showOneTime: false, + dismissOnOverwrite: true, + repeating: false, + templateData: {} + }; + const notificationOptions = Object.assign(defaultNotificationOptions, options); + + // Create the notification object + const notification: Notification = { + template: templateName, + options: notificationOptions, + dateDisplayed: new Date(), + dismissed: false, + dateDismissed: undefined + }; + + // If notification already exists update it, otherwise create a new one + const existingNotification = this.state.notifications.find( + x => x.template === notification.template + ); + + if (existingNotification) { + service.updateNotification(existingNotification.uuid, notification); + } else { + service.createNotification(notification); + } + + this.getNotifications(); + return; + }; + + public dismissCurrentNotification = () => { + const notification = this.state.currentNotification; + if (notification) { + this.dismissNotification(notification); + this.getNotifications(); + } + }; + + public dismissNotification = (notification: ExtendedNotification) => { + notification.dismissed = true; + notification.dateDismissed = new Date(); + service.updateNotification(notification.uuid, notification); + }; + + public render() { + const { children } = this.props; + return ( + {children} + ); + } + + private getNotifications = () => { + const notifications: ExtendedNotification[] = service.readAllNotifications() || []; + + this.setState({ notifications }); + const sortedNotifications = notifications.sort((a, b) => { + return new Date(a.dateDisplayed).getTime() - new Date(b.dateDisplayed).getTime(); + }); + const visibleNotifications = sortedNotifications.filter(x => x.dismissed === false); + + this.setState({ currentNotification: visibleNotifications[visibleNotifications.length - 1] }); + }; +} diff --git a/common/v2/providers/NotificationsProvider/index.ts b/common/v2/providers/NotificationsProvider/index.ts new file mode 100644 index 000000000..3ef5b3b0e --- /dev/null +++ b/common/v2/providers/NotificationsProvider/index.ts @@ -0,0 +1 @@ +export * from './NotificationsProvider'; diff --git a/common/v2/providers/index.ts b/common/v2/providers/index.ts index f87278984..04a1545d6 100644 --- a/common/v2/providers/index.ts +++ b/common/v2/providers/index.ts @@ -13,10 +13,7 @@ export { CurrentsContext, CurrentsProvider } from './CurrentsProvider'; export { FiatCurrencyContext, FiatCurrencyProvider } from './FiatCurrencyProvider'; export { TransactionContext, TransactionProvider } from './TransactionProvider'; export { AssetOptionsContext, AssetOptionsProvider } from './AssetOptionsProvider'; -export { - ActiveNotificationsContext, - ActiveNotificationsProvider -} from './ActiveNotificationsProvider'; +export { NotificationsContext, NotificationsProvider } from './NotificationsProvider'; export { AddressMetadataContext, AddressMetadataProvider } from './AddressMetadataProvider'; export { NetworkOptionsContext, NetworkOptionsProvider } from './NetworkOptionsProvider'; export { NodeOptionsContext, NodeOptionsProvider } from './NodeOptionsProvider'; diff --git a/common/v2/services/ActiveNotifications/ActiveNotifications.ts b/common/v2/services/ActiveNotifications/ActiveNotifications.ts deleted file mode 100644 index 552715455..000000000 --- a/common/v2/services/ActiveNotifications/ActiveNotifications.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { create, read, update, destroy, readAll } from 'v2/services/LocalCache'; - -export const createActiveNotifications = create('activeNotifications'); -export const readActiveNotifications = read('activeNotifications'); -export const updateActiveNotifications = update('activeNotifications'); -export const deleteActiveNotifications = destroy('activeNotifications'); -export const readAllActiveNotifications = readAll('activeNotifications'); diff --git a/common/v2/services/ActiveNotifications/index.ts b/common/v2/services/ActiveNotifications/index.ts deleted file mode 100644 index 7d4c72fe9..000000000 --- a/common/v2/services/ActiveNotifications/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ActiveNotifications'; -export * from './types'; diff --git a/common/v2/services/ActiveNotifications/types.ts b/common/v2/services/ActiveNotifications/types.ts deleted file mode 100644 index 13f096b64..000000000 --- a/common/v2/services/ActiveNotifications/types.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface ActiveNotifications { - template: string; -} - -export interface ExtendedActiveNotifications extends ActiveNotifications { - uuid: string; -} diff --git a/common/v2/services/LocalCache/LocalCache.ts b/common/v2/services/LocalCache/LocalCache.ts index 1ba65cffd..1bc1a3e48 100644 --- a/common/v2/services/LocalCache/LocalCache.ts +++ b/common/v2/services/LocalCache/LocalCache.ts @@ -175,7 +175,7 @@ export const updateSettings = (key: K) => (value: LocalCa type CollectionKey = | 'accounts' | 'accountTypes' - | 'activeNotifications' + | 'notifications' | 'addressMetadata' | 'assetOptions' | 'assets' diff --git a/common/v2/services/LocalCache/constants.ts b/common/v2/services/LocalCache/constants.ts index 3734d6901..76aeb91ad 100644 --- a/common/v2/services/LocalCache/constants.ts +++ b/common/v2/services/LocalCache/constants.ts @@ -18,7 +18,7 @@ export interface LocalCache { contractOptions: Record; derivationPathOptions: Record; addressMetadata: Record; - activeNotifications: Record; + notifications: Record; fiatCurrencies: Record; } @@ -182,11 +182,7 @@ export const CACHE_INIT_DEV: LocalCache = { notes: 'This is my wallet.' } }, - activeNotifications: { - '61d84f5e-0efa-46b9-915c-aed6ebe5a4dd': { - template: 'wallet-created' - } - }, + notifications: {}, fiatCurrencies: { USD: { code: 'USD', @@ -212,6 +208,6 @@ export const CACHE_INIT: LocalCache = { contractOptions: {}, derivationPathOptions: {}, addressMetadata: {}, - activeNotifications: {}, + notifications: {}, fiatCurrencies: {} }; diff --git a/common/v2/services/Notifications/Notifications.ts b/common/v2/services/Notifications/Notifications.ts new file mode 100644 index 000000000..5e16345df --- /dev/null +++ b/common/v2/services/Notifications/Notifications.ts @@ -0,0 +1,7 @@ +import { create, read, update, destroy, readAll } from 'v2/services/LocalCache'; + +export const createNotification = create('notifications'); +export const readNotification = read('notifications'); +export const updateNotification = update('notifications'); +export const deleteNotification = destroy('notifications'); +export const readAllNotifications = readAll('notifications'); diff --git a/common/v2/services/Notifications/index.ts b/common/v2/services/Notifications/index.ts new file mode 100644 index 000000000..86fa20fb2 --- /dev/null +++ b/common/v2/services/Notifications/index.ts @@ -0,0 +1,2 @@ +export * from './Notifications'; +export * from './types'; diff --git a/common/v2/services/Notifications/types.ts b/common/v2/services/Notifications/types.ts new file mode 100644 index 000000000..7f69ee54c --- /dev/null +++ b/common/v2/services/Notifications/types.ts @@ -0,0 +1,26 @@ +export interface Notification { + template: string; + options: NotificationOptions; + dateDisplayed: Date; + dismissed: boolean; + dateDismissed: Date | undefined; +} + +export interface ExtendedNotification extends Notification { + uuid: string; +} + +export interface NotificationOptions { + showOneTime?: boolean; + dismissOnOverwrite?: boolean; + repeating?: boolean; + templateData?: { [key: string]: any }; +} + +export enum NotificationTemplates { + walletCreated = 'wallet-created', + walletAdded = 'wallet-added', + saveSettings = 'save-settings', + printPaperWallet = 'print-paper-wallet', + getHardwareWallet = 'get-hardware-wallet' +} diff --git a/common/v2/services/types.ts b/common/v2/services/types.ts index 0e68c4fa8..06f6235bd 100644 --- a/common/v2/services/types.ts +++ b/common/v2/services/types.ts @@ -1,6 +1,6 @@ export * from 'v2/services/Account/types'; export * from 'v2/services/AccountType/types'; -export * from 'v2/services/ActiveNotifications/types'; +export * from 'v2/services/Notifications/types'; export * from 'v2/services/AddressMetadata/types'; export * from 'v2/services/Asset/types'; export * from 'v2/services/AssetOption/types'; From 88c078fc09bb37266813ec0f7712d397e2b632cc Mon Sep 17 00:00:00 2001 From: blurpesec Date: Mon, 29 Apr 2019 10:13:13 -0400 Subject: [PATCH 0406/1466] Simplify handler methods --- common/v2/features/AddAccount/AddAccount.tsx | 12 +++---- common/v2/features/Wallets/web3/web3.ts | 2 +- common/v2/libs/networks/networks.ts | 36 ++++---------------- 3 files changed, 13 insertions(+), 37 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 5868e531c..e04bb984a 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -275,23 +275,23 @@ const WalletDecrypt = withRouter( return this.WALLETS[selectedWalletKey]; } - public handleCreateAccount = async (createAccount: any) => { + public handleCreateAccount = (createAccount: any) => { const { accountData } = this.state; - try { - const network: NetworkOptions = await getNetworkByName(accountData.network); + const network: NetworkOptions | undefined = getNetworkByName(accountData.network); + if (!network) { const newAccount: Account = { ...accountData, - assets: network.unit, + assets: 'DefaultAsset', value: 0, label: 'New Account', localSettings: 'default', transactionHistory: '' }; createAccount(newAccount); - } catch { + } else { const newAccount: Account = { ...accountData, - assets: 'DefaultAsset', + assets: network.unit, value: 0, label: 'New Account', localSettings: 'default', diff --git a/common/v2/features/Wallets/web3/web3.ts b/common/v2/features/Wallets/web3/web3.ts index 57dcb61f0..4a1d0ee74 100644 --- a/common/v2/features/Wallets/web3/web3.ts +++ b/common/v2/features/Wallets/web3/web3.ts @@ -24,7 +24,7 @@ let web3Added = true; export const initWeb3Node = async () => { const { chainId, lib } = await setupWeb3Node(); - const network: NetworkOptions = await getNetworkByChainId(chainId); + const network: NetworkOptions | undefined = getNetworkByChainId(chainId); if (!network) { throw new Error(`MyCrypto doesn’t support the network with chain ID '${chainId}'`); } diff --git a/common/v2/libs/networks/networks.ts b/common/v2/libs/networks/networks.ts index 1c74407c3..d91b18ec8 100644 --- a/common/v2/libs/networks/networks.ts +++ b/common/v2/libs/networks/networks.ts @@ -5,36 +5,12 @@ export const getAllNetworks = () => { return Object.values(getCache().networkOptions); }; -export const getNetworkByChainId = (chainId: string): Promise => { - return new Promise((resolve, reject) => { - try { - const networks = getAllNetworks(); - - networks.map((network: NetworkOptions) => { - if (network.chainId === parseInt(chainId, 16)) { - resolve(network); - } - }); - reject(); - } catch (e) { - reject(); - } - }); +export const getNetworkByChainId = (chainId: string): NetworkOptions | undefined => { + const networks = getAllNetworks() || []; + return networks.find((network: NetworkOptions) => network.chainId === parseInt(chainId, 16)); }; -export const getNetworkByName = async (name: string): Promise => { - return new Promise((resolve, reject) => { - try { - const networks = getAllNetworks(); - - networks.map((network: NetworkOptions) => { - if (network.name === name) { - resolve(network); - } - }); - reject(); - } catch (e) { - reject(); - } - }); +export const getNetworkByName = (name: string): NetworkOptions | undefined => { + const networks = getAllNetworks() || []; + return networks.find((network: NetworkOptions) => network.name === name); }; From 6cd24a2199d447726c8c3e93d3af1cfd08c9ef1e Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Mon, 29 Apr 2019 16:47:30 +0200 Subject: [PATCH 0407/1466] Added analytics for displayed notification --- .../NotificationsPanel/NotificationsPanel.tsx | 10 ---- .../NotificationsProvider.tsx | 48 +++++++++++++++++-- common/v2/services/Analytics/constants.ts | 3 +- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx index 96916f6b4..7957dc2fa 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx @@ -39,10 +39,6 @@ const CloseButton = styled(Button)` `; class NotificationsPanel extends Component { - public state = { - isOpen: true - }; - public render() { return ( @@ -117,13 +113,10 @@ class NotificationsPanel extends Component { switch (template) { case NotificationTemplates.walletCreated: return ; - break; case NotificationTemplates.walletAdded: return ; - break; case NotificationTemplates.saveSettings: return ; - break; case NotificationTemplates.printPaperWallet: return ( ); - break; case NotificationTemplates.getHardwareWallet: return ; - break; default: return ; - break; } } } diff --git a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx index fa70310ee..2d1cd0ea1 100644 --- a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx +++ b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx @@ -1,7 +1,33 @@ import React, { Component, createContext } from 'react'; import * as service from 'v2/services/Notifications/Notifications'; -import { ExtendedNotification, Notification, NotificationOptions } from 'v2/services/Notifications'; +import { + ExtendedNotification, + Notification, + NotificationOptions, + NotificationTemplates +} from 'v2/services/Notifications'; +import { AnalyticsService, ANALYTICS_CATEGORIES } from 'v2/services'; + +const { + walletCreated, + walletAdded, + saveSettings, + printPaperWallet, + getHardwareWallet +} = NotificationTemplates; + +interface NotificationsStringsProps { + [key: string]: string; +} + +const notificationsStrings: NotificationsStringsProps = { + [walletCreated]: 'New Account (Wallet) Created', + [walletAdded]: 'New Account (Wallet) Added', + [saveSettings]: 'Save Your Dashboard Settings', + [printPaperWallet]: 'Print Your Paper Wallet', + [getHardwareWallet]: 'Get a Hardware Wallet' +}; export interface ProviderState { currentNotification: ExtendedNotification | undefined; @@ -20,12 +46,15 @@ export class NotificationsProvider extends Component { public state: ProviderState = { currentNotification: undefined, notifications: service.readAllNotifications() || [], - createNotification: (templateName: string, options?: NotificationOptions) => + createNotification: (templateName: NotificationTemplates, options?: NotificationOptions) => this.createNotification(templateName, options), dismissCurrentNotification: () => this.dismissCurrentNotification() }; - public createNotification = (templateName: string, options?: NotificationOptions) => { + public createNotification = ( + templateName: NotificationTemplates, + options?: NotificationOptions + ) => { // Dismiss old notifications that need to be dismissed const notificationsToDismiss = this.state.notifications.filter( x => x.options.dismissOnOverwrite === true && x.dismissed === false @@ -63,8 +92,10 @@ export class NotificationsProvider extends Component { service.createNotification(notification); } + // track notification displayed event + this.trackNotificationDisplayed(notificationsStrings[templateName]); + this.getNotifications(); - return; }; public dismissCurrentNotification = () => { @@ -95,8 +126,15 @@ export class NotificationsProvider extends Component { const sortedNotifications = notifications.sort((a, b) => { return new Date(a.dateDisplayed).getTime() - new Date(b.dateDisplayed).getTime(); }); - const visibleNotifications = sortedNotifications.filter(x => x.dismissed === false); + const visibleNotifications = sortedNotifications.filter(x => !x.dismissed); this.setState({ currentNotification: visibleNotifications[visibleNotifications.length - 1] }); }; + + private trackNotificationDisplayed = (notification: string) => { + AnalyticsService.instance.track( + ANALYTICS_CATEGORIES.NOTIFICATION, + `${notification} notification displayed` + ); + }; } diff --git a/common/v2/services/Analytics/constants.ts b/common/v2/services/Analytics/constants.ts index 043e30585..e681bf7cc 100644 --- a/common/v2/services/Analytics/constants.ts +++ b/common/v2/services/Analytics/constants.ts @@ -14,5 +14,6 @@ export enum ANALYTICS_CATEGORIES { SIDEBAR = 'Sidebar', ROOT = 'Root', DOWNLOAD_DESKTOP = 'Download Desktop App', - HOME = 'Homepage' + HOME = 'Homepage', + NOTIFICATION = 'Notification' } From 446cc4bb1e5aefb55aea9ec18bf5640ca5489aac Mon Sep 17 00:00:00 2001 From: blurpesec Date: Mon, 29 Apr 2019 10:59:09 -0400 Subject: [PATCH 0408/1466] simplified further, added createAccount type --- common/v2/features/AddAccount/AddAccount.tsx | 32 ++++++-------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index e04bb984a..1df1d9012 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -275,30 +275,18 @@ const WalletDecrypt = withRouter( return this.WALLETS[selectedWalletKey]; } - public handleCreateAccount = (createAccount: any) => { + public handleCreateAccount = (createAccount: ((newAccount: Account) => void)) => { const { accountData } = this.state; const network: NetworkOptions | undefined = getNetworkByName(accountData.network); - if (!network) { - const newAccount: Account = { - ...accountData, - assets: 'DefaultAsset', - value: 0, - label: 'New Account', - localSettings: 'default', - transactionHistory: '' - }; - createAccount(newAccount); - } else { - const newAccount: Account = { - ...accountData, - assets: network.unit, - value: 0, - label: 'New Account', - localSettings: 'default', - transactionHistory: '' - }; - createAccount(newAccount); - } + const newAccount: Account = { + ...accountData, + assets: network ? network.unit : 'DefaultAsset', + value: 0, + label: 'New Account', + localSettings: 'default', + transactionHistory: '' + }; + createAccount(newAccount); }; public handleCompleteFlow() { From 5ff9831e86d4d695fd28e607dd816e8c264dd036 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Mon, 29 Apr 2019 13:47:08 -0400 Subject: [PATCH 0409/1466] remove 'confirm address' page --- common/v2/features/AddAccount/AddAccount.tsx | 25 +++++++------------ common/v2/features/DevTools/DevTools.tsx | 3 ++- .../AccountProvider/AccountProvider.tsx | 6 ++--- common/v2/services/Account/types.ts | 1 + common/v2/services/LocalCache/constants.ts | 3 ++- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 1df1d9012..53c9f94ae 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import React, { Component } from 'react'; import { TransitionGroup, CSSTransition } from 'react-transition-group'; -import { withRouter, RouteComponentProps } from 'react-router'; +import { withRouter, RouteComponentProps, Redirect, Route } from 'react-router'; import { connect } from 'react-redux'; import isEmpty from 'lodash/isEmpty'; @@ -49,7 +49,6 @@ import backArrow from 'common/assets/images/icn-back-arrow.svg'; import * as WalletActions from 'v2/features/Wallets'; import { NetworkOptionsContext, AccountContext } from 'v2/providers'; -import { Link } from 'react-router-dom'; import { Account } from 'v2/services/Account/types'; import { Web3Decrypt } from 'components/WalletDecrypt/components/Web3'; import { getNetworkByName } from 'v2/libs'; @@ -290,22 +289,16 @@ const WalletDecrypt = withRouter( }; public handleCompleteFlow() { - const { accountData } = this.state; return ( - {({ createAccount }) => ( -
              - {`You're trying to add an ${accountData.network} address ${ - accountData.address - } to your - dashboard.`} - - - -
              - )} + {({ createAccount }) => { + this.handleCreateAccount(createAccount); + return ( + + + + ); + }}
              ); } diff --git a/common/v2/features/DevTools/DevTools.tsx b/common/v2/features/DevTools/DevTools.tsx index 41a9bd545..94175788e 100644 --- a/common/v2/features/DevTools/DevTools.tsx +++ b/common/v2/features/DevTools/DevTools.tsx @@ -39,7 +39,8 @@ const DevTools = () => { accountType: SecureWalletName.WEB3, value: 0, transactionHistory: '76b50f76-afb2-4185-ab7d-4d62c0654882', - uuid: '61d84f5e-0efa-46b9-915c-aed6ebe5a4dc' + uuid: '61d84f5e-0efa-46b9-915c-aed6ebe5a4dc', + derivationPath: `m/44'/60'/0'/0/0` }} onSubmit={(values: ExtendedAccount, { setSubmitting }) => { createAccount(values); diff --git a/common/v2/providers/AccountProvider/AccountProvider.tsx b/common/v2/providers/AccountProvider/AccountProvider.tsx index ca11e27f6..e6dc59cc9 100644 --- a/common/v2/providers/AccountProvider/AccountProvider.tsx +++ b/common/v2/providers/AccountProvider/AccountProvider.tsx @@ -1,10 +1,10 @@ import React, { Component, createContext } from 'react'; import * as service from 'v2/services/Account/Account'; -import { ExtendedAccount } from 'v2/services/Account'; +import { Account, ExtendedAccount } from 'v2/services/Account'; export interface ProviderState { accounts: ExtendedAccount[]; - createAccount(accountData: ExtendedAccount): void; + createAccount(accountData: Account): void; deleteAccount(uuid: string): void; updateAccount(uuid: string, accountData: ExtendedAccount): void; } @@ -14,7 +14,7 @@ export const AccountContext = createContext({} as ProviderState); export class AccountProvider extends Component { public readonly state: ProviderState = { accounts: service.readAccounts() || [], - createAccount: (accountData: ExtendedAccount) => { + createAccount: (accountData: Account) => { service.createAccount(accountData); this.getAccounts(); }, diff --git a/common/v2/services/Account/types.ts b/common/v2/services/Account/types.ts index 3f828a522..8f78838aa 100644 --- a/common/v2/services/Account/types.ts +++ b/common/v2/services/Account/types.ts @@ -9,6 +9,7 @@ export interface Account { accountType: WalletName; value: number; transactionHistory: string; + derivationPath: string; } export interface ExtendedAccount extends Account { diff --git a/common/v2/services/LocalCache/constants.ts b/common/v2/services/LocalCache/constants.ts index 02c0b1141..ded643828 100644 --- a/common/v2/services/LocalCache/constants.ts +++ b/common/v2/services/LocalCache/constants.ts @@ -45,7 +45,8 @@ export const CACHE_INIT_DEV: LocalCache = { assets: '12d3cbf2-de3a-4050-a0c6-521592e4b85a', accountType: SecureWalletName.WEB3, value: 1e18, - transactionHistory: '76b50f76-afb2-4185-ab7d-4d62c0654882' + transactionHistory: '76b50f76-afb2-4185-ab7d-4d62c0654882', + derivationPath: `m/44'/60'/0'/0/0` } }, transactionHistories: { From 74f4ee5e6fb7a3153669609418af64d2e77ba1a0 Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 29 Apr 2019 19:55:17 +0200 Subject: [PATCH 0410/1466] mark deprecated lifecycle hooks as UNSAFE --- common/components/AddressBookTableRow.tsx | 2 +- common/components/ui/DateTime/DateTime.tsx | 2 +- common/components/ui/DateTime/TimeView.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/components/AddressBookTableRow.tsx b/common/components/AddressBookTableRow.tsx index 497390e13..5474cefda 100644 --- a/common/components/AddressBookTableRow.tsx +++ b/common/components/AddressBookTableRow.tsx @@ -29,7 +29,7 @@ class AddressBookTableRow extends React.Component { private labelInput: HTMLInputElement | null = null; - public componentWillReceiveProps(nextProps: Props) { + public UNSAFE_componentWillReceiveProps(nextProps: Props) { this.setState({ label: nextProps.label, mostRecentValidLabel: nextProps.label }); } diff --git a/common/components/ui/DateTime/DateTime.tsx b/common/components/ui/DateTime/DateTime.tsx index ff781fbd6..7042ed7cd 100644 --- a/common/components/ui/DateTime/DateTime.tsx +++ b/common/components/ui/DateTime/DateTime.tsx @@ -265,7 +265,7 @@ export default class DateTime extends Component { return formats as DatepickerFormats; } - public componentWillReceiveProps(nextProps: Props) { + public UNSAFE_componentWillReceiveProps(nextProps: Props) { const formats = this.getFormats(nextProps); let updatedState: Partial = {}; diff --git a/common/components/ui/DateTime/TimeView.tsx b/common/components/ui/DateTime/TimeView.tsx index 22bbef47d..743ff07ff 100644 --- a/common/components/ui/DateTime/TimeView.tsx +++ b/common/components/ui/DateTime/TimeView.tsx @@ -215,7 +215,7 @@ export default class DateTimePickerTime extends Component { this.setState(this.calculateState(this.props)); } - public componentWillReceiveProps(nextProps: Props) { + public UNSAFE_componentWillReceiveProps(nextProps: Props) { this.setState(this.calculateState(nextProps)); } From 2c4dd84af059b1ca029afaea893e37faf09d1eea Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 29 Apr 2019 19:56:47 +0200 Subject: [PATCH 0411/1466] use new syntax for react-spring Transition --- .../Header/NewHeader/components/MobileHeader.tsx | 15 +++++++++++---- common/containers/TabSection/WebTemplate.tsx | 5 +++-- common/v2/features/Layout/Header/Header.tsx | 15 +++++++++++---- common/v2/providers/DrawerProvider.tsx | 14 ++++++++++---- 4 files changed, 35 insertions(+), 14 deletions(-) diff --git a/common/components/Header/NewHeader/components/MobileHeader.tsx b/common/components/Header/NewHeader/components/MobileHeader.tsx index e12377ac5..fe50f108a 100644 --- a/common/components/Header/NewHeader/components/MobileHeader.tsx +++ b/common/components/Header/NewHeader/components/MobileHeader.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; -import { Transition } from 'react-spring'; +import { Transition } from 'react-spring/renderprops'; import { AnalyticsService, ANALYTICS_CATEGORIES } from 'v2/services'; import { languages } from 'config'; @@ -87,8 +87,14 @@ class MobileHeader extends Component { {/* Dummy
              for flex spacing */}
              - - {menuVisible && + + {visible => + visible && (props => (
                @@ -182,7 +188,8 @@ class MobileHeader extends Component {
              - ))} + )) + }
              ); diff --git a/common/containers/TabSection/WebTemplate.tsx b/common/containers/TabSection/WebTemplate.tsx index ae98d0216..de67b7d65 100644 --- a/common/containers/TabSection/WebTemplate.tsx +++ b/common/containers/TabSection/WebTemplate.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { Transition } from 'react-spring'; +import { Transition } from 'react-spring/renderprops'; import { makeAutoNodeName } from 'libs/nodes'; import { AppState } from 'features/reducers'; @@ -41,11 +41,12 @@ class WebTemplate extends Component { )} /> - {sidebarVisible && ((style: any) => )} + {visible => visible && ((style: any) => )}
              {isUnavailableOffline && isOffline ? : children} diff --git a/common/v2/features/Layout/Header/Header.tsx b/common/v2/features/Layout/Header/Header.tsx index b314b9880..ad52e1db1 100644 --- a/common/v2/features/Layout/Header/Header.tsx +++ b/common/v2/features/Layout/Header/Header.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { Link, withRouter, RouteComponentProps } from 'react-router-dom'; -import { Transition } from 'react-spring'; +import { Transition } from 'react-spring/renderprops'; import { Icon } from '@mycrypto/ui'; import styled from 'styled-components'; @@ -305,8 +305,14 @@ export class Header extends Component, State> { return ( {/* Mobile Menu */} - - {menuOpen && + + {open => + open && ((style: any) => ( @@ -361,7 +367,8 @@ export class Header extends Component, State> { - ))} + )) + } {/* Mobile Left */} diff --git a/common/v2/providers/DrawerProvider.tsx b/common/v2/providers/DrawerProvider.tsx index 97df8f483..034eb99d5 100644 --- a/common/v2/providers/DrawerProvider.tsx +++ b/common/v2/providers/DrawerProvider.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Transition } from 'react-spring'; +import { Transition } from 'react-spring/renderprops'; import { Overlay } from 'v2/components'; import { Drawer } from 'v2/features'; @@ -44,9 +44,15 @@ export default class DrawerProvider extends Component { {children} {visible && } - - {visible && - ((style: any) => )} + + {show => + show && ((style: any) => ) + } ); From 4b7c9fb5eca46a8b194ea198313bffe564aa0df2 Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 29 Apr 2019 20:16:05 +0200 Subject: [PATCH 0412/1466] update react, react-dom, react-hot-loader, react-spring and react-transition-group --- package.json | 44 +++++++----------- yarn.lock | 129 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 107 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index 64ce746e0..9d47930c6 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,7 @@ "classnames": "2.2.5", "electron-updater": "2.21.10", "ethereum-blockies-base64": "1.0.2", - "ethereumjs-abi": - "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", + "ethereumjs-abi": "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796", "ethereumjs-tx": "1.3.4", "ethereumjs-util": "5.1.5", "ethereumjs-wallet": "0.6.0", @@ -47,9 +46,9 @@ "qrcode.react": "0.8.0", "query-string": "6.0.0", "rc-slider": "8.6.0", - "react": "16.5.2", + "react": "16.8.6", "react-copy-to-clipboard": "5.0.1", - "react-dom": "16.5.2", + "react-dom": "16.8.6", "react-markdown": "3.3.0", "react-onclickoutside": "6.7.1", "react-redux": "5.0.7", @@ -57,9 +56,9 @@ "react-router-redux": "4.0.8", "react-select": "1.2.1", "react-slick": "0.23.2", - "react-spring": "5.9.2", + "react-spring": "v8.0", "react-stepper-horizontal": "1.0.9", - "react-transition-group": "2.3.1", + "react-transition-group": "4.0.0", "redux": "3.7.2", "redux-logger": "3.0.6", "redux-saga": "0.16.0", @@ -93,12 +92,12 @@ "@types/query-string": "5.1.0", "@types/rc-slider": "8.2.3", "@types/react": "16.8.7", - "@types/react-dom": "16.0.5", + "@types/react-dom": "16.8.4", "@types/react-redux": "5.0.15", "@types/react-router-dom": "4.2.6", "@types/react-router-redux": "5.0.13", "@types/react-select": "1.2.6", - "@types/react-transition-group": "2.0.8", + "@types/react-transition-group": "2.9.0", "@types/redux-logger": "3.0.5", "@types/semver": "5.5.0", "@types/styled-components": "4.0.3", @@ -140,7 +139,7 @@ "null-loader": "0.1.1", "prettier": "1.11.1", "raw-loader": "0.5.1", - "react-hot-loader": "4.0.0", + "react-hot-loader": "4.8.4", "react-test-renderer": "16.3.2", "redux-devtools-extension": "2.13.2", "redux-test-utils": "0.2.2", @@ -181,19 +180,13 @@ "prebuild": "check-node-version --package", "build:downloadable": "webpack --mode=production --config webpack_config/webpack.html.js", "prebuild:downloadable": "check-node-version --package", - "build:electron": - "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", - "build:electron:osx": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=osx node webpack_config/buildElectron.js", - "build:electron:windows": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=windows node webpack_config/buildElectron.js", - "build:electron:linux": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=linux node webpack_config/buildElectron.js", + "build:electron": "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js", + "build:electron:osx": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=osx node webpack_config/buildElectron.js", + "build:electron:windows": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=windows node webpack_config/buildElectron.js", + "build:electron:linux": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=linux node webpack_config/buildElectron.js", "prebuild:electron": "check-node-version --package", - "jenkins:build:linux": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", - "jenkins:build:mac": - "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", + "jenkins:build:linux": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js", + "jenkins:build:mac": "webpack --config webpack_config/webpack.electron-prod.js && cross-env ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js", "jenkins:upload": "node jenkins/upload", "test:coverage": "jest --config=jest_config/jest.config.json --coverage", "test": "jest --config=jest_config/jest.config.json", @@ -206,16 +199,13 @@ "predev": "check-node-version --package", "dev:https": "cross-env HTTPS=true node webpack_config/devServer.js", "predev:https": "check-node-version --package", - "dev:electron": - "concurrently --kill-others --names \"webpack,electron\" \"cross-env BUILD_ELECTRON=true node webpack_config/devServer.js\" \"webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js\"", + "dev:electron": "concurrently --kill-others --names \"webpack,electron\" \"cross-env BUILD_ELECTRON=true node webpack_config/devServer.js\" \"webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js\"", "tslint": "tslint --project . --exclude common/vendor/**/*", "tscheck": "tsc --noEmit", "start": "npm run dev", "precommit": "lint-staged", - "formatAll": - "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", - "prettier:diff": - "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", + "formatAll": "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", + "prettier:diff": "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"", "update:tokens": "ts-node scripts/update-tokens", "postinstall": "electron-builder install-app-deps" }, diff --git a/yarn.lock b/yarn.lock index 607183915..8b70ded94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -155,7 +155,14 @@ core-js "^2.5.3" regenerator-runtime "^0.11.1" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1": +"@babel/runtime@^7.1.2": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.4.tgz#dc2e34982eb236803aa27a07fea6857af1b9171d" + integrity sha512-w0+uT71b6Yi7i5SE0co4NioIpSYS6lLiXvCzWzGSKvpK5vdQtCbICHMj+gbAKAOtxiV6HsVh/MBdaF9EQ6faSg== + dependencies: + regenerator-runtime "^0.13.2" + +"@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1": version "7.3.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.4.tgz#73d12ba819e365fcf7fd152aed56d6df97d21c83" dependencies: @@ -623,11 +630,11 @@ dependencies: "@types/react" "*" -"@types/react-dom@16.0.5": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.5.tgz#a757457662e3819409229e8f86795ff37b371f96" +"@types/react-dom@16.8.4": + version "16.8.4" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.8.4.tgz#7fb7ba368857c7aa0f4e4511c4710ca2c5a12a88" + integrity sha512-eIRpEW73DCzPIMaNBDP5pPIpK1KXyZwNgfxiVagb5iGiz6da+9A5hslSX6GAQKdO7SayVCS/Fr2kjqprgAvkfA== dependencies: - "@types/node" "*" "@types/react" "*" "@types/react-inlinesvg@^0.8.0": @@ -680,9 +687,10 @@ dependencies: "@types/react" "*" -"@types/react-transition-group@2.0.8": - version "2.0.8" - resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-2.0.8.tgz#1ea86f6d8288e4bba8d743317ba9cc61cdacc1ad" +"@types/react-transition-group@2.9.0": + version "2.9.0" + resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-2.9.0.tgz#2a74a885432d673a93a2c93c34ce5dbf9f1426f8" + integrity sha512-hP7vUaZMVSWKxo133P8U51U6UZ7+pbY+eAQb8+p6SZ2rB1rj3mOTDgTzhhi+R2SCB4S+sWekAAGoxdiZPG0ReQ== dependencies: "@types/react" "*" @@ -3923,9 +3931,12 @@ dom-converter@~0.1: dependencies: utila "~0.3" -dom-helpers@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.3.1.tgz#fc1a4e15ffdf60ddde03a480a9c0fece821dd4a6" +dom-helpers@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" + integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA== + dependencies: + "@babel/runtime" "^7.1.2" dom-serializer@0, dom-serializer@~0.1.0: version "0.1.0" @@ -6018,6 +6029,13 @@ hoist-non-react-statics@^2.5.5: version "2.5.5" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" +hoist-non-react-statics@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b" + integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA== + dependencies: + react-is "^16.7.0" + home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" @@ -7551,7 +7569,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-tokens@^4.0.0: +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -8268,6 +8286,13 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3 dependencies: js-tokens "^3.0.0" +loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + loud-rejection@^1.0.0, loud-rejection@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -10513,14 +10538,15 @@ react-copy-to-clipboard@5.0.1: copy-to-clipboard "^3" prop-types "^15.5.8" -react-dom@16.5.2: - version "16.5.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.5.2.tgz#b69ee47aa20bab5327b2b9d7c1fe2a30f2cfa9d7" +react-dom@16.8.6: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f" + integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - schedule "^0.5.0" + scheduler "^0.13.6" react-dom@^15.3.2: version "15.6.2" @@ -10535,15 +10561,20 @@ react-fast-compare@^1.0.0: version "1.0.0" resolved "http://registry.npmjs.org/react-fast-compare/-/react-fast-compare-1.0.0.tgz#813a039155e49b43ceffe99528fe5e9d97a6c938" -react-hot-loader@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.0.0.tgz#3452fa9bc0d0ba9dfc5b0ccfa25101ca8dbd2de2" +react-hot-loader@4.8.4: + version "4.8.4" + resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.8.4.tgz#357ba342e367fd42d6a870a9c0601c23fa0730c6" + integrity sha512-O98btZXcm24ZgP+aPBD0W9N+GEnkOg6vlLEy/IMZ53u3K/dGqO0I/RU4qrmQzE+wMDLpwNo5TwxaAjVw9Y+IBA== dependencies: fast-levenshtein "^2.0.6" global "^4.3.0" - hoist-non-react-statics "^2.5.0" - prop-types "^15.6.0" + hoist-non-react-statics "^3.3.0" + loader-utils "^1.1.0" + lodash "^4.17.11" + prop-types "^15.6.1" + react-lifecycles-compat "^3.0.4" shallowequal "^1.0.2" + source-map "^0.7.3" react-inlinesvg@^0.8.3: version "0.8.4" @@ -10568,11 +10599,16 @@ react-is@^16.3.2: version "16.3.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.3.2.tgz#f4d3d0e2f5fbb6ac46450641eb2e25bf05d36b22" -react-is@^16.8.4: +react-is@^16.7.0, react-is@^16.8.4: version "16.8.6" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== +react-lifecycles-compat@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== + react-markdown@3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-3.3.0.tgz#a87cdd822aa9302d6add9687961dd1a82a45d02e" @@ -10661,11 +10697,12 @@ react-slick@0.23.2: prettier "^1.14.3" resize-observer-polyfill "^1.5.0" -react-spring@5.9.2: - version "5.9.2" - resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-5.9.2.tgz#4c4e048ffce24755eaa60acd2f3fe4a3d686ef16" +react-spring@v8.0: + version "8.0.19" + resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-8.0.19.tgz#62f4f396b4b73fa402838200a1c80374338cb12e" + integrity sha512-DjrwjXqqVEitj6e6GqdW5dUp1BoVyeFQhEcXvPfoQxwyIVSJ9smNt8CNjSvoQqRujVllE7XKaJRWSZO/ewd1/A== dependencies: - "@babel/runtime" "^7.0.0" + "@babel/runtime" "^7.3.1" react-stepper-horizontal@1.0.9: version "1.0.9" @@ -10684,22 +10721,24 @@ react-test-renderer@16.3.2, react-test-renderer@^16.0.0-0: prop-types "^15.6.0" react-is "^16.3.2" -react-transition-group@2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.3.1.tgz#31d611b33e143a5e0f2d94c348e026a0f3b474b6" +react-transition-group@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.0.0.tgz#1d82b20d78aa09eac6268ceef0349307146942c6" + integrity sha512-b+uvkr15Pb80mqcsz5WAB+d53zS8/pTp3wDEsOiqpea93G8BqfsMFcPv2XZR0owqU13BJWoJvd17VjOPEY/9aA== dependencies: - dom-helpers "^3.3.1" - loose-envify "^1.3.1" - prop-types "^15.6.1" + dom-helpers "^3.4.0" + loose-envify "^1.4.0" + prop-types "^15.6.2" -react@16.5.2: - version "16.5.2" - resolved "https://registry.yarnpkg.com/react/-/react-16.5.2.tgz#19f6b444ed139baa45609eee6dc3d318b3895d42" +react@16.8.6: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" + integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - schedule "^0.5.0" + scheduler "^0.13.6" react@^15.3.2: version "15.6.2" @@ -10966,6 +11005,11 @@ regenerator-runtime@^0.12.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== +regenerator-runtime@^0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" + integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA== + regenerator-transform@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" @@ -11491,10 +11535,12 @@ sc-formatter@~3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/sc-formatter/-/sc-formatter-3.0.2.tgz#9abdb14e71873ce7157714d3002477bbdb33c4e6" -schedule@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/schedule/-/schedule-0.5.0.tgz#c128fffa0b402488b08b55ae74bb9df55cc29cc8" +scheduler@^0.13.6: + version "0.13.6" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" + integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== dependencies: + loose-envify "^1.1.0" object-assign "^4.1.1" schema-utils@^0.4.0, schema-utils@^0.4.2, schema-utils@^0.4.5: @@ -11910,6 +11956,11 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" +source-map@^0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" + integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== + sparkles@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" From 709a5f5101e9fdf1158191a58876fbf7254a0894 Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 29 Apr 2019 20:16:44 +0200 Subject: [PATCH 0413/1466] use defaultValue to remove warning --- common/v2/features/Dashboard/components/WalletBreakdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.tsx b/common/v2/features/Dashboard/components/WalletBreakdown.tsx index 02d11ca7c..99345a6d9 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.tsx +++ b/common/v2/features/Dashboard/components/WalletBreakdown.tsx @@ -38,7 +38,7 @@ export default function WalletBreakdown() {
              From 4ff4a96f4332f97d2060e6f5aef1d91392c46c5b Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 29 Apr 2019 21:33:11 +0200 Subject: [PATCH 0414/1466] use .cjs import for react-spring --- .../components/Header/NewHeader/components/MobileHeader.tsx | 5 ++++- common/containers/TabSection/WebTemplate.tsx | 2 +- common/v2/features/Layout/Header/Header.tsx | 2 +- common/v2/providers/DrawerProvider.tsx | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/common/components/Header/NewHeader/components/MobileHeader.tsx b/common/components/Header/NewHeader/components/MobileHeader.tsx index fe50f108a..edded1c22 100644 --- a/common/components/Header/NewHeader/components/MobileHeader.tsx +++ b/common/components/Header/NewHeader/components/MobileHeader.tsx @@ -1,7 +1,10 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; -import { Transition } from 'react-spring/renderprops'; + +// Default import breaks jest so we use `.cjs` instead. +// https://github.com/react-spring/react-spring/issues/601 +import { Transition } from 'react-spring/renderprops.cjs'; import { AnalyticsService, ANALYTICS_CATEGORIES } from 'v2/services'; import { languages } from 'config'; diff --git a/common/containers/TabSection/WebTemplate.tsx b/common/containers/TabSection/WebTemplate.tsx index de67b7d65..d395f9da6 100644 --- a/common/containers/TabSection/WebTemplate.tsx +++ b/common/containers/TabSection/WebTemplate.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { Transition } from 'react-spring/renderprops'; +import { Transition } from 'react-spring/renderprops.cjs'; import { makeAutoNodeName } from 'libs/nodes'; import { AppState } from 'features/reducers'; diff --git a/common/v2/features/Layout/Header/Header.tsx b/common/v2/features/Layout/Header/Header.tsx index ad52e1db1..7cea0bd41 100644 --- a/common/v2/features/Layout/Header/Header.tsx +++ b/common/v2/features/Layout/Header/Header.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { Link, withRouter, RouteComponentProps } from 'react-router-dom'; -import { Transition } from 'react-spring/renderprops'; +import { Transition } from 'react-spring/renderprops.cjs'; import { Icon } from '@mycrypto/ui'; import styled from 'styled-components'; diff --git a/common/v2/providers/DrawerProvider.tsx b/common/v2/providers/DrawerProvider.tsx index 034eb99d5..826e5626c 100644 --- a/common/v2/providers/DrawerProvider.tsx +++ b/common/v2/providers/DrawerProvider.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Transition } from 'react-spring/renderprops'; +import { Transition } from 'react-spring/renderprops.cjs'; import { Overlay } from 'v2/components'; import { Drawer } from 'v2/features'; From b229b0034169cc8a35702be7b56e6b6b7afd426e Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 29 Apr 2019 21:33:39 +0200 Subject: [PATCH 0415/1466] remove unsued config file --- jest_config/jest.int.config.json | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 jest_config/jest.int.config.json diff --git a/jest_config/jest.int.config.json b/jest_config/jest.int.config.json deleted file mode 100644 index cc7510549..000000000 --- a/jest_config/jest.int.config.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "rootDir": "../", - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "testRegex": "(/__tests__/.*|(\\.|/)(int))\\.(jsx?|tsx?)$", - "moduleDirectories": ["node_modules", "common"], - "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json"], - "moduleNameMapper": { - "shared/(.*)": "/shared/$1", - "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": - "/jest_config/__mocks__/fileMock.ts", - "\\.(css|scss)$": "/jest_config/__mocks__/styleMock.ts" - }, - "testPathIgnorePatterns": [], - "setupFiles": [ - "/jest_config/setupJest.js", - "/jest_config/__mocks__/localStorage.ts" - ], - "automock": false, - "snapshotSerializers": ["enzyme-to-json/serializer"], - "browser": true, - "collectCoverage": true, - "globals": { - "ts-jest": { - "diagnostics": false - } - } -} From 81a1b0de268b5dfbd7790e8d88b6846996684cfc Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 29 Apr 2019 15:56:27 -0400 Subject: [PATCH 0416/1466] refactored stateless AccountList class to functions --- .../Dashboard/components/AccountList.tsx | 134 +++++++++--------- 1 file changed, 65 insertions(+), 69 deletions(-) diff --git a/common/v2/features/Dashboard/components/AccountList.tsx b/common/v2/features/Dashboard/components/AccountList.tsx index d45acc309..387c7af44 100644 --- a/common/v2/features/Dashboard/components/AccountList.tsx +++ b/common/v2/features/Dashboard/components/AccountList.tsx @@ -1,5 +1,5 @@ import { Address, Button, CollapsibleTable, Icon, Network, Typography } from '@mycrypto/ui'; -import React, { Component } from 'react'; +import React from 'react'; import { Redirect } from 'react-router-dom'; import styled from 'styled-components'; import { truncate } from 'v2/libs'; @@ -7,10 +7,31 @@ import { ExtendedAccount } from 'v2/services'; import './AccountList.scss'; import DashboardPanel from './DashboardPanel'; -interface Props { +type DeleteAccount = (uuid: string) => void; +interface AccountListProps { accounts: ExtendedAccount[]; className?: string; - deleteAccount(uuid: string): void; + deleteAccount: DeleteAccount; +} + +export default function AccountList(props: AccountListProps) { + const { accounts, deleteAccount, className } = props; + + const shouldRedirect = accounts === undefined || accounts === null || accounts.length === 0; + if (shouldRedirect) { + return ; + } + + return ( + + + + ); } const DeleteButton = styled(Button)` @@ -18,72 +39,47 @@ const DeleteButton = styled(Button)` margin-left: 1em; `; -export default class AccountList extends Component { - public handleAccountDelete = (uuid: string) => () => { - const { deleteAccount } = this.props; - deleteAccount(uuid); - }; - - public renderRedirect() { - if ( - this.props.accounts === undefined || - this.props.accounts === null || - this.props.accounts.length === 0 - ) { - return ; +function buildAccountTable(accounts: ExtendedAccount[], deleteAccount: DeleteAccount) { + return { + head: ['Favorite', 'Address', 'Network', 'Value', 'Delete'], + body: accounts.map(account => { + return [ + , +
              , + + {account.network} + , + {account.value}, + + ]; + }), + config: { + primaryColumn: 'Address', + sortableColumn: 'Address', + sortFunction: (a: any, b: any) => { + const aLabel = a.props.label; + const bLabel = b.props.label; + return aLabel === bLabel ? true : aLabel.localeCompare(bLabel); + }, + hiddenHeadings: ['Favorite', 'Delete'], + iconColumns: ['Favorite', 'Delete'] } - } - - public BuildAccountList() { - const { accounts } = this.props; - return { - head: ['Favorite', 'Address', 'Network', 'Value', 'Delete'], - body: accounts.map(account => { - return [ - , -
              , - - {account.network} - , - {account.value}, - - ]; - }), - config: { - primaryColumn: 'Address', - sortableColumn: 'Address', - sortFunction: (a: any, b: any) => { - const aLabel = a.props.label; - const bLabel = b.props.label; - return aLabel === bLabel ? true : aLabel.localeCompare(bLabel); - }, - hiddenHeadings: ['Favorite', 'Delete'], - iconColumns: ['Favorite', 'Delete'] - } - }; - } - public render() { - const { className } = this.props; + }; +} - return ( - - - {this.renderRedirect()} - - ); - } +/** + * A higher order function that binds to an account uuid, which returns a handler that will + * delete the bound account onClick + */ +function handleAccountDelete(deleteAccount: DeleteAccount, uuid: string) { + return () => deleteAccount(uuid); } From dee65555d612a5f74c95b8ed522d094e33caf8df Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Mon, 29 Apr 2019 15:58:02 -0400 Subject: [PATCH 0417/1466] Fix Select Network and Node layout --- common/v2/features/AddAccount/AddAccount.tsx | 6 +++--- common/v2/features/AddAccount/AddAccountStyles.scss | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 53c9f94ae..6dbb01ffd 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -497,11 +497,11 @@ const WalletDecrypt = withRouter(
              -
              Select Network
              +
              Select Network and Node
              - Select the blockchain that you want to operate with. Not sure what to choose? Stick - with the default choices below and click next. + Select the blockchain that you want to operate with and the node it connects through. + Not sure what to choose? Stick with the default choices below and click next.
              diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index 18331d495..b9d29ff64 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -42,7 +42,6 @@ $speed: 500ms; position: relative; } &-title { - width: 421px; height: 39px; font-family: Lato; font-size: 32px; @@ -52,6 +51,7 @@ $speed: 500ms; line-height: normal; letter-spacing: normal; color: var(--dark-slate-blue); + text-align: center; &-connectDevice { justify-content: center; @@ -75,7 +75,6 @@ $speed: 500ms; } &-description { - width: 417px; height: 108px; font-family: Lato; font-size: 18px; @@ -87,10 +86,11 @@ $speed: 500ms; color: #333333; padding-top: 16px; position: relative; + text-align: center; &-button { - width: 417px; position: absolute; bottom: 50px; + width: calc(100% - 140px); } } &-networkLabel { @@ -99,7 +99,6 @@ $speed: 500ms; font-family: Lato; font-size: 15px; color: var(--dark-slate-blue); - padding: 16px; } &-dropdown { padding-top: 10px; From f9faf9eedab6ea565370f0cbbfc69f9ee2df1e4a Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 29 Apr 2019 16:53:21 -0400 Subject: [PATCH 0418/1466] styling changes and added translateable strings --- common/translations/lang/en.json | 10 +++- .../Dashboard/components/AccountList.tsx | 52 +++++++++++-------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index fe87253c1..9a13af6db 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -789,6 +789,14 @@ "DOWNLOAD_APP_FOOTER_INFO": "Not sure what this is?", "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app.", "NO_ACCOUNTS_HEADER":"You don't have any accounts in your wallet.", - "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now." + "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now.", + "ACCOUNT_LIST_TABLE_YOUR_ACCOUNTS":"Your Accounts", + "ACCOUNT_LIST_TABLE_ADD_ACCOUNT": "Add Account", + "ACCOUNT_LIST_FAVOURITE": "Favorite", + "ACCOUNT_LIST_ADDRESS": "Address", + "ACCOUNT_LIST_NETWORK":"Network", + "ACCOUNT_LIST_VALUE": "Value", + "ACCOUNT_LIST_DELETE": "Delete" + } } diff --git a/common/v2/features/Dashboard/components/AccountList.tsx b/common/v2/features/Dashboard/components/AccountList.tsx index 387c7af44..0f37429d8 100644 --- a/common/v2/features/Dashboard/components/AccountList.tsx +++ b/common/v2/features/Dashboard/components/AccountList.tsx @@ -1,11 +1,18 @@ import { Address, Button, CollapsibleTable, Icon, Network, Typography } from '@mycrypto/ui'; import React from 'react'; import { Redirect } from 'react-router-dom'; + import styled from 'styled-components'; import { truncate } from 'v2/libs'; import { ExtendedAccount } from 'v2/services'; import './AccountList.scss'; import DashboardPanel from './DashboardPanel'; +import { translateRaw } from 'translations'; + +const DeleteButton = styled(Button)` + align-self: flex-start; + margin-left: 1em; +`; type DeleteAccount = (uuid: string) => void; interface AccountListProps { @@ -24,8 +31,8 @@ export default function AccountList(props: AccountListProps) { return ( @@ -34,44 +41,43 @@ export default function AccountList(props: AccountListProps) { ); } -const DeleteButton = styled(Button)` - align-self: flex-start; - margin-left: 1em; -`; - function buildAccountTable(accounts: ExtendedAccount[], deleteAccount: DeleteAccount) { return { - head: ['Favorite', 'Address', 'Network', 'Value', 'Delete'], + head: [ + translateRaw('ACCOUNT_LIST_FAVOURITE'), + translateRaw('ACCOUNT_LIST_ADDRESS'), + translateRaw('ACCOUNT_LIST_NETWORK'), + translateRaw('ACCOUNT_LIST_VALUE'), + translateRaw('ACCOUNT_LIST_DELETE') + ], body: accounts.map(account => { return [ - , + // tslint:disable-next-line: jsx-key + , + // tslint:disable-next-line: jsx-key
              , - - {account.network} - , - {account.value}, - + // tslint:disable-next-line: jsx-key + {account.network}, + // tslint:disable-next-line: jsx-key + {account.value}, + // tslint:disable-next-line: jsx-key + ]; }), config: { - primaryColumn: 'Address', - sortableColumn: 'Address', + primaryColumn: translateRaw('ACCOUNT_LIST_ADDRESS'), + sortableColumn: translateRaw('ACCOUNT_LIST_ADDRESS'), sortFunction: (a: any, b: any) => { const aLabel = a.props.label; const bLabel = b.props.label; return aLabel === bLabel ? true : aLabel.localeCompare(bLabel); }, - hiddenHeadings: ['Favorite', 'Delete'], - iconColumns: ['Favorite', 'Delete'] + hiddenHeadings: [translateRaw('ACCOUNT_LIST_FAVOURITE'), translateRaw('ACCOUNT_LIST_DELETE')], + iconColumns: [translateRaw('ACCOUNT_LIST_FAVOURITE'), translateRaw('ACCOUNT_LIST_DELETE')] } }; } From d3c9399e86f901c95f7451403b882a740f98e0e0 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Mon, 29 Apr 2019 17:30:03 -0400 Subject: [PATCH 0419/1466] Fix wording for network only --- common/v2/features/AddAccount/AddAccount.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 6dbb01ffd..152c3955c 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -497,11 +497,11 @@ const WalletDecrypt = withRouter(
              -
              Select Network and Node
              +
              Select Network
              - Select the blockchain that you want to operate with and the node it connects through. - Not sure what to choose? Stick with the default choices below and click next. + Select the blockchain that you want to operate with. Not sure what to choose? Stick + with the default choice below and click next.
              From 3f5e26e7cc357a7f059681975a755106fbf65e9f Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 29 Apr 2019 22:10:31 -0400 Subject: [PATCH 0420/1466] improved styling of all wallets in add-existing-account-views --- common/translations/lang/en.json | 14 ++-- .../features/AddAccount/AddAccountStyles.scss | 3 +- .../AddAccount/components/Keystore.scss | 8 ++ .../AddAccount/components/Keystore.tsx | 78 ++++++++++--------- .../AddAccount/components/LedgerNano.scss | 6 +- .../AddAccount/components/LedgerNano.tsx | 2 +- .../AddAccount/components/Mnemonic.scss | 9 +++ .../AddAccount/components/Mnemonic.tsx | 72 +++++++++-------- .../AddAccount/components/ParitySigner.scss | 8 +- .../AddAccount/components/PrivateKey.scss | 13 ++++ .../AddAccount/components/PrivateKey.tsx | 78 +++++++++++-------- .../features/AddAccount/components/SafeT.scss | 10 +++ .../features/AddAccount/components/SafeT.tsx | 6 +- .../AddAccount/components/Trezor.scss | 11 +++ .../features/AddAccount/components/Trezor.tsx | 7 +- 15 files changed, 207 insertions(+), 118 deletions(-) create mode 100644 common/v2/features/AddAccount/components/Keystore.scss create mode 100644 common/v2/features/AddAccount/components/Mnemonic.scss create mode 100644 common/v2/features/AddAccount/components/PrivateKey.scss diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index fe87253c1..b28795456 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -82,12 +82,13 @@ "HOWTO_TREZOR": "How to use TREZOR with MyCrypto", "X_KEEPKEY": "KeepKey", "UNLOCK_WALLET": "Connect and Unlock Your $wallet", - "SIGNER_SELECT_WALLET": "Select an account from your Parity Signer", - "SIGNER_SELECT_WALLET_QR": "or scan a QR code with an address to use a new account", + "SIGNER_SELECT_WALLET": "Connect and Unlock with Parity Signer", + "SIGNER_SELECT_WALLET_QR": "Open your Parity Signer app on your phone and scane the QR code.", "SIGNER_SELECT_WALLET_LIST": "Use a recent account", - "X_SAFE_T": "Safe-T mini ", - "ADD_SAFE_T_SCAN": "Connect to Safe-T mini ", - "ORDER_SAFE_T": "Don’t have a Safe-T mini? Order one now!", + "X_SAFE_T": "Safe-T Mini ", + "ADD_SAFE_T_SCAN": "Connect to Safe-T Mini ", + "SAFET_MINI_DESCRIPTION":"Afer you've connected, follow the instructions on screen to access your account.", + "ORDER_SAFE_T": "Don’t have a Safe-T Mini? Order one now!", "X_PARITYSIGNER": "Parity Signer ", "ADD_VIEW_ADDRESS_DESC": "View your account & balances using only your address ", "ADD_PARITY_DESC": "Connect & sign via your Parity Signer mobile app ", @@ -789,6 +790,7 @@ "DOWNLOAD_APP_FOOTER_INFO": "Not sure what this is?", "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app.", "NO_ACCOUNTS_HEADER":"You don't have any accounts in your wallet.", - "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now." + "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now.", + "PRIVATE_KEY_HELP":"Not working? [Here's some troubleshooting tips to try.] ($link)" } } diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index b9d29ff64..8f91b62b7 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -16,6 +16,7 @@ $speed: 500ms; @mixin decrypt-title { text-align: center; + justify-content: center; line-height: 1; margin: $space 0 2rem; font-weight: normal; @@ -56,7 +57,7 @@ $speed: 500ms; &-connectDevice { justify-content: center; text-align: center; - width: 421px; + // width: 421px; height: auto; font-family: Lato; font-size: 32px; diff --git a/common/v2/features/AddAccount/components/Keystore.scss b/common/v2/features/AddAccount/components/Keystore.scss new file mode 100644 index 000000000..a9a4374a2 --- /dev/null +++ b/common/v2/features/AddAccount/components/Keystore.scss @@ -0,0 +1,8 @@ +.Keystore { + position: relative; + &-img { + display: flex; + justify-content: center; + margin: 4em; + } +} diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 66e9f56bc..4aec6bfba 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -5,6 +5,8 @@ import { isKeystorePassRequired } from 'libs/wallet'; import { notificationsActions } from 'features/notifications'; import Spinner from 'components/ui/Spinner'; import { Input } from 'components/ui'; +import PrivateKeyicon from 'common/assets/images/icn-privatekey-new.svg'; +import './Keystore.scss'; export interface KeystoreValue { file: string; @@ -44,41 +46,47 @@ export class KeystoreDecrypt extends PureComponent { const unlockDisabled = !file || (passReq && !password); return ( -
              -
              - - - - - - {isWalletPending ? : ''} - 0} - className={`${file.length && isWalletPending ? 'hidden' : ''}`} - disabled={!file} - value={password} - onChange={this.onPasswordChange} - onKeyDown={this.onKeyDown} - placeholder={translateRaw('INPUT_PASSWORD_LABEL')} - type="password" - /> -
              - - - +
              +
              +
              +
              + +
              + + + + + + + {isWalletPending ? : ''} + 0} + className={`${file.length && isWalletPending ? 'hidden' : ''}`} + disabled={!file} + value={password} + onChange={this.onPasswordChange} + onKeyDown={this.onKeyDown} + placeholder={translateRaw('INPUT_PASSWORD_LABEL')} + type="password" + /> +
              + + + +
              ); } diff --git a/common/v2/features/AddAccount/components/LedgerNano.scss b/common/v2/features/AddAccount/components/LedgerNano.scss index f49069a75..87bedf09d 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.scss +++ b/common/v2/features/AddAccount/components/LedgerNano.scss @@ -12,7 +12,6 @@ } &-description { - width: 417px; height: 500px; font-family: Lato; font-size: 18px; @@ -28,11 +27,12 @@ align-content: center; &-button { width: 417px; - bottom: 50px; - position: absolute; + position: relative; + width: calc(100% - 140px); } } &-image { vertical-align: center; + margin: 4em; } } diff --git a/common/v2/features/AddAccount/components/LedgerNano.tsx b/common/v2/features/AddAccount/components/LedgerNano.tsx index 5cd461730..e32714915 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.tsx +++ b/common/v2/features/AddAccount/components/LedgerNano.tsx @@ -85,7 +85,7 @@ class LedgerNanoSDecryptClass extends PureComponent {
              {translate('LEDGER_TIP')} -
              +
              diff --git a/common/v2/features/AddAccount/components/Mnemonic.scss b/common/v2/features/AddAccount/components/Mnemonic.scss new file mode 100644 index 000000000..59672b575 --- /dev/null +++ b/common/v2/features/AddAccount/components/Mnemonic.scss @@ -0,0 +1,9 @@ +.Mnemonic { + position: relative; + + &-img { + display: flex; + justify-content: center; + margin: 3em; + } +} diff --git a/common/v2/features/AddAccount/components/Mnemonic.tsx b/common/v2/features/AddAccount/components/Mnemonic.tsx index b38b16985..63bc6b953 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.tsx +++ b/common/v2/features/AddAccount/components/Mnemonic.tsx @@ -10,6 +10,8 @@ import { configSelectors, configNetworksStaticSelectors } from 'features/config' import { TogglablePassword } from 'components'; import { Input } from 'components/ui'; import DeterministicWallets from './DeterministicWallets'; +import PrivateKeyicon from 'common/assets/images/icn-privatekey-new.svg'; +import './Mnemonic.scss'; interface OwnProps { seed: string; @@ -63,38 +65,44 @@ class MnemonicDecryptClass extends PureComponent { ); } else { return ( -
              -
              - -
              -
              -

              {translate('ADD_LABEL_8')}

              - -
              -
              - +
              +
              +
              + +
              + +
              + +
              +
              +

              {translate('ADD_LABEL_8')}

              + +
              +
              + +
              ); diff --git a/common/v2/features/AddAccount/components/ParitySigner.scss b/common/v2/features/AddAccount/components/ParitySigner.scss index 6ac13f825..e206abdfb 100644 --- a/common/v2/features/AddAccount/components/ParitySigner.scss +++ b/common/v2/features/AddAccount/components/ParitySigner.scss @@ -1,10 +1,14 @@ @import 'common/sass/variables'; .ParitySigner { + position: relative; + justify-content: center; + text-align: center; &-badge { display: inline-block; height: 3em; margin: 0 0.4em; + margin-bottom: 2em; } &-fields { display: flex; @@ -31,7 +35,9 @@ text-align: center; line-height: 1; margin: $space 0 2rem; - font-weight: normal; animation: decrypt-enter 500ms ease 1; + font-family: Lato; + font-size: 32px; + font-weight: bold; } } diff --git a/common/v2/features/AddAccount/components/PrivateKey.scss b/common/v2/features/AddAccount/components/PrivateKey.scss new file mode 100644 index 000000000..077e79a2a --- /dev/null +++ b/common/v2/features/AddAccount/components/PrivateKey.scss @@ -0,0 +1,13 @@ +.PrivateKey { + position: relative; + &-img { + display: flex; + justify-content: center; + margin: 4em; + } + &-help { + display: flex; + justify-content: center; + margin: 2rem; + } +} diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index de5186b8d..9467592db 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -6,7 +6,7 @@ import { stripHexPrefix } from 'libs/formatters'; import { TogglablePassword } from 'components'; import { Input } from 'components/ui'; import PrivateKeyicon from 'common/assets/images/icn-privatekey-new.svg'; - +import './PrivateKey.scss'; export interface PrivateKeyValue { key: string; password: string; @@ -48,6 +48,8 @@ interface Props { onUnlock(): void; } +const privateKeyHelpLink = + 'https://support.mycrypto.com/troubleshooting/accessing-wallet/private-key-not-working'; export class PrivateKeyDecrypt extends PureComponent { public render() { const { key, password } = this.props.value; @@ -55,40 +57,48 @@ export class PrivateKeyDecrypt extends PureComponent { const unlockDisabled = !isValidPkey || (isPassRequired && !password.length); return ( -
              - -
              - +
              + +
              + +
              + +
              + +
              + {isValidPkey && + isPassRequired && ( +
              + +
              + )} + + +
              + {translate('PRIVATE_KEY_HELP', { $wiki_link: privateKeyHelpLink })}
              - {isValidPkey && - isPassRequired && ( -
              - -
              - )} - - +
              ); } diff --git a/common/v2/features/AddAccount/components/SafeT.scss b/common/v2/features/AddAccount/components/SafeT.scss index c4e330839..095f70c2b 100644 --- a/common/v2/features/AddAccount/components/SafeT.scss +++ b/common/v2/features/AddAccount/components/SafeT.scss @@ -1,6 +1,16 @@ .SafeTminiDecrypt { text-align: center; + &-description { + margin: 2em; + height: 54px; + font-family: Lato; + font-size: 18px; + } + &-img { + margin: 4em; + } + &-help { margin-top: 10px; font-size: 13px; diff --git a/common/v2/features/AddAccount/components/SafeT.tsx b/common/v2/features/AddAccount/components/SafeT.tsx index bdbf8b815..43bf3e490 100644 --- a/common/v2/features/AddAccount/components/SafeT.tsx +++ b/common/v2/features/AddAccount/components/SafeT.tsx @@ -72,7 +72,11 @@ class SafeTminiDecryptClass extends PureComponent { // todo: update help link return (
              - +
              {translate('SAFET_MINI_DESCRIPTION')}
              +
              + +
              + - -
              {error || '-'}
              ); } From 53e4e54b8519162e7386b1dc14e8970676047644 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 29 Apr 2019 22:11:48 -0400 Subject: [PATCH 0421/1466] clean up unused files in add-existing-account-views flow --- .../components/ConnectLedgerPanel.tsx | 21 ------------- .../components/ConnectMetaMaskPanel.tsx | 5 ---- .../components/ConnectParitySignerPanel.tsx | 5 ---- .../components/ConnectSafeTMiniPanel.tsx | 5 ---- .../components/ConnectTrezorPanel.tsx | 5 ---- .../features/AddAccount/components/index.ts | 7 ----- common/v2/features/AddAccount/constants.ts | 30 ------------------- 7 files changed, 78 deletions(-) delete mode 100644 common/v2/features/AddAccount/components/ConnectLedgerPanel.tsx delete mode 100644 common/v2/features/AddAccount/components/ConnectMetaMaskPanel.tsx delete mode 100644 common/v2/features/AddAccount/components/ConnectParitySignerPanel.tsx delete mode 100644 common/v2/features/AddAccount/components/ConnectSafeTMiniPanel.tsx delete mode 100644 common/v2/features/AddAccount/components/ConnectTrezorPanel.tsx delete mode 100644 common/v2/features/AddAccount/constants.ts diff --git a/common/v2/features/AddAccount/components/ConnectLedgerPanel.tsx b/common/v2/features/AddAccount/components/ConnectLedgerPanel.tsx deleted file mode 100644 index 1f6e85f8c..000000000 --- a/common/v2/features/AddAccount/components/ConnectLedgerPanel.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React, { Component } from 'react'; -import { ContentPanel } from 'v2/components'; - -import LedgerNanoIcon from 'common/assets/images/icn-ledger-nano.svg'; - -export default class ConnectLedgerPanel extends Component { - public render() { - return ( - { - console.log('Connect & Unlock Ledger Back'); - }} - > - - - ); - } -} diff --git a/common/v2/features/AddAccount/components/ConnectMetaMaskPanel.tsx b/common/v2/features/AddAccount/components/ConnectMetaMaskPanel.tsx deleted file mode 100644 index 3a8f1f32c..000000000 --- a/common/v2/features/AddAccount/components/ConnectMetaMaskPanel.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -export default function ConnectMetaMaskPanel() { - return
              Connect MetaMask
              ; -} diff --git a/common/v2/features/AddAccount/components/ConnectParitySignerPanel.tsx b/common/v2/features/AddAccount/components/ConnectParitySignerPanel.tsx deleted file mode 100644 index 4d92da7e2..000000000 --- a/common/v2/features/AddAccount/components/ConnectParitySignerPanel.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -export default function ConnectParitySignerPanel() { - return
              Connect Parity Signer
              ; -} diff --git a/common/v2/features/AddAccount/components/ConnectSafeTMiniPanel.tsx b/common/v2/features/AddAccount/components/ConnectSafeTMiniPanel.tsx deleted file mode 100644 index 8245c03e0..000000000 --- a/common/v2/features/AddAccount/components/ConnectSafeTMiniPanel.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -export default function ConnectSafeTMiniPanel() { - return
              Connect Safe-T Mini
              ; -} diff --git a/common/v2/features/AddAccount/components/ConnectTrezorPanel.tsx b/common/v2/features/AddAccount/components/ConnectTrezorPanel.tsx deleted file mode 100644 index 1c0876d2f..000000000 --- a/common/v2/features/AddAccount/components/ConnectTrezorPanel.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -export default function ConnectTrezorPanel() { - return
              Connect Trezor
              ; -} diff --git a/common/v2/features/AddAccount/components/index.ts b/common/v2/features/AddAccount/components/index.ts index f1e28ead2..a817f496a 100644 --- a/common/v2/features/AddAccount/components/index.ts +++ b/common/v2/features/AddAccount/components/index.ts @@ -1,10 +1,3 @@ -export { default as ConnectLedgerPanel } from './ConnectLedgerPanel'; -export { default as ConnectMetaMaskPanel } from './ConnectMetaMaskPanel'; -export { default as ConnectParitySignerPanel } from './ConnectParitySignerPanel'; -export { default as ConnectSafeTMiniPanel } from './ConnectSafeTMiniPanel'; -export { default as ConnectTrezorPanel } from './ConnectTrezorPanel'; -export { default as SelectNetworkPanel } from './SelectNetworkPanel'; -export { default as SelectAddressPanel } from './SelectAddressPanel'; export * from './DeterministicWallets'; export * from './InsecureWalletWarning'; export * from './Keystore'; diff --git a/common/v2/features/AddAccount/constants.ts b/common/v2/features/AddAccount/constants.ts deleted file mode 100644 index 654fef3bf..000000000 --- a/common/v2/features/AddAccount/constants.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { - SelectNetworkPanel, - SelectAddressPanel, - ConnectMetaMaskPanel, - ConnectLedgerPanel, - ConnectTrezorPanel, - ConnectParitySignerPanel, - ConnectSafeTMiniPanel -} from './components'; - -export enum ImportAddAccountStages { - SelectMethod, - SelectNetwork, - SelectAddress, - ConnectMetaMask, - ConnectLedger, - ConnectTrezor, - ConnectParitySigner, - ConnectSafeTMini -} - -export const importAddAccountStageToComponentHash = { - [ImportAddAccountStages.SelectNetwork]: SelectNetworkPanel, - [ImportAddAccountStages.SelectAddress]: SelectAddressPanel, - [ImportAddAccountStages.ConnectMetaMask]: ConnectMetaMaskPanel, - [ImportAddAccountStages.ConnectLedger]: ConnectLedgerPanel, - [ImportAddAccountStages.ConnectTrezor]: ConnectTrezorPanel, - [ImportAddAccountStages.ConnectParitySigner]: ConnectParitySignerPanel, - [ImportAddAccountStages.ConnectSafeTMini]: ConnectSafeTMiniPanel -}; From acc084e1f02d9ae2f5dab46d8beded688d031ff6 Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Tue, 30 Apr 2019 10:27:16 +0200 Subject: [PATCH 0422/1466] Removed unused param --- .../NotificationsProvider/NotificationsProvider.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx index 2d1cd0ea1..ea4cf47b3 100644 --- a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx +++ b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx @@ -32,11 +32,7 @@ const notificationsStrings: NotificationsStringsProps = { export interface ProviderState { currentNotification: ExtendedNotification | undefined; notifications: ExtendedNotification[]; - createNotification( - templateName: string, - templateData?: object, - options?: NotificationOptions - ): void; + createNotification(templateName: string, options?: NotificationOptions): void; dismissCurrentNotification(): void; } From 02eb47f11f49d9401139219c44fd419ad00b69a5 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 30 Apr 2019 14:14:35 -0400 Subject: [PATCH 0423/1466] enable web3 on add-existing-account flow --- common/v2/features/AddAccount/AddAccount.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 53c9f94ae..76060eaa7 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -151,7 +151,7 @@ const WalletDecrypt = withRouter( description: 'ADD_WEB3DESC', component: Web3Decrypt, initialParams: {}, - unlock: this.props.unlockWeb3, + unlock: WalletActions.unlockWeb3, attemptUnlock: true, helpLink: `${knowledgeBaseURL}/how-to/migrating/moving-from-mycrypto-to-metamask` }, @@ -683,14 +683,14 @@ const WalletDecrypt = withRouter( // this.state.value will remain unpopulated. in this case, we can expect // the payload to contain the unlocked wallet info. const unlockValue = value && !isEmpty(value) ? value : payload; - if (this.state.accountData.accountType === 'web3') { + const wallet = await this.WALLETS[selectedWalletKey].unlock(unlockValue); this.setState({ hasSelectedAddress: true, accountData: { ...this.state.accountData, derivationPath: '', - address: unlockValue.getAddressString() + address: wallet.getAddressString() } }); } else if (this.state.accountData.accountType === 'viewOnly') { @@ -764,7 +764,6 @@ function mapStateToProps(state: AppState, ownProps: Props) { export default connect(mapStateToProps, { unlockMnemonic: WalletActions.unlockMnemonic, - unlockWeb3: WalletActions.unlockWeb3, resetTransactionRequested: transactionFieldsActions.resetTransactionRequested, showNotification: notificationsActions.showNotification })(WalletDecrypt) as React.ComponentClass; From a3e4a546528363d3fb8b08fb3a1d81c9bf93684f Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Thu, 25 Apr 2019 18:14:38 +0200 Subject: [PATCH 0424/1466] feat/CW-32/Update current acounts with AccountDropdown The AccountDropdown in Dashboard displays all the users Accounts. The user selects the accounts which he wants to display in the Dashboard. When he clicks apply it updates Currents.accounts in LocalStorage. - Create Checkbox component - Create AccountDropdown component - Create shared v2/services/Effects and useOnClickOutside - Create shared v2/theme to combine @mycrypto/UI with GAU theme - Create shared v2/types for global types --- common/Root.tsx | 43 +-- common/translations/lang/en.json | 4 + common/v2/components/Checkbox.tsx | 132 +++++++++ common/v2/components/index.ts | 1 + .../Dashboard/components/AccountDropdown.scss | 50 ---- .../Dashboard/components/AccountDropdown.tsx | 255 +++++++++--------- .../Dashboard/components/WalletBreakdown.tsx | 16 +- .../CurrentsProvider/CurrentsProvider.tsx | 18 +- common/v2/services/Currents/types.ts | 2 +- common/v2/services/Effects/index.ts | 1 + .../v2/services/Effects/useOnClickOutside.tsx | 36 +++ common/v2/services/LocalCache/constants.ts | 8 +- common/v2/services/index.ts | 1 + common/v2/theme/colors.scss | 3 + common/v2/theme/index.js | 13 + common/v2/types/global.d.ts | 4 + package.json | 3 + yarn.lock | 58 +++- 18 files changed, 445 insertions(+), 203 deletions(-) create mode 100644 common/v2/components/Checkbox.tsx delete mode 100644 common/v2/features/Dashboard/components/AccountDropdown.scss create mode 100644 common/v2/services/Effects/index.ts create mode 100644 common/v2/services/Effects/useOnClickOutside.tsx create mode 100644 common/v2/theme/colors.scss create mode 100644 common/v2/theme/index.js create mode 100644 common/v2/types/global.d.ts diff --git a/common/Root.tsx b/common/Root.tsx index 5542a5a07..246fe6c60 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -3,8 +3,8 @@ import { Store } from 'redux'; import { Provider, connect } from 'react-redux'; import { withRouter, Switch, HashRouter, Route, BrowserRouter } from 'react-router-dom'; import { ThemeProvider } from 'styled-components'; -import { light } from '@mycrypto/ui'; +import GAU_THEME from 'v2/theme'; import { AnalyticsService } from 'v2/services'; import { AppState } from 'features/reducers'; import { configSelectors, configMetaSelectors } from 'features/config'; @@ -38,6 +38,7 @@ import { AddressMetadataProvider } from 'v2/providers/AddressMetadataProvider'; import { TransactionProvider } from 'v2/providers/TransactionProvider'; import { TransactionHistoryProvider } from 'v2/providers/TransactionHistoryProvider'; import LockScreenProvider from 'v2/providers/LockScreenProvider/LockScreenProvider'; +import { CurrentsProvider } from 'v2/providers'; import { NewAppReleaseModal } from 'v2/components'; interface OwnProps { @@ -118,29 +119,31 @@ class RootClass extends Component { : BrowserRouter; return ( - + - - - - - - {onboardingActive && } - {routes} - - - - {process.env.BUILD_ELECTRON && } - - - - {developmentMode && } -
              - - + + + + + + + {onboardingActive && } + {routes} + + + + {process.env.BUILD_ELECTRON && } + + + + {developmentMode && } +
              + + + diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 685f9ea4d..10682318e 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -1,6 +1,10 @@ { "code": "en", "data": { + "ACCOUNTS_DROPDOWN_ALL_WALLETS": "All Wallets", + "ACCOUNTS_DROPDOWN_SOME_WALLETS": "Showing $current of $total accounts", + "ACCOUNTS_DROPDOWN_ALL_ACCOUNTS": "All Accounts", + "ACCOUNTS_DROPDOWN_ACTION": "Apply", "ADDRESS": "Address", "LABEL": "Label", "INVALID_LABEL_LENGTH": "An address label must be between 2 and 50 characters.", diff --git a/common/v2/components/Checkbox.tsx b/common/v2/components/Checkbox.tsx new file mode 100644 index 000000000..5bdd7f092 --- /dev/null +++ b/common/v2/components/Checkbox.tsx @@ -0,0 +1,132 @@ +import React from 'react'; +import styled from 'styled-components'; +import { Typography } from '@mycrypto/ui'; + +interface CheckboxProps { + name: string; + label: string; + checked: boolean; + icon?: any; + onChange(): void; +} + +const SContainer = styled('div')` + display: flex; + flex-direction: row; + align-items: center; + height: 31px; + margin-bottom: 15px; + font-size: 1em; +`; + +// Styling Checkbox Starts +// Adapted from: https://appitventures.com/blog/styling-checkbox-css-tips/ +const checkboxSize = '20px'; +const borderRadius = '2px'; +const SLabel = styled('label')` + display: block; + position: relative; + cursor: pointer; + font-size: 18px; + line-height: ${checkboxSize}; + height: ${checkboxSize}; + width: ${checkboxSize}; + clear: both; + margin: 0; + + & > input { + position: absolute; + opacity: 0; + cursor: pointer; + } + + & > input:checked ~ span { + background-color: transparent; + border-radius: ${borderRadius}; + transform: rotate(0deg) scale(1); + opacity: 1; + border: ${props => `1px solid ${props.theme.GAU.COLORS.borderColor}`}; + } + + & > span { + position: absolute; + height: ${checkboxSize}; + width: ${checkboxSize}; + background-color: transparent; + border-radius: ${borderRadius}; + border: ${props => `1px solid ${props.theme.GAU.COLORS.borderColor}`}; + transition: all 0.2s ease-out; + } + + // Create the pseudo content element and place it in the center + // Hide it by setting the scale(0) + // This will be the origin of the transition. + & > span::after { + position: absolute; + content: ''; + left: 50%; + top: 50%; + margin-top: -1px; + margin-left: -1px; + height: 0px; + width: 0px; + border: ${props => `1px solid ${props.theme.GAU.COLORS.brightSkyBlue}`}; + opacity: 1; + transform: rotate(0deg) scale(0); + transition: all 0.2s ease-out; + } + + // When the checkbox is selected we transform to show half the borders + // of a rotated rectangle which provides the swoosh effect. + // 'top' & 'left' are used to position the swoosh with the container. + // 'width' & 'height' serve as the size. + & > input:checked ~ span::after { + opacity: 1; + left: 35%; + top: 15%; + width: 7px; + height: 12px; + border: ${props => `solid ${props.theme.GAU.COLORS.brightSkyBlue}`}; + border-radius: 1px; + border-width: 0 2px 2px 0; + background-color: transparent; + transform: rotate(45deg) scale(1); + } +`; + +const SIconContainer = styled('div')` + display: flex; + align-items: center; + margin-right: 15px; + & img { + width: 30px; + height: 30px; + } +`; + +const SLabelContainer = styled('div')` + padding: 7px 0; +`; + +export default function Checkbox({ name, label, checked, onChange, icon }: CheckboxProps) { + return ( + + + + + +
              + {icon && {icon()}} + + {label} + +
              +
              + ); +} diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index ff56e1fc4..29c8319b0 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -1,4 +1,5 @@ export { default as Amount } from './Amount'; +export { default as Checkbox } from './Checkbox'; export { default as ContentPanel } from './ContentPanel'; export { default as ExtendedContentPanel } from './ExtendedContentPanel'; export { default as FlippablePanel } from './FlippablePanel'; diff --git a/common/v2/features/Dashboard/components/AccountDropdown.scss b/common/v2/features/Dashboard/components/AccountDropdown.scss deleted file mode 100644 index 82a8c3b37..000000000 --- a/common/v2/features/Dashboard/components/AccountDropdown.scss +++ /dev/null @@ -1,50 +0,0 @@ -.AccountDropdown { - position: relative; - display: flex; - align-items: center; - height: 48px; - padding: 9px 15px; - border: 0.125em solid #e5ecf3; - border-radius: 2px; - box-shadow: 0 1px 1px 0 rgba(232, 234, 237, 0.5), inset 0 1px 3px 0 rgba(232, 234, 237, 0.5); - background-color: #ffffff; - color: #1d2732; - cursor: pointer; - - &-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 2; - width: 100%; - padding: 0 20px 14px 20px; - background: #ffffff; - border: 1px solid #e5ecf3; - - label { - display: flex; - align-items: center; - margin: 0; - padding: 16px 0; - font-weight: 300; - - &:first-of-type, - &:last-of-type { - border-bottom: 1px solid #e5ecf3; - } - } - input[type='checkbox'] { - margin: 0; - margin-right: 15px; - } - &-identicon { - width: 30px; - height: 30px; - margin-right: 15px; - } - &-apply { - width: 100%; - margin-top: 15px; - } - } -} diff --git a/common/v2/features/Dashboard/components/AccountDropdown.tsx b/common/v2/features/Dashboard/components/AccountDropdown.tsx index be2b6c7da..1870ff23e 100644 --- a/common/v2/features/Dashboard/components/AccountDropdown.tsx +++ b/common/v2/features/Dashboard/components/AccountDropdown.tsx @@ -1,136 +1,151 @@ -import React, { Component } from 'react'; -import onClickOutside from 'react-onclickoutside'; +import React, { useState, useEffect, useRef } from 'react'; +import styled, { StyledFunction } from 'styled-components'; import { Button, Identicon } from '@mycrypto/ui'; -import './AccountDropdown.scss'; +import { translateRaw } from 'translations'; +import { Checkbox } from 'v2/components'; +import { ExtendedAccount, useOnClickOutside } from 'v2/services'; -interface AccountDropdownEntry { - uuid: string; - name: string; - address: string; - visible: boolean; +interface AccountDropdownProps { + accounts: ExtendedAccount[]; + selected: string[]; + onSubmit(selected: string[]): void; } -interface Props { - accounts: AccountDropdownEntry[]; - visibleCount: number; - allVisible: boolean; - onSelectAll(): void; - onSelect(uuid: string): void; +interface SDropdownProps { + isOpen: boolean; + ref: SCref; } -export class AccountDropdown extends Component { - public state = { - open: false - }; +const Divider = styled('div')` + border-bottom: ${props => `1px solid ${props.theme.GAU.COLORS.dividerColor}`}; + margin-bottom: 15px; +`; + +const SButton = styled(Button)` + height: 40px; + width: 100%; + padding: 9px 0; + font-size: 18px; + line-height: 18px; + font-weight: bold; +`; + +const dropdown: StyledFunction> = styled('div'); +const SDropdown = dropdown` + display: flex; + align-items: center; + position: relative; + height: 48px; + padding: 9px 15px; + border: ${props => `1px solid ${props.theme.GAU.COLORS.dividerColor}`}; + border-radius: 2px; + background-color: #ffffff; + cursor: pointer; + + ${props => + props.isOpen + ? `{ + box-shadow: 0 7px 10px 5px rgba(50, 50, 93, 0.1), 0 3px 6px 0 rgba(0, 0, 0, 0.07); + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + }` + : ''} - public handleClickOutside = () => this.state.open && this.toggleOpen(); - - public render() { - const { accounts, visibleCount, allVisible, onSelectAll, onSelect } = this.props; - const { open } = this.state; - const label = allVisible - ? 'All Accounts' - : `Viewing ${visibleCount} of ${accounts.length} Accounts`; - - return ( -
              - {label} - {open && ( -
              e.stopPropagation()}> - - {accounts.map(({ uuid, name, address, visible }) => ( - - ))} - -
              - )} -
              - ); + & > div { + border-top-left-radius: 0; + border-top-right-radius: 0; + left: -1px; // border-box isn't satisfying so we increase width and + width: calc(100% + 2px); // move to left to align the trigger and the dropdown. + position: absolute; + top: 100%; + z-index: 2; + padding: 15px 20px 14px 20px; + background: #ffffff; + border: 1px solid #e5ecf3; + border-top: none; + box-shadow: 0 7px 10px 5px rgba(50, 50, 93, 0.1); } +`; - private toggleOpen = () => - this.setState(prevState => ({ - open: !prevState.open - })); -} +const renderAccounts = ( + accounts: ExtendedAccount[], + selected: string[], + handleChange: (uuid: string) => void +) => + accounts.map(({ uuid, label, address }: ExtendedAccount) => ( + handleChange(uuid)} + label={label} + icon={() => } + /> + )); -const ModifiedAccountDropdown = onClickOutside(AccountDropdown); +const AccountDropdown = ({ accounts = [], selected = [], onSubmit }: AccountDropdownProps) => { + const ref = useRef(null); + const [isOpen, setIsOpen] = useState(false); + const [draftSelected, setDraftSelected] = useState([]); -interface State { - accountsById: Record; - allAccounts: string[]; - visibleAccounts: string[]; -} + useOnClickOutside(ref, () => setIsOpen(false)); + + // Only update our draft if the prop changed. + // https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects + useEffect(() => setDraftSelected(selected), [selected]); + + const allVisible = accounts.length !== 0 && accounts.length === draftSelected.length; -// tslint:disable-next-line -export default class MockContext extends Component<{}, State> { - public state: State = { - accountsById: { - '1': { - uuid: '1', - name: 'Example account one', - address: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d' - }, - '2': { - uuid: '2', - name: 'An account with a really, really, really, really, really, really long name', - address: '0x80200997f095da94E404F7E0d581AAb1fFba9f7d' - } - }, - allAccounts: ['1', '2'], - visibleAccounts: ['1', '2'] + const label = allVisible + ? translateRaw('ACCOUNTS_DROPDOWN_ALL_ACCOUNTS') + : translateRaw('ACCOUNTS_DROPDOWN_SOME_WALLETS', { + $current: `${draftSelected.length}`, + $total: `${accounts.length}` + }); + + const toggleOpen = () => { + setIsOpen(!isOpen); }; - public render() { - const { accountsById, allAccounts, visibleAccounts } = this.state; - const accounts = allAccounts.map(uuid => ({ - ...accountsById[uuid], - visible: visibleAccounts.includes(uuid) - })); - - return ( - - ); - } + const toggleAllAccounts = () => { + const changed = draftSelected.length < accounts.length ? accounts.map(a => a.uuid) : []; + setDraftSelected(changed); + }; - private toggleAllAccounts = () => - this.setState(prevState => ({ - visibleAccounts: - prevState.visibleAccounts.length < prevState.allAccounts.length - ? [...prevState.allAccounts] - : [] - })); - - private toggleSingleAccount = (uuid: string) => - this.setState(prevState => ({ - visibleAccounts: prevState.visibleAccounts.includes(uuid) - ? prevState.visibleAccounts.filter(entry => entry !== uuid) - : prevState.visibleAccounts.concat(uuid) - })); -} + const toggleSingleAccount = (uuid: string) => { + const changed = draftSelected.includes(uuid) + ? draftSelected.filter(entry => entry !== uuid) + : draftSelected.concat(uuid); + setDraftSelected(changed); + }; + + return ( + + {label} + {isOpen && ( +
              e.stopPropagation()}> + + + {renderAccounts(accounts, draftSelected, toggleSingleAccount)} + + { + onSubmit(draftSelected); + toggleOpen(); + }} + > + {translateRaw('ACCOUNTS_DROPDOWN_ACTION')} + +
              + )} +
              + ); +}; + +export default AccountDropdown; diff --git a/common/v2/features/Dashboard/components/WalletBreakdown.tsx b/common/v2/features/Dashboard/components/WalletBreakdown.tsx index 99345a6d9..1a39216a3 100644 --- a/common/v2/features/Dashboard/components/WalletBreakdown.tsx +++ b/common/v2/features/Dashboard/components/WalletBreakdown.tsx @@ -1,7 +1,8 @@ -import React from 'react'; +import React, { useContext } from 'react'; import { Link } from 'react-router-dom'; import { ComboBox, Heading, Panel, Typography } from '@mycrypto/ui'; +import { AccountContext, CurrentsContext } from 'v2/providers'; import AccountDropdown from './AccountDropdown'; import './WalletBreakdown.scss'; @@ -32,7 +33,10 @@ const balances = [ } ]; -export default function WalletBreakdown() { +function WalletBreakdown() { + const { accounts } = useContext(AccountContext); + const { currents, updateCurrentsAccounts } = useContext(CurrentsContext); + return (
              @@ -42,7 +46,11 @@ export default function WalletBreakdown() { items={new Set(['US Dollars'])} />
              - + updateCurrentsAccounts(selected)} + />
              @@ -103,3 +111,5 @@ export default function WalletBreakdown() {
              ); } + +export default WalletBreakdown; diff --git a/common/v2/providers/CurrentsProvider/CurrentsProvider.tsx b/common/v2/providers/CurrentsProvider/CurrentsProvider.tsx index 4df1f8b4b..ea3cd21c3 100644 --- a/common/v2/providers/CurrentsProvider/CurrentsProvider.tsx +++ b/common/v2/providers/CurrentsProvider/CurrentsProvider.tsx @@ -1,19 +1,27 @@ import React, { Component, createContext } from 'react'; -import * as service from 'v2/services/Currents/Currents'; -import { Currents } from 'v2/services/Currents'; + +import { Currents, updateCurrents, readCurrents } from 'v2/services/Currents'; interface ProviderState { currents: Currents; updateCurrents(currentsData: Currents): void; + updateCurrentsAccounts(accounts: string[]): void; } export const CurrentsContext = createContext({} as ProviderState); export class CurrentsProvider extends Component { public readonly state: ProviderState = { - currents: service.readCurrents() || [], + currents: readCurrents() || {}, + updateCurrents: (currentsData: Currents) => { - service.updateCurrents(currentsData); + updateCurrents(currentsData); + this.getCurrents(); + }, + + updateCurrentsAccounts: (accounts: string[]) => { + const currents = readCurrents(); + updateCurrents({ ...currents, accounts }); this.getCurrents(); } }; @@ -24,7 +32,7 @@ export class CurrentsProvider extends Component { } private getCurrents = () => { - const currents: Currents = service.readCurrents() || []; + const currents = readCurrents() || {}; this.setState({ currents }); }; } diff --git a/common/v2/services/Currents/types.ts b/common/v2/services/Currents/types.ts index 1cb316afd..2163b5541 100644 --- a/common/v2/services/Currents/types.ts +++ b/common/v2/services/Currents/types.ts @@ -1,5 +1,5 @@ export interface Currents { - account?: string[]; + accounts: string[]; fiatCurrency?: string; activeWallet?: string; } diff --git a/common/v2/services/Effects/index.ts b/common/v2/services/Effects/index.ts new file mode 100644 index 000000000..10823cebf --- /dev/null +++ b/common/v2/services/Effects/index.ts @@ -0,0 +1 @@ +export { default as useOnClickOutside } from './useOnClickOutside'; diff --git a/common/v2/services/Effects/useOnClickOutside.tsx b/common/v2/services/Effects/useOnClickOutside.tsx new file mode 100644 index 000000000..a93f73fbc --- /dev/null +++ b/common/v2/services/Effects/useOnClickOutside.tsx @@ -0,0 +1,36 @@ +import React, { useEffect } from 'react'; + +// Simple Effect to replace react-onclickoutside +// https://usehooks.com/useOnClickOutside/ + +export default function useOnClickOutside( + ref: React.RefObject, + handler: (e: Event) => void +) { + useEffect( + () => { + const listener = (event: any) => { + // Do nothing if clicking ref's element or descendent elements + if (!ref.current || ref.current.contains(event.target)) { + return; + } + handler(event); + }; + + document.addEventListener('mousedown', listener); + document.addEventListener('touchstart', listener); + + return () => { + document.removeEventListener('mousedown', listener); + document.removeEventListener('touchstart', listener); + }; + }, + // Add ref and handler to effect dependencies + // It's worth noting that because passed in handler is a new ... + // ... function on every render that will cause this effect ... + // ... callback/cleanup to run every render. It's not a big deal ... + // ... but to optimize you can wrap handler in useCallback before ... + // ... passing it into this hook. + [ref, handler] + ); +} diff --git a/common/v2/services/LocalCache/constants.ts b/common/v2/services/LocalCache/constants.ts index 61796a404..020b3b63c 100644 --- a/common/v2/services/LocalCache/constants.ts +++ b/common/v2/services/LocalCache/constants.ts @@ -4,7 +4,7 @@ export const CACHE_KEY = 'MyCryptoCache'; export const ENCRYPTED_CACHE_KEY = 'ENCRYPTED_CACHE'; export interface LocalCache { - currents: Partial; + currents: serviceTypes.Currents; globalSettings: Partial; recentAccounts: string[]; accounts: Record; @@ -26,7 +26,7 @@ export interface LocalCache { export const CACHE_INIT_DEV: LocalCache = { currents: { - account: ['61d84f5e-0efa-46b9-915c-aed6ebe5a4dc'], + accounts: ['61d84f5e-0efa-46b9-915c-aed6ebe5a4dc'], fiatCurrency: 'USD', activeWallet: 'all' }, @@ -199,7 +199,9 @@ export const CACHE_INIT_DEV: LocalCache = { export const CACHE_INIT: LocalCache = { // : LocalCache - currents: {}, + currents: { + accounts: [] + }, recentAccounts: [], globalSettings: {}, accounts: {}, diff --git a/common/v2/services/index.ts b/common/v2/services/index.ts index f0109ab91..0208af815 100644 --- a/common/v2/services/index.ts +++ b/common/v2/services/index.ts @@ -3,6 +3,7 @@ export * from './API'; export * from './Cache'; export * from './ContractOptions'; export * from './Currents'; +export * from './Effects'; export * from './LocalCache'; export * from './GlobalSettings'; export * from './Storage'; diff --git a/common/v2/theme/colors.scss b/common/v2/theme/colors.scss new file mode 100644 index 000000000..bb395c80e --- /dev/null +++ b/common/v2/theme/colors.scss @@ -0,0 +1,3 @@ +$bright-sky-blue: #1eb8e7; +$border-color: #e8eaed; +$divider-color: #e5ecf3; diff --git a/common/v2/theme/index.js b/common/v2/theme/index.js new file mode 100644 index 000000000..c66890d6b --- /dev/null +++ b/common/v2/theme/index.js @@ -0,0 +1,13 @@ +import { light } from '@mycrypto/ui'; + +// Direct require to customise the webpack default scss loader +const COLORS = require('sass-extract-loader?{"plugins": ["sass-extract-js"]}!./colors.scss'); + +// Combine the themes in a single object to be consummed by SC ThemeProvider +const theme = Object.assign({}, light, { + GAU: { + COLORS + } +}); + +export default theme; diff --git a/common/v2/types/global.d.ts b/common/v2/types/global.d.ts new file mode 100644 index 000000000..8a62d69fd --- /dev/null +++ b/common/v2/types/global.d.ts @@ -0,0 +1,4 @@ +// Styled Components are missing types for 'refs'. We create and alias now to +// enable a fast change once the typings are fixed +// https://spectrum.chat/styled-components/general/typescript-refs~5857d917-966e-4a71-940f-524206896f43 +type SCref = any; diff --git a/package.json b/package.json index 40b5b3026..8e683f398 100644 --- a/package.json +++ b/package.json @@ -146,6 +146,9 @@ "redux-devtools-extension": "2.13.2", "redux-test-utils": "0.2.2", "rimraf": "2.6.2", + "sass-extract": "2.1.0", + "sass-extract-js": "0.4.0", + "sass-extract-loader": "1.1.0", "sass-loader": "6.0.7", "style-loader": "0.20.3", "thread-loader": "1.1.5", diff --git a/yarn.lock b/yarn.lock index 9c5a6283f..f3a042a37 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2083,6 +2083,11 @@ bluebird-lst@^1.0.5: dependencies: bluebird "^3.5.1" +bluebird@^3.4.7: + version "3.5.4" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.4.tgz#d6cc661595de30d5b3af5fcedd3c0b3ef6ec5714" + integrity sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw== + bluebird@^3.5.0, bluebird@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" @@ -2543,7 +2548,7 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@3.0.x: +camel-case@3.0.x, camel-case@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" dependencies: @@ -5649,6 +5654,13 @@ glogg@^1.0.0: dependencies: sparkles "^1.0.0" +gonzales-pe@^4.2.2: + version "4.2.4" + resolved "https://registry.yarnpkg.com/gonzales-pe/-/gonzales-pe-4.2.4.tgz#356ae36a312c46fe0f1026dd6cb539039f8500d2" + integrity sha512-v0Ts/8IsSbh9n1OJRnSfa7Nlxi4AkXIsWB6vPept8FDbL4bXn3FNuxjYtO/nmBGu7GDkL9MFeGebeSu6l55EPQ== + dependencies: + minimist "1.1.x" + got@^5.0.0: version "5.7.1" resolved "https://registry.yarnpkg.com/got/-/got-5.7.1.tgz#5f81635a61e4a6589f180569ea4e381680a51f35" @@ -6472,6 +6484,13 @@ into-stream@^3.1.0: from2 "^2.1.1" p-is-promise "^1.1.0" +invariant@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + integrity sha1-nh9WrArNtr8wMwbzOL47IErmA2A= + dependencies: + loose-envify "^1.0.0" + invariant@^2.0.0, invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -8621,6 +8640,11 @@ minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" +minimist@1.1.x: + version "1.1.3" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8" + integrity sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag= + minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -10382,6 +10406,14 @@ qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" +query-ast@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/query-ast/-/query-ast-1.0.2.tgz#efc59271addc2699a1ed563be9a7cc61fed590c0" + integrity sha512-mg78RW1QHhW8ChuJfR3V7/8GZ+Hm0mVyuh91gCCaYlObGPaorPsOEY0LXbzjzydvfGui9seLTFW2MiuDy0MT8w== + dependencies: + invariant "2.2.2" + lodash "^4.17.4" + query-string@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.0.0.tgz#8b8f39447b73e8290d6f5e3581779218e9171142" @@ -11497,6 +11529,30 @@ sanitize-filename@^1.6.1: dependencies: truncate-utf8-bytes "^1.0.0" +sass-extract-js@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/sass-extract-js/-/sass-extract-js-0.4.0.tgz#0578dc8459b9844936794d9bacfa83d4c8d7dbf8" + integrity sha512-iCeT4yARgI1EE+KkjKQEuGbNiN7UPm9ObD6dlFFFUgoRQzDHfP2faK+8aKn4fvzznSa1B+R2EFJw1YzCYUavSw== + dependencies: + camel-case "^3.0.0" + +sass-extract-loader@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/sass-extract-loader/-/sass-extract-loader-1.1.0.tgz#ad4e7123b82533f8cbbde814e342f44abcb21054" + integrity sha1-rU5xI7glM/jLvegU40L0SryyEFQ= + dependencies: + loader-utils "^1.1.0" + +sass-extract@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/sass-extract/-/sass-extract-2.1.0.tgz#c65e6ca3103cbcf2fca0dcd81b07e4e49a6cc583" + integrity sha1-xl5soxA8vPL8oNzYGwfk5JpsxYM= + dependencies: + bluebird "^3.4.7" + gonzales-pe "^4.2.2" + parse-color "^1.0.0" + query-ast "^1.0.1" + sass-graph@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" From d2348fc36c9ec3b4110e4adbcc680b14d2e0ddf5 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Thu, 2 May 2019 20:45:18 -0400 Subject: [PATCH 0425/1466] main add-account view styled web/desktop --- common/translations/lang/en.json | 3 +- common/utils/web3.ts | 2 +- common/v2/features/AddAccount/AddAccount.tsx | 14 +- .../features/AddAccount/AddAccountStyles.scss | 7 +- .../AddAccount/components/WalletButton.scss | 160 +++--------------- .../AddAccount/components/WalletButton.tsx | 27 +-- 6 files changed, 41 insertions(+), 172 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index b28795456..aa04b1e0f 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -791,6 +791,7 @@ "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app.", "NO_ACCOUNTS_HEADER":"You don't have any accounts in your wallet.", "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now.", - "PRIVATE_KEY_HELP":"Not working? [Here's some troubleshooting tips to try.] ($link)" + "PRIVATE_KEY_HELP":"Not working? [Here's some troubleshooting tips to try.] ($link)", + "ADD_ACCOUNT_FOOTER_LINK": "Don't have an account? [Create a new account now.](https://MyCrypto.com/download-desktop-app)" } } diff --git a/common/utils/web3.ts b/common/utils/web3.ts index 40bfa6270..e63654ab6 100644 --- a/common/utils/web3.ts +++ b/common/utils/web3.ts @@ -1,4 +1,4 @@ -import MetamaskIcon from 'assets/images/wallets/metamask.svg'; +import MetamaskIcon from 'common/assets/images/wallets/metamask-2.svg'; import MistIcon from 'assets/images/wallets/mist.svg'; import CipherIcon from 'assets/images/wallets/cipher.svg'; import TrustIcon from 'assets/images/wallets/trust.svg'; diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 6dbb01ffd..13a614183 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -21,10 +21,10 @@ import * as derivedSelectors from 'features/selectors'; import { walletActions, walletSelectors } from 'features/wallet'; import { transactionFieldsActions } from 'features/transaction'; import { notificationsActions } from 'features/notifications'; -import LedgerIcon from 'assets/images/wallets/ledger.svg'; -import TrezorIcon from 'assets/images/wallets/trezor.svg'; -import SafeTIcon from 'assets/images/wallets/safe-t.svg'; -import ParitySignerIcon from 'assets/images/wallets/parity-signer.svg'; +import LedgerIcon from 'common/assets/images/wallets/ledger.svg'; +import TrezorIcon from 'common/assets/images/wallets/trezor.svg'; +import SafeTIcon from 'common/assets/images/wallets/safe-t.png'; +import ParitySignerIcon from 'common/assets/images/wallets/parity-signer.svg'; import { Errorable } from 'components'; import { Warning } from 'components/ui'; import { DisabledWallets } from './components/disables'; @@ -477,9 +477,7 @@ const WalletDecrypt = withRouter( ); })}
              -
              - Don't have an account? Create new account now. -
              +
              {translate('ADD_ACCOUNT_FOOTER_LINK')}
              ); } @@ -621,7 +619,7 @@ const WalletDecrypt = withRouter( if (!hidden && decryptionComponent && selectedWallet && !this.state.hasSelectedNetwork) { componentToRender = ( <> - + {selectNetworkComponent} diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index 8f91b62b7..0823552d0 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -114,13 +114,18 @@ $speed: 500ms; min-height: 790px; border-radius: 3px; + @media (max-width: $screen-md) { + width: 375px; + height: 769px; + } + &-connectWallet { width: 562px; height: 629px; } &-info { - width: 512px; + justify-content: center; height: 19px; font-family: Lato; font-size: 16px; diff --git a/common/v2/features/AddAccount/components/WalletButton.scss b/common/v2/features/AddAccount/components/WalletButton.scss index 4311c50a3..d9c1454f1 100644 --- a/common/v2/features/AddAccount/components/WalletButton.scss +++ b/common/v2/features/AddAccount/components/WalletButton.scss @@ -12,15 +12,15 @@ } } -.WalletButton { - position: relative; - flex: 1; +.WalletButton-main { + display: flex; + justify-content: center; + align-content: center; + align-items: center; height: 200px; max-width: 200px; min-width: 200px; padding: 25px 15px; - margin: 0 $space-md $space; - background-color: #ffffff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 0 0 rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.1); @@ -31,6 +31,12 @@ animation: wallet-button-enter 400ms ease 1; animation-fill-mode: backwards; + @media screen and (max-width: 700px) { + height: 159.7px; + max-width: 159.7px; + min-width: 159.7px; + } + @for $i from 0 to 6 { &:nth-child(#{$i}) { animation-delay: 100ms + ($i * 60ms); @@ -43,14 +49,6 @@ transform: translateY(-2px); z-index: 2; box-shadow: 0 1px 4px rgba(#000, 0.12), 0 4px 6px rgba(#000, 0.12); - - .WalletButton-title { - color: color(brand-primary); - - &-icon { - opacity: 1; - } - } } &:active { @@ -66,21 +64,25 @@ &-inner { transition: opacity 200ms ease; + + // transform: perspective(1px) translateY(5%); } &-title { - position: relative; - justify-content: center; - align-items: center; font-size: $font-size-medium; - margin-bottom: $space * 1.25; transition: color 150ms ease; + font-family: Lato; + font-size: 18px; + padding-top: 19px; &-icon { - margin-right: 8px; - max-height: 26px; + max-height: 75px; opacity: 0.8; + @media screen and (max-width: 700px) { + max-height: 59.9px; + } + @include theme(dark) { opacity: 1; filter: invert(1); @@ -92,124 +94,4 @@ } } } - - &-icons { - position: absolute; - bottom: 5px; - right: 5px; - - &-icon { - position: relative; - margin-left: 8px; - @include show-tooltip-on-hover; - - .fa { - position: relative; - opacity: 0.6; - font-size: $font-size-medium; - - &:hover { - opacity: 0.9; - } - } - } - } - - &--small { - height: 159.7px; - max-width: 159.7px; - min-width: 159.7px; - box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 0 0 rgba(0, 0, 0, 0.05), - 0 1px 3px 0 rgba(0, 0, 0, 0.1); - margin: 0 $space-sm $space-md; - - .WalletButton { - &-title { - font-size: $font-size-bump; - margin-bottom: $space-sm; - } - - &-icons { - &-icon { - margin-left: 6px; - - .fa { - font-size: $font-size-bump; - } - } - } - } - } - - // Mobile handling - @media screen and (max-width: $screen-xs) { - padding: 16px; - - &, - &--small { - height: 159.7px; - width: 159.7px; - min-width: 159.7px; - max-width: none; - margin-left: 0; - margin-right: 0; - box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 0 0 rgba(0, 0, 0, 0.05), - 0 1px 3px 0 rgba(0, 0, 0, 0.1); - } - - &-title { - justify-content: flex-start; - margin: 0; - } - - &-description, - &-example { - display: none; - } - - &-icons { - top: 0; - right: 0; - bottom: 0; - - &-icon { - float: left; - display: block; - height: 100%; - margin: 0; - width: 48px; - text-align: center; - border-left: 1px solid rgba(0, 0, 0, 0.1); - - a { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - } - - .fa { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - } - } - - &--small { - padding: 12px; - - .WalletButton-title { - margin: 0; - } - - .WalletButton-icons { - &-icon { - margin: 0; - } - } - } - } } diff --git a/common/v2/features/AddAccount/components/WalletButton.tsx b/common/v2/features/AddAccount/components/WalletButton.tsx index c17b4a2df..8275c0707 100644 --- a/common/v2/features/AddAccount/components/WalletButton.tsx +++ b/common/v2/features/AddAccount/components/WalletButton.tsx @@ -2,9 +2,7 @@ import React from 'react'; import classnames from 'classnames'; import { WalletName } from 'config'; -import { Tooltip } from 'components/ui'; import './WalletButton.scss'; -import { Typography } from '@mycrypto/ui'; interface OwnProps { name: string; @@ -32,37 +30,22 @@ type Props = OwnProps & StateProps & Icon; export class WalletButton extends React.PureComponent { public render() { - const { name, description, example, icon, isSecure, isDisabled, disableReason } = this.props; + const { name, icon, isSecure, isDisabled } = this.props; return (
              -
              - {icon && {name} -
              - {name} -
              - - {description && ( -
              - {description} -
              - )} - {example && ( -
              - {example} -
              - )} - - {isDisabled && disableReason && {disableReason}} +
              + {icon && {name} +
              {name}
              ); From 0e3f894105a788d83a880450ffe3d0f08ba743e0 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Fri, 3 May 2019 14:37:40 -0400 Subject: [PATCH 0426/1466] increase sizing of select address panel --- common/v2/features/AddAccount/AddAccount.tsx | 2 +- common/v2/features/AddAccount/AddAccountStyles.scss | 2 +- .../AddAccount/components/DeterministicWallets.scss | 9 +++++++++ .../AddAccount/components/SelectAddressPanel.tsx | 5 ----- 4 files changed, 11 insertions(+), 7 deletions(-) delete mode 100644 common/v2/features/AddAccount/components/SelectAddressPanel.tsx diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 13a614183..6d2ecbb7a 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -495,7 +495,7 @@ const WalletDecrypt = withRouter(
              -
              Select Network and Node
              +
              Select Network
              Select the blockchain that you want to operate with and the node it connects through. diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index 0823552d0..ebf3033c4 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -24,7 +24,7 @@ $speed: 500ms; } .Panel { - width: 760px; + width: 562px; min-height: 790px; // display: flex; // flex-direction: column; diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index c267e2f82..ea91524bf 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -2,7 +2,16 @@ @import 'common/sass/mixins'; .DW { + width: 935px; + border-radius: 3px; + box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 1px 4px 0 rgba(0, 0, 0, 0.12); + background-color: #ffffff; padding: 1rem 0.5rem; + top: 50%; + left: 50%; + height: 800px; + margin-top: -125px; + margin-left: -225px; header { width: 100%; diff --git a/common/v2/features/AddAccount/components/SelectAddressPanel.tsx b/common/v2/features/AddAccount/components/SelectAddressPanel.tsx deleted file mode 100644 index 3364f176f..000000000 --- a/common/v2/features/AddAccount/components/SelectAddressPanel.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -export default function SelectAddressPanel() { - return
              Select Address
              ; -} From 3ac735bb739074c0a057f382bf9d00d73e31ff69 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Fri, 3 May 2019 15:16:20 -0400 Subject: [PATCH 0427/1466] fix merge issues --- common/Root.tsx | 18 +++++++++--------- common/v2/services/LocalCache/LocalCache.ts | 9 +-------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/common/Root.tsx b/common/Root.tsx index 0933f6127..db64501f2 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -130,15 +130,15 @@ class RootClass extends Component { - - - {onboardingActive && } - {routes} - - - - {process.env.BUILD_ELECTRON && } - + + + {onboardingActive && } + {routes} + + + + {process.env.BUILD_ELECTRON && } + {developmentMode && } diff --git a/common/v2/services/LocalCache/LocalCache.ts b/common/v2/services/LocalCache/LocalCache.ts index 873fd914c..6542d377f 100644 --- a/common/v2/services/LocalCache/LocalCache.ts +++ b/common/v2/services/LocalCache/LocalCache.ts @@ -1,13 +1,6 @@ import * as utils from 'v2/libs'; import * as types from 'v2/services'; -import { - CACHE_INIT, - CACHE_INIT_DEV, - CACHE_KEY, - ENCRYPTED_CACHE_KEY, - LocalCache -} from './constants'; -import { isDevelopment } from 'v2/utils'; +import { CACHE_INIT, CACHE_KEY, ENCRYPTED_CACHE_KEY, LocalCache } from './constants'; import { DPaths, Fiats } from 'config'; import { ContractsData } from 'config/cacheData'; import { ACCOUNTTYPES } from 'v2/config'; From 8d6fde4f30d21e2ed63984cdf9915f7b2cf871fe Mon Sep 17 00:00:00 2001 From: blurpesec Date: Fri, 3 May 2019 15:19:16 -0400 Subject: [PATCH 0428/1466] Fix translation json --- common/translations/lang/en.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 9d9b2955a..60547c31b 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -790,7 +790,6 @@ "DOWNLOAD_APP_DESCRIPTION": "Please download the MyCrypto Desktop app so you can securely complete creating your new account and start managing your funds.", "DOWNLOAD_APP_DOWNLOAD_BUTTON": "Download for", "DOWNLOAD_APP_FOOTER_INFO": "Not sure what this is?", - "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app.", "NO_ACCOUNTS_HEADER":"You don't have any accounts in your wallet.", "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now.", "ACCOUNT_LIST_TABLE_YOUR_ACCOUNTS":"Your Accounts", @@ -799,7 +798,7 @@ "ACCOUNT_LIST_ADDRESS": "Address", "ACCOUNT_LIST_NETWORK":"Network", "ACCOUNT_LIST_VALUE": "Value", - "ACCOUNT_LIST_DELETE": "Delete" + "ACCOUNT_LIST_DELETE": "Delete", "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app.", "SCREEN_LOCK_NEW_HEADING":"Create Password to Lock Your Wallet", "SCREEN_LOCK_NEW_DESCRIPTION":"We want to help you keep your funds safe! Please create a password so you can securly view your wallet when you come back to MyCrypto.", From 34492a19a62cd880c1a62906e4c98e3547344f55 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Fri, 3 May 2019 18:24:07 -0400 Subject: [PATCH 0429/1466] add wallet type filtering for networks tab --- common/v2/features/AddAccount/AddAccount.tsx | 7 ++-- common/v2/features/Wallets/types.ts | 34 ++++++++++++++++++ common/v2/libs/networks/networks.ts | 37 ++++++++++++++++++++ common/v2/libs/networks/types.ts | 7 ++++ common/v2/services/LocalCache/LocalCache.ts | 2 +- common/v2/services/LocalCache/constants.ts | 6 +++- common/v2/services/NetworkOptions/types.ts | 4 +-- 7 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 common/v2/libs/networks/types.ts diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 166065641..5f728cced 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -51,7 +51,7 @@ import * as WalletActions from 'v2/features/Wallets'; import { NetworkOptionsContext, AccountContext } from 'v2/providers'; import { Account } from 'v2/services/Account/types'; import { Web3Decrypt } from 'components/WalletDecrypt/components/Web3'; -import { getNetworkByName } from 'v2/libs'; +import { getNetworkByName, isWalletFormatSupportedOnNetwork } from 'v2/libs'; import { NetworkOptions } from 'v2/services/NetworkOptions/types'; interface OwnProps { @@ -509,8 +509,11 @@ const WalletDecrypt = withRouter( {({ networkOptions = [] }) => { const networkNames: any[] = []; networkOptions.map(en => { - networkNames.push(en.name); + if (isWalletFormatSupportedOnNetwork(en, this.state.accountData.accountType)) { + networkNames.push(en.name); + } }); + console.log(networkNames); return ( { return Object.values(getCache().networkOptions); @@ -14,3 +17,37 @@ export const getNetworkByName = (name: string): NetworkOptions | undefined => { const networks = getAllNetworks() || []; return networks.find((network: NetworkOptions) => network.name === name); }; + +export const isWalletFormatSupportedOnNetwork = ( + network: NetworkOptions, + format: WalletName +): boolean => { + const chainId = network ? network.chainId : 0; + + const CHECK_FORMATS: types.DPathFormat[] = [ + SecureWalletName.LEDGER_NANO_S, + SecureWalletName.TREZOR, + SecureWalletName.SAFE_T, + InsecureWalletName.MNEMONIC_PHRASE + ]; + + const isHDFormat = (f: string): f is types.DPathFormat => + CHECK_FORMATS.includes(f as types.DPathFormat); + + // Ensure DPath's are found + if (isHDFormat(format)) { + if (!network) { + return false; + } + const dPath: DPath | undefined = network.dPathFormats && network.dPathFormats[format]; + return !!dPath; + } + + // Parity signer on RSK + if ((chainId === 30 || chainId === 31) && format === SecureWalletName.PARITY_SIGNER) { + return false; + } + + // All other wallet formats are supported + return true; +}; diff --git a/common/v2/libs/networks/types.ts b/common/v2/libs/networks/types.ts new file mode 100644 index 000000000..d6da39ad4 --- /dev/null +++ b/common/v2/libs/networks/types.ts @@ -0,0 +1,7 @@ +import { SecureWalletName, InsecureWalletName } from 'v2/features/Wallets/types'; + +export type DPathFormat = + | SecureWalletName.TREZOR + | SecureWalletName.SAFE_T + | SecureWalletName.LEDGER_NANO_S + | InsecureWalletName.MNEMONIC_PHRASE; diff --git a/common/v2/services/LocalCache/LocalCache.ts b/common/v2/services/LocalCache/LocalCache.ts index 6542d377f..a4ce7d411 100644 --- a/common/v2/services/LocalCache/LocalCache.ts +++ b/common/v2/services/LocalCache/LocalCache.ts @@ -104,7 +104,7 @@ export const initNetworkOptions = () => { blockExplorer: {}, tokenExplorer: {}, tokens: {}, - dPathFormats: {}, + dPathFormats: STATIC_NETWORKS_INITIAL_STATE[en].dPathFormats, gasPriceSettings: STATIC_NETWORKS_INITIAL_STATE[en].gasPriceSettings, shouldEstimateGasPrice: STATIC_NETWORKS_INITIAL_STATE[en].shouldEstimateGasPrice }; diff --git a/common/v2/services/LocalCache/constants.ts b/common/v2/services/LocalCache/constants.ts index 9ded896b2..d99ab1477 100644 --- a/common/v2/services/LocalCache/constants.ts +++ b/common/v2/services/LocalCache/constants.ts @@ -1,5 +1,7 @@ import * as serviceTypes from 'v2/services/types'; import { SecureWalletName } from 'config/data'; +import { InsecureWalletName } from 'v2/features/Wallets/types'; +import { ETH_DEFAULT } from 'config/dpaths'; export const CACHE_KEY = 'MyCryptoCache'; export const ENCRYPTED_CACHE_KEY = 'ENCRYPTED_CACHE'; @@ -144,7 +146,9 @@ export const CACHE_INIT_DEV: LocalCache = { tokens: [], contracts: ['17ed6f49-ff23-4bef-a676-69174c266b38'], nodes: ['eth_mycrypto'], - dPathFormats: {}, + dPathFormats: { + [InsecureWalletName.MNEMONIC_PHRASE]: ETH_DEFAULT + }, gasPriceSettings: { min: 1, max: 100, diff --git a/common/v2/services/NetworkOptions/types.ts b/common/v2/services/NetworkOptions/types.ts index d37be954f..195fa423b 100644 --- a/common/v2/services/NetworkOptions/types.ts +++ b/common/v2/services/NetworkOptions/types.ts @@ -1,4 +1,4 @@ -import { GasPriceSetting } from 'types/network'; +import { GasPriceSetting, DPathFormats } from 'types/network'; export interface NetworkOptions { contracts: string[]; @@ -13,7 +13,7 @@ export interface NetworkOptions { blockExplorer: {}; tokenExplorer: {}; tokens: {}; - dPathFormats: {}; + dPathFormats: DPathFormats; gasPriceSettings: GasPriceSetting; shouldEstimateGasPrice: boolean | undefined; } From 450d2f7d05cc3bd0e75dcd89cd92bf156fc2f348 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Fri, 3 May 2019 18:25:38 -0400 Subject: [PATCH 0430/1466] widening of select-address panel --- .../components/WalletButton.scss | 1 - common/translations/lang/en.json | 4 ++- common/v2/features/AddAccount/AddAccount.tsx | 8 +++--- .../features/AddAccount/AddAccountStyles.scss | 22 +++++++++++++--- .../components/DeterministicWallets.scss | 26 +++++++++++-------- .../components/DeterministicWallets.tsx | 20 +++++++------- 6 files changed, 50 insertions(+), 31 deletions(-) diff --git a/common/components/WalletDecrypt/components/WalletButton.scss b/common/components/WalletDecrypt/components/WalletButton.scss index 98ba00fcc..cf62af88f 100644 --- a/common/components/WalletDecrypt/components/WalletButton.scss +++ b/common/components/WalletDecrypt/components/WalletButton.scss @@ -72,7 +72,6 @@ justify-content: center; align-items: center; font-size: $font-size-medium; - margin-bottom: $space * 1.25; transition: color 150ms ease; &-icon { diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index aa04b1e0f..5b33354e7 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -792,6 +792,8 @@ "NO_ACCOUNTS_HEADER":"You don't have any accounts in your wallet.", "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now.", "PRIVATE_KEY_HELP":"Not working? [Here's some troubleshooting tips to try.] ($link)", - "ADD_ACCOUNT_FOOTER_LINK": "Don't have an account? [Create a new account now.](https://MyCrypto.com/download-desktop-app)" + "ADD_ACCOUNT_FOOTER_LINK": "Don't have an account? [Create a new account now.](https://MyCrypto.com/download-desktop-app)", + "ADD_ACCOUNT_DESCRIPTION": "Select from the options below to unlock your account and manage your assets.", + "ADD_ACCOUNT_NETWORK_SELCT":"Select the blockchain that you want to operate with and the network it connects through. Not sure what to choose? Stick with the default choices below and click next." } } diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 6d2ecbb7a..35786079a 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -398,6 +398,9 @@ const WalletDecrypt = withRouter( return (

              {translate('DECRYPT_ACCESS')}

              +
              + {translate('ADD_ACCOUNT_DESCRIPTION')} +
              {accessMessage && (
              {accessMessage} @@ -497,10 +500,7 @@ const WalletDecrypt = withRouter(
              Select Network
              -
              - Select the blockchain that you want to operate with and the node it connects through. - Not sure what to choose? Stick with the default choices below and click next. -
              +
              {translate('ADD_ACCOUNT_NETWORK_SELCT')}
              diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index ebf3033c4..ff4d7ebac 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -21,6 +21,7 @@ $speed: 500ms; margin: $space 0 2rem; font-weight: normal; animation: decrypt-enter $speed ease 1; + padding-top: 0.75em; } .Panel { @@ -90,7 +91,7 @@ $speed: 500ms; text-align: center; &-button { position: absolute; - bottom: 50px; + bottom: 2em; width: calc(100% - 140px); } } @@ -100,6 +101,7 @@ $speed: 500ms; font-family: Lato; font-size: 15px; color: var(--dark-slate-blue); + padding-top: 1.25em; } &-dropdown { padding-top: 10px; @@ -107,11 +109,10 @@ $speed: 500ms; } .WalletDecrypt { - display: flex; justify-content: center; box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 1px 4px 0 rgba(0, 0, 0, 0.12); width: 760px; - min-height: 790px; + min-height: 850px; border-radius: 3px; @media (max-width: $screen-md) { @@ -280,15 +281,28 @@ $speed: 500ms; } .WalletDecrypt { - position: relative; + display: flex; &-wallets { margin: 0 -$space-md; + justify-content: center; + text-align: center; &-title { @include decrypt-title; } + &-description { + text-align: center; + display: flex; + justify-content: center; + + height: 54px; + font-family: Lato; + font-size: 18px; + line-height: 1.5; + } + &-row { display: flex; justify-content: center; diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index ea91524bf..0d87bd5cb 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -11,25 +11,29 @@ left: 50%; height: 800px; margin-top: -125px; - margin-left: -225px; - - header { + margin-left: -425px; + position: relative; + z-index: 1; + + &-header { + display: flex; + justify-content: space-around; + align-content: center; + position: relative; + z-index: 1; width: 100%; margin-bottom: 20px; - } - - &-path { - margin-bottom: 20px; - + background-color: #ffffff; + padding-top: 40px; + margin-bottom: 35px; &-title { font-size: 32px; font-weight: bold; - margin-bottom: 20px; } &-select { - flex: 1; - + width: 421px; + height: 26px; small { padding-left: 5px; opacity: 0.5; diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index c64bc46dc..f48b54a07 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Select, { Option } from 'react-select'; import { connect } from 'react-redux'; -import { Table, Address, IconLink, Typography, Button } from '@mycrypto/ui'; +import { Table, Address, Button } from '@mycrypto/ui'; import translate, { translateRaw } from 'translations'; import { isValidPath } from 'libs/validators'; @@ -92,16 +92,15 @@ class DeterministicWalletsClass extends React.PureComponent { return (
              -
              -
              {translate('DECRYPT_PROMPT_SELECT_ADDRESS')}
              - - Derivation Path{' '} +
              + {' '} +
              {translate('DECRYPT_PROMPT_SELECT_ADDRESS')}
              +
              + {/* Derivation Path{' '} - -
              + /> */} form.setFieldValue(field.name, value)} - placeholder="Enter an Address or Contact" - className="SendAssetsForm-fieldset-input" - /> - )} - /> + ) => ( + + )} /> {/* Amount / Asset */}
              @@ -63,30 +96,49 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props)
              Amount
              send max
              - ) => ( - form.setFieldValue(field.name, value)} - placeholder="0.00" - className="SendAssetsForm-fieldset-input" - /> - )} - /> + + ) => ( + form.setFieldValue(field.name, value)} + placeholder="0.00" + className="SendAssetsForm-fieldset-input" + /> + )} + /> +
              - ) => ( - - )} - /> + + {({ assetOptions = [] }) => { + const assetslist: string[] = []; + assetOptions.map(en => { + assetslist.push(en.ticker); + }) + return( + ) => ( + + )} + /> + ) + }} +
              {/* You'll Send */} @@ -145,6 +197,7 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) name="gasPrice" render={({ field, form }: FieldProps) => ( form.setFieldValue(field.name, value) @@ -161,6 +214,7 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) name="gasLimit" render={({ field, form }: FieldProps) => ( form.setFieldValue(field.name, value) @@ -177,6 +231,7 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) name="nonce" render={({ field, form }: FieldProps) => ( form.setFieldValue(field.name, value) @@ -194,6 +249,7 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) name="data" render={({ field, form }: FieldProps) => ( form.setFieldValue(field.name, value) diff --git a/common/v2/features/Dashboard/SendAssets/components/index.ts b/common/v2/features/Dashboard/SendAssets/components/index.ts index d1913f753..643e17043 100644 --- a/common/v2/features/Dashboard/SendAssets/components/index.ts +++ b/common/v2/features/Dashboard/SendAssets/components/index.ts @@ -1,3 +1,4 @@ export { default as ConfirmTransaction } from './ConfirmTransaction'; export { default as SendAssetsForm } from './SendAssetsForm'; export { default as TransactionComplete } from './TransactionComplete'; +export { default as RecipientAddressField } from './RecipientAddressField'; From 275fda46facdaf73964e0a25ce5058b4af3349f9 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Sat, 30 Mar 2019 08:50:49 -0400 Subject: [PATCH 0438/1466] extract out some fields --- .../Dashboard/SendAssets/SendAssets.tsx | 15 +- .../components/RecipientAddressField.tsx | 38 ---- .../SendAssets/components/SendAssetsForm.tsx | 188 ++++-------------- .../components/fields/AmountField.tsx | 87 ++++++++ .../components/fields/DataField.tsx | 48 +++++ .../components/fields/GasLimitField.tsx | 47 +++++ .../components/fields/GasPriceField.tsx | 51 +++++ .../fields/RecipientAddressField.tsx | 38 ++++ .../components/fields/SenderAddressField.tsx | 58 ++++++ .../SendAssets/components/fields/index.ts | 6 + .../Dashboard/SendAssets/components/index.ts | 4 +- 11 files changed, 382 insertions(+), 198 deletions(-) delete mode 100644 common/v2/features/Dashboard/SendAssets/components/RecipientAddressField.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/index.ts diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx index 4a986b43e..875f96a30 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -8,8 +8,6 @@ import './SendAssets.scss'; // Legacy import sendIcon from 'common/assets/images/icn-send.svg'; -import { WhenQueryExists } from 'components/renderCbs'; -import translate from 'translations'; import { isAdvancedQueryTransaction } from 'utils/helpers'; export interface Transaction { @@ -31,14 +29,12 @@ interface State { transaction: Transaction; } - - const getInitialState = (): State => { - return ({ + return { step: 0, transaction: { - senderAddress: 'blah' || '', - recipientAddress: 'blahrecipient' || '', + senderAddress: '', + recipientAddress: '', amount: '0.00', asset: 'ETH', transactionFee: '', @@ -47,9 +43,9 @@ const getInitialState = (): State => { gasPrice: '20', gasLimit: '21000', nonce: '0', - data: '' + data: '' } - }) + }; }; export class SendAssets extends Component> { @@ -65,7 +61,6 @@ export class SendAssets extends Component> { return ( - ; -} - -interface StateProps { - name: string; -} - -type Props = OwnProps & StateProps; - -export default function RecipientAddressField ({ showLabelMatch}: Props ) { - return ( - -)}; -/* -export default connect((state: AppState): StateProps => ({ - name: 'meh' -}))(RecipientAddressField);*/ -//export default connect((state: AppState) => ((RecipientAddressField))); \ No newline at end of file diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx index cc7a3e999..a5e52e55f 100644 --- a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx @@ -1,17 +1,22 @@ import React from 'react'; import { Formik, Form, Field, FieldProps } from 'formik'; -import { Button, ComboBox, Heading, Input, Typography } from '@mycrypto/ui'; +import { Button, Heading, Input, Typography } from '@mycrypto/ui'; import { Transaction } from '../SendAssets'; import './SendAssetsForm.scss'; // Legacy import sendIcon from 'common/assets/images/icn-send.svg'; -import { AccountContext, AssetOptionsContext } from 'v2/providers'; import { WhenQueryExists } from 'components/renderCbs'; import translate from 'translations'; -import { AddressField } from 'components'; -import { RecipientAddressField } from '.'; +import { + RecipientAddressField, + AmountField, + SenderAddressField, + GasPriceField, + GasLimitField, + DataField +} from './fields'; interface Props { transaction: Transaction; @@ -31,128 +36,48 @@ const QueryWarning: React.SFC<{}> = () => ( export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) { return ( - { onSubmit(values); - console.log('values: ' + JSON.stringify(values, null, 4)) + console.log('values: ' + JSON.stringify(values, null, 4)); onNext(); }} render={({ setFieldValue, values: { advancedMode }, handleChange }) => { const toggleAdvancedOptions = () => setFieldValue('advancedMode', !advancedMode); return ( - - {/* Sender Address */} + {/* Sender Address */} +
              - - - {({ accounts }) => { - const accountlist: string[] = []; - accounts.map(en => { - accountlist.push(en.address); - }) - return( - ) => ( - - )} - /> - ) - }} - +
              {translate('X_ADDRESS')}
              +
              {/* Recipient Address */} - +
              - ) => ( - - )} /> +
              {translate('SEND_ADDR')}
              +
              {/* Amount / Asset */} -
              -
              - - - ) => ( - form.setFieldValue(field.name, value)} - placeholder="0.00" - className="SendAssetsForm-fieldset-input" - /> - )} - /> - -
              -
              - - - {({ assetOptions = [] }) => { - const assetslist: string[] = []; - assetOptions.map(en => { - assetslist.push(en.ticker); - }) - return( - ) => ( - - )} - /> - ) - }} - -
              -
              + {/* You'll Send */}
              - Send 13.233333 ETH + Send 13.233333 ETH{/* TRANSLATE THIS */} - ≈ $1440.00 USD + + {/* TRANSLATE THIS */}≈ $1440.00 USD +
              Conversion Rate
              - 1 ETH ≈ $109.41 USD + {/* TRANSLATE THIS */} + 1 ETH ≈ $109.41 USD{/* TRANSLATE THIS */}
              @@ -161,7 +86,9 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props)
              @@ -170,7 +97,9 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props)
              Cheap
              + {/* TRANSLATE THIS */}
              Fast
              + {/* TRANSLATE THIS */}
              {/* Advanced Options */} @@ -187,43 +116,17 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props)
              - - ) => ( - - form.setFieldValue(field.name, value) - } - placeholder="0" - className="SendAssetsForm-fieldset-input" - /> - )} - /> + +
              -
              - - ) => ( - - form.setFieldValue(field.name, value) - } - placeholder="150000000" - className="SendAssetsForm-fieldset-input" - /> - )} - /> +
              + +
              @@ -244,31 +147,18 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props)
              - - ) => ( - - form.setFieldValue(field.name, value) - } - placeholder="0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520" - className="SendAssetsForm-fieldset-input" - /> - )} - /> + +
              - 0 + 13000000000 * 1500000 + 20000000000 * (180000 + 53000) = 0.02416 ETH ~= - $2.67 USD + 0 + 13000000000 * 1500000 + 20000000000 * (180000 + 53000) = 0.02416 ETH ~={/* TRANSLATE THIS */} + $2.67 USD{/* TRANSLATE THIS */}
              )}
              ); diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx new file mode 100644 index 000000000..fe5e79ef5 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx @@ -0,0 +1,87 @@ +import React, { ChangeEvent, Component } from 'react'; +import { Field, FieldProps } from 'formik'; +import { Transaction } from '../../SendAssets'; +import { Input, ComboBox } from '@mycrypto/ui'; +import { AssetOptionsContext } from 'v2/providers'; +//import { donationAddressMap } from ''; + +interface OwnProps { + handleChange: { + (e: ChangeEvent): void; + >(field: T): T extends ChangeEvent + ? void + : (e: string | ChangeEvent) => void; + }; +} + +/*interface StateProps { + name: string; +}*/ + +type Props = OwnProps; // & StateProps; + +export default class AmountField extends Component { + public isValidateAmount = (value: any) => { + const valid = value >= 0; // && value <= (this.balance - this.gasCost); + this.setState({ isValidAmount: valid }); + return valid; + }; + + render() { + const { handleChange } = this.props; + return ( +
              +
              + + ) => ( + form.setFieldValue(field.name, value)} + placeholder="0.00" + className="SendAssetsForm-fieldset-input" + /> + )} + /> +
              +
              + + + {({ assetOptions = [] }) => { + const assetslist: string[] = []; + assetOptions.map(en => { + assetslist.push(en.ticker); + }); + return ( + ) => ( + + )} + /> + ); + }} + +
              +
              + ); + } +} diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx new file mode 100644 index 000000000..fc3a841aa --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx @@ -0,0 +1,48 @@ +import React, { ChangeEvent, Component } from 'react'; +import { Field, FieldProps } from 'formik'; +import { Transaction } from '../../SendAssets'; +import { Input } from '@mycrypto/ui'; +//import { donationAddressMap } from ''; + +interface OwnProps { + handleChange: { + (e: ChangeEvent): void; + >(field: T): T extends ChangeEvent + ? void + : (e: string | ChangeEvent) => void; + }; +} + +/*interface StateProps { + name: string; +}*/ + +type Props = OwnProps; // & StateProps; + +export default class DataField extends Component { + public isValidDataInput = (value: any) => { + const valid = true; + this.setState({ isValidDataInput: valid }); + return valid; + }; + + render() { + //const { handleChange } = this.props; + return ( + ) => ( + form.setFieldValue(field.name, value)} + placeholder="0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520" + className="SendAssetsForm-fieldset-input" + /> + )} + /> + ); + } +} diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx new file mode 100644 index 000000000..a2535f9e5 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx @@ -0,0 +1,47 @@ +import React, { ChangeEvent, Component } from 'react'; +import { Field, FieldProps } from 'formik'; +import { Transaction } from '../../SendAssets'; +import { Input } from '@mycrypto/ui'; +//import { donationAddressMap } from ''; + +interface OwnProps { + handleChange: { + (e: ChangeEvent): void; + >(field: T): T extends ChangeEvent + ? void + : (e: string | ChangeEvent) => void; + }; +} + +/*interface StateProps { + name: string; +}*/ + +type Props = OwnProps; // & StateProps; + +export default class GasLimitField extends Component { + public isValidGasLimit = (value: any) => { + const valid = value >= 0 && value <= 8000000; + this.setState({ isValidGasLimit: valid }); + return valid; + }; + + render() { + //const { handleChange } = this.props; + return ( + ) => ( + form.setFieldValue(field.name, value)} + placeholder="21000" + className="SendAssetsForm-fieldset-input" + /> + )} + /> + ); + } +} diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx new file mode 100644 index 000000000..52b3e0ca3 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx @@ -0,0 +1,51 @@ +import React, { ChangeEvent, Component } from 'react'; +import { Field, FieldProps } from 'formik'; +import { Transaction } from '../../SendAssets'; +import { Input } from '@mycrypto/ui'; +//import { donationAddressMap } from ''; + +interface OwnProps { + handleChange: { + (e: ChangeEvent): void; + >(field: T): T extends ChangeEvent + ? void + : (e: string | ChangeEvent) => void; + }; +} + +/*interface StateProps { + name: string; +}*/ + +type Props = OwnProps; // & StateProps; + +export default class GasPriceField extends Component { + public isValidGasPrice = (value: any) => { + const valid = value >= 0 && value <= 3000; + this.setState({ isValidGasPrice: valid }); + return valid; + }; + + render() { + const { handleChange } = this.props; + return ( + ) => ( + form.setFieldValue(field.name, value)} + placeholder="20" + className="SendAssetsForm-fieldset-input" + /> + )} + /> + ); + } +} +/* +export default connect((state: AppState): StateProps => ({ + name: 'meh' +}))(RecipientAddressField);*/ +//export default connect((state: AppState) => ((RecipientAddressField))); diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx new file mode 100644 index 000000000..9a54e8681 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx @@ -0,0 +1,38 @@ +import React, { Component } from 'react'; +import { Field, FieldProps } from 'formik'; +import { Transaction } from '../../SendAssets'; +import { Input } from '@mycrypto/ui'; +import { isValidETHAddress } from 'libs/validators'; + +interface StateProps { + isValidFieldInput: boolean; +} + +export default class RecipientAddressField extends Component { + public state: StateProps = { + isValidFieldInput: true + }; + public isValidRecipientAddress = (value: any) => { + const valid = isValidETHAddress(value); + this.setState({ isValidFieldInput: valid }); + return valid; + }; + + public render() { + return ( + ) => ( + + )} + /> + ); + } +} diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx new file mode 100644 index 000000000..a813d989c --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx @@ -0,0 +1,58 @@ +import React, { ChangeEvent, Component } from 'react'; +import { Field, FieldProps } from 'formik'; +import { Transaction } from '../../SendAssets'; +import { ComboBox } from '@mycrypto/ui'; +import { AccountContext } from 'v2/providers'; + +interface OwnProps { + handleChange: { + (e: ChangeEvent): void; + >(field: T): T extends ChangeEvent + ? void + : (e: string | ChangeEvent) => void; + }; +} + +/*interface StateProps { + name: string; +}*/ + +type Props = OwnProps; // & StateProps; + +export default class SenderAddressField extends Component { + public isValidateSender = (value: any) => { + return true; + }; + + public render() { + const { handleChange } = this.props; + return ( + + {({ accounts }) => { + const accountlist: string[] = []; + accounts.map(en => { + accountlist.push(en.address); + }); + return ( + ) => ( + + )} + /> + ); + }} + + ); + } +} diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/index.ts b/common/v2/features/Dashboard/SendAssets/components/fields/index.ts new file mode 100644 index 000000000..f82303156 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/fields/index.ts @@ -0,0 +1,6 @@ +export { default as RecipientAddressField } from './RecipientAddressField'; +export { default as SenderAddressField } from './SenderAddressField'; +export { default as AmountField } from './AmountField'; +export { default as GasPriceField } from './GasPriceField'; +export { default as GasLimitField } from './GasLimitField'; +export { default as DataField } from './DataField'; diff --git a/common/v2/features/Dashboard/SendAssets/components/index.ts b/common/v2/features/Dashboard/SendAssets/components/index.ts index 643e17043..d220236b8 100644 --- a/common/v2/features/Dashboard/SendAssets/components/index.ts +++ b/common/v2/features/Dashboard/SendAssets/components/index.ts @@ -1,4 +1,6 @@ export { default as ConfirmTransaction } from './ConfirmTransaction'; export { default as SendAssetsForm } from './SendAssetsForm'; export { default as TransactionComplete } from './TransactionComplete'; -export { default as RecipientAddressField } from './RecipientAddressField'; +//export { default as RecipientAddressField } from './fields/RecipientAddressField'; + +export * from './fields'; From 2dbd090015e86cdf58178d2a7eb55593905aee4c Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 2 Apr 2019 13:45:05 -0400 Subject: [PATCH 0439/1466] old slider implement --- .../SendAssets/components/SendAssetsForm.tsx | 47 +++--- .../components/fields/AmountField.tsx | 4 +- .../components/fields/GasPriceSlider.tsx | 151 ++++++++++++++++++ .../components/fields/NonceField.tsx | 47 ++++++ .../components/fields/SenderAddressField.tsx | 7 +- .../SendAssets/components/fields/index.ts | 2 + .../fields/styles/GasPriceSlider.scss | 65 ++++++++ 7 files changed, 292 insertions(+), 31 deletions(-) create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/GasPriceSlider.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/styles/GasPriceSlider.scss diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx index a5e52e55f..96adc0c37 100644 --- a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Formik, Form, Field, FieldProps } from 'formik'; -import { Button, Heading, Input, Typography } from '@mycrypto/ui'; +import { Formik, Form, Field } from 'formik'; +import { Button, Heading, Typography } from '@mycrypto/ui'; import { Transaction } from '../SendAssets'; import './SendAssetsForm.scss'; @@ -14,8 +14,10 @@ import { AmountField, SenderAddressField, GasPriceField, + GasPriceSlider, GasLimitField, - DataField + DataField, + NonceField } from './fields'; interface Props { @@ -40,12 +42,18 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) initialValues={transaction} onSubmit={values => { onSubmit(values); - console.log('values: ' + JSON.stringify(values, null, 4)); onNext(); }} - render={({ setFieldValue, values: { advancedMode }, handleChange }) => { + render={({ setFieldValue, values: { advancedMode, gasPrice }, handleChange }) => { const toggleAdvancedOptions = () => setFieldValue('advancedMode', !advancedMode); - + const gasEstimates = { + fastest: 20, + fast: 18, + standard: 12, + isDefault: true, + safeLow: 4 + }; + console.log('gas Price: ' + gasPrice); return (
              @@ -90,11 +98,11 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props)
              0.000273 / $0.03 USD
              {/* TRANSLATE THIS */} -
              -
              - -
              -
              +
              Cheap
              {/* TRANSLATE THIS */} @@ -114,7 +122,7 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) {advancedMode && (
              - + @@ -130,20 +138,7 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props)
              - ) => ( - - form.setFieldValue(field.name, value) - } - placeholder="0" - className="SendAssetsForm-fieldset-input" - /> - )} - /> +
              diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx index fe5e79ef5..ffcf48f6f 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx @@ -21,7 +21,7 @@ interface OwnProps { type Props = OwnProps; // & StateProps; export default class AmountField extends Component { - public isValidateAmount = (value: any) => { + public isValidAmount = (value: any) => { const valid = value >= 0; // && value <= (this.balance - this.gasCost); this.setState({ isValidAmount: valid }); return valid; @@ -41,7 +41,7 @@ export default class AmountField extends Component { ) => ( ): void; + >(field: T): T extends ChangeEvent + ? void + : (e: string | ChangeEvent) => void; + }; +} +/* +interface ActionProps { + fetchGasEstimates: {};//gasActions.TFetchGasEstimates; +}*/ + +type Props = OwnProps & StateProps; // & ActionProps; + +interface State { + hasSetRecommendedGasPrice: boolean; + realGasPrice: number; +} + +interface GasTooltips { + [estimationLevel: string]: string; +} + +export default class SimpleGas extends React.Component { + public state: State = { + hasSetRecommendedGasPrice: false, + realGasPrice: 0 + }; + + public render() { + const { gasPrice } = this.props; + const gasEstimates = { + fastest: 20, + fast: 18, + standard: 12, + isDefault: false, + safeLow: 4 + }; + + const bounds = { + max: gasEstimates ? gasEstimates.fastest : gasPriceDefaults.max, + min: gasEstimates ? gasEstimates.safeLow : gasPriceDefaults.min + }; + const gasNotches = this.makeGasNotches(); + + /** + * @desc On retrieval of gas estimates, + * the current gas price may be lower than the lowest recommended price. + * `rc-slider` will force the onChange if the value is too low, so we + * ensure it at least passes the lower boundary. + * When this occurs, the logic in `UNSAFE_componentWillReceiveProps` fires, + * and it cannot happen again from that point forward. + */ + const actualGasPrice = Math.max(parseFloat(gasPrice), bounds.min); + return ( + ) => { + return ( +
              +
              +
              + { + form.setFieldValue(field.name, e); + }} + min={bounds.min} + max={bounds.max} + marks={gasNotches} + included={false} + value={actualGasPrice} + tipFormatter={this.formatTooltip} + step={bounds.min < 1 ? 0.1 : 1} + /> +
              + {translate('TX_FEE_SCALE_LEFT')} + {translate('TX_FEE_SCALE_RIGHT')} +
              +
              +
              +
              + ); + }} + /> + ); + } + + private makeGasNotches = (): Marks => { + const { gasEstimates } = this.props; + + return gasEstimates + ? { + [gasEstimates.safeLow]: '', + [gasEstimates.standard]: '', + [gasEstimates.fast]: '', + [gasEstimates.fastest]: '' + } + : {}; + }; + + private formatTooltip = (gas: number) => { + const { gasEstimates } = this.props; + console.log('gasEstimates: ' + JSON.stringify(gasEstimates, null, 2)); + console.log('out: ' + gasEstimates + ' and ' + !gasEstimates.isDefault); + if (!(gasEstimates && !gasEstimates.isDefault)) { + console.log('got here3'); + return ''; + } + console.log('gas: ' + gas); + + const gasTooltips: GasTooltips = { + [gasEstimates.fast]: translateRaw('TX_FEE_RECOMMENDED_FAST'), + [gasEstimates.fastest]: translateRaw('TX_FEE_RECOMMENDED_FASTEST'), + [gasEstimates.safeLow]: translateRaw('TX_FEE_RECOMMENDED_SAFELOW'), + [gasEstimates.standard]: translateRaw('TX_FEE_RECOMMENDED_STANDARD') + }; + + const recommended = gasTooltips[gas] || ''; + const x = translateRaw('GAS_GWEI_COST', { + $gas: gas.toString(), + $recommended: recommended + }); + console.log('x: ' + x); + return x; + }; +} diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx new file mode 100644 index 000000000..d54a497f2 --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx @@ -0,0 +1,47 @@ +import React, { ChangeEvent, Component } from 'react'; +import { Field, FieldProps } from 'formik'; +import { Transaction } from '../../SendAssets'; +import { Input } from '@mycrypto/ui'; +//import { donationAddressMap } from ''; + +interface OwnProps { + handleChange: { + (e: ChangeEvent): void; + >(field: T): T extends ChangeEvent + ? void + : (e: string | ChangeEvent) => void; + }; +} + +/*interface StateProps { + name: string; +}*/ + +type Props = OwnProps; // & StateProps; + +export default class NonceField extends Component { + public isValidNonce = (value: any) => { + const valid = value >= 0; // && value <= (this.balance - this.gasCost); + this.setState({ isValidAmount: valid }); + return valid; + }; + + render() { + const { handleChange } = this.props; + return ( + ) => ( + form.setFieldValue(field.name, value)} + placeholder="0" + className="SendAssetsForm-fieldset-input" + /> + )} + /> + ); + } +} diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx index a813d989c..5f8adbd3b 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx @@ -3,6 +3,7 @@ import { Field, FieldProps } from 'formik'; import { Transaction } from '../../SendAssets'; import { ComboBox } from '@mycrypto/ui'; import { AccountContext } from 'v2/providers'; +import { isValidETHAddress } from 'libs/validators'; interface OwnProps { handleChange: { @@ -20,8 +21,8 @@ interface OwnProps { type Props = OwnProps; // & StateProps; export default class SenderAddressField extends Component { - public isValidateSender = (value: any) => { - return true; + public isValidSender = (value: any) => { + return isValidETHAddress(value); }; public render() { @@ -37,7 +38,7 @@ export default class SenderAddressField extends Component { ) => ( .SimpleGas-slider { + flex-grow: 1; + margin-right: $space; + + > .rc-slider > .rc-slider-step > .rc-slider-dot { + height: 20px; + width: 12px; + bottom: -7px + } + } + + > .FeeSummary { + margin-left: $space; + min-width: 224px; + } + + @media screen and (max-width: $screen-md) { + flex-wrap: wrap; + + > .SimpleGas-slider { + width: 100%; + margin-right: 0; + } + + > .FeeSummary { + width: 100%; + margin-left: 0; + } + } + } + + &-slider { + padding-top: 8px; + margin-bottom: $space-xs; + + &-labels { + margin-top: 4px; + display: flex; + + > span { + flex: 1; + padding: 0 $space-xs; + text-align: center; + color: shade-dark(0.4); + font-size: $font-size-xs; + + &:first-child { + text-align: left; + } + + &:last-child { + text-align: right; + } + } + } + } +} From 09c9fb72e10aecd314a47d4b1e0fae3f019b5a4d Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 2 Apr 2019 14:32:09 -0400 Subject: [PATCH 0440/1466] some clean up --- .../Dashboard/SendAssets/components/SendAssetsForm.tsx | 1 - .../Dashboard/SendAssets/components/fields/AmountField.tsx | 2 +- .../Dashboard/SendAssets/components/fields/DataField.tsx | 4 ++-- .../SendAssets/components/fields/GasLimitField.tsx | 2 +- .../SendAssets/components/fields/GasPriceField.tsx | 3 +-- .../SendAssets/components/fields/GasPriceSlider.tsx | 6 ------ .../Dashboard/SendAssets/components/fields/NonceField.tsx | 3 +-- 7 files changed, 6 insertions(+), 15 deletions(-) diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx index 96adc0c37..acab0eb1a 100644 --- a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx @@ -53,7 +53,6 @@ export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) isDefault: true, safeLow: 4 }; - console.log('gas Price: ' + gasPrice); return ( diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx index ffcf48f6f..165660844 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx @@ -27,7 +27,7 @@ export default class AmountField extends Component { return valid; }; - render() { + public render() { const { handleChange } = this.props; return (
              diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx index fc3a841aa..1f8428619 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx @@ -20,13 +20,13 @@ interface OwnProps { type Props = OwnProps; // & StateProps; export default class DataField extends Component { - public isValidDataInput = (value: any) => { + public isValidDataInput = () => { const valid = true; this.setState({ isValidDataInput: valid }); return valid; }; - render() { + public render() { //const { handleChange } = this.props; return ( { return valid; }; - render() { + public render() { //const { handleChange } = this.props; return ( { return valid; }; - render() { - const { handleChange } = this.props; + public render() { return ( { return ( ) => { return (
              @@ -125,13 +124,9 @@ export default class SimpleGas extends React.Component { private formatTooltip = (gas: number) => { const { gasEstimates } = this.props; - console.log('gasEstimates: ' + JSON.stringify(gasEstimates, null, 2)); - console.log('out: ' + gasEstimates + ' and ' + !gasEstimates.isDefault); if (!(gasEstimates && !gasEstimates.isDefault)) { - console.log('got here3'); return ''; } - console.log('gas: ' + gas); const gasTooltips: GasTooltips = { [gasEstimates.fast]: translateRaw('TX_FEE_RECOMMENDED_FAST'), @@ -145,7 +140,6 @@ export default class SimpleGas extends React.Component { $gas: gas.toString(), $recommended: recommended }); - console.log('x: ' + x); return x; }; } diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx index d54a497f2..8f0e6f054 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx @@ -26,8 +26,7 @@ export default class NonceField extends Component { return valid; }; - render() { - const { handleChange } = this.props; + public render() { return ( Date: Wed, 3 Apr 2019 21:42:34 -0400 Subject: [PATCH 0441/1466] gas price slider slight fix --- common/v2/features/Dashboard/SendAssets/SendAssets.tsx | 2 +- .../Dashboard/SendAssets/components/fields/GasPriceSlider.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx index 875f96a30..454d77507 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -37,7 +37,7 @@ const getInitialState = (): State => { recipientAddress: '', amount: '0.00', asset: 'ETH', - transactionFee: '', + transactionFee: '20', advancedMode: isAdvancedQueryTransaction(location.search) || false, automaticallyCalculateGasLimit: true, gasPrice: '20', diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceSlider.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceSlider.tsx index 4f22539e1..407629fff 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceSlider.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceSlider.tsx @@ -77,7 +77,7 @@ export default class SimpleGas extends React.Component { const actualGasPrice = Math.max(parseFloat(gasPrice), bounds.min); return ( ) => { return (
              From 05f7896402973011549b7442cd3d5cd7cd87076f Mon Sep 17 00:00:00 2001 From: blurpesec Date: Sun, 5 May 2019 11:46:44 -0400 Subject: [PATCH 0442/1466] fix prettier --- .../components/ConfirmTransaction.tsx | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx b/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx index e33ae4713..94766af54 100644 --- a/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx @@ -41,28 +41,32 @@ export default class ConfirmTransaction extends Component { addressMetadata.map(en => { if (en.address.toLowerCase() === recipientAddress.toLowerCase()) { recipientLabel = en.label; - } + } if (en.address.toLowerCase() === senderAddress.toLowerCase()) { senderLabel = en.label; } - }) + }); return ( -
              -
              - To: -
              -
              +
              +
              + To: +
              +
              +
              -
              -
              - From: -
              -
              +
              + From: +
              +
              +
              -
              - )} - } + ); + }}
              From e28756fa36e3cf70474a62600de57dfd6134876a Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 6 May 2019 00:24:47 -0400 Subject: [PATCH 0443/1466] Private key styling done --- common/translations/lang/en.json | 4 ++-- common/v2/features/AddAccount/components/PrivateKey.scss | 8 +++++++- common/v2/features/AddAccount/components/PrivateKey.tsx | 8 +++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index d57db5228..9bd94e6dc 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -795,8 +795,8 @@ "DOWNLOAD_APP_FOOTER_INFO": "Not sure what this is?", "NO_ACCOUNTS_HEADER":"You don't have any accounts in your wallet.", "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now.", - "PRIVATE_KEY_HELP":"Not working? [Here's some troubleshooting tips to try.] ($link)", - "ADD_ACCOUNT_FOOTER_LINK": "Don't have an account? [Create a new account now.](https://MyCrypto.com/download-desktop-app)", + "PRIVATE_KEY_HELP":"Not working?[Here's some troubleshooting tips to try.](https://support.mycrypto.com/troubleshooting/accessing-wallet/private-key-not-working)", + "ADD_ACCOUNT_FOOTER_LINK": "Don't have an account? [ Create a new account now.](https://MyCrypto.com/download-desktop-app)", "ADD_ACCOUNT_DESCRIPTION": "Select from the options below to unlock your account and manage your assets.", "ADD_ACCOUNT_NETWORK_SELCT":"Select the blockchain that you want to operate with and the network it connects through. Not sure what to choose? Stick with the default choices below and click next.", "ACCOUNT_LIST_TABLE_ADD_ACCOUNT": "Add Account", diff --git a/common/v2/features/AddAccount/components/PrivateKey.scss b/common/v2/features/AddAccount/components/PrivateKey.scss index 077e79a2a..f96b009ff 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.scss +++ b/common/v2/features/AddAccount/components/PrivateKey.scss @@ -5,9 +5,15 @@ justify-content: center; margin: 4em; } + &-label { + width: 110px; + height: 18px; + font-family: Lato; + font-size: 15px; + } &-help { display: flex; justify-content: center; - margin: 2rem; + margin-top: 2rem; } } diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index 9467592db..9917dcc64 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -48,8 +48,6 @@ interface Props { onUnlock(): void; } -const privateKeyHelpLink = - 'https://support.mycrypto.com/troubleshooting/accessing-wallet/private-key-not-working'; export class PrivateKeyDecrypt extends PureComponent { public render() { const { key, password } = this.props.value; @@ -65,6 +63,7 @@ export class PrivateKeyDecrypt extends PureComponent {
              ); } From ddd196e807de881446ea107420de10acfc541b7e Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 6 May 2019 00:40:45 -0400 Subject: [PATCH 0445/1466] mnemonic phrase styling complete --- common/translations/lang/en.json | 5 +++-- common/v2/features/AddAccount/components/Mnemonic.scss | 6 ++++++ common/v2/features/AddAccount/components/Mnemonic.tsx | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index de6211dce..0c3327d81 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -110,7 +110,7 @@ "ADD_LABEL_6": "Unlock your Wallet ", "ADD_LABEL_6_SHORT": "Unlock ", "ADD_LABEL_7": "Add Account ", - "ADD_LABEL_8": "Password (optional): ", + "ADD_LABEL_8": "Your Password (optional): ", "ADD_LABEL_9": "add label", "ADD_WEB3DESC": "Connect & sign via your browser or extension", "ADD_HARDWAREDESC": "Connect & sign via your hardware wallet", @@ -835,6 +835,7 @@ "SCREEN_LOCK_TAB_TITLE": "MyCrypto", "SCREEN_LOCK_TAB_TITLE_LOCKED": "MyCrypto (Locked)", "SCREEN_LOCK_TAB_TITLE_LOCKING": "Locking Screen in", - "KEYSTORE_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-keystore-file)" + "KEYSTORE_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-keystore-file)", + "MNEMONIC_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-mnemonic-phrase)]" } } diff --git a/common/v2/features/AddAccount/components/Mnemonic.scss b/common/v2/features/AddAccount/components/Mnemonic.scss index 59672b575..917d19d44 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.scss +++ b/common/v2/features/AddAccount/components/Mnemonic.scss @@ -6,4 +6,10 @@ justify-content: center; margin: 3em; } + &-help { + display: flex; + justify-content: center; + margin-top: 2rem; + padding-bottom: 2em; + } } diff --git a/common/v2/features/AddAccount/components/Mnemonic.tsx b/common/v2/features/AddAccount/components/Mnemonic.tsx index 63bc6b953..6a664d2ca 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.tsx +++ b/common/v2/features/AddAccount/components/Mnemonic.tsx @@ -72,6 +72,7 @@ class MnemonicDecryptClass extends PureComponent {
              + { />
              -

              {translate('ADD_LABEL_8')}

              + { {translate('MNEMONIC_CHOOSE_ADDR')}
              +
              {translate('KEYSTORE_HELP')}
              ); From 60c0c56f3f8d34c587652827d2b7732690c2f2ce Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 6 May 2019 00:46:17 -0400 Subject: [PATCH 0446/1466] fix main wallet views styles --- .../features/AddAccount/AddAccountStyles.scss | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index ff4d7ebac..0cd60275e 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -21,7 +21,9 @@ $speed: 500ms; margin: $space 0 2rem; font-weight: normal; animation: decrypt-enter $speed ease 1; - padding-top: 0.75em; + padding-top: 1em; + font-size: 32px; + font-weight: bold; } .Panel { @@ -48,10 +50,6 @@ $speed: 500ms; font-family: Lato; font-size: 32px; font-weight: bold; - font-style: normal; - font-stretch: normal; - line-height: normal; - letter-spacing: normal; color: var(--dark-slate-blue); text-align: center; @@ -63,10 +61,6 @@ $speed: 500ms; font-family: Lato; font-size: 32px; font-weight: bold; - font-style: normal; - font-stretch: normal; - line-height: normal; - letter-spacing: normal; color: var(--dark-slate-blue); position: relative; } @@ -80,11 +74,7 @@ $speed: 500ms; height: 108px; font-family: Lato; font-size: 18px; - font-weight: normal; - font-style: normal; - font-stretch: normal; line-height: 1.5; - letter-spacing: normal; color: #333333; padding-top: 16px; position: relative; @@ -114,6 +104,7 @@ $speed: 500ms; width: 760px; min-height: 850px; border-radius: 3px; + background-color: #ffffff; @media (max-width: $screen-md) { width: 375px; @@ -130,13 +121,10 @@ $speed: 500ms; height: 19px; font-family: Lato; font-size: 16px; - font-weight: normal; - font-style: normal; - font-stretch: normal; - line-height: normal; - letter-spacing: normal; text-align: center; color: #093053; + margin: 2em; + padding-bottom: 2em; } &-wallets { From 389103164afe996a18274ce67eac09afb95e2c49 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Mon, 6 May 2019 09:28:29 -0400 Subject: [PATCH 0447/1466] some-field-functionality --- common/Root.tsx | 44 +-- .../Dashboard/SendAssets/SendAssets.tsx | 102 +++++-- .../components/ConfirmTransaction.tsx | 9 +- .../SendAssets/components/SendAssetsForm.tsx | 266 ++++++++++-------- .../components/TransactionComplete.tsx | 6 +- .../components/fields/AmountField.tsx | 55 ++-- .../components/fields/AssetField.tsx | 102 +++++++ .../components/fields/DataField.tsx | 4 +- .../components/fields/GasLimitField.tsx | 4 +- .../components/fields/GasPriceField.tsx | 4 +- .../components/fields/NonceField.tsx | 4 +- .../fields/RecipientAddressField.tsx | 48 +++- .../components/fields/SenderAddressField.tsx | 31 +- .../SendAssets/components/fields/index.ts | 1 + common/v2/libs/assetOptions.ts | 11 + common/v2/libs/index.ts | 1 + common/v2/services/AssetOption/types.ts | 4 +- common/v2/services/LocalCache/constants.ts | 2 +- 18 files changed, 467 insertions(+), 231 deletions(-) create mode 100644 common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx create mode 100644 common/v2/libs/assetOptions.ts diff --git a/common/Root.tsx b/common/Root.tsx index 246fe6c60..12cef163d 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -38,7 +38,7 @@ import { AddressMetadataProvider } from 'v2/providers/AddressMetadataProvider'; import { TransactionProvider } from 'v2/providers/TransactionProvider'; import { TransactionHistoryProvider } from 'v2/providers/TransactionHistoryProvider'; import LockScreenProvider from 'v2/providers/LockScreenProvider/LockScreenProvider'; -import { CurrentsProvider } from 'v2/providers'; +import { CurrentsProvider, AssetOptionsProvider } from 'v2/providers'; import { NewAppReleaseModal } from 'v2/components'; interface OwnProps { @@ -124,26 +124,28 @@ class RootClass extends Component { - - - - - - - {onboardingActive && } - {routes} - - - - {process.env.BUILD_ELECTRON && } - - - - {developmentMode && } -
              - - - + + + + + + + + {onboardingActive && } + {routes} + + + + {process.env.BUILD_ELECTRON && } + + + + {developmentMode && } +
              + + + + diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx index 454d77507..93928ddec 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -9,51 +9,99 @@ import './SendAssets.scss'; // Legacy import sendIcon from 'common/assets/images/icn-send.svg'; import { isAdvancedQueryTransaction } from 'utils/helpers'; +import { AssetOption, assetType } from 'v2/services/AssetOption/types'; -export interface Transaction { +export interface TransactionFields { + asset: string; senderAddress: string; recipientAddress: string; amount: string; - asset: string; - transactionFee: string; - advancedMode: boolean; - automaticallyCalculateGasLimit: boolean; - gasPrice: string; + data: string; + gasLimitEstimated: string; + gasPriceSlider: string; + nonceEstimated: string; + gasLimitField: string; // Use only if advanced tab is open AND isGasLimitManual is true + gasPriceField: string; // Use only if advanced tab is open AND user has input gas price + nonceField: string; // Use only if user has input a manual nonce value. +} + +export interface RawTransactionValues { + from: string; + to: string; + value: string; + data: string; gasLimit: string; + gasPrice: string; nonce: string; - data: string; } -interface State { +export interface SendState { step: number; - transaction: Transaction; + transactionFields: TransactionFields; + rawTransactionValues: RawTransactionValues; + + isFetchingAccountValue: boolean; // Used to indicate looking up user's balance of currently-selected asset. + isResolvingNSName: boolean; // Used to indicate recipient-address is ENS name that is currently attempting to be resolved. + isAddressLabelValid: boolean; // Used to indicate if recipient-address is found in the address book. + isFetchingAssetPricing: boolean; // Used to indicate fetching CC rates for currently-selected asset. + isEstimatingGasLimit: boolean; // Used to indicate that gas limit is being estimated using `eth_estimateGas` jsonrpc call. + isGasLimitManual: boolean; // Used to indicate that user has un-clicked the user-input gas-limit checkbox. + isAdvancedTransaction: boolean; // Used to indicate whether transaction fee slider should be displayed and if Advanced Tab fields should be displayed. + + resolvedNSAddress: string; // Address returned when attempting to resolve an ENS/RNS address. + recipientAddressLabel: string; // Recipient-address label found in address book. + asset: AssetOption | undefined; + network: string; + assetType: assetType; // Type of asset selected. Directs how rawTransactionValues field are handled when formatting transaction. } -const getInitialState = (): State => { +const getInitialState = (): SendState => { return { step: 0, - transaction: { + transactionFields: { senderAddress: '', recipientAddress: '', amount: '0.00', asset: 'ETH', - transactionFee: '20', - advancedMode: isAdvancedQueryTransaction(location.search) || false, - automaticallyCalculateGasLimit: true, - gasPrice: '20', - gasLimit: '21000', - nonce: '0', + gasPriceSlider: '20', + gasPriceField: '20', + gasLimitField: '21000', + gasLimitEstimated: '21000', + nonceEstimated: '0', + nonceField: '0', data: '' - } + }, + rawTransactionValues: { + from: '', + to: '', + value: '', + data: '', + gasLimit: '', + gasPrice: '', + nonce: '' + }, + isFetchingAccountValue: false, // Used to indicate looking up user's balance of currently-selected asset. + isResolvingNSName: false, // Used to indicate recipient-address is ENS name that is currently attempting to be resolved. + isAddressLabelValid: false, // Used to indicate if recipient-address is found in the address book. + isFetchingAssetPricing: false, // Used to indicate fetching CC rates for currently-selected asset. + isEstimatingGasLimit: false, // Used to indicate that gas limit is being estimated using `eth_estimateGas` jsonrpc call. + isGasLimitManual: false, // Used to indicate that user has un-clicked the user-input gas-limit checkbox. + isAdvancedTransaction: isAdvancedQueryTransaction(location.search) || false, // Used to indicate whether transaction fee slider should be displayed and if Advanced Tab fields should be displayed. + + resolvedNSAddress: '', // Address returned when attempting to resolve an ENS/RNS address. + recipientAddressLabel: '', // Recipient-address label found in address book. + asset: undefined, + network: 'ETH', + assetType: 'base' // Type of asset selected. Directs how rawTransactionValues field are handled when formatting transaction. }; }; export class SendAssets extends Component> { - public state: State = getInitialState(); + public state: SendState = getInitialState(); public render() { const { history } = this.props; - const { step, transaction } = this.state; + const { step } = this.state; const backOptions = [history.goBack, this.regressStep]; // Step 3, ConfirmTransaction, cannot go back (as backOptions[2] is undefined) const onBack = backOptions[step]; @@ -72,9 +120,10 @@ export class SendAssets extends Component> { }} > @@ -83,19 +132,20 @@ export class SendAssets extends Component> { } private advanceStep = () => - this.setState((prevState: State) => ({ + this.setState((prevState: SendState) => ({ step: Math.min(prevState.step + 1, steps.length - 1) })); private regressStep = () => - this.setState((prevState: State) => ({ + this.setState((prevState: SendState) => ({ step: Math.min(0, prevState.step - 1) })); - private updateTransaction = (transaction: Transaction) => + private updateState = (state: SendState) => { this.setState({ - transaction + ...state }); + }; private handleReset = () => this.setState(getInitialState()); } diff --git a/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx b/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx index 94766af54..a67de9949 100644 --- a/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { Address, Button, Network } from '@mycrypto/ui'; import { Amount } from 'v2/components'; -import { Transaction } from '../SendAssets'; +import { SendState } from '../SendAssets'; import './ConfirmTransaction.scss'; // Legacy @@ -11,7 +11,7 @@ import feeIcon from 'common/assets/images/icn-fee.svg'; import { AddressMetadataContext } from 'v2/providers'; interface Props { - transaction: Transaction; + values: SendState; onNext(): void; } @@ -29,7 +29,10 @@ export default class ConfirmTransaction extends Component { }; public render() { - const { transaction: { senderAddress, recipientAddress }, onNext } = this.props; + const { + values: { transactionFields: { senderAddress, recipientAddress } }, + onNext + } = this.props; const { showingDetails } = this.state; return ( diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx index acab0eb1a..8f7d9f286 100644 --- a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Formik, Form, Field } from 'formik'; import { Button, Heading, Typography } from '@mycrypto/ui'; -import { Transaction } from '../SendAssets'; +import { SendState } from '../SendAssets'; import './SendAssetsForm.scss'; // Legacy @@ -12,6 +12,7 @@ import translate from 'translations'; import { RecipientAddressField, AmountField, + AssetField, SenderAddressField, GasPriceField, GasPriceSlider, @@ -21,9 +22,10 @@ import { } from './fields'; interface Props { - transaction: Transaction; + values: SendState; onNext(): void; - onSubmit(values: Transaction): void; + onSubmit(values: SendState): void; + updateState(values: SendState): void; } const QueryWarning: React.SFC<{}> = () => ( @@ -36,127 +38,155 @@ const QueryWarning: React.SFC<{}> = () => ( /> ); -export default function SendAssetsForm({ transaction, onNext, onSubmit }: Props) { +export default function SendAssetsForm({ values, onNext, onSubmit, updateState }: Props) { return ( - { - onSubmit(values); - onNext(); - }} - render={({ setFieldValue, values: { advancedMode, gasPrice }, handleChange }) => { - const toggleAdvancedOptions = () => setFieldValue('advancedMode', !advancedMode); - const gasEstimates = { - fastest: 20, - fast: 18, - standard: 12, - isDefault: true, - safeLow: 4 - }; - return ( -
              - - {/* Sender Address */} +
              + + {'RawValues: '} +
              + {JSON.stringify(values.rawTransactionValues, null, 2)} +
              +
              +
              +
              + + {'Fields: '} +
              + {JSON.stringify(values.transactionFields, null, 2)} +
              + { + onSubmit(fields); + onNext(); + }} + render={({ + setFieldValue, + values: { transactionFields: { gasPriceField }, isAdvancedTransaction }, + handleChange + }) => { + const toggleAdvancedOptions = () => + setFieldValue('isAdvancedTransaction', !isAdvancedTransaction); + const gasEstimates = { + fastest: 20, + fast: 18, + standard: 12, + isDefault: true, + safeLow: 4 + }; + return ( + + -
              -
              {translate('X_ADDRESS')}
              - -
              - {/* Recipient Address */} - -
              -
              {translate('SEND_ADDR')}
              - -
              - {/* Amount / Asset */} - - {/* You'll Send */} -
              - -
              - - Send 13.233333 ETH{/* TRANSLATE THIS */} - - - {/* TRANSLATE THIS */}≈ $1440.00 USD - -
              - - Conversion Rate
              - {/* TRANSLATE THIS */} - 1 ETH ≈ $109.41 USD{/* TRANSLATE THIS */} -
              -
              -
              -
              - {/* Transaction Fee */} -
              - - -
              -
              Cheap
              - {/* TRANSLATE THIS */} -
              Fast
              - {/* TRANSLATE THIS */} -
              -
              - {/* Advanced Options */} -
              - - {advancedMode && ( -
              -
              - - + {/* Amount / Asset */} + + + {/* Sender Address */} +
              +
              {translate('X_ADDRESS')}
              + +
              + {/* Recipient Address */} +
              +
              {translate('SEND_ADDR')}
              + +
              + {/* You'll Send */} +
              + +
              + + Send 13.233333 ETH{/* TRANSLATE THIS */} + + + {/* TRANSLATE THIS */}≈ $1440.00 USD + +
              + + Conversion Rate
              + {/* TRANSLATE THIS */} + 1 ETH ≈ $109.41 USD{/* TRANSLATE THIS */} +
              -
              -
              - - +
              +
              + {/* Transaction Fee */} +
              + + +
              +
              Cheap
              + {/* TRANSLATE THIS */} +
              Fast
              + {/* TRANSLATE THIS */} +
              +
              + {/* Advanced Options */} +
              + + {isAdvancedTransaction && ( +
              +
              + +
              -
              - - +
              +
              + + +
              +
              + + +
              +
              + + +
              -
              - - +
              + + +
              +
              + 0 + 13000000000 * 1500000 + 20000000000 * (180000 + 53000) = 0.02416 ETH ~={/* TRANSLATE THIS */} + $2.67 USD{/* TRANSLATE THIS */}
              -
              - - -
              -
              - 0 + 13000000000 * 1500000 + 20000000000 * (180000 + 53000) = 0.02416 ETH ~={/* TRANSLATE THIS */} - $2.67 USD{/* TRANSLATE THIS */} -
              -
              - )} -
              - - - ); - }} - /> + )} +
              + + + ); + }} + /> +
              ); } diff --git a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx index 973944128..7c24dd51c 100644 --- a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx @@ -3,14 +3,14 @@ import { Link } from 'react-router-dom'; import { Address, Button, Copyable } from '@mycrypto/ui'; import { Amount } from 'v2/components'; -import { Transaction } from '../SendAssets'; +import { SendState } from '../SendAssets'; import './TransactionComplete.scss'; // Legacy import sentIcon from 'common/assets/images/icn-sent.svg'; interface Props { - transaction: Transaction; + values: SendState; onReset(): void; } @@ -19,7 +19,7 @@ const truncate = (children: string) => { }; export default function TransactionComplete({ - transaction: { recipientAddress, senderAddress }, + values: { transactionFields: { recipientAddress, senderAddress } }, onReset }: Props) { return ( diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx index 165660844..bef931c00 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx @@ -1,17 +1,18 @@ import React, { ChangeEvent, Component } from 'react'; import { Field, FieldProps } from 'formik'; -import { Transaction } from '../../SendAssets'; -import { Input, ComboBox } from '@mycrypto/ui'; -import { AssetOptionsContext } from 'v2/providers'; +import { TransactionFields, SendState } from 'v2/features/Dashboard/SendAssets/SendAssets'; +import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; interface OwnProps { + values: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent ? void : (e: string | ChangeEvent) => void; }; + updateState(values: SendState): void; } /*interface StateProps { @@ -21,14 +22,29 @@ interface OwnProps { type Props = OwnProps; // & StateProps; export default class AmountField extends Component { + public values = this.props.values; public isValidAmount = (value: any) => { const valid = value >= 0; // && value <= (this.balance - this.gasCost); this.setState({ isValidAmount: valid }); return valid; }; + public handleAmountField = (e: ChangeEvent) => { + this.props.updateState({ + ...this.values, + transactionFields: { + ...this.values.transactionFields, + amount: e.target.value + }, + rawTransactionValues: { + ...this.values.rawTransactionValues, + value: e.target.value + } + }); + this.props.handleChange(e); + }; + public render() { - const { handleChange } = this.props; return (
              @@ -42,45 +58,18 @@ export default class AmountField extends Component { id={'5'} name="amount" validate={this.isValidAmount} - render={({ field, form }: FieldProps) => ( + render={({ field }: FieldProps) => ( form.setFieldValue(field.name, value)} + onChange={this.handleAmountField} placeholder="0.00" className="SendAssetsForm-fieldset-input" /> )} />
              -
              - - - {({ assetOptions = [] }) => { - const assetslist: string[] = []; - assetOptions.map(en => { - assetslist.push(en.ticker); - }); - return ( - ) => ( - - )} - /> - ); - }} - -
              ); } diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx new file mode 100644 index 000000000..481765bfe --- /dev/null +++ b/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx @@ -0,0 +1,102 @@ +import React, { ChangeEvent, Component } from 'react'; +import { Field, FieldProps } from 'formik'; +import { TransactionFields } from '../../SendAssets'; +import { ComboBox } from '@mycrypto/ui'; +import { AssetOptionsContext } from 'v2/providers'; +import { SendState } from 'v2/features/Dashboard/SendAssets/SendAssets'; +import { getAssetByTicker } from 'v2/libs'; +import { AssetOption } from 'v2/services/AssetOption/types'; +//import { donationAddressMap } from ''; + +interface OwnProps { + values: SendState; + handleChange: { + (e: ChangeEvent): void; + >(field: T): T extends ChangeEvent + ? void + : (e: string | ChangeEvent) => void; + }; + updateState(values: SendState): void; +} + +/*interface StateProps { + name: string; +}*/ + +type Props = OwnProps; // & StateProps; + +export default class AssetField extends Component { + public isValidAmount = (value: any) => { + const valid = value >= 0; // && value <= (this.balance - this.gasCost); + this.setState({ isValidAmount: valid }); + return valid; + }; + + public handleAssetField = (e: ChangeEvent) => { + const { values } = this.props; + const assetType: AssetOption | undefined = getAssetByTicker(e.target.value); + this.props.updateState({ + ...values, + transactionFields: { + ...values.transactionFields, + asset: e.target.value, + senderAddress: '', + recipientAddress: '', + amount: '0.00', + gasPriceSlider: '20', + gasPriceField: '20', + gasLimitField: '21000', + gasLimitEstimated: '21000', + nonceEstimated: '0', + nonceField: '0', + data: '' + }, + rawTransactionValues: { + from: '', + to: '', + value: '', + data: '', + gasLimit: '', + gasPrice: '', + nonce: '' + }, + assetType: assetType ? assetType.type : 'base', + network: assetType ? assetType.network : 'ETH' + }); + // Conduct estimateGas + // Conduct clearFields + this.props.handleChange(e); + }; + + public render() { + return ( +
              + + + {({ assetOptions = [] }) => { + const assetslist: string[] = []; + assetOptions.map(en => { + assetslist.push(en.ticker); + }); + return ( + ) => ( + + )} + /> + ); + }} + +
              + ); + } +} diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx index 1f8428619..0c2fd50f7 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx @@ -1,6 +1,6 @@ import React, { ChangeEvent, Component } from 'react'; import { Field, FieldProps } from 'formik'; -import { Transaction } from '../../SendAssets'; +import { TransactionFields } from '../../SendAssets'; import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; @@ -32,7 +32,7 @@ export default class DataField extends Component { ) => ( + render={({ field, form }: FieldProps) => ( { ) => ( + render={({ field, form }: FieldProps) => ( { return ( ) => ( + render={({ field, form }: FieldProps) => ( { ) => ( + render={({ field, form }: FieldProps) => ( ): void; + >(field: T): T extends ChangeEvent + ? void + : (e: string | ChangeEvent) => void; + }; + updateState(values: SendState): void; } -export default class RecipientAddressField extends Component { - public state: StateProps = { - isValidFieldInput: true - }; +type Props = OwnProps; + +export default class RecipientAddressField extends Component { public isValidRecipientAddress = (value: any) => { const valid = isValidETHAddress(value); this.setState({ isValidFieldInput: valid }); return valid; }; + public handleRecipientAddress = (e: ChangeEvent) => { + const { values } = this.props; + const assetType: AssetOption | undefined = getAssetByTicker(values.transactionFields.asset); + this.props.updateState({ + ...values, + transactionFields: { + ...values.transactionFields, + recipientAddress: e.target.value + }, + rawTransactionValues: { + ...values.rawTransactionValues, + to: assetType + ? assetType.type === 'base' ? e.target.value : assetType.contractAddress + : 'base' + } + }); + + // Conduct estimateGas + this.props.handleChange(e); + }; + public render() { return ( ) => ( + render={({ field }: FieldProps) => ( diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx index 5f8adbd3b..3a067a40c 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx @@ -1,32 +1,47 @@ import React, { ChangeEvent, Component } from 'react'; import { Field, FieldProps } from 'formik'; -import { Transaction } from '../../SendAssets'; +import { TransactionFields, SendState } from '../../SendAssets'; import { ComboBox } from '@mycrypto/ui'; import { AccountContext } from 'v2/providers'; import { isValidETHAddress } from 'libs/validators'; interface OwnProps { + values: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent ? void : (e: string | ChangeEvent) => void; }; + updateState(values: SendState): void; } -/*interface StateProps { - name: string; -}*/ - type Props = OwnProps; // & StateProps; export default class SenderAddressField extends Component { public isValidSender = (value: any) => { return isValidETHAddress(value); }; + public handleSenderAddress = (e: ChangeEvent) => { + const { values } = this.props; + this.props.updateState({ + ...values, + transactionFields: { + ...values.transactionFields, + senderAddress: e.target.value + }, + rawTransactionValues: { + ...values.rawTransactionValues, + from: e.target.value + } + }); + + // Conduct max nonce check + // Conduct estimateGas + this.props.handleChange(e); + }; public render() { - const { handleChange } = this.props; return ( {({ accounts }) => { @@ -39,11 +54,11 @@ export default class SenderAddressField extends Component { name="senderAddress" id={'1'} validate={this.isValidSender} - render={({ field }: FieldProps) => ( + render={({ field }: FieldProps) => ( { + const assets = getAllAssets() || []; + return assets.find((asset: AssetOption) => asset.ticker === ticker); +}; + +export const getAllAssets = () => { + return Object.values(getCache().assetOptions); +}; diff --git a/common/v2/libs/index.ts b/common/v2/libs/index.ts index 162a99a3a..b836d6cbd 100644 --- a/common/v2/libs/index.ts +++ b/common/v2/libs/index.ts @@ -1,2 +1,3 @@ export * from './cache'; export * from './address'; +export * from './assetOptions'; diff --git a/common/v2/services/AssetOption/types.ts b/common/v2/services/AssetOption/types.ts index fe67e89a7..0c13262e7 100644 --- a/common/v2/services/AssetOption/types.ts +++ b/common/v2/services/AssetOption/types.ts @@ -2,7 +2,7 @@ export interface AssetOption { name: string; network: string; ticker: string; - type: string; + type: assetType; decimal: number; contractAddress: null; } @@ -10,3 +10,5 @@ export interface AssetOption { export interface ExtendedAssetOption extends AssetOption { uuid: string; } + +export type assetType = 'base' | 'erc20'; diff --git a/common/v2/services/LocalCache/constants.ts b/common/v2/services/LocalCache/constants.ts index 020b3b63c..a4555e70c 100644 --- a/common/v2/services/LocalCache/constants.ts +++ b/common/v2/services/LocalCache/constants.ts @@ -162,7 +162,7 @@ export const CACHE_INIT_DEV: LocalCache = { name: 'Ethereum', network: 'Ethereum', ticker: 'ETH', - type: 'coin', + type: 'base', decimal: 18, contractAddress: null } From 93f95929711697141d0b4bd0fbb7056279f68da8 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 6 May 2019 14:21:31 -0400 Subject: [PATCH 0448/1466] rendering loading symbol instead of buttons --- common/components/ui/Spinner.scss | 2 +- common/v2/features/AddAccount/AddAccount.tsx | 7 ++- .../features/AddAccount/AddAccountStyles.scss | 6 --- .../components/DeterministicWallets.scss | 6 ++- .../AddAccount/components/Keystore.tsx | 9 ++-- .../AddAccount/components/LedgerNano.scss | 9 +++- .../AddAccount/components/LedgerNano.tsx | 29 ++++++----- .../features/AddAccount/components/SafeT.tsx | 28 +++++------ .../AddAccount/components/Trezor.scss | 11 +++- .../features/AddAccount/components/Trezor.tsx | 50 ++++++++++--------- 10 files changed, 85 insertions(+), 72 deletions(-) diff --git a/common/components/ui/Spinner.scss b/common/components/ui/Spinner.scss index b4bc031ab..474ffe29f 100644 --- a/common/components/ui/Spinner.scss +++ b/common/components/ui/Spinner.scss @@ -41,7 +41,7 @@ &-dark { & .path { - stroke: color(loader-dark); + stroke: #7c9ec3; } } } diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 4e1378dbc..cdaeabe88 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -1,4 +1,3 @@ -import classNames from 'classnames'; import React, { Component } from 'react'; import { TransitionGroup, CSSTransition } from 'react-transition-group'; import { withRouter, RouteComponentProps, Redirect, Route } from 'react-router'; @@ -342,7 +341,7 @@ const WalletDecrypt = withRouter(
              -
              +
              {!( selectedWallet.isReadOnly || @@ -353,7 +352,7 @@ const WalletDecrypt = withRouter( $wallet: translateRaw(selectedWallet.lid) })}
              -
              +
              ( onSeed={this.handleSeed} /> -
              +
              ); diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index 0cd60275e..122cfd23c 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -6,11 +6,9 @@ $speed: 500ms; @keyframes decrypt-enter { 0% { opacity: 0; - transform: translateY(8px); } 100% { opacity: 1; - transform: translateY(0px); } } @@ -162,7 +160,6 @@ $speed: 500ms; &-decrypt { text-align: center; - padding-bottom: $space; @media (max-width: $screen-md) { padding-bottom: $space * 2; @@ -182,7 +179,6 @@ $speed: 500ms; top: auto; bottom: -10px; left: 50%; - transform: translateX(-50%); } &:hover, @@ -320,7 +316,6 @@ $speed: 500ms; &-decrypt { position: relative; text-align: center; - padding-bottom: $space; @media (max-width: $screen-md) { padding-bottom: $space * 2; @@ -339,7 +334,6 @@ $speed: 500ms; top: auto; bottom: -10px; left: 50%; - transform: translateX(-50%); } &:hover, diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index 0d87bd5cb..9f01d6d38 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -1,6 +1,10 @@ @import 'common/sass/variables'; @import 'common/sass/mixins'; +.Mnemoinc-dpath { + margin-top: 90px; +} + .DW { width: 935px; border-radius: 3px; @@ -10,7 +14,7 @@ top: 50%; left: 50%; height: 800px; - margin-top: -125px; + margin-top: -135px; margin-left: -425px; position: relative; z-index: 1; diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 109cf9d1d..39cb21f69 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -64,14 +64,13 @@ export class KeystoreDecrypt extends PureComponent {
              {translate('ADD_RADIO_2_SHORT')} - - - {isWalletPending ? : ''} - + 0} className={`${file.length && isWalletPending ? 'hidden' : ''}`} diff --git a/common/v2/features/AddAccount/components/LedgerNano.scss b/common/v2/features/AddAccount/components/LedgerNano.scss index bab4198d9..816eed43f 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.scss +++ b/common/v2/features/AddAccount/components/LedgerNano.scss @@ -10,6 +10,12 @@ &-top { display: flex; } + &-loading { + padding-bottom: 2em; + } + &-footer { + padding-bottom: 2em; + } &-description { font-family: Lato; @@ -32,12 +38,13 @@ } &-button { position: relative; - bottom: 2em; + bottom: 3em; width: 420px; } } &-image { vertical-align: center; margin: 2em; + padding-top: 2em; } } diff --git a/common/v2/features/AddAccount/components/LedgerNano.tsx b/common/v2/features/AddAccount/components/LedgerNano.tsx index 067657e17..c3179bf3a 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.tsx +++ b/common/v2/features/AddAccount/components/LedgerNano.tsx @@ -91,22 +91,21 @@ class LedgerNanoSDecryptClass extends PureComponent {
              {error || '-'}
              - + {isLoading ? ( +
              + {translate('WALLET_UNLOCKING')} +
              + ) : ( + + )}
              -
              +
              {translate('LEDGER_REFERRAL_2')}
              {translate('LEDGER_HELP_LINK')}
              diff --git a/common/v2/features/AddAccount/components/SafeT.tsx b/common/v2/features/AddAccount/components/SafeT.tsx index fc1644d6f..0e85c648b 100644 --- a/common/v2/features/AddAccount/components/SafeT.tsx +++ b/common/v2/features/AddAccount/components/SafeT.tsx @@ -77,20 +77,20 @@ class SafeTminiDecryptClass extends PureComponent {
              - + {isLoading ? ( +
              + + {translate('WALLET_UNLOCKING')} +
              + ) : ( + + )}
              {error || '-'}
              diff --git a/common/v2/features/AddAccount/components/Trezor.scss b/common/v2/features/AddAccount/components/Trezor.scss index 734cf2060..44e5d25fa 100644 --- a/common/v2/features/AddAccount/components/Trezor.scss +++ b/common/v2/features/AddAccount/components/Trezor.scss @@ -18,8 +18,17 @@ align-content: center; } + &-footer { + padding-bottom: 2em; + } + &-img { margin: 2em; + padding-top: 2em; + } + + &-loading { + padding-bottom: 1em; } &-help { @@ -51,7 +60,7 @@ } &-button { position: relative; - bottom: 2em; + bottom: 3em; width: 420px; } } diff --git a/common/v2/features/AddAccount/components/Trezor.tsx b/common/v2/features/AddAccount/components/Trezor.tsx index 0f9e60279..7e6c514fc 100644 --- a/common/v2/features/AddAccount/components/Trezor.tsx +++ b/common/v2/features/AddAccount/components/Trezor.tsx @@ -58,15 +58,17 @@ class TrezorDecryptClass extends PureComponent { if (publicKey && chainCode) { return ( - +
              + +
              ); } else { return ( @@ -78,21 +80,21 @@ class TrezorDecryptClass extends PureComponent {
              {error || '-'}
              - -
              + + {isLoading ? ( +
              + {translate('WALLET_UNLOCKING')} +
              + ) : ( + + )} +
              {translate('ORDER_TREZOR')}
              {translate('HOWTO_TREZOR')}
              From ad527f43c34eeb809a3ebae54185fae549cc6b75 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 6 May 2019 15:46:15 -0400 Subject: [PATCH 0449/1466] styling fixes for select-address panel --- common/v2/features/AddAccount/AddAccount.tsx | 8 ++------ common/v2/features/AddAccount/AddAccountStyles.scss | 8 -------- .../AddAccount/components/DeterministicWallets.scss | 8 ++------ .../AddAccount/components/DeterministicWallets.tsx | 5 ----- 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index cdaeabe88..673b21a96 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -343,16 +343,12 @@ const WalletDecrypt = withRouter(
              - {!( - selectedWallet.isReadOnly || - selectedWallet.lid === 'X_PARITYSIGNER' || - this.state.seed - ) && + {!(selectedWallet.isReadOnly || selectedWallet.lid === 'X_PARITYSIGNER') && translate('UNLOCK_WALLET', { $wallet: translateRaw(selectedWallet.lid) })}
              -
              +
              { {' '}
              {translate('DECRYPT_PROMPT_SELECT_ADDRESS')}
              - {/* Derivation Path{' '} - */} Date: Tue, 7 May 2019 13:31:09 -0400 Subject: [PATCH 0453/1466] migrate config folder / add assetOptions in LC init --- common/config/tokens/eth.json | 101 +- common/v2/config/addressMessages.ts | 194 + common/v2/config/bity.ts | 44 + common/v2/config/cacheData.ts | 62 + common/v2/config/constants.ts | 8 + common/v2/config/contracts/artis_sigma1.json | 7 + common/v2/config/contracts/artis_tau1.json | 1 + common/v2/config/contracts/esn.json | 16 + common/v2/config/contracts/etc.json | 21 + common/v2/config/contracts/eth.json | 356 + common/v2/config/contracts/exp.json | 1 + common/v2/config/contracts/goerli.json | 1 + common/v2/config/contracts/index.ts | 37 + common/v2/config/contracts/pirl.json | 14 + common/v2/config/contracts/rinkeby.json | 12 + common/v2/config/contracts/ropsten.json | 26 + common/v2/config/contracts/rsk.json | 27 + common/v2/config/contracts/rsk_testnet.json | 12 + common/v2/config/contracts/ubq.json | 1 + common/v2/config/data.tsx | 108 + common/v2/config/dpaths.ts | 216 + common/v2/config/helpArticles.ts | 17 + common/v2/config/index.ts | 8 + common/v2/config/languages.json | 22 + common/v2/config/links.ts | 123 + common/v2/config/navigation.ts | 53 + common/v2/config/tokens/artis_sigma1.json | 8 + common/v2/config/tokens/artis_tau1.json | 1 + common/v2/config/tokens/ella.json | 8 + common/v2/config/tokens/esn.json | 16 + common/v2/config/tokens/etc.json | 9 + common/v2/config/tokens/eth.json | 7520 ++++++++++++++++++ common/v2/config/tokens/exp.json | 1 + common/v2/config/tokens/goerli.json | 1 + common/v2/config/tokens/index.ts | 46 + common/v2/config/tokens/kovan.json | 16 + common/v2/config/tokens/rinkeby.json | 1 + common/v2/config/tokens/ropsten.json | 1 + common/v2/config/tokens/rsk.json | 8 + common/v2/config/tokens/rsk_testnet.json | 8 + common/v2/config/tokens/ubq.json | 16 + common/v2/index.ts | 1 + common/v2/services/AssetOption/types.ts | 2 +- common/v2/services/LocalCache/LocalCache.ts | 64 +- scripts/update-tokens-utils.ts | 17 +- scripts/update-tokens.ts | 24 +- 46 files changed, 9218 insertions(+), 38 deletions(-) create mode 100644 common/v2/config/addressMessages.ts create mode 100644 common/v2/config/bity.ts create mode 100644 common/v2/config/cacheData.ts create mode 100644 common/v2/config/constants.ts create mode 100644 common/v2/config/contracts/artis_sigma1.json create mode 100644 common/v2/config/contracts/artis_tau1.json create mode 100644 common/v2/config/contracts/esn.json create mode 100644 common/v2/config/contracts/etc.json create mode 100644 common/v2/config/contracts/eth.json create mode 100644 common/v2/config/contracts/exp.json create mode 100644 common/v2/config/contracts/goerli.json create mode 100644 common/v2/config/contracts/index.ts create mode 100644 common/v2/config/contracts/pirl.json create mode 100644 common/v2/config/contracts/rinkeby.json create mode 100644 common/v2/config/contracts/ropsten.json create mode 100644 common/v2/config/contracts/rsk.json create mode 100644 common/v2/config/contracts/rsk_testnet.json create mode 100644 common/v2/config/contracts/ubq.json create mode 100644 common/v2/config/data.tsx create mode 100644 common/v2/config/dpaths.ts create mode 100644 common/v2/config/helpArticles.ts create mode 100644 common/v2/config/languages.json create mode 100644 common/v2/config/links.ts create mode 100644 common/v2/config/navigation.ts create mode 100644 common/v2/config/tokens/artis_sigma1.json create mode 100644 common/v2/config/tokens/artis_tau1.json create mode 100644 common/v2/config/tokens/ella.json create mode 100644 common/v2/config/tokens/esn.json create mode 100644 common/v2/config/tokens/etc.json create mode 100644 common/v2/config/tokens/eth.json create mode 100644 common/v2/config/tokens/exp.json create mode 100644 common/v2/config/tokens/goerli.json create mode 100644 common/v2/config/tokens/index.ts create mode 100644 common/v2/config/tokens/kovan.json create mode 100644 common/v2/config/tokens/rinkeby.json create mode 100644 common/v2/config/tokens/ropsten.json create mode 100644 common/v2/config/tokens/rsk.json create mode 100644 common/v2/config/tokens/rsk_testnet.json create mode 100644 common/v2/config/tokens/ubq.json diff --git a/common/config/tokens/eth.json b/common/config/tokens/eth.json index b6350969d..56551e585 100644 --- a/common/config/tokens/eth.json +++ b/common/config/tokens/eth.json @@ -1249,6 +1249,11 @@ "symbol": "COV", "decimal": 18 }, + { + "address": "0x31910AFF5545784755970aE1fBE7fE65d5F0eEa2", + "symbol": "CPAL", + "decimal": 8 + }, { "address": "0x0Ebb614204E47c09B6C3FeB9AAeCad8EE060E23E", "symbol": "CPAY", @@ -2299,6 +2304,11 @@ "symbol": "FRV", "decimal": 8 }, + { + "address": "0x36a73557f5BDE5195EC39eCA82d28b8A36D21141", + "symbol": "FRX", + "decimal": 18 + }, { "address": "0xD0352a019e9AB9d757776F532377aAEbd36Fd541", "symbol": "FSN", @@ -2429,6 +2439,16 @@ "symbol": "GCP", "decimal": 18 }, + { + "address": "0xa4ec83c8907888d006A37debF755ee39766f38ae", + "symbol": "GCU", + "decimal": 18 + }, + { + "address": "0x44A67C8570a61A28bAfd0035042f2F0A73a64428", + "symbol": "GCX", + "decimal": 6 + }, { "address": "0x4F4f0Db4de903B88f2B1a2847971E231D54F8fd3", "symbol": "GEE", @@ -2774,6 +2794,11 @@ "symbol": "IAD", "decimal": 18 }, + { + "address": "0x3c20d67b6B1aE0985F913aBb7397babc2fBb1A1F", + "symbol": "ICD", + "decimal": 18 + }, { "address": "0x5a84969bb663fb64F6d015DcF9F622Aedc796750", "symbol": "ICE", @@ -2989,6 +3014,11 @@ "symbol": "JNT", "decimal": 18 }, + { + "address": "0x17280DA053596E097604839C61A2eF5efb7d493f", + "symbol": "JOB", + "decimal": 8 + }, { "address": "0xdb455c71C1bC2de4e80cA451184041Ef32054001", "symbol": "JOT", @@ -3009,6 +3039,11 @@ "symbol": "KC", "decimal": 18 }, + { + "address": "0x039B5649A59967e3e936D7471f9c3700100Ee1ab", + "symbol": "KCS", + "decimal": 6 + }, { "address": "0x72D32ac1c5E66BfC5b08806271f8eEF915545164", "symbol": "KEE", @@ -3039,6 +3074,11 @@ "symbol": "KIND", "decimal": 8 }, + { + "address": "0x2BDD6c9bf1bf396a37501AAE53751B9946B503Da", + "symbol": "KMTBA", + "decimal": 18 + }, { "address": "0xdd974D5C2e2928deA5F71b9825b8b646686BD200", "symbol": "KNC", @@ -3154,6 +3194,11 @@ "symbol": "LEND", "decimal": 18 }, + { + "address": "0xf97b5d65Da6b0468b90D531ddae2a69843e6797d", + "symbol": "LEO", + "decimal": 18 + }, { "address": "0x0F4CA92660Efad97a9a70CB0fe969c755439772C", "symbol": "LEV", @@ -3389,6 +3434,11 @@ "symbol": "MEDX", "decimal": 8 }, + { + "address": "0x420167D87d35c3A249b32Ef6225872fBD9aB85D2", + "symbol": "MESG", + "decimal": 18 + }, { "address": "0xF03045a4C8077e38f3B8e2Ed33b8aEE69edF869F", "symbol": "MESH", @@ -3454,6 +3504,11 @@ "symbol": "MIT (Mychatcoin)", "decimal": 6 }, + { + "address": "0x3893b9422Cd5D70a81eDeFfe3d5A1c6A978310BB", + "symbol": "MITH", + "decimal": 18 + }, { "address": "0x4a527d8fc13C5203AB24BA0944F4Cb14658D1Db6", "symbol": "MITX", @@ -3729,6 +3784,11 @@ "symbol": "NIO", "decimal": 0 }, + { + "address": "0xCeE4019Fd41ECDc8bae9EFDd20510f4b6FAA6197", + "symbol": "NLYA", + "decimal": 18 + }, { "address": "0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671", "symbol": "NMR", @@ -3864,6 +3924,11 @@ "symbol": "OLD_MKR", "decimal": 18 }, + { + "address": "0x3618516F45CD3c913F81F9987AF41077932Bc40d", + "symbol": "OLDPCL", + "decimal": 8 + }, { "address": "0x9d9223436dDD466FC247e9dbbD20207e640fEf58", "symbol": "OLE", @@ -3924,6 +3989,11 @@ "symbol": "OPEN (OPEN)", "decimal": 8 }, + { + "address": "0x77599D2C6DB170224243e255e6669280F11F1473", + "symbol": "OPQ", + "decimal": 18 + }, { "address": "0x4355fC160f74328f9b383dF2EC589bB3dFd82Ba0", "symbol": "OPT", @@ -4065,7 +4135,7 @@ "decimal": 18 }, { - "address": "0x3618516F45CD3c913F81F9987AF41077932Bc40d", + "address": "0x0F02e27745e3b6e9e1310d19469e2b5D7B5eC99A", "symbol": "PCL", "decimal": 8 }, @@ -4274,6 +4344,11 @@ "symbol": "PRON", "decimal": 8 }, + { + "address": "0x6fe56C0bcdD471359019FcBC48863d6c3e9d4F41", + "symbol": "PROPS", + "decimal": 18 + }, { "address": "0xd94F2778e2B3913C53637Ae60647598bE588c570", "symbol": "PRPS", @@ -4370,8 +4445,13 @@ "decimal": 8 }, { - "address": "0xCb5ea3c190d8f82DEADF7ce5Af855dDbf33e3962", + "address": "0x1602af2C782cC03F9241992E243290Fccf73Bb13", "symbol": "QBIT", + "decimal": 18 + }, + { + "address": "0xCb5ea3c190d8f82DEADF7ce5Af855dDbf33e3962", + "symbol": "QBIT (1)", "decimal": 6 }, { @@ -4679,6 +4759,11 @@ "symbol": "RVT", "decimal": 18 }, + { + "address": "0xd30a2e9347Ad48Ea208ee563a9CdfD80E962a727", + "symbol": "RYLT", + "decimal": 18 + }, { "address": "0x1EC8fE51a9B6A3a6C427D17d9ECC3060fbc4a45c", "symbol": "S-A-PAT", @@ -5384,6 +5469,11 @@ "symbol": "TMTG", "decimal": 18 }, + { + "address": "0xF7920B0768Ecb20A123fAc32311d07D193381d6f", + "symbol": "TNB", + "decimal": 18 + }, { "address": "0xb0280743b44bF7db4B6bE482b2Ba7b75E5dA096C", "symbol": "TNS", @@ -5634,6 +5724,11 @@ "symbol": "VERI", "decimal": 18 }, + { + "address": "0x1B879d3812F2Ade1214264655B473910e0caF1e6", + "symbol": "VERSI", + "decimal": 18 + }, { "address": "0x2C974B2d0BA1716E644c1FC59982a89DDD2fF724", "symbol": "VIB", @@ -6169,4 +6264,4 @@ "symbol": "ZXC", "decimal": 18 } -] +] \ No newline at end of file diff --git a/common/v2/config/addressMessages.ts b/common/v2/config/addressMessages.ts new file mode 100644 index 000000000..a11b2e4c8 --- /dev/null +++ b/common/v2/config/addressMessages.ts @@ -0,0 +1,194 @@ +import { toChecksumAddress } from 'ethereumjs-util'; + +export interface AddressMessage { + msg: string; + gasLimit?: number; + data?: string; + severity?: 'warning' | 'danger' | 'success' | 'info'; +} + +// MAKE SURE THE ADDRESS KEY IS EITHER LOWER CASED OR CHECKSUMMED. +export const ADDRESS_MESSAGES: { [key: string]: AddressMessage } = { + '0xC33B16198DD9FB3bB342d8119694f94aDfcdca23': { + gasLimit: 0, + msg: + 'This address has been associated with an issue with the Ledger Chrome App. Do not send to this address. Monitor [their Twitter account](https://twitter.com/LedgerHQ) for updates.' + }, + '0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520': { + msg: 'Thank you for donating to MyCrypto. TO THE MOON!' + }, + '0x75aa7b0d02532f3833b66c7f0ad35376d373ddf8': { + gasLimit: 300000, + msg: 'Accord (ARD) ERC20 token sale - http://accordtoken.com' + }, + '0x16b0e62ac13a2faed36d18bce2356d25ab3cfad3': { + gasLimit: 200000, + msg: + "BTQ ICO ends February 1, 2018. btc btq is your exclusive bitcoin boutique and world's premier cryptocurrency lifestyle brand. https://thebtcbtq.com/btq" + }, + '0xa9877b1e05d035899131dbd1e403825166d09f92': { + gasLimit: 200000, + msg: 'MNT Token Sale - http://mnt.coinjoker.com' + }, + '0xef6b4ce8c9bc83744fbcde2657b32ec18790458a': { + gasLimit: 930000, + msg: 'PUC Token Sale - http://price-s.info' + }, + '0x13f11c9905a08ca76e3e853be63d4f0944326c72': { + gasLimit: 300000, + data: '0xb4427263', + msg: 'DIVX Token Sale - www.diviproject.org' + }, + '0x4b0712de9b75bc68a566215acca876ea5e55c172': { + gasLimit: 114293, + msg: 'NOX Token Sale' + }, + '0xf5dffdeaea54bb56156b47de1c7b4346c7dba69c': { + gasLimit: 180000, + msg: 'GEE Token Sale' + }, + '0xc88c7e1aebd89187d13bd42e1ff814d32f492bf6': { + gasLimit: 250000, + msg: + 'STORM token sale: gamified micro-tasks - Earn anywhere, anytime, from any device. https://www.stormtoken.com, NOV 7, 2017' + }, + '0xdd64ef0c8a41d8a17f09ce2279d79b3397184a10': { + gasLimit: 200000, + msg: + 'RVL token sale: PRE-ICO SUPER SALE, SHARING ECONOMY PIATTAFORM, https://www.R-EVOLUTIONCOIN.COM.com, DIC 15, 2017' + }, + ' 0xea0c348a297084bffbddad7f89216f24a2106e58': { + gasLimit: 300000, + msg: + 'Aigang token sale contract. Autonomous insurance network - fully automated insurance for IoT devices and a platform for insurance innovation built around data: https://aigang.network . Ends 12/15/2017' + }, + '0x17681500757628c7aa56d7e6546e119f94dd9479': { + gasLimit: 170000, + msg: + 'Confideal token sale. Confideal is a platform for making deals. https://confideal.io, ends Jan 31, 2018' + }, + '0x5454af9d2ba75a60fa5b0419c251810544cea21d': { + gasLimit: 200000, + msg: 'WeBetCrypto ICO Sale. Thank you for your support!' + }, + '0x882448f83d90b2bf477af2ea79327fdea1335d93': { + gasLimit: 200000, + msg: 'Vibehub ICO Sale. Thank you for your support!' + }, + '0xdea6d29da64bba5ab86a7424ca894756e7ae8ed3': { + gasLimit: 200000, + msg: 'Trade.io ICO Sale. Thank you for your support!' + }, + '0xaf518d65f84e4695a4da0450ec02c1248f56b668': { + gasLimit: 200000, + msg: 'Substratum Network ICO Sale. Thank you for your support!' + }, + '0x0f33bb20a282a7649c7b3aff644f084a9348e933': { + gasLimit: 400000, + msg: 'YUPIE (YUPIE) ICO' + }, + '0xbd2ed3e85faa3433c068c7b3f9c8c7d839ce88d7': { + gasLimit: 69153, + msg: 'Horizon State Token Sale. Thank you for your support. ' + }, + '0x8aec8f09a840faea966f4b0e29a497d8f5b5a6b4': { + gasLimit: 200000, + msg: 'DataBrokerDAO. https://databrokerdao.com' + }, + '0xeaaf270436a0ed397ed23bbf64df7b1dcaff142f': { + gasLimit: 85000, + msg: 'BattleDrome ICO/Crowdsale. Thanks for your support!' + }, + '0x58b7056deb51ed292614f0da1e94e7e9c589828d': { + gasLimit: 150000, + msg: 'Simple Token — the cryptocurrency that powers digital communities.' + }, + '0x5fb3d432bae33fcd418ede263d98d7440e7fa3ea': { + gasLimit: 200000, + msg: 'SunContract ICO address - suncontract.org' + }, + '0xd88755197e107603c139df6e709ed09eec6b6bb3': { + gasLimit: 200000, + msg: 'NVC Fund' + }, + '0x2a8a7afa955d8616e2e60e454e5a9c6b6c0a60fc': { + gasLimit: 200000, + msg: 'OHNI ICO. Restoration of our communities!' + }, + '0xf9f0fc7167c311dd2f1e21e9204f87eba9012fb2': { + gasLimit: 200000, + msg: 'Easy Homes ICO. Thank you!' + }, + '0x7fc408011165760ee31be2bf20daf450356692af': { + gasLimit: 200000, + msg: 'Mitrav ICO Sale. Thank you for your support!' + }, + '0xa5dd8cde486436f0cfd62652952e1fcec5a61cae': { + gasLimit: 300000, + msg: 'WinBitcoin ICO Sale. Thank you for your support!' + }, + '0x19d7a9ad3b49252fd2ef640d0e43dfd651168499': { + gasLimit: 100000, + msg: 'BMChain ICO - Platform of digital reputation - Official site https://bmchain.io' + }, + '0xafe60511341a37488de25bef351952562e31fcc1': { + gasLimit: 200000, + msg: 'Tbot ICO Sale.' + }, + '0xe386b139ed3715ca4b18fd52671bdcea1cdfe4b1': { + gasLimit: 200000, + msg: + 'Zeus Exchange - The First Hybrid Trading Platform for Traditional Stock Investors and Crypto Traders. Official site https://zeus.exchange' + }, + '0xb70835d7822ebb9426b56543e391846c107bd32c': { + gasLimit: 200000, + msg: 'Game Token Sale' + }, + '0x5f53f7a8075614b699baad0bc2c899f4bad8fbbf': { + gasLimit: 200000, + msg: 'Rebellious Token' + }, + '0xd5e3036d5ce7ec222379d16f6ffc38c38c55bf7f': { + gasLimit: 200000, + msg: + 'Ethereum High HIG is a robust and feather-light cryptocurrency designed to hedge the risk of your portfolio' + }, + '0x2a3aa9eca41e720ed46b5a70d6c37efa47f768ac': { + gasLimit: 200000, + msg: 'REAL CHAIN TOKEN!' + }, + '0x7705faa34b16eb6d77dfc7812be2367ba6b0248e': { + gasLimit: 200000, + msg: 'Artex - Art Provenance Blockchain. Official site https://artex.global' + }, + '0x29afa3443f752eb29d814d9042fd88a4a2dc0f1e': { + gasLimit: 200000, + msg: 'SIRIN LABS official crowdsale address. Official website https://sirinlabs.com' + }, + '0xa671f2914ba0e73979ffc47cd350801d1714b18f': { + gasLimit: 150000, + msg: 'TRV Ongoing Sale.' + }, + '0xdee3bfae40ac2ae9c69ebf30ecaf67a499a9dd5e': { + gasLimit: 150000, + msg: 'The World News Pre-ICO.' + }, + '0x92685e93956537c25bb75d5d47fca4266dd628b8': { + gasLimit: 200000, + msg: 'Bitlle Token. Official website https://bitlle.com' + }, + '0x2097175d0abb8258f2468e3487f8db776e29d076': { + gasLimit: 200000, + msg: 'LiveEdu EDU token sale. Official website: https://tokensale.liveedu.tv/' + }, + '0x4f8b6ca78711207e1b281db63e8d6eaa1ce2f63e': { + gasLimit: 230000, + msg: 'HEdpAY (Hdp.ф) sale. Official sale website: https://ibiginvestments.com/hedpay' + } +}; + +export function getAddressMessage(address: string): AddressMessage | undefined { + const lowerAddr = address.toLowerCase(); + const checksumAddr = toChecksumAddress(address); + return ADDRESS_MESSAGES[lowerAddr] || ADDRESS_MESSAGES[checksumAddr]; +} diff --git a/common/v2/config/bity.ts b/common/v2/config/bity.ts new file mode 100644 index 000000000..1ff1e6e47 --- /dev/null +++ b/common/v2/config/bity.ts @@ -0,0 +1,44 @@ +import { BTCTxExplorer, ETHTxExplorer } from './data'; + +export type WhitelistedCoins = 'BTC' | 'REP' | 'ETH' | 'XMR'; +const serverURL = 'https://bity.myetherapi.com'; +const bityURL = 'https://bity.com/api'; +const BTCMin = 0.01; +const BTCMax = 3; + +// while Bity is supposedly OK with any order that is at least 0.01 BTC Worth, the order will fail if you send 0.01 BTC worth of ETH. +// This is a bad magic number, but will suffice for now +// value = percent higher/lower than 0.01 BTC worth +const buffers = { + ETH: 0.1, + REP: 0.2, + XMR: 0.3 +}; + +// rate must be BTC[KIND] +export function generateKindMin(BTCKINDRate: number, kind: keyof typeof buffers): number { + const kindMinVal = BTCKINDRate * BTCMin; + return kindMinVal + kindMinVal * buffers[kind]; +} + +// rate must be BTC[KIND] +export function generateKindMax(BTCKINDRate: number, kind: keyof typeof buffers): number { + const kindMax = BTCKINDRate * BTCMax; + return kindMax - kindMax * buffers[kind]; +} + +export const bityConfig = { + serverURL, + bityURL, + ETHTxExplorer, + BTCTxExplorer, + BTCMin, + BTCMax, + validStatus: ['RCVE', 'FILL', 'CONF', 'EXEC'], + invalidStatus: ['CANC'], + postConfig: { + headers: { + 'Content-Type': 'application/json; charset:UTF-8' + } + } +}; diff --git a/common/v2/config/cacheData.ts b/common/v2/config/cacheData.ts new file mode 100644 index 000000000..842d92414 --- /dev/null +++ b/common/v2/config/cacheData.ts @@ -0,0 +1,62 @@ +import * as contracts from 'v2/config/contracts'; +import * as tokens from 'v2/config/tokens'; +import * as utils from 'v2/libs'; +import * as types from 'v2/services'; + +export interface Fiat { + code: string; + name: string; +} + +export const USD = { + code: 'USD', + name: 'US Dollars' +}; +export const EUR = { + code: 'EUR', + name: 'Euros' +}; +export const GBP = { + code: 'GBP', + name: 'British Pounds' +}; + +export const Fiats: Fiat[] = [USD, EUR, GBP]; + +export const ContractsData = (): Record => { + const data: any = Object.keys(contracts.default); + const outData = {} as Record; + data.map((en: string) => { + const nextData: [contracts.Network] = contracts.default[en]; + nextData.map((entry: contracts.Network) => { + const uuid: string = utils.generateUUID(); + outData[uuid] = { + name: entry.name, + address: entry.address, + abi: entry.abi, + network: en + }; + }); + }); + return outData; +}; + +export const AssetOptionsData = (): Record => { + const data: any = Object.keys(tokens.default); + const outData = {} as Record; + data.map((en: string) => { + const nextData: [tokens.Asset] = tokens.default[en]; + nextData.map((entry: tokens.Asset) => { + const uuid: string = entry.symbol; + outData[uuid] = { + name: entry.name, + contractAddress: entry.address, + decimal: entry.decimal, + network: en, + ticker: entry.symbol, + type: 'erc20' + }; + }); + }); + return outData; +}; diff --git a/common/v2/config/constants.ts b/common/v2/config/constants.ts new file mode 100644 index 000000000..4ee74c8e1 --- /dev/null +++ b/common/v2/config/constants.ts @@ -0,0 +1,8 @@ +// Lower/upper ranges for gas limit +export const GAS_LIMIT_LOWER_BOUND = 21000; +export const GAS_LIMIT_UPPER_BOUND = 8000000; + +// Lower/upper ranges for gas price in gwei +export const GAS_PRICE_GWEI_LOWER_BOUND = 0.01; +export const GAS_PRICE_GWEI_UPPER_BOUND = 3000; +export const GAS_PRICE_GWEI_DEFAULT = 20; diff --git a/common/v2/config/contracts/artis_sigma1.json b/common/v2/config/contracts/artis_sigma1.json new file mode 100644 index 000000000..7bd714eb9 --- /dev/null +++ b/common/v2/config/contracts/artis_sigma1.json @@ -0,0 +1,7 @@ +[ + { + "name": "lab10 -> ATS swap", + "address": "0x583E58e651151157243697116D6bf17761cdEd4b", + "abi": "[{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"outputs\":[],\"name\":\"tokensReceived\",\"inputs\":[{\"type\":\"address\",\"name\":\"\"},{\"type\":\"address\",\"name\":\"_from\"},{\"type\":\"address\",\"name\":\"\"},{\"type\":\"uint256\",\"name\":\"_amount\"},{\"type\":\"bytes\",\"name\":\"\"},{\"type\":\"bytes\",\"name\":\"\"}],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"uint256\",\"name\":\"\"}],\"name\":\"LAB10_ATS_MULTIPLIER\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"address\",\"name\":\"\"}],\"name\":\"swappableToken\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"address\",\"name\":\"\"}],\"name\":\"owner\",\"inputs\":[],\"constant\":true},{\"type\":\"constructor\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"inputs\":[{\"type\":\"address\",\"name\":\"_swappableToken\"}]},{\"type\":\"fallback\",\"stateMutability\":\"payable\",\"payable\":true},{\"type\":\"event\",\"name\":\"Swapped\",\"inputs\":[{\"type\":\"address\",\"name\":\"account\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"lab10Amount\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"atsAmount\",\"indexed\":false}],\"anonymous\":false}]" + } +] diff --git a/common/v2/config/contracts/artis_tau1.json b/common/v2/config/contracts/artis_tau1.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/common/v2/config/contracts/artis_tau1.json @@ -0,0 +1 @@ +[] diff --git a/common/v2/config/contracts/esn.json b/common/v2/config/contracts/esn.json new file mode 100644 index 000000000..f5aecf68b --- /dev/null +++ b/common/v2/config/contracts/esn.json @@ -0,0 +1,16 @@ +[ + { + "name": "DdengleToken - DGT", + "address": "0x72ea3508d9d817a91465abb59be10fef9857a055", + "abi": "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + }, + { + "name": "Mist's Multisig Contract", + "abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_numOwners\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_lastDay\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"resetSpentToday\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_spentToday\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_required\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_h\",\"type\":\"bytes32\"}],\"name\":\"confirm\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newLimit\",\"type\":\"uint256\"}],\"name\":\"setDailyLimit\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"name\":\"_r\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_operation\",\"type\":\"bytes32\"}],\"name\":\"revoke\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newRequired\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_operation\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"hasConfirmed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"kill\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_dailyLimit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"inputs\":[{\"name\":\"_owners\",\"type\":\"address[]\"},{\"name\":\"_required\",\"type\":\"uint256\"},{\"name\":\"_daylimit\",\"type\":\"uint256\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"Revoke\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldOwner\",\"type\":\"address\"}],\"name\":\"OwnerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newRequirement\",\"type\":\"uint256\"}],\"name\":\"RequirementChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"SingleTransact\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"MultiTransact\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ConfirmationNeeded\",\"type\":\"event\"}]" + }, + { + "name": "Generic ERC223 Token", + "address": "0x0001000000001000000000100000000010000001", + "abi": "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"initialSupply\",\"type\":\"uint256\"},{\"name\":\"tokenName\",\"type\":\"string\"},{\"name\":\"decimalUnits\",\"type\":\"uint8\"},{\"name\":\"tokenSymbol\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + } +] diff --git a/common/v2/config/contracts/etc.json b/common/v2/config/contracts/etc.json new file mode 100644 index 000000000..c7173a42e --- /dev/null +++ b/common/v2/config/contracts/etc.json @@ -0,0 +1,21 @@ +[ + { + "name": "DAO Classic Withdraw", + "address": "0x180826b05452ce96e157f0708c43381fee64a6b8", + "abi": "[{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"seal\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalAccounts\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"data\",\"type\":\"uint256[]\"}],\"name\":\"fill\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"sealed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"inputs\":[],\"type\":\"constructor\"}]" + }, + { + "name": "P3C Farm Contract", + "address": "0x93123bA3781bc066e076D249479eEF760970aa32", + "abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"_playerAddress\",\"type\":\"address\"},{\"name\":\"_selfBuy\",\"type\":\"bool\"}],\"name\":\"createCrop\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"crop\",\"type\":\"address\"}],\"name\":\"CropCreated\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"crops\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"myCrop\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"myCropDisabled\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"myCropDividends\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"myCropTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"p3cAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" + }, + { + "name": "BitEther", + "address": "0x085fb4f24031eaedbc2b611aa528f22343eb52db", + "abi": "[{\"constant\":false,\"inputs\":[],\"name\":\"getEra\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_eraBlock\",\"type\":\"uint256\"},{\"name\":\"_blockMined\",\"type\":\"uint256\"},{\"name\":\"_blockNumber\",\"type\":\"uint256\"},{\"name\":\"_rewardPrev\",\"type\":\"uint256\"},{\"name\":\"_reward\",\"type\":\"uint256\"}],\"name\":\"getUnclaimed\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"getEraForBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claim\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_miner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_current\",\"type\":\"bool\"}],\"name\":\"Reward\",\"type\":\"event\"}]" + }, + { + "name": "Mist's Multisig Contract", + "abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_numOwners\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_lastDay\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"resetSpentToday\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_spentToday\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_required\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_h\",\"type\":\"bytes32\"}],\"name\":\"confirm\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newLimit\",\"type\":\"uint256\"}],\"name\":\"setDailyLimit\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"name\":\"_r\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_operation\",\"type\":\"bytes32\"}],\"name\":\"revoke\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newRequired\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_operation\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"hasConfirmed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"kill\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_dailyLimit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"inputs\":[{\"name\":\"_owners\",\"type\":\"address[]\"},{\"name\":\"_required\",\"type\":\"uint256\"},{\"name\":\"_daylimit\",\"type\":\"uint256\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"Revoke\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldOwner\",\"type\":\"address\"}],\"name\":\"OwnerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newRequirement\",\"type\":\"uint256\"}],\"name\":\"RequirementChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"SingleTransact\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"MultiTransact\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ConfirmationNeeded\",\"type\":\"event\"}]" + } +] diff --git a/common/v2/config/contracts/eth.json b/common/v2/config/contracts/eth.json new file mode 100644 index 000000000..7043bdaad --- /dev/null +++ b/common/v2/config/contracts/eth.json @@ -0,0 +1,356 @@ +[ + { + "name": "Athenian: Warrior for Battle", + "address": "0x17052d51E954592C1046320c2371AbaB6C73Ef10", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenName\",\"type\":\"string\"},{\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"name\":\"tokenSupply\",\"type\":\"uint256\"}],\"name\":\"SetupToken\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"adr\",\"type\":\"address\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "Battle Of Thermopylae: Battle", + "address": "0x553B4546D26F383d4f4a056B7f50DaDFf07FB252", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"getGreeksBattlePoints\",\"outputs\":[{\"name\":\"greeksBattlePoints\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_ATHENIANS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_warriors\",\"type\":\"uint256\"}],\"name\":\"assignAtheniansToBattle\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"immortals\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"deprecated\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BTL_IMMORTAL\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_player\",\"type\":\"address\"}],\"name\":\"getImmortalsOnTheBattlefield\",\"outputs\":[{\"name\":\"immortalsOnTheBattlefield\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BTL_PERSIAN\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"newVersion\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"endTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_faction\",\"type\":\"address\"}],\"name\":\"getTotalSlaves\",\"outputs\":[{\"name\":\"slaves\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_warriors\",\"type\":\"uint256\"}],\"name\":\"assignImmortalsToBattle\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"athenians\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BATTLE_POINT_DECIMALS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getTemporaryWinningFaction\",\"outputs\":[{\"name\":\"temporaryWinningFaction\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"battles\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_player\",\"type\":\"address\"}],\"name\":\"getPersiansOnTheBattlefield\",\"outputs\":[{\"name\":\"persiansOnTheBattlefield\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInTime\",\"outputs\":[{\"name\":\"inTime\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_battleTokenAddress\",\"type\":\"address\"},{\"name\":\"_battleTokenOwner\",\"type\":\"address\"}],\"name\":\"setBattleTokenAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BTL_SPARTAN\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"WAD\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInProgress\",\"outputs\":[{\"name\":\"inProgress\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"redeemWarriors\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"startTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BTL_ATHENIAN\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isTimeExpired\",\"outputs\":[{\"name\":\"timeExpired\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BP_ATHENIAN\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"avarageBlockTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"persians\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_player\",\"type\":\"address\"}],\"name\":\"getAtheniansOnTheBattlefield\",\"outputs\":[{\"name\":\"atheniansOnTheBattlefield\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"warriorsOnTheBattlefield\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_player\",\"type\":\"address\"}],\"name\":\"getGreeksBattlePointsBy\",\"outputs\":[{\"name\":\"playerBattlePoints\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_player\",\"type\":\"address\"},{\"name\":\"_loosingMainTroops\",\"type\":\"address\"}],\"name\":\"computeSlaves\",\"outputs\":[{\"name\":\"slaves\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isEnded\",\"outputs\":[{\"name\":\"ended\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"warriorsByPlayer\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"spartans\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getPersiansBattlePoints\",\"outputs\":[{\"name\":\"persiansBattlePoints\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_player\",\"type\":\"address\"}],\"name\":\"getPersiansBattlePointsBy\",\"outputs\":[{\"name\":\"playerBattlePoints\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_player\",\"type\":\"address\"}],\"name\":\"getSpartansOnTheBattlefield\",\"outputs\":[{\"name\":\"spartansOnTheBattlefield\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BATTLE_CASUALTIES\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_PERSIANS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newVersion\",\"type\":\"string\"},{\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"setDeprecated\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_SPARTANS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getWinningFaction\",\"outputs\":[{\"name\":\"winningFaction\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"newAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BP_PERSIAN\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_IMMORTALS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"battlesOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BP_IMMORTAL\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BP_SPARTAN\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_warriors\",\"type\":\"uint256\"}],\"name\":\"assignSpartansToBattle\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isDraw\",\"outputs\":[{\"name\":\"draw\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_warriors\",\"type\":\"uint256\"}],\"name\":\"assignPersiansToBattle\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_startTime\",\"type\":\"uint256\"},{\"name\":\"_life\",\"type\":\"uint256\"},{\"name\":\"_avarageBlockTime\",\"type\":\"uint8\"},{\"name\":\"_persians\",\"type\":\"address\"},{\"name\":\"_immortals\",\"type\":\"address\"},{\"name\":\"_spartans\",\"type\":\"address\"},{\"name\":\"_athenians\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_faction\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_battlePointsIncrementForecast\",\"type\":\"uint256\"}],\"name\":\"WarriorsAssignedToBattlefield\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_faction\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_survivedWarriors\",\"type\":\"uint256\"}],\"name\":\"WarriorsBackToHome\",\"type\":\"event\"}]" + }, + { + "name": "BattleDrome ICO / Crowdsale", + "address": "0xeaAf270436a0ed397ED23BBF64DF7b1DCAfF142F", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"creator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"duration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"devRatio\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundingMax\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_contributor\",\"type\":\"address\"}],\"name\":\"checkTokBalance\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"startBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_contributor\",\"type\":\"address\"}],\"name\":\"checkSavedEthBalance\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isStarted\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"checkTokDev\",\"outputs\":[{\"name\":\"total\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ratio\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"savedBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundingGoal\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"checkTokSold\",\"outputs\":[{\"name\":\"total\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"checkTokTotal\",\"outputs\":[{\"name\":\"total\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_contributor\",\"type\":\"address\"}],\"name\":\"checkEthBalance\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenBalance\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"creatorPaid\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumPurchase\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isComplete\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"Token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"contribute\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"payMe\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"payCreator\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"escrow\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"percentOfGoal\",\"outputs\":[{\"name\":\"goalPercent\",\"type\":\"uint16\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isSuccessful\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_receiver\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"PayTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_receiver\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"PayEther\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"BurnTokens\",\"type\":\"event\"}]" + }, + { + "name": "BitMartToken", + "address": "0x986EE2B944c42D017F52Af21c4c69B84DBeA35d8", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawEther\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"unfreeze\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"freezeOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"freeze\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"initialSupply\",\"type\":\"uint256\"},{\"name\":\"decimalUnits\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Freeze\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Unfreeze\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + }, + { + "name": "BlockCAT CAT Token / Crowdsale", + "address": "0x56ba2Ee7890461f463F7be02aAC3099f6d5811A8", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"HIDDEN_CAP\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DEV_PORTION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"RESERVE_PORTION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"saleStartBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawFunds\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"triggerRefund\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalETHRaised\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"endSale\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"changeDeveloperCATDestinationAddress\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveCATDestination\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"saleEndBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"devETHDestination\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CAT_PER_ETH_FIRST_EARLY_BIRD_RATE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"refund\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"devCATDestination\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"saleHasEnded\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ADDITIONAL_PORTION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CAT_PER_ETH_SECOND_EARLY_BIRD_RATE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minCapReached\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"saleFirstEarlyBirdEndBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"saleSecondEarlyBirdEndBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CAT_PER_ETH_BASE_RATE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"changeReserveCATDestinationAddress\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"createTokens\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"changeDeveloperETHDestinationAddress\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"triggerMinCap\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"executor\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"SECURITY_ETHER_CAP\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"ETHContributed\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"allowRefund\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_devETHDestination\",\"type\":\"address\"},{\"name\":\"_devCATDestination\",\"type\":\"address\"},{\"name\":\"_reserveCATDestination\",\"type\":\"address\"},{\"name\":\"_saleStartBlock\",\"type\":\"uint256\"},{\"name\":\"_saleEndBlock\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_creator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amountOfCAT\",\"type\":\"uint256\"}],\"name\":\"CreatedCAT\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_refunder\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amountOfWei\",\"type\":\"uint256\"}],\"name\":\"CATRefundedForWei\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + }, + { + "name": "Crypto20", + "address": "0x26E75307Fc0C021472fEb8F727839531F112f317", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"removeEth\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newFundWallet\",\"type\":\"address\"}],\"name\":\"changeFundWallet2\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundWallet2\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundWallet1\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"vestingContract\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"participants\",\"type\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"batchAllocate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"vestingContractInput\",\"type\":\"address\"}],\"name\":\"setVestingContract\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"enableTrading\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundingEndBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newFundWallet\",\"type\":\"address\"}],\"name\":\"changeFundWallet1\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"claimTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newFundingEndBlock\",\"type\":\"uint256\"}],\"name\":\"updateFundingEndBlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"participant\",\"type\":\"address\"}],\"name\":\"adjustBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tradeable\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"backupFundWallet\",\"type\":\"address\"},{\"name\":\"endBlockInput\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + }, + { + "name": "Consensys Multisig", + "address": "0x1010101010101010101010101010101010101010", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"owners\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"revokeConfirmation\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"confirmations\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"pending\",\"type\":\"bool\"},{\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionCount\",\"outputs\":[{\"name\":\"count\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"isConfirmed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmationCount\",\"outputs\":[{\"name\":\"count\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"name\":\"destination\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"executed\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"from\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"uint256\"},{\"name\":\"pending\",\"type\":\"bool\"},{\"name\":\"executed\",\"type\":\"bool\"}],\"name\":\"getTransactionIds\",\"outputs\":[{\"name\":\"_transactionIds\",\"type\":\"uint256[]\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"getConfirmations\",\"outputs\":[{\"name\":\"_confirmations\",\"type\":\"address[]\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"transactionCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"confirmTransaction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"destination\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"submitTransaction\",\"outputs\":[{\"name\":\"transactionId\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_OWNER_COUNT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"replaceOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"transactionId\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_owners\",\"type\":\"address[]\"},{\"name\":\"_required\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_sender\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_transactionId\",\"type\":\"uint256\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_sender\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_transactionId\",\"type\":\"uint256\"}],\"name\":\"Revocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_transactionId\",\"type\":\"uint256\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_transactionId\",\"type\":\"uint256\"}],\"name\":\"Execution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_transactionId\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_sender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"OwnerAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"OwnerRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"RequirementChange\",\"type\":\"event\"}]" + }, + { + "name": "CryptoKitties", + "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"_interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"cfoAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"name\":\"_preferredTransport\",\"type\":\"string\"}],\"name\":\"tokenMetadata\",\"outputs\":[{\"name\":\"infoUrl\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"promoCreatedCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ceoAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"GEN0_STARTING_PRICE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setSiringAuctionAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pregnantKitties\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_kittyId\",\"type\":\"uint256\"}],\"name\":\"isPregnant\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"GEN0_AUCTION_DURATION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"siringAuction\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setGeneScienceAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newCEO\",\"type\":\"address\"}],\"name\":\"setCEO\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newCOO\",\"type\":\"address\"}],\"name\":\"setCOO\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_kittyId\",\"type\":\"uint256\"},{\"name\":\"_startingPrice\",\"type\":\"uint256\"},{\"name\":\"_endingPrice\",\"type\":\"uint256\"},{\"name\":\"_duration\",\"type\":\"uint256\"}],\"name\":\"createSaleAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"sireAllowedToAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_matronId\",\"type\":\"uint256\"},{\"name\":\"_sireId\",\"type\":\"uint256\"}],\"name\":\"canBreedWith\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"kittyIndexToApproved\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_kittyId\",\"type\":\"uint256\"},{\"name\":\"_startingPrice\",\"type\":\"uint256\"},{\"name\":\"_endingPrice\",\"type\":\"uint256\"},{\"name\":\"_duration\",\"type\":\"uint256\"}],\"name\":\"createSiringAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"val\",\"type\":\"uint256\"}],\"name\":\"setAutoBirthFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"},{\"name\":\"_sireId\",\"type\":\"uint256\"}],\"name\":\"approveSiring\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newCFO\",\"type\":\"address\"}],\"name\":\"setCFO\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_genes\",\"type\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"createPromoKitty\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"secs\",\"type\":\"uint256\"}],\"name\":\"setSecondsPerBlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"GEN0_CREATION_LIMIT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"newContractAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setSaleAuctionAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"count\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_v2Address\",\"type\":\"address\"}],\"name\":\"setNewAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"secondsPerBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"tokensOfOwner\",\"outputs\":[{\"name\":\"ownerTokens\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_matronId\",\"type\":\"uint256\"}],\"name\":\"giveBirth\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawAuctionBalances\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"cooldowns\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"kittyIndexToOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"cooAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"autoBirthFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"erc721Metadata\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_genes\",\"type\":\"uint256\"}],\"name\":\"createGen0Auction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_kittyId\",\"type\":\"uint256\"}],\"name\":\"isReadyToBreed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"PROMO_CREATION_LIMIT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_contractAddress\",\"type\":\"address\"}],\"name\":\"setMetadataAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"saleAuction\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"getKitty\",\"outputs\":[{\"name\":\"isGestating\",\"type\":\"bool\"},{\"name\":\"isReady\",\"type\":\"bool\"},{\"name\":\"cooldownIndex\",\"type\":\"uint256\"},{\"name\":\"nextActionAt\",\"type\":\"uint256\"},{\"name\":\"siringWithId\",\"type\":\"uint256\"},{\"name\":\"birthTime\",\"type\":\"uint256\"},{\"name\":\"matronId\",\"type\":\"uint256\"},{\"name\":\"sireId\",\"type\":\"uint256\"},{\"name\":\"generation\",\"type\":\"uint256\"},{\"name\":\"genes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_sireId\",\"type\":\"uint256\"},{\"name\":\"_matronId\",\"type\":\"uint256\"}],\"name\":\"bidOnSiringAuction\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gen0CreatedCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"geneScience\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_matronId\",\"type\":\"uint256\"},{\"name\":\"_sireId\",\"type\":\"uint256\"}],\"name\":\"breedWithAuto\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"matronId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"sireId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"cooldownEndBlock\",\"type\":\"uint256\"}],\"name\":\"Pregnant\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"kittyId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"matronId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"sireId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"genes\",\"type\":\"uint256\"}],\"name\":\"Birth\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newContract\",\"type\":\"address\"}],\"name\":\"ContractUpgrade\",\"type\":\"event\"}]" + }, + { + "name": "CryptoKitties Sales Auction", + "address": "0xb1690c08e213a35ed9bab7b318de14420fb57d8c", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"name\":\"_startingPrice\",\"type\":\"uint256\"},{\"name\":\"_endingPrice\",\"type\":\"uint256\"},{\"name\":\"_duration\",\"type\":\"uint256\"},{\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"createAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"bid\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastGen0SalePrices\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"getAuction\",\"outputs\":[{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"startingPrice\",\"type\":\"uint256\"},{\"name\":\"endingPrice\",\"type\":\"uint256\"},{\"name\":\"duration\",\"type\":\"uint256\"},{\"name\":\"startedAt\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ownerCut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isSaleClockAuction\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"cancelAuctionWhenPaused\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gen0SaleCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"cancelAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"getCurrentPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nonFungibleContract\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"averageGen0SalePrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_nftAddr\",\"type\":\"address\"},{\"name\":\"_cut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"startingPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"endingPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"AuctionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"totalPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"winner\",\"type\":\"address\"}],\"name\":\"AuctionSuccessful\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"AuctionCancelled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Pause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpause\",\"type\":\"event\"}]" + }, + { + "name": "CryptoKitties Siring Auction", + "address": "0xc7af99fe5513eb6710e6d5f44f9989da40f27f26", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"name\":\"_startingPrice\",\"type\":\"uint256\"},{\"name\":\"_endingPrice\",\"type\":\"uint256\"},{\"name\":\"_duration\",\"type\":\"uint256\"},{\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"createAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"bid\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isSiringClockAuction\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"getAuction\",\"outputs\":[{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"startingPrice\",\"type\":\"uint256\"},{\"name\":\"endingPrice\",\"type\":\"uint256\"},{\"name\":\"duration\",\"type\":\"uint256\"},{\"name\":\"startedAt\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ownerCut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"cancelAuctionWhenPaused\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"cancelAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"getCurrentPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nonFungibleContract\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_nftAddr\",\"type\":\"address\"},{\"name\":\"_cut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"startingPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"endingPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"AuctionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"totalPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"winner\",\"type\":\"address\"}],\"name\":\"AuctionSuccessful\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"AuctionCancelled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Pause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpause\",\"type\":\"event\"}]" + }, + { + "name": "CryptoPunks", + "address": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"punksOfferedForSale\",\"outputs\":[{\"name\":\"isForSale\",\"type\":\"bool\"},{\"name\":\"punkIndex\",\"type\":\"uint256\"},{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"minValue\",\"type\":\"uint256\"},{\"name\":\"onlySellTo\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"enterBidForPunk\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"punkIndex\",\"type\":\"uint256\"},{\"name\":\"minPrice\",\"type\":\"uint256\"}],\"name\":\"acceptBidForPunk\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"addresses\",\"type\":\"address[]\"},{\"name\":\"indices\",\"type\":\"uint256[]\"}],\"name\":\"setInitialOwners\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"imageHash\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextPunkIndexToAssign\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"punkIndexToAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"standard\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"punkBids\",\"outputs\":[{\"name\":\"hasBid\",\"type\":\"bool\"},{\"name\":\"punkIndex\",\"type\":\"uint256\"},{\"name\":\"bidder\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"allInitialOwnersAssigned\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"allPunksAssigned\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"buyPunk\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"transferPunk\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"withdrawBidForPunk\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"setInitialOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"punkIndex\",\"type\":\"uint256\"},{\"name\":\"minSalePriceInWei\",\"type\":\"uint256\"},{\"name\":\"toAddress\",\"type\":\"address\"}],\"name\":\"offerPunkForSaleToAddress\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"punksRemainingToAssign\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"punkIndex\",\"type\":\"uint256\"},{\"name\":\"minSalePriceInWei\",\"type\":\"uint256\"}],\"name\":\"offerPunkForSale\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"getPunk\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"pendingWithdrawals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"punkNoLongerForSale\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":true,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"PunkTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"punkIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"minValue\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"toAddress\",\"type\":\"address\"}],\"name\":\"PunkOffered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"punkIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"fromAddress\",\"type\":\"address\"}],\"name\":\"PunkBidEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"punkIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"fromAddress\",\"type\":\"address\"}],\"name\":\"PunkBidWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"punkIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"fromAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"toAddress\",\"type\":\"address\"}],\"name\":\"PunkBought\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"punkIndex\",\"type\":\"uint256\"}],\"name\":\"PunkNoLongerForSale\",\"type\":\"event\"}]" + }, + { + "name": "DGD Crowdsale / Claim", + "address": "0xF0160428a8552AC9bB7E050D90eEADE4DDD52843", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"_eth\",\"type\":\"uint256\"}],\"name\":\"setEthToCents\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"startDate\",\"outputs\":[{\"name\":\"date\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimFounders\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"userInfo\",\"outputs\":[{\"name\":\"centstotal\",\"type\":\"uint256\"},{\"name\":\"weitotal\",\"type\":\"uint256\"},{\"name\":\"share\",\"type\":\"uint256\"},{\"name\":\"badges\",\"type\":\"uint256\"},{\"name\":\"claimed\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getPeriod\",\"outputs\":[{\"name\":\"saleperiod\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodTwo\",\"outputs\":[{\"name\":\"date\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"proxyPurchase\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BILLION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claim\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ethToCents\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_wei\",\"type\":\"uint256\"}],\"name\":\"weiToCents\",\"outputs\":[{\"name\":\"centsvalue\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalWei\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"WEI_PER_ETH\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"goalReached\",\"outputs\":[{\"name\":\"reached\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"getPayout\",\"outputs\":[{\"name\":\"payout\",\"type\":\"address\"},{\"name\":\"isproxy\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"myInfo\",\"outputs\":[{\"name\":\"centstotal\",\"type\":\"uint256\"},{\"name\":\"weitotal\",\"type\":\"uint256\"},{\"name\":\"share\",\"type\":\"uint256\"},{\"name\":\"badges\",\"type\":\"uint256\"},{\"name\":\"claimed\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_payout\",\"type\":\"address\"}],\"name\":\"regProxy\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getSaleStatus\",\"outputs\":[{\"name\":\"fclaim\",\"type\":\"bool\"},{\"name\":\"reltokens\",\"type\":\"uint256\"},{\"name\":\"relbadges\",\"type\":\"uint256\"},{\"name\":\"claimers\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"sendFunds\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isEnded\",\"outputs\":[{\"name\":\"ended\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unlock\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_contrib\",\"type\":\"uint256\"},{\"name\":\"_total\",\"type\":\"uint256\"}],\"name\":\"calcShare\",\"outputs\":[{\"name\":\"share\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_payout\",\"type\":\"address\"}],\"name\":\"getProxy\",\"outputs\":[{\"name\":\"proxy\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodThree\",\"outputs\":[{\"name\":\"date\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalCents\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"endDate\",\"outputs\":[{\"name\":\"date\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getSaleConfig\",\"outputs\":[{\"name\":\"start\",\"type\":\"uint256\"},{\"name\":\"two\",\"type\":\"uint256\"},{\"name\":\"three\",\"type\":\"uint256\"},{\"name\":\"end\",\"type\":\"uint256\"},{\"name\":\"goal\",\"type\":\"uint256\"},{\"name\":\"cap\",\"type\":\"uint256\"},{\"name\":\"badgecost\",\"type\":\"uint256\"},{\"name\":\"famount\",\"type\":\"uint256\"},{\"name\":\"fwallet\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getSaleInfo\",\"outputs\":[{\"name\":\"weiamount\",\"type\":\"uint256\"},{\"name\":\"cents\",\"type\":\"uint256\"},{\"name\":\"realcents\",\"type\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"claimFor\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CENTS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_a\",\"type\":\"uint256\"},{\"name\":\"_c\",\"type\":\"uint256\"}],\"name\":\"ppb\",\"outputs\":[{\"name\":\"b\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"inputs\":[{\"name\":\"_config\",\"type\":\"address\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_exchange\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_rate\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_cents\",\"type\":\"uint256\"}],\"name\":\"Purchase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_user\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_badges\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"}]" + }, + { + "name": "DGX 1.0", + "address": "0x55b9a11c2e8351b4ffc7b11561148bfac9977855", + "abi": + "[{\"constant\":false,\"inputs\":[],\"name\":\"vendorRegistry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"getFeeDays\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"},{\"name\":\"_val\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"userExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_ownr\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"actualBalanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_acct\",\"type\":\"address\"}],\"name\":\"isAdmin\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"custodianRegistry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_cust\",\"type\":\"address\"}],\"name\":\"isCustodian\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"calculateDemurrage\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getConfigAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"redemptionFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"goldTokenLedger\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_adtr\",\"type\":\"address\"}],\"name\":\"isAuditor\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"txFeeWallet\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"accountingWallet\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"auditRelease\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_gold\",\"type\":\"address\"},{\"name\":\"_user\",\"type\":\"address\"},{\"name\":\"_tokens\",\"type\":\"uint256\"},{\"name\":\"_fees\",\"type\":\"uint256\"}],\"name\":\"ledgerMint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"storageRate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"recastContract\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"billingPeriod\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"config\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"goldRegistry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"requiredConfirmations\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"deductFees\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"minterContract\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_balance\",\"type\":\"uint256\"},{\"name\":\"_feedays\",\"type\":\"uint256\"}],\"name\":\"demurrageCalc\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"recastFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"auditorRegistry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"txFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getBase\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"txFeeMax\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_gold\",\"type\":\"address\"},{\"name\":\"_user\",\"type\":\"address\"},{\"name\":\"_tokens\",\"type\":\"uint256\"},{\"name\":\"_recastfee\",\"type\":\"uint256\"}],\"name\":\"recastCall\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_greg\",\"type\":\"address\"}],\"name\":\"isGoldRegistry\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_vndr\",\"type\":\"address\"}],\"name\":\"isVendor\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"calculateTxFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_gold\",\"type\":\"address\"}],\"name\":\"payStorageFee\",\"outputs\":[],\"type\":\"function\"},{\"inputs\":[{\"name\":\"_conf\",\"type\":\"address\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"user\",\"type\":\"address\"}],\"name\":\"NewAccount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "DAO Original", + "address": "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"votingDeadline\",\"type\":\"uint256\"},{\"name\":\"open\",\"type\":\"bool\"},{\"name\":\"proposalPassed\",\"type\":\"bool\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"name\":\"proposalDeposit\",\"type\":\"uint256\"},{\"name\":\"newCurator\",\"type\":\"bool\"},{\"name\":\"yea\",\"type\":\"uint256\"},{\"name\":\"nay\",\"type\":\"uint256\"},{\"name\":\"creator\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minTokensToCreate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardAccount\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"daoCreator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"divisor\",\"outputs\":[{\"name\":\"divisor\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"extraBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_transactionData\",\"type\":\"bytes\"}],\"name\":\"executeProposal\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unblockMe\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalRewardToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"actualBalance\",\"outputs\":[{\"name\":\"_actualBalance\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"closingTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedRecipients\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"refund\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_description\",\"type\":\"string\"},{\"name\":\"_transactionData\",\"type\":\"bytes\"},{\"name\":\"_debatingPeriod\",\"type\":\"uint256\"},{\"name\":\"_newCurator\",\"type\":\"bool\"}],\"name\":\"newProposal\",\"outputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"DAOpaidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minQuorumDivisor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newContract\",\"type\":\"address\"}],\"name\":\"newContract\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"changeAllowedRecipients\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"halveMinQuorum\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"paidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_newCurator\",\"type\":\"address\"}],\"name\":\"splitDAO\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DAOrewardAccount\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposalDeposit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numberOfProposals\",\"outputs\":[{\"name\":\"_numberOfProposals\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeMinQuorumMet\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_toMembers\",\"type\":\"bool\"}],\"name\":\"retrieveDAOReward\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isFueled\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenHolder\",\"type\":\"address\"}],\"name\":\"createTokenProxy\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"getNewDAOAddress\",\"outputs\":[{\"name\":\"_newDAO\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_supportsProposal\",\"type\":\"bool\"}],\"name\":\"vote\",\"outputs\":[{\"name\":\"_voteID\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getMyReward\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewardToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFromWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalDeposit\",\"type\":\"uint256\"}],\"name\":\"changeProposalDeposit\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"blocked\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"curator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_transactionData\",\"type\":\"bytes\"}],\"name\":\"checkProposalCode\",\"outputs\":[{\"name\":\"_codeChecksOut\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"privateCreation\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"inputs\":[{\"name\":\"_curator\",\"type\":\"address\"},{\"name\":\"_daoCreator\",\"type\":\"address\"},{\"name\":\"_proposalDeposit\",\"type\":\"uint256\"},{\"name\":\"_minTokensToCreate\",\"type\":\"uint256\"},{\"name\":\"_closingTime\",\"type\":\"uint256\"},{\"name\":\"_privateCreation\",\"type\":\"address\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"FuelingToDate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CreatedToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Refund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newCurator\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"description\",\"type\":\"string\"}],\"name\":\"ProposalAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"position\",\"type\":\"bool\"},{\"indexed\":true,\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"result\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"quorum\",\"type\":\"uint256\"}],\"name\":\"ProposalTallied\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_newCurator\",\"type\":\"address\"}],\"name\":\"NewCurator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_recipient\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"AllowedRecipientChanged\",\"type\":\"event\"}]" + }, + { + "name": "DIVX Token", + "address": "0x13f11C9905A08ca76e3e853bE63D4f0944326C72", + "abi": + "[{\"constant\":false,\"inputs\":[],\"name\":\"resume\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"withdrawWei\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"privateExchangeRate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"thirdExchangeRate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"refund\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"firstXRChangeBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"receivedWeiMin\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"firstExchangeRate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundDeposit\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundingEndBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"secondExchangeRate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"thirdXRChangeBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isRedeeming\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isPaused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"createTokens\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"stopRedeeming\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundingStartBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"secondXRChangeBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"startRedeeming\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalReceivedWei\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"diviAddress\",\"type\":\"bytes32\"}],\"name\":\"redeem\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"receivedWeiCap\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_fundDeposit\",\"type\":\"address\"},{\"name\":\"_fundingStartBlock\",\"type\":\"uint256\"},{\"name\":\"_firstXRChangeBlock\",\"type\":\"uint256\"},{\"name\":\"_secondXRChangeBlock\",\"type\":\"uint256\"},{\"name\":\"_thirdXRChangeBlock\",\"type\":\"uint256\"},{\"name\":\"_fundingEndBlock\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_tokenValue\",\"type\":\"uint256\"}],\"name\":\"LogCreate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_tokenValue\",\"type\":\"uint256\"}],\"name\":\"LogRefund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_diviAddress\",\"type\":\"bytes32\"}],\"name\":\"LogRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "Ethereum Lottery", + "address": "0xc0ADF1CCc703A0a3393892600883A1A91a4E38de", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"lastInitTimestamp\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"poissonData\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"name\":\"lotteries\",\"outputs\":[{\"name\":\"jackpot\",\"type\":\"uint256\"},{\"name\":\"decidingBlock\",\"type\":\"int256\"},{\"name\":\"numTickets\",\"type\":\"uint256\"},{\"name\":\"numTicketsSold\",\"type\":\"uint256\"},{\"name\":\"ticketPrice\",\"type\":\"uint256\"},{\"name\":\"cutoffTimestamp\",\"type\":\"uint256\"},{\"name\":\"winningTicket\",\"type\":\"int256\"},{\"name\":\"winner\",\"type\":\"address\"},{\"name\":\"finalizationBlock\",\"type\":\"uint256\"},{\"name\":\"finalizer\",\"type\":\"address\"},{\"name\":\"message\",\"type\":\"string\"},{\"name\":\"nearestKnownBlock\",\"type\":\"int256\"},{\"name\":\"nearestKnownBlockHash\",\"type\":\"int256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"recentActivity\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"destruct\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_id\",\"type\":\"int256\"},{\"name\":\"_offset\",\"type\":\"uint256\"},{\"name\":\"_n\",\"type\":\"uint256\"},{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"getTicketDetails\",\"outputs\":[{\"name\":\"details\",\"type\":\"uint8[]\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_message\",\"type\":\"string\"}],\"name\":\"getMessageLength\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_id\",\"type\":\"int256\"}],\"name\":\"getLotteryDetailsB\",\"outputs\":[{\"name\":\"_actualId\",\"type\":\"int256\"},{\"name\":\"_winningTicket\",\"type\":\"int256\"},{\"name\":\"_winner\",\"type\":\"address\"},{\"name\":\"_finalizationBlock\",\"type\":\"uint256\"},{\"name\":\"_finalizer\",\"type\":\"address\"},{\"name\":\"_message\",\"type\":\"string\"},{\"name\":\"_prevLottery\",\"type\":\"int256\"},{\"name\":\"_nextLottery\",\"type\":\"int256\"},{\"name\":\"_blockHeight\",\"type\":\"int256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getRecentActivity\",\"outputs\":[{\"name\":\"_id\",\"type\":\"int256\"},{\"name\":\"_idx\",\"type\":\"uint256\"},{\"name\":\"_recentActivity\",\"type\":\"uint256[1000]\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"recentActivityIdx\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"id\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_jackpot\",\"type\":\"uint256\"},{\"name\":\"_numTickets\",\"type\":\"uint256\"},{\"name\":\"_ticketPrice\",\"type\":\"uint256\"},{\"name\":\"_durationInBlocks\",\"type\":\"int256\"}],\"name\":\"initLottery\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_id\",\"type\":\"int256\"},{\"name\":\"_message\",\"type\":\"string\"}],\"name\":\"setMessage\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"proposeOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"needsInitialization\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"needsFinalization\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tickets\",\"type\":\"uint256[]\"}],\"name\":\"buyTickets\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposedOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"btcRelay\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_id\",\"type\":\"int256\"}],\"name\":\"getLotteryDetailsA\",\"outputs\":[{\"name\":\"_actualId\",\"type\":\"int256\"},{\"name\":\"_jackpot\",\"type\":\"uint256\"},{\"name\":\"_decidingBlock\",\"type\":\"int256\"},{\"name\":\"_numTickets\",\"type\":\"uint256\"},{\"name\":\"_numTicketsSold\",\"type\":\"uint256\"},{\"name\":\"_lastSaleTimestamp\",\"type\":\"uint256\"},{\"name\":\"_ticketPrice\",\"type\":\"uint256\"},{\"name\":\"_cutoffTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"escrow\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_id\",\"type\":\"int256\"},{\"name\":\"_ticket\",\"type\":\"uint256\"}],\"name\":\"getTicketOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_steps\",\"type\":\"uint256\"}],\"name\":\"finalizeLottery\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastSaleTimestamp\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_btcRelay\",\"type\":\"address\"},{\"name\":\"_poissonData\",\"type\":\"address\"},{\"name\":\"_escrow\",\"type\":\"address\"}],\"payable\":false,\"type\":\"constructor\"}]" + }, + { + "name": "EagleCoin [EAGLE] Contract Address", + "address": "0x994f0dffdbae0bbf09b652d6f11a493fd33f42b9", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"coinAge\",\"outputs\":[{\"name\":\"myCoinAge\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"ownerSetStakeStartTime\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxTotalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getBlockNumber\",\"outputs\":[{\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"chainStartTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stakeStartTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipients\",\"type\":\"address[]\"},{\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchTransfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"ownerBurnToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalInitialSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"annualInterest\",\"outputs\":[{\"name\":\"interest\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stakeMinAge\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"chainStartBlockNumber\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stakeMaxAge\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxMintProofOfStake\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"burner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_reward\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + }, + { + "name": "Etherisc Flight Delay", + "address": "0xc0f29798c57e890cac82a79dadbebfb3d3fa67b9", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"_carrierFlightNumber\",\"type\":\"bytes32\"},{\"name\":\"_departureYearMonthDay\",\"type\":\"bytes32\"},{\"name\":\"_departureTime\",\"type\":\"uint256\"},{\"name\":\"_arrivalTime\",\"type\":\"uint256\"},{\"name\":\"_currency\",\"type\":\"uint8\"},{\"name\":\"_customerExternalId\",\"type\":\"bytes32\"}],\"name\":\"newPolicy\",\"outputs\":[],\"payable\":true,\"type\":\"function\"}]" + }, + { + "name": "Etheroll Rewards", + "address": "0xa4463f9Ff0d87531232c8c4819B536c332DA6EAc", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"_tokenHolder\",\"type\":\"address\"}],\"name\":\"getTokensHeldByAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"ownerUpdateCurrentEpoch\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"payoutsPaused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newTreasury\",\"type\":\"address\"}],\"name\":\"ownerSetTreasury\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalRewardsForEpoch\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newPayoutStatus\",\"type\":\"bool\"}],\"name\":\"ownerPausePayouts\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"ownerChangeOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_sendTo\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ownerTransferEther\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"theTokenAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenHolder\",\"type\":\"address\"}],\"name\":\"getExpectedPayout\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenHolder\",\"type\":\"address\"}],\"name\":\"getAddressLastPaidOutEpoch\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getMyReward\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"ownerkill\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newTotalRewardsForEpochInWei\",\"type\":\"uint256\"}],\"name\":\"ownerUpdateTotalRewardsForEpoch\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"tokenAddress\",\"type\":\"address\"}],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"SentToAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"AmountTransferred\",\"type\":\"uint256\"}],\"name\":\"LogOwnerTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"SentToAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"AmountTransferred\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"NumberOfTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"TotalRewardsForEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"Epoch\",\"type\":\"uint256\"}],\"name\":\"LogPaidOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"NewCurrentEpoch\",\"type\":\"uint256\"}],\"name\":\"LogEpochUpdated\",\"type\":\"event\"}]" + }, + { + "name": "EOS: Contribution", + "address": "0xd0a6E6C54DbC68Db5db3A091B171A77407Ff7ccf", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"claimed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner_\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"time\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint128\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"foundersAllocation\",\"outputs\":[{\"name\":\"\",\"type\":\"uint128\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"claim\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"foundersKey\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"userBuys\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"createOnDay\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"freeze\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"keys\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"startTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"authority_\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dailyTotals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"buy\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"openTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EOS\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"today\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"eos\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"createFirstDay\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimAll\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"dayFor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"limit\",\"type\":\"uint256\"}],\"name\":\"buyWithLimit\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"collect\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numberOfDays\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"string\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"createPerDay\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_numberOfDays\",\"type\":\"uint256\"},{\"name\":\"_totalSupply\",\"type\":\"uint128\"},{\"name\":\"_openTime\",\"type\":\"uint256\"},{\"name\":\"_startTime\",\"type\":\"uint256\"},{\"name\":\"_foundersAllocation\",\"type\":\"uint128\"},{\"name\":\"_foundersKey\",\"type\":\"string\"}],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"window\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LogBuy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"window\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LogClaim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"key\",\"type\":\"string\"}],\"name\":\"LogRegister\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LogCollect\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"LogFreeze\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"LogSetAuthority\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"LogSetOwner\",\"type\":\"event\"}]" + }, + { + "name": "ENS: Eth Registrar (Auction)", + "address": "0x6090A6e47849629b7245Dfa1Ca21D94cd15878Ef", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"releaseDeed\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"getAllowedTime\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"unhashedName\",\"type\":\"string\"}],\"name\":\"invalidateName\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"salt\",\"type\":\"bytes32\"}],\"name\":\"shaBid\",\"outputs\":[{\"name\":\"sealedBid\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\"},{\"name\":\"seal\",\"type\":\"bytes32\"}],\"name\":\"cancelBid\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"entries\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"},{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ens\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"unsealBid\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"transferRegistrars\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"sealedBids\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"state\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"},{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"},{\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"isAllowed\",\"outputs\":[{\"name\":\"allowed\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"finalizeAuction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"registryStarted\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"launchLength\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sealedBid\",\"type\":\"bytes32\"}],\"name\":\"newBid\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"labels\",\"type\":\"bytes32[]\"}],\"name\":\"eraseNode\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hashes\",\"type\":\"bytes32[]\"}],\"name\":\"startAuctions\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"},{\"name\":\"deed\",\"type\":\"address\"},{\"name\":\"registrationDate\",\"type\":\"uint256\"}],\"name\":\"acceptRegistrarTransfer\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"startAuction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rootNode\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"hashes\",\"type\":\"bytes32[]\"},{\"name\":\"sealedBid\",\"type\":\"bytes32\"}],\"name\":\"startAuctionsAndBid\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_ens\",\"type\":\"address\"},{\"name\":\"_rootNode\",\"type\":\"bytes32\"},{\"name\":\"_startDate\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"registrationDate\",\"type\":\"uint256\"}],\"name\":\"AuctionStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"bidder\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"deposit\",\"type\":\"uint256\"}],\"name\":\"NewBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"BidRevealed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"registrationDate\",\"type\":\"uint256\"}],\"name\":\"HashRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"HashReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"registrationDate\",\"type\":\"uint256\"}],\"name\":\"HashInvalidated\",\"type\":\"event\"}]" + }, + { + "name": "ENS: Registry", + "address": "0x314159265dD8dbb310642f98f50C066173C1259b", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"resolver\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"label\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"setSubnodeOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"setTTL\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"ttl\",\"outputs\":[{\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"setResolver\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NewOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"NewResolver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"NewTTL\",\"type\":\"event\"}]" + }, + { + "name": "ENS: Reverse Registrar", + "address": "0x9062C0A6Dbd6108336BcBe4593a3D1cE05512069", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"claimWithResolver\",\"outputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ens\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"defaultResolver\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"node\",\"outputs\":[{\"name\":\"ret\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"name\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"ensAddr\",\"type\":\"address\"},{\"name\":\"resolverAddr\",\"type\":\"address\"}],\"payable\":false,\"type\":\"constructor\"}]" + }, + { + "name": "ENS: Public Resolver", + "address": "0x5FfC014343cd971B7eb70732021E26C35B744cc4", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"key\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"}],\"name\":\"setText\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"contentTypes\",\"type\":\"uint256\"}],\"name\":\"ABI\",\"outputs\":[{\"name\":\"contentType\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"x\",\"type\":\"bytes32\"},{\"name\":\"y\",\"type\":\"bytes32\"}],\"name\":\"setPubkey\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"content\",\"outputs\":[{\"name\":\"ret\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"addr\",\"outputs\":[{\"name\":\"ret\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"key\",\"type\":\"string\"}],\"name\":\"text\",\"outputs\":[{\"name\":\"ret\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"contentType\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"setABI\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"name\",\"outputs\":[{\"name\":\"ret\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"name\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"setContent\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"pubkey\",\"outputs\":[{\"name\":\"x\",\"type\":\"bytes32\"},{\"name\":\"y\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setAddr\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"ensAddr\",\"type\":\"address\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"a\",\"type\":\"address\"}],\"name\":\"AddrChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"ContentChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NameChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"contentType\",\"type\":\"uint256\"}],\"name\":\"ABIChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"x\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"y\",\"type\":\"bytes32\"}],\"name\":\"PubkeyChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"indexedKey\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"key\",\"type\":\"string\"}],\"name\":\"TextChanged\",\"type\":\"event\"}]" + }, + { + "name": "EtherDelta (02/09/2017)", + "address": "0x8d12A197cB00D4747a1fe03395095ce2A5CC6819", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"tokenGet\",\"type\":\"address\"},{\"name\":\"amountGet\",\"type\":\"uint256\"},{\"name\":\"tokenGive\",\"type\":\"address\"},{\"name\":\"amountGive\",\"type\":\"uint256\"},{\"name\":\"expires\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"user\",\"type\":\"address\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"trade\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenGet\",\"type\":\"address\"},{\"name\":\"amountGet\",\"type\":\"uint256\"},{\"name\":\"tokenGive\",\"type\":\"address\"},{\"name\":\"amountGive\",\"type\":\"uint256\"},{\"name\":\"expires\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"order\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"orderFills\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenGet\",\"type\":\"address\"},{\"name\":\"amountGet\",\"type\":\"uint256\"},{\"name\":\"tokenGive\",\"type\":\"address\"},{\"name\":\"amountGive\",\"type\":\"uint256\"},{\"name\":\"expires\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"cancelOrder\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositToken\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenGet\",\"type\":\"address\"},{\"name\":\"amountGet\",\"type\":\"uint256\"},{\"name\":\"tokenGive\",\"type\":\"address\"},{\"name\":\"amountGive\",\"type\":\"uint256\"},{\"name\":\"expires\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"user\",\"type\":\"address\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"amountFilled\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"feeMake_\",\"type\":\"uint256\"}],\"name\":\"changeFeeMake\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeMake\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"feeRebate_\",\"type\":\"uint256\"}],\"name\":\"changeFeeRebate\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeAccount\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenGet\",\"type\":\"address\"},{\"name\":\"amountGet\",\"type\":\"uint256\"},{\"name\":\"tokenGive\",\"type\":\"address\"},{\"name\":\"amountGive\",\"type\":\"uint256\"},{\"name\":\"expires\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"user\",\"type\":\"address\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"testTrade\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"feeAccount_\",\"type\":\"address\"}],\"name\":\"changeFeeAccount\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeRebate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"feeTake_\",\"type\":\"uint256\"}],\"name\":\"changeFeeTake\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"admin_\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"orders\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeTake\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"accountLevelsAddr_\",\"type\":\"address\"}],\"name\":\"changeAccountLevelsAddr\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accountLevelsAddr\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"},{\"name\":\"user\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenGet\",\"type\":\"address\"},{\"name\":\"amountGet\",\"type\":\"uint256\"},{\"name\":\"tokenGive\",\"type\":\"address\"},{\"name\":\"amountGive\",\"type\":\"uint256\"},{\"name\":\"expires\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"user\",\"type\":\"address\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"availableVolume\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"admin_\",\"type\":\"address\"},{\"name\":\"feeAccount_\",\"type\":\"address\"},{\"name\":\"accountLevelsAddr_\",\"type\":\"address\"},{\"name\":\"feeMake_\",\"type\":\"uint256\"},{\"name\":\"feeTake_\",\"type\":\"uint256\"},{\"name\":\"feeRebate_\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokenGet\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amountGet\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"tokenGive\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amountGive\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"expires\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"user\",\"type\":\"address\"}],\"name\":\"Order\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokenGet\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amountGet\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"tokenGive\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amountGive\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"expires\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"v\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"r\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"Cancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokenGet\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amountGet\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"tokenGive\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amountGive\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"get\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"give\",\"type\":\"address\"}],\"name\":\"Trade\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"}]" + }, + { + "name": "Global Academy Place (GAP)", + "address": "0xC86414354c06dC8bA428A08BCc589C72c2805959", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"_deposits\",\"type\":\"uint256\"},{\"name\":\"actualSellPriceInWei\",\"type\":\"uint256\"},{\"name\":\"_actualPriceInCents\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maximumBuyBackPriceInCents\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"secondLevelPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"Killer\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"_totalSupply\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"deadline\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"depositsTillNow\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"checkActualPrice\",\"outputs\":[{\"name\":\"_sellPrice\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"beneficiary\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"_thirdLevelEth\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountRaisedEth\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"sellPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maximumBuyBackAmountInWEI\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"actualPriceInCents\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maximumBuyBack\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"thirdLevelPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundingGoal\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"_secondLevelEth\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_NewPrice\",\"type\":\"uint256\"}],\"name\":\"manualBuyPrice\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"buyPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"contrubutedAmount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"_firstLevelEth\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maximumBuyBackAmountInCents\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amountInWei\",\"type\":\"uint256\"},{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"ownerWithdrawal\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"KilledTillNow\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CapLevelPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"actualSellPriceInWei\",\"type\":\"uint256\"},{\"name\":\"_mustToSellCourses\",\"type\":\"uint256\"},{\"name\":\"maxBuyBackPriceCents\",\"type\":\"uint256\"}],\"name\":\"BuyBackStart\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"buyTokens\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sell\",\"outputs\":[{\"name\":\"revenue\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"firstLevelPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"mustToSellCourses\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"_capLevelEth\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"safeWithdrawal\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"KilledTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"backer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"isContribution\",\"type\":\"bool\"}],\"name\":\"FundTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amountRaised\",\"type\":\"uint256\"}],\"name\":\"GoalReached\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "Global Invest Crypto Fund (GCF)", + "address": "0xb8c07c219202aFd165b7ECfD5800B7e941338193", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferEther\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buyTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"Register\",\"outputs\":[{\"name\":\"_userWallet\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_period\",\"type\":\"uint256\"}],\"name\":\"claimEthers\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"marketCap\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"isReg\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"myUserWallet\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"kill\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimTax\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Reederem\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_period\",\"type\":\"uint256\"}],\"name\":\"claimTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"taxTillNow\",\"outputs\":[{\"name\":\"_ethTax\",\"type\":\"uint256\"},{\"name\":\"_tokenTax\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_price\",\"type\":\"uint256\"},{\"name\":\"_marketCap\",\"type\":\"uint256\"},{\"name\":\"_ethForReederem\",\"type\":\"uint256\"}],\"name\":\"closePeriod\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gcf\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"numAccounts\",\"outputs\":[{\"name\":\"_numAccounts\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"contractVersion\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getActualPeriod\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getPrices\",\"outputs\":[{\"name\":\"_Price\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"sellTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"buy\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"periods\",\"outputs\":[{\"name\":\"ethAtThePeriod\",\"type\":\"uint256\"},{\"name\":\"tokensAtThePeriod\",\"type\":\"uint256\"},{\"name\":\"price\",\"type\":\"uint256\"},{\"name\":\"ethForReederem\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentPeriodPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"accounts\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_ethTx\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_tokenTx\",\"type\":\"uint256\"}],\"name\":\"TaxTillNow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_person\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_userWallet\",\"type\":\"address\"}],\"name\":\"RegisterEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"price\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_marketCap\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_ethForReederem\",\"type\":\"uint256\"}],\"name\":\"ClosePeriodEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"DepositEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_amountEthers\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_ethAtThePeriod\",\"type\":\"uint256\"}],\"name\":\"BuyEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_amountTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_tokensAtThePeriod\",\"type\":\"uint256\"}],\"name\":\"ReederemEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_taxPayment\",\"type\":\"uint256\"}],\"name\":\"Tax\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_tokensValue\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_tokensPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_ethersAmount\",\"type\":\"uint256\"}],\"name\":\"ClaimTokensEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_ethValue\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_tokensPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_tokensAmount\",\"type\":\"uint256\"}],\"name\":\"ClaimEthersEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_eth\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_tokens\",\"type\":\"uint256\"}],\"name\":\"claimTaxex\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + }, + { + "name": "IIC - Ibiscoin ERC20 Token Contract", + "address": "0x16662F73dF3e79e54c6c5938b4313f92C524C120", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"newSellPrice\",\"type\":\"uint256\"},{\"name\":\"newBuyPrice\",\"type\":\"uint256\"}],\"name\":\"setPrices\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"sellPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"target\",\"type\":\"address\"},{\"name\":\"mintedAmount\",\"type\":\"uint256\"}],\"name\":\"mintToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"buyPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"buy\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"frozenAccount\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sell\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"target\",\"type\":\"address\"},{\"name\":\"freeze\",\"type\":\"bool\"}],\"name\":\"freezeAccount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"initialSupply\",\"type\":\"uint256\"},{\"name\":\"tokenName\",\"type\":\"string\"},{\"name\":\"tokenSymbol\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"frozen\",\"type\":\"bool\"}],\"name\":\"FrozenFunds\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"}]" + }, + { + "name": "Immortal - Warrior for Battle Contract", + "address": "0x22E5F62D0FA19974749faa194e3d3eF6d89c08d7", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"redeemEther\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenAssigned\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_immortals\",\"type\":\"uint256\"}],\"name\":\"Assigned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "LookRev Crowdsale", + "address": "0x21ae23b882a340a22282162086bc98d3e2b73018", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"TOKENS_TOTAL\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokensPerKEther\",\"type\":\"uint256\"}],\"name\":\"setTokensPerKEther\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"participant\",\"type\":\"address\"},{\"name\":\"_required\",\"type\":\"bool\"}],\"name\":\"kycVerify\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"finalised\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"KYC_THRESHOLD\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CONTRIBUTIONS_MIN\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"START_DATE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initialSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"participant\",\"type\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"addPrecommitment\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"TOKENS_SOFT_CAP\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"wallet\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"END_DATE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"TOKENS_HARD_CAP\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DECIMALSFACTOR\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CONTRIBUTIONS_MAX\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finalise\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokensPerKEther\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"kycRequired\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenAddress\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferAnyERC20Token\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_wallet\",\"type\":\"address\"}],\"name\":\"setWallet\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"participant\",\"type\":\"address\"}],\"name\":\"proxyPayment\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newWallet\",\"type\":\"address\"}],\"name\":\"WalletUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"tokensPerKEther\",\"type\":\"uint256\"}],\"name\":\"TokensPerKEtherUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"ethers\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"participantTokenBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newTotalSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"tokensPerKEther\",\"type\":\"uint256\"}],\"name\":\"TokensBought\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"participant\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"PrecommitmentAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"participant\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"required\",\"type\":\"bool\"}],\"name\":\"KycVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "Global Messaging Token (GMT)", + "address": "0xb3Bd49E28f8F832b8d1E246106991e546c323502", + "abi": + "[{\"constant\": true, \"inputs\": [], \"name\": \"name\", \"outputs\": [{\"name\": \"\", \"type\": \"string\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"endBlock\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [{\"name\": \"spender\", \"type\": \"address\"}, {\"name\": \"value\", \"type\": \"uint256\"}], \"name\": \"approve\", \"outputs\": [{\"name\": \"\", \"type\": \"bool\"}], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [{\"name\": \"from\", \"type\": \"address\"}, {\"name\": \"to\", \"type\": \"address\"}, {\"name\": \"value\", \"type\": \"uint256\"}], \"name\": \"transferFrom\", \"outputs\": [{\"name\": \"\", \"type\": \"bool\"}], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"ethFundAddress\", \"outputs\": [{\"name\": \"\", \"type\": \"address\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"secondCapEndingBlock\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"decimals\", \"outputs\": [{\"name\": \"\", \"type\": \"uint8\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"isStopped\", \"outputs\": [{\"name\": \"\", \"type\": \"bool\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"minCap\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"tokenExchangeRate\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [], \"name\": \"claimTokens\", \"outputs\": [], \"payable\": true, \"stateMutability\": \"payable\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"startBlock\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"baseTokenCapPerAddress\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [], \"name\": \"finalize\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [], \"name\": \"refund\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"blocksInSecondCapPeriod\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [{\"name\": \"owner\", \"type\": \"address\"}], \"name\": \"balanceOf\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [], \"name\": \"restartSale\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [{\"name\": \"targets\", \"type\": \"address[]\"}, {\"name\": \"isRegistered\", \"type\": \"bool\"}], \"name\": \"changeRegistrationStatuses\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [{\"name\": \"\", \"type\": \"address\"}], \"name\": \"purchases\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"isFinalized\", \"outputs\": [{\"name\": \"\", \"type\": \"bool\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"owner\", \"outputs\": [{\"name\": \"\", \"type\": \"address\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"symbol\", \"outputs\": [{\"name\": \"\", \"type\": \"string\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [{\"name\": \"_newOwner\", \"type\": \"address\"}], \"name\": \"changeOwner\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [{\"name\": \"to\", \"type\": \"address\"}, {\"name\": \"value\", \"type\": \"uint256\"}], \"name\": \"transfer\", \"outputs\": [{\"name\": \"\", \"type\": \"bool\"}], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"assignedSupply\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [{\"name\": \"\", \"type\": \"address\"}], \"name\": \"registered\", \"outputs\": [{\"name\": \"\", \"type\": \"bool\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"blocksInFirstCapPeriod\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"gmtFundAddress\", \"outputs\": [{\"name\": \"\", \"type\": \"address\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"gmtFund\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [{\"name\": \"owner\", \"type\": \"address\"}, {\"name\": \"spender\", \"type\": \"address\"}], \"name\": \"allowance\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"baseEthCapPerAddress\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"firstCapEndingBlock\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [], \"name\": \"stopSale\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"tokenUnit\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"constant\": false, \"inputs\": [{\"name\": \"target\", \"type\": \"address\"}, {\"name\": \"isRegistered\", \"type\": \"bool\"}], \"name\": \"changeRegistrationStatus\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\"}, {\"constant\": true, \"inputs\": [], \"name\": \"gasLimitInWei\", \"outputs\": [{\"name\": \"\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\"}, {\"inputs\": [{\"name\": \"_ethFundAddress\", \"type\": \"address\"}, {\"name\": \"_gmtFundAddress\", \"type\": \"address\"}, {\"name\": \"_startBlock\", \"type\": \"uint256\"}, {\"name\": \"_endBlock\", \"type\": \"uint256\"}, {\"name\": \"_tokenExchangeRate\", \"type\": \"uint256\"}], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"constructor\"}, {\"payable\": true, \"stateMutability\": \"payable\", \"type\": \"fallback\"}, {\"anonymous\": false, \"inputs\": [{\"indexed\": true, \"name\": \"_to\", \"type\": \"address\"}, {\"indexed\": false, \"name\": \"_value\", \"type\": \"uint256\"}], \"name\": \"RefundSent\", \"type\": \"event\"}, {\"anonymous\": false, \"inputs\": [{\"indexed\": true, \"name\": \"_to\", \"type\": \"address\"}, {\"indexed\": false, \"name\": \"_value\", \"type\": \"uint256\"}], \"name\": \"ClaimGMT\", \"type\": \"event\"}, {\"anonymous\": false, \"inputs\": [{\"indexed\": true, \"name\": \"from\", \"type\": \"address\"}, {\"indexed\": true, \"name\": \"to\", \"type\": \"address\"}, {\"indexed\": false, \"name\": \"value\", \"type\": \"uint256\"}], \"name\": \"Transfer\", \"type\": \"event\"}, {\"anonymous\": false, \"inputs\": [{\"indexed\": true, \"name\": \"owner\", \"type\": \"address\"}, {\"indexed\": true, \"name\": \"spender\", \"type\": \"address\"}, {\"indexed\": false, \"name\": \"value\", \"type\": \"uint256\"}], \"name\": \"Approval\", \"type\": \"event\"}]" + }, + { + "name": "Havven (HAV)", + "address": "0xD989a04AD891528B571eF73dAcaEFeB0402a65b3", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"setFeePeriodDuration\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_issuanceRatio\",\"type\":\"uint256\"}],\"name\":\"setIssuanceRatio\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalIssuanceData\",\"outputs\":[{\"name\":\"currentBalanceSum\",\"type\":\"uint256\"},{\"name\":\"lastAverageBalance\",\"type\":\"uint256\"},{\"name\":\"lastModified\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"unlockedCollateral\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"nominateNewOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initiationTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"issueNomins\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"setSelfDestructBeneficiary\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"priceStalePeriod\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feePeriodDuration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"hasWithdrawnFees\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"issuanceDraft\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"setPriceStalePeriod\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnNomins\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"terminateSelfDestruct\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawFees\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"setIssuer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastPriceUpdateTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nominatedOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_nomin\",\"type\":\"address\"}],\"name\":\"setNomin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"recomputeLastAverageBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"nominsIssued\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"issuanceLastAverageBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feePeriodStartTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"setOracle\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"issuer\",\"type\":\"address\"}],\"name\":\"maxIssuableNomins\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newPrice\",\"type\":\"uint256\"},{\"name\":\"timeSent\",\"type\":\"uint256\"}],\"name\":\"updatePrice\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"isIssuer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"issuanceData\",\"outputs\":[{\"name\":\"currentBalanceSum\",\"type\":\"uint256\"},{\"name\":\"lastAverageBalance\",\"type\":\"uint256\"},{\"name\":\"lastModified\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"lockedCollateral\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rolloverFeePeriodIfElapsed\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalIssuanceLastModified\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"setProxy\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"selfDestruct\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"UNIT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenState\",\"type\":\"address\"}],\"name\":\"setTokenState\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"price\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"usd_dec\",\"type\":\"uint256\"}],\"name\":\"USDtoHAV\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"SELFDESTRUCT_DELAY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"collateral\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"issuanceRatio\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"selfDestructInitiated\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"setMessageSender\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"initiateSelfDestruct\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastFeesCollected\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_escrow\",\"type\":\"address\"}],\"name\":\"setEscrow\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalIssuanceLastAverageBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"issuanceCurrentBalanceSum\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"selfDestructBeneficiary\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"issuer\",\"type\":\"address\"}],\"name\":\"remainingIssuableNomins\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastFeePeriodStartTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalIssuanceCurrentBalanceSum\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"issueMaxNomins\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"hav_dec\",\"type\":\"uint256\"}],\"name\":\"HAVtoUSD\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"transferableHavvens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"escrow\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nomin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenState\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proxy\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"issuanceLastModified\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"priceIsStale\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_proxy\",\"type\":\"address\"},{\"name\":\"_tokenState\",\"type\":\"address\"},{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_oracle\",\"type\":\"address\"},{\"name\":\"_price\",\"type\":\"uint256\"},{\"name\":\"_issuers\",\"type\":\"address[]\"},{\"name\":\"_oldHavven\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"PriceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newRatio\",\"type\":\"uint256\"}],\"name\":\"IssuanceRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"FeePeriodRollover\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"FeePeriodDurationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"FeesWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newOracle\",\"type\":\"address\"}],\"name\":\"OracleUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newNomin\",\"type\":\"address\"}],\"name\":\"NominUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newEscrow\",\"type\":\"address\"}],\"name\":\"EscrowUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"IssuersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newTokenState\",\"type\":\"address\"}],\"name\":\"TokenStateUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"proxyAddress\",\"type\":\"address\"}],\"name\":\"ProxyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"SelfDestructTerminated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"SelfDestructed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"selfDestructDelay\",\"type\":\"uint256\"}],\"name\":\"SelfDestructInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newBeneficiary\",\"type\":\"address\"}],\"name\":\"SelfDestructBeneficiaryUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerNominated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"}]" + }, + { + "name": "Havven Mintr", + "address": "0xC011A72400E58ecD99Ee497CF89E3775d4bd732F", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"nominsIssued\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"issuer\",\"type\":\"address\"}],\"name\":\"remainingIssuableNomins\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"issuer\",\"type\":\"address\"}],\"name\":\"maxIssuableNomins\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"issueNomins\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"issueMaxNomins\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnNomins\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawFees\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"FeesWithdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastFeesCollected\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" + }, + { + "name": "Milestone Tracker", + "address": "0x3C01ddC7aF41E6888cBD8d0398Fe34a81C3c7f36", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"proposedMilestones\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"changingMilestones\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"campaignCanceled\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_idMilestone\",\"type\":\"uint256\"}],\"name\":\"collectMilestonePayment\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unproposeMilestones\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"donor\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_idMilestone\",\"type\":\"uint256\"}],\"name\":\"milestoneCompleted\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hashProposals\",\"type\":\"bytes32\"}],\"name\":\"acceptProposedMilestones\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_idMilestone\",\"type\":\"uint256\"}],\"name\":\"approveCompletedMilestone\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"recipient\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newMilestones\",\"type\":\"bytes\"}],\"name\":\"proposeMilestones\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"arbitrateCancelCampaign\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newRecipient\",\"type\":\"address\"}],\"name\":\"changeRecipient\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numberOfMilestones\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_idMilestone\",\"type\":\"uint256\"}],\"name\":\"rejectMilestone\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newDonor\",\"type\":\"address\"}],\"name\":\"changeDonor\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"milestones\",\"outputs\":[{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"minCompletionDate\",\"type\":\"uint256\"},{\"name\":\"maxCompletionDate\",\"type\":\"uint256\"},{\"name\":\"reviewer\",\"type\":\"address\"},{\"name\":\"reviewTime\",\"type\":\"uint256\"},{\"name\":\"paymentSource\",\"type\":\"address\"},{\"name\":\"payData\",\"type\":\"bytes\"},{\"name\":\"status\",\"type\":\"uint8\"},{\"name\":\"doneTime\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_idMilestone\",\"type\":\"uint256\"}],\"name\":\"arbitrateApproveMilestone\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_idMilestone\",\"type\":\"uint256\"}],\"name\":\"cancelMilestone\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newArbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_arbitrator\",\"type\":\"address\"},{\"name\":\"_donor\",\"type\":\"address\"},{\"name\":\"_recipient\",\"type\":\"address\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"NewMilestoneListProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"NewMilestoneListUnproposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"NewMilestoneListAccepted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"idProposal\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newProposal\",\"type\":\"uint8\"}],\"name\":\"ProposalStatusChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CampaignCalncelled\",\"type\":\"event\"}]" + }, + { + "name": "Mist's Multisig Contract", + "address": "0x0101010101010101010101010101010101010101", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_numOwners\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_lastDay\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"resetSpentToday\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_spentToday\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_required\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_h\",\"type\":\"bytes32\"}],\"name\":\"confirm\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newLimit\",\"type\":\"uint256\"}],\"name\":\"setDailyLimit\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"name\":\"_r\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_operation\",\"type\":\"bytes32\"}],\"name\":\"revoke\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newRequired\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_operation\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"hasConfirmed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"kill\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_dailyLimit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"inputs\":[{\"name\":\"_owners\",\"type\":\"address[]\"},{\"name\":\"_required\",\"type\":\"uint256\"},{\"name\":\"_daylimit\",\"type\":\"uint256\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"Revoke\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldOwner\",\"type\":\"address\"}],\"name\":\"OwnerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newRequirement\",\"type\":\"uint256\"}],\"name\":\"RequirementChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"SingleTransact\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"MultiTransact\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ConfirmationNeeded\",\"type\":\"event\"}]" + }, + { + "name": "Modum Token", + "address": "0x957c30aB0426e0C93CD8241E2c60392d08c6aC8e", + "abi": + "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"weiPerToken\",\"type\":\"uint256\"}],\"name\":\"Payout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"option\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"votes\",\"type\":\"uint256\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"name\":\"lastProposalStartTime\",\"type\":\"uint256\"},{\"name\":\"lastAirdropWei\",\"type\":\"uint256\"},{\"name\":\"lastAirdropClaimTime\",\"type\":\"uint256\"},{\"name\":\"bonusWei\",\"type\":\"uint256\"},{\"name\":\"valueModVote\",\"type\":\"uint256\"},{\"name\":\"valueMod\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowed\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blockingDuration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimBonus\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimVotingProposal\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentProposal\",\"outputs\":[{\"name\":\"addr\",\"type\":\"string\"},{\"name\":\"hash\",\"type\":\"bytes32\"},{\"name\":\"valueMod\",\"type\":\"uint256\"},{\"name\":\"startTime\",\"type\":\"uint256\"},{\"name\":\"yay\",\"type\":\"uint256\"},{\"name\":\"nay\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isProposalActive\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isVoteOngoing\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isVotingPhaseOver\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastNegativeVoting\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lockedTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address[]\"},{\"name\":\"_value\",\"type\":\"uint256[]\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"mintDone\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address[]\"}],\"name\":\"payBonus\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"redistributionTimeout\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rounding\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"setMintDone\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"showBonus\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"showVotes\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalDropPerUnlockedToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_vote\",\"type\":\"bool\"}],\"name\":\"vote\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"votingDuration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"string\"},{\"name\":\"_hash\",\"type\":\"bytes32\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"votingProposal\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + }, + { + "name": "NVC Fund", + "address": "0x53b60A7c2F6d95E12c5e5A3cCaAcFE35620AeFf6", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"standard\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimal\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"initialSupply\",\"type\":\"uint256\"},{\"name\":\"tokenName\",\"type\":\"string\"},{\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"name\":\"decimalUnits\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + }, + { + "name": "OpenWeb Network", + "address": "0x68fcb1f0d07000a84b569ccb647dd8fe320cddaa", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"},{\"name\":\"_git\",\"type\":\"string\"},{\"name\":\"_filesHash\",\"type\":\"bytes32\"},{\"name\":\"_file_name\",\"type\":\"bytes32[]\"},{\"name\":\"_file_hash\",\"type\":\"bytes32[]\"}],\"name\":\"publishWebsite\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"websiteSizeLimit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"_priceFetchingCost\",\"outputs\":[{\"name\":\"_getprice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"__response\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"hostConnectionDB\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_year\",\"type\":\"uint256\"},{\"name\":\"_month\",\"type\":\"uint256\"}],\"name\":\"claimHostTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"},{\"name\":\"_file_name\",\"type\":\"bytes32\"},{\"name\":\"_file_hash\",\"type\":\"bytes32\"}],\"name\":\"verifyDomainFileHash\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ow_owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"}],\"name\":\"buyDomain\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"poolBalanceClaimed\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stakeLockTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"websiteUpdatesCounter\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"},{\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"addDomainAdmin\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"internalTransfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"}],\"name\":\"getDomainMeta\",\"outputs\":[{\"name\":\"_name\",\"type\":\"string\"},{\"name\":\"_git\",\"type\":\"string\"},{\"name\":\"_domain_bytes\",\"type\":\"bytes32\"},{\"name\":\"_hash\",\"type\":\"bytes32\"},{\"name\":\"_total_admins\",\"type\":\"uint256\"},{\"name\":\"_adminIndex\",\"type\":\"uint256\"},{\"name\":\"_total_files\",\"type\":\"uint256\"},{\"name\":\"_version\",\"type\":\"uint256\"},{\"name\":\"_ttl\",\"type\":\"uint256\"},{\"name\":\"_time\",\"type\":\"uint256\"},{\"name\":\"_expity_time\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"notifyBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"userSurfingCost\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_connection\",\"type\":\"string\"}],\"name\":\"registerHost\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"stakesLockups\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"},{\"name\":\"_ttl\",\"type\":\"uint256\"}],\"name\":\"updateDomainTTL\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"domain_sale\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"time\",\"type\":\"uint256\"},{\"name\":\"expity_time\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_year\",\"type\":\"uint256\"},{\"name\":\"_month\",\"type\":\"uint256\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"poolDonate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_year\",\"type\":\"uint256\"},{\"name\":\"_month\",\"type\":\"uint256\"}],\"name\":\"getHostTokens\",\"outputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"stakeBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"poolBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"hostUpdatesCounter\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"hostAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastPriceUpdate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"hostConnection\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"stakeTmpBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hostAddress\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"stakeTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"totalStakes\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"},{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_expiry\",\"type\":\"uint256\"}],\"name\":\"sellDomain\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_connection\",\"type\":\"string\"}],\"name\":\"updateHost\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"},{\"name\":\"_file_name\",\"type\":\"bytes32\"}],\"name\":\"getDomainFileHash\",\"outputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setOwOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"},{\"name\":\"_ttl\",\"type\":\"uint256\"}],\"name\":\"registerDomain\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"hostStakes\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"publishCost\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_year\",\"type\":\"uint256\"},{\"name\":\"_month\",\"type\":\"uint256\"}],\"name\":\"claimStakeTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"users\",\"outputs\":[{\"name\":\"active\",\"type\":\"bool\"},{\"name\":\"start_time\",\"type\":\"uint256\"},{\"name\":\"expiry_time\",\"type\":\"uint256\"},{\"name\":\"time\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"websiteUpdates\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"hostUpdates\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"hosts\",\"outputs\":[{\"name\":\"id\",\"type\":\"uint256\"},{\"name\":\"hostAddress\",\"type\":\"address\"},{\"name\":\"connection\",\"type\":\"bytes32\"},{\"name\":\"active\",\"type\":\"bool\"},{\"name\":\"start_time\",\"type\":\"uint256\"},{\"name\":\"time\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"fetchTokenPrice\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSubscriber\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"domains\",\"outputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"admin_index\",\"type\":\"uint256\"},{\"name\":\"total_admins\",\"type\":\"uint256\"},{\"name\":\"git\",\"type\":\"string\"},{\"name\":\"domain_bytes\",\"type\":\"bytes32\"},{\"name\":\"hash\",\"type\":\"bytes32\"},{\"name\":\"total_files\",\"type\":\"uint256\"},{\"name\":\"version\",\"type\":\"uint256\"},{\"name\":\"ttl\",\"type\":\"uint256\"},{\"name\":\"time\",\"type\":\"uint256\"},{\"name\":\"expity_time\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_year\",\"type\":\"uint256\"},{\"name\":\"_month\",\"type\":\"uint256\"}],\"name\":\"burnPoolTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalDomains\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"cmcAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"registryDuration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"},{\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"removeDomainAdmin\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"}],\"name\":\"cancelSellDomain\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"domainCost\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_duration\",\"type\":\"uint256\"}],\"name\":\"userSubscribe\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_year\",\"type\":\"uint256\"},{\"name\":\"_month\",\"type\":\"uint256\"}],\"name\":\"getStakeTokens\",\"outputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"hostRegistryCost\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"websiteFilesLimit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_domain\",\"type\":\"string\"}],\"name\":\"renewDomain\",\"outputs\":[{\"name\":\"_status\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalHosts\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"_currentPrice\",\"outputs\":[{\"name\":\"_getprice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_cmc\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"}]" + }, + { + "name": "Pass DAO: Committees Contract", + "address": "0x6A3DCd2Ad3C693aA8CBc3e5bCB075b674209A033", + "abi": + "[{ \"constant\": false, \"inputs\": [ { \"name\": \"_committeeID\", \"type\": \"uint256\" }, { \"name\": \"_supportsProposal\", \"type\": \"bool\" } ], \"name\": \"vote\", \"outputs\": [], \"payable\": false, \"type\": \"function\" },{ \"constant\": false, \"inputs\": [ { \"name\": \"_proposalID\", \"type\": \"uint256\" } ], \"name\": \"buySharesForProposal\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": true, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [], \"name\": \"withdrawPendingAmounts\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"type\": \"function\"}, { \"constant\": false, \"inputs\": [ { \"name\": \"_contractorCreator\", \"type\": \"address\" }, { \"name\": \"_recipient\", \"type\": \"address\" }, { \"name\": \"_metaProject\", \"type\": \"bool\" }, { \"name\": \"_passProject\", \"type\": \"address\" }, { \"name\": \"_projectName\", \"type\": \"string\" }, { \"name\": \"_projectDescription\", \"type\": \"string\" } ], \"name\": \"createContractor\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_amount\", \"type\": \"uint256\" }, { \"name\": \"_contractor\", \"type\": \"address\" }, { \"name\": \"_contractorProposalID\", \"type\": \"uint256\" }, { \"name\": \"_proposalDescription\", \"type\": \"string\" }, { \"name\": \"_hashOfTheContractorProposalDocument\", \"type\": \"bytes32\" }, { \"name\": \"_moderator\", \"typPassDe\": \"address\" }, { \"name\": \"_initialSharePriceMultiplier\", \"type\": \"uint256\" }, { \"name\": \"_minutesFundingPeriod\", \"type\": \"uint256\" }, { \"name\": \"_minutesDebatingPeriod\", \"type\": \"uint256\" } ], \"name\": \"contractorProposal\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": true, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_name\", \"type\": \"string\" }, { \"name\": \"_description\", \"type\": \"string\" }, { \"name\": \"_project\", \"type\": \"address\" }, { \"name\": \"_minutesDebatingPeriod\", \"type\": \"uint256\" } ], \"name\": \"resolutionProposal\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": true, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_minQuorumDivisor\", \"type\": \"uint256\" }, { \"name\": \"_minCommitteeFees\", \"type\": \"uint256\" }, { \"name\": \"_minPercentageOfLikes\", \"type\": \"uint256\" }, { \"name\": \"_minutesSetProposalPeriod\", \"type\": \"uint256\" }, { \"name\": \"_minMinutesDebatePeriod\", \"type\": \"uint256\" }, { \"name\": \"_feesRewardInflationRate\", \"type\": \"uint256\" }, { \"name\": \"_defaultMinutesFundingPeriod\", \"type\": \"uint256\" }, { \"name\": \"_tokenPriceInflationRate\", \"type\": \"uint256\" } ], \"name\": \"rulesProposal\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": true, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_newCommitteeRoom\", \"type\": \"address\" }, { \"name\": \"_newShareManager\", \"type\": \"address\" }, { \"name\": \"_newTokenManager\", \"type\": \"address\" }, { \"name\": \"_minutesDebatingPeriod\", \"type\": \"uint256\" } ], \"name\": \"upgradeProposal\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": true, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_committeeID\", \"type\": \"uint256\" } ], \"name\": \"executeDecision\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_proposalID\", \"type\": \"uint256\" } ], \"name\": \"orderToContractor\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"type\": \"function\" }]" + }, + { + "name": "Pass DAO: Tokens Contract", + "address": "0x85bC00724203D53536072b000C44A2cc16CD12C5", + "abi": + "[{ \"constant\": false, \"inputs\": [ { \"name\": \"_proposalID\", \"type\": \"uint256\" }, { \"name\": \"_buyer\", \"type\": \"address\" } ], \"name\": \"buyTokensForProposal\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": true, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [], \"name\": \"withdrawPendingAmounts\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [], \"name\": \"buyTokens\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": true, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_from\", \"type\": \"uint256\" }, { \"name\": \"_to\", \"type\": \"uint256\" } ], \"name\": \"removeOrders\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_tokenAmount\", \"type\": \"uint256\" }, { \"name\": \"_from\", \"type\": \"uint256\" }, { \"name\": \"_to\", \"type\": \"uint256\" } ], \"name\": \"sellTokens\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"type\": \"function\" }]" + }, + { + "name": "Persian: Warrior for Battle Contract", + "address": "0x163733bcc28dbf26B41a8CfA83e369b5B3af741b", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"icoStartBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxTotalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalContributions\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"contributions\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimToken\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"icoEndBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"estimateBalanceOf\",\"outputs\":[{\"name\":\"estimatedTokens\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isICOOpen\",\"outputs\":[{\"name\":\"_open\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isICOEnded\",\"outputs\":[{\"name\":\"_ended\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"contribute\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":true,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"redeemEther\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_icoStartBlock\",\"type\":\"uint256\"},{\"name\":\"_icoEndBlock\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_estimatedTotalTokenBalance\",\"type\":\"uint256\"}],\"name\":\"Contributed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "☼Plasma Token & Token Wallet", + "address": "0x59416A25628A76b4730eC51486114c32E0B582A1", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"message\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ViewerStatus\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ViewerValue\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenRateEther\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"Login\",\"type\":\"string\"}],\"name\":\"registrationFromLogin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"MainAccount\",\"type\":\"address\"},{\"name\":\"ActiveAliasAccount\",\"type\":\"bool\"},{\"name\":\"ActiveMainAccount\",\"type\":\"bool\"},{\"name\":\"PromilleDeposit\",\"type\":\"uint256\"},{\"name\":\"DeleteMainAccount\",\"type\":\"bool\"}],\"name\":\"setupAccount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"NewPIN\",\"type\":\"uint256\"}],\"name\":\"setupAccountPIN\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"deleteLogin\",\"type\":\"string\"},{\"name\":\"newLogin\",\"type\":\"string\"}],\"name\":\"setupLoginVipAccount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"MainAccount\",\"type\":\"address\"}],\"name\":\"setupAliasAccount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"Account\",\"type\":\"address\"},{\"name\":\"Freezen\",\"type\":\"bool\"}],\"name\":\"frozenSubAccount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"Account\",\"type\":\"address\"}],\"name\":\"buyVipStatusPay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"buyTokenPay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"toTransferETHER\",\"type\":\"address\"},{\"name\":\"microToken\",\"type\":\"uint256\"},{\"name\":\"SellDeposit\",\"type\":\"bool\"}],\"name\":\"sellToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"login\",\"type\":\"string\"},{\"name\":\"password\",\"type\":\"string\"}],\"name\":\"depositaryPay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"Account\",\"type\":\"address\"},{\"name\":\"microToken\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"Login\",\"type\":\"string\"},{\"name\":\"PIN\",\"type\":\"uint256\"}],\"name\":\"transferFromLoginPay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"Login\",\"type\":\"string\"}],\"name\":\"transferToLoginPay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"microToken\",\"type\":\"uint256\"}],\"name\":\"returnDepositToBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"SubAccount\",\"type\":\"address\"},{\"name\":\"PIN\",\"type\":\"uint256\"}],\"name\":\"transferProtectPay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"PIN\",\"type\":\"uint256\"}],\"name\":\"unblockTransferProtectPay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"SubAccount\",\"type\":\"address\"},{\"name\":\"pinSubAccount\",\"type\":\"uint256\"},{\"name\":\"promilleRefund\",\"type\":\"uint256\"}],\"name\":\"transferRefundSubAccountPay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"MainAccount\",\"type\":\"address\"},{\"name\":\"pinMainAccount\",\"type\":\"uint256\"},{\"name\":\"SubAccount\",\"type\":\"address\"},{\"name\":\"pinSubAccount\",\"type\":\"uint256\"},{\"name\":\"promilleReferee\",\"type\":\"uint256\"}],\"name\":\"refereeTransferProtect\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"VipAccount\",\"type\":\"bool\"},{\"name\":\"ActiveAliasAccount\",\"type\":\"bool\"},{\"name\":\"ActiveMainAccount\",\"type\":\"bool\"},{\"name\":\"MainAccount\",\"type\":\"address\"},{\"name\":\"MyReferralAccount\",\"type\":\"address\"}],\"name\":\"MyAccountStatus\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"Deposit\",\"type\":\"bool\"},{\"name\":\"PromilleDeposit\",\"type\":\"bool\"},{\"name\":\"ZoneToken\",\"type\":\"bool\"}],\"name\":\"MyAccountValue\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"myMessage\",\"type\":\"string\"}],\"name\":\"advertisingPay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"burnToken\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"microToken\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"Message\",\"type\":\"string\"}],\"name\":\"Advertising\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"microToken\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"PriceVipAccountMicroEther\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"TransferTokensFeeInPromille\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"BonusForZone1InPromille\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"BonusForZone2InPromille\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"BonusForZone3InPromille\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"BonusForZone4InPromille\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"BonusForZone5InPromille\",\"type\":\"uint256\"}],\"name\":\"OptionsContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"microETHER\",\"type\":\"uint256\"}],\"name\":\"TokenSellingRate\",\"type\":\"event\"}]" + }, + { + "name": "Rebellious", + "address": "0x5f53f7a8075614b699baad0bc2c899f4bad8fbbf", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"coinAge\",\"outputs\":[{\"name\":\"myCoinAge\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"ownerSetStakeStartTime\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxTotalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getBlockNumber\",\"outputs\":[{\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"chainStartTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stakeStartTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipients\",\"type\":\"address[]\"},{\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchTransfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"ownerBurnToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalInitialSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"annualInterest\",\"outputs\":[{\"name\":\"interest\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stakeMinAge\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"chainStartBlockNumber\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stakeMaxAge\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxMintProofOfStake\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"burner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_reward\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + }, + { + "name": "Replay Safe Split", + "address": "0xAA1A6e3e6EF20068f7F8d8C835d2D22fd5116444", + "abi": + "[{\"constant\":false,\"inputs\":[{\"name\":\"targetFork\",\"type\":\"address\"},{\"name\":\"targetNoFork\",\"type\":\"address\"}],\"name\":\"split\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"}]" + }, + { + "name": "RiderToken", + "address": "0x54b293226000ccBFC04DF902eEC567CB4C35a903", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenName\",\"type\":\"string\"},{\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"name\":\"tokenSupply\",\"type\":\"uint256\"}],\"name\":\"SetupToken\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"adr\",\"type\":\"address\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "SingularDTV Fund", + "address": "0xe736091FC36f1ad476f5E4e03e4425940822D3BA", + "abi": + "[{\"inputs\": [{\"type\": \"address\", \"name\": \"singularDTVCrowdfundingAddress\"}, {\"type\": \"address\", \"name\": \"singularDTVTokenAddress\"}], \"constant\": false, \"type\": \"function\", \"name\": \"setup\", \"outputs\": [{\"type\": \"bool\", \"name\": \"\"}]}, {\"inputs\": [], \"constant\": false, \"type\": \"function\", \"name\": \"depositRevenue\", \"outputs\": [{\"type\": \"bool\", \"name\": \"\"}]}, {\"inputs\": [], \"constant\": false, \"type\": \"function\", \"name\": \"withdrawRevenue\", \"outputs\": [{\"type\": \"uint256\", \"name\": \"\"}]}, {\"inputs\": [{\"type\": \"address\", \"name\": \"forAddress\"}], \"constant\": false, \"type\": \"function\", \"name\": \"softWithdrawRevenueFor\", \"outputs\": [{\"type\": \"uint256\", \"name\": \"\"}]}, {\"inputs\": [], \"constant\": true, \"type\": \"function\", \"name\": \"workshop\", \"outputs\": [{\"type\": \"address\", \"name\": \"\"}]}, {\"inputs\": [{\"type\": \"address\", \"name\": \"\"}], \"constant\": true, \"type\": \"function\", \"name\": \"revenueAtTimeOfWithdraw\", \"outputs\": [{\"type\": \"uint256\", \"name\": \"\"}]}, {\"inputs\": [], \"constant\": true, \"type\": \"function\", \"name\": \"singularDTVToken\", \"outputs\": [{\"type\": \"address\", \"name\": \"\"}]}, {\"inputs\": [], \"constant\": true, \"type\": \"function\", \"name\": \"owner\", \"outputs\": [{\"type\": \"address\", \"name\": \"\"}]}, {\"inputs\": [], \"constant\": true, \"type\": \"function\", \"name\": \"singularDTVCrowdfunding\", \"outputs\": [{\"type\": \"address\", \"name\": \"\"}]}, {\"inputs\": [], \"constant\": true, \"type\": \"function\", \"name\": \"totalRevenue\", \"outputs\": [{\"type\": \"uint256\", \"name\": \"\"}]}, {\"inputs\": [{\"type\": \"address\", \"name\": \"\"}], \"constant\": true, \"type\": \"function\", \"name\": \"owed\", \"outputs\": [{\"type\": \"uint256\", \"name\": \"\"}]}, {\"inputs\": [], \"type\": \"constructor\"}]" + }, + { + "name": "SIFT Vote SVP002", + "address": "0x7f39f3a01701bbb3b637597ab3267c213c8a11df", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"vote02YesCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"vote02NoCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"voteStartTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"vote03YesCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"vote01YesCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"vote\",\"type\":\"bool\"}],\"name\":\"voteSvp01\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"vote03NoCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"voteCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"vote01NoCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"voteEndTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"setVoterCount\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"voterAddresses\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"vote\",\"type\":\"bool\"}],\"name\":\"voteSvp02\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"vote\",\"type\":\"bool\"}],\"name\":\"voteSvp03\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_position\",\"type\":\"uint256\"},{\"name\":\"_voter\",\"type\":\"address\"},{\"name\":\"_voteCount\",\"type\":\"uint256\"}],\"name\":\"setVoter\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_authenticationManagerAddress\",\"type\":\"address\"},{\"name\":\"_voteStartTime\",\"type\":\"uint256\"},{\"name\":\"_voteEndTime\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"constructor\"}]" + }, + { + "name": "SIFT Dividends", + "address": "0x9599954b6ade1f00f36a95cdf3a1b773ba3be19a", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"dividends\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawDividend\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"contractVersion\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_siftContractAddress\",\"type\":\"address\"}],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"PaymentAvailable\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"paymentPerShare\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"DividendPayment\",\"type\":\"event\"}]" + }, + { + "name": "SIFT Transparency", + "address": "0x27c8566bfb73280606e58f60cb3374788a43d850", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"accountBalanceCount\",\"outputs\":[{\"name\":\"_count\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_accountType\",\"type\":\"string\"},{\"name\":\"_accountIssuer\",\"type\":\"string\"},{\"name\":\"_balance\",\"type\":\"uint256\"},{\"name\":\"_accountReference\",\"type\":\"string\"},{\"name\":\"_validationUrl\",\"type\":\"string\"},{\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"accountBalancePublish\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundValueCount\",\"outputs\":[{\"name\":\"_count\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_usdTotalFund\",\"type\":\"uint256\"},{\"name\":\"_etherTotalFund\",\"type\":\"uint256\"},{\"name\":\"_definedTimestamp\",\"type\":\"uint256\"}],\"name\":\"fundValuePublish\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fundValues\",\"outputs\":[{\"name\":\"usdValue\",\"type\":\"uint256\"},{\"name\":\"etherEquivalent\",\"type\":\"uint256\"},{\"name\":\"suppliedTimestamp\",\"type\":\"uint256\"},{\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"accountBalances\",\"outputs\":[{\"name\":\"accountType\",\"type\":\"string\"},{\"name\":\"accountIssuer\",\"type\":\"string\"},{\"name\":\"balance\",\"type\":\"uint256\"},{\"name\":\"accountReference\",\"type\":\"string\"},{\"name\":\"validationUrl\",\"type\":\"string\"},{\"name\":\"suppliedTimestamp\",\"type\":\"uint256\"},{\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"contractVersion\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_authenticationManagerAddress\",\"type\":\"address\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"usdValue\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"etherEquivalent\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"suppliedTimestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"name\":\"FundValue\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"accountType\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"accountIssuer\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"balance\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"accountReference\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"validationUrl\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"name\":\"AccountBalance\",\"type\":\"event\"}]" + }, + { + "name": "SIFT Authentication", + "address": "0xc6a3746aa3fec176559f0865fd5240159402a81f", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isCurrentOrPastAccountReader\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"removeAdmin\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"removeAccountReader\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"addAdmin\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"contractVersion\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"addAccountReader\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isCurrentAdmin\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isCurrentOrPastAdmin\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isCurrentAccountReader\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"addedBy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"AdminAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"removedBy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"AdminRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"addedBy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AccountReaderAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"removedBy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AccountReaderRemoved\",\"type\":\"event\"}]" + }, + { + "name": "Skrilla Token", + "address": "0x4c382F8E09615AC86E08CE58266CC227e7d4D913", + "abi": + "[{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"tokenSaleBalanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_buyer\",\"type\":\"address\"}],\"name\":\"getCurrentPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "Telcoin Redeem", + "address": "0x6D9FE564C9B1C81C305e066346dF73de6cF9295f", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"mintingFinished\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finishMinting\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"vestedBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"redeemableBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_beneficiaries\",\"type\":\"address[]\"}],\"name\":\"redeemMany\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalRedeemed\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_telcoin\",\"type\":\"address\"},{\"name\":\"_vestingStart\",\"type\":\"uint256\"},{\"name\":\"_vestingDuration\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"MintFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"sacrificedValue\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"grantedValue\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + }, + { + "name": "StashPay", + "address": "0xecd570bBf74761b960Fa04Cc10fe2c4e86FfDA36", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"stop\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"distributionComplete\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"publicKeySize\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getData\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"addr\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"freeze\",\"type\":\"bool\"}],\"name\":\"distributeAdviserBounty\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"publicKey\",\"type\":\"string\"}],\"name\":\"registerKey\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"timeTransferbleUntil\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"sale\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stopped\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"string\"}],\"name\":\"burn\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"data\",\"type\":\"uint256[]\"},{\"name\":\"freeze\",\"type\":\"bool\"}],\"name\":\"multiDistributeAdviserBounty\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"publicKeys\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_publicKeySize\",\"type\":\"uint8\"}],\"name\":\"modifyPublicKeySize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"frozenAccount\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"setSymbol\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"data\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"adviserAndBounty\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"isFrozen\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"data\",\"type\":\"uint256[]\"}],\"name\":\"multiDistribute\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_publicKey\",\"type\":\"string\"}],\"name\":\"RegisterKey\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_size\",\"type\":\"uint8\"}],\"name\":\"ModifyPublicKeySize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"string\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"LogStop\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "TRV", + "address": "0xA671f2914Ba0e73979FFc47cD350801d1714b18f", + "abi": + "[{\"constant\":false,\"inputs\":[],\"name\":\"checkGoalReached\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"creator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundingMinimumTargetInUsd\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_source\",\"type\":\"address\"}],\"name\":\"addToSyncList\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenRaised\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"setEtherPrice\",\"outputs\":[{\"name\":\"result\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalUsdRaised\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"beneficiary\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"icoState\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"priceInUsd\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenAllocation\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"userRefund\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenReward\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"stopIco\",\"outputs\":[{\"name\":\"result\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountRaised\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"startIco\",\"outputs\":[{\"name\":\"result\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundingMaximumTargetInUsd\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"drain\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"syncList\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"a\",\"type\":\"uint256\"},{\"name\":\"b\",\"type\":\"uint256\"}],\"name\":\"safeDiv\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"AutorizeRefund\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"etherPriceInUsd\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"a\",\"type\":\"uint256\"},{\"name\":\"b\",\"type\":\"uint256\"}],\"name\":\"safeMul\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundingGoalReached\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_priceInUsd\",\"type\":\"uint256\"},{\"name\":\"_tokenHolder\",\"type\":\"address\"},{\"name\":\"_tokenAllocation\",\"type\":\"uint256\"},{\"name\":\"_fundingMinimumTargetInUsd\",\"type\":\"uint256\"},{\"name\":\"_fundingMaximumTargetInUsd\",\"type\":\"uint256\"}],\"name\":\"settingsIco\",\"outputs\":[{\"name\":\"result\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"safeWithdrawal\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"removeContract\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"ifSuccessfulSendTo\",\"type\":\"address\"},{\"name\":\"_fundingMinimumTargetInUsd\",\"type\":\"uint256\"},{\"name\":\"_fundingMaximumTargetInUsd\",\"type\":\"uint256\"},{\"name\":\"tokenPriceInUSD\",\"type\":\"uint256\"},{\"name\":\"addressOfTokenUsedAsReward\",\"type\":\"address\"},{\"name\":\"_tokenHolder\",\"type\":\"address\"},{\"name\":\"_tokenAllocation\",\"type\":\"uint256\"},{\"name\":\"_etherPriceInUsd\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amountRaised\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_totalUsdRaised\",\"type\":\"uint256\"}],\"name\":\"GoalMinimumReached\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amountRaised\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_totalUsdRaised\",\"type\":\"uint256\"}],\"name\":\"GoalMaximumReached\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_backer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_isContribution\",\"type\":\"bool\"}],\"name\":\"FundTransfer\",\"type\":\"event\"}]" + }, + { + "name": "Q - TiiQu Network", + "address": "0x2C3C1F05187dBa7A5f2Dd47Dca57281C4d4F183F", + "abi": + "[{\"constant\":false,\"inputs\":[],\"name\":\"killPay\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isAuthorised\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"authorise\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_toReplace\",\"type\":\"address\"},{\"name\":\"_new\",\"type\":\"address\"}],\"name\":\"replaceAuthorised\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"unauthorise\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"pay\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_message\",\"type\":\"bytes16\"},{\"indexed\":true,\"name\":\"_actioner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_actionee\",\"type\":\"address\"}],\"name\":\"Authorise\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "VIBEX", + "address": "0x882448f83d90b2bf477af2ea79327fdea1335d93", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"startDate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ETH_RECEIVED_MIN\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"proceed\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finalize\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenExchange\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalReceivedEth\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_ETH_TRANS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ethFundDeposit\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"deadlines\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenAccountAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"prices\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"endDate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ETH_RECEIVED_CAP\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"startRedeeming\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"TOKEN_MIN\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"redeemTokens\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenExchangeAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"},{\"payable\":true,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"LogCreateVIBEX\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_value2\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_value3\",\"type\":\"uint256\"}],\"name\":\"LogRedeemVIBE\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "Who The Eth?", + "address": "0x842D6dA3097B5efdE5a81535144f947Ab482b6eE", + "abi": + "[{\"constant\": true,\"inputs\": [],\"name\": \"numberOfNames\",\"outputs\": [{\"name\": \"\",\"type\": \"uint256\"}],\"payable\": false,\"stateMutability\": \"view\",\"type\": \"function\"},{\"constant\": true,\"inputs\": [{\"name\": \"\",\"type\": \"address\"}],\"name\": \"names\",\"outputs\": [{\"name\": \"\",\"type\": \"string\"}],\"payable\": false,\"stateMutability\": \"view\",\"type\": \"function\"},{\"constant\": true,\"inputs\": [{\"name\": \"\",\"type\": \"address\"}],\"name\": \"bank\",\"outputs\": [{\"name\": \"\",\"type\": \"uint256\"}],\"payable\": false,\"stateMutability\": \"view\",\"type\": \"function\"},{\"anonymous\": false,\"inputs\": [{\"indexed\": true,\"name\": \"_address\",\"type\": \"address\"},{\"indexed\": false,\"name\": \"_name\",\"type\": \"string\"},{\"indexed\": false,\"name\": \"_time\",\"type\": \"uint256\"},{\"indexed\": true,\"name\": \"_referrer\",\"type\": \"address\"},{\"indexed\": false,\"name\": \"_value\",\"type\": \"uint256\"}],\"name\": \"AddedName\",\"type\": \"event\"},{\"constant\": false,\"inputs\": [],\"name\": \"pullFunds\",\"outputs\": [],\"payable\": false,\"stateMutability\": \"nonpayable\",\"type\": \"function\"},{\"constant\": false,\"inputs\": [{\"name\": \"newName\",\"type\": \"string\"}],\"name\": \"setName\",\"outputs\": [],\"payable\": true,\"stateMutability\": \"payable\",\"type\": \"function\"},{\"constant\": false,\"inputs\": [{\"name\": \"newName\",\"type\": \"string\"},{\"name\": \"ref\",\"type\": \"address\"}],\"name\": \"setNameRefer\",\"outputs\": [],\"payable\": true,\"stateMutability\": \"payable\",\"type\": \"function\"},{\"inputs\": [],\"payable\": false,\"stateMutability\": \"nonpayable\",\"type\": \"constructor\"}]" + }, + { + "name": "X8X", + "address": "0x910Dfc18D6EA3D6a7124A6F8B5458F281060fa4c", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_UINT256\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"standard\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"salvageTokensFromContract\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_untilBlock\",\"type\":\"uint256\"},{\"name\":\"_reason\",\"type\":\"string\"}],\"name\":\"lockUntil\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupplyLimit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lockedUntilBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mintTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_untilBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_reason\",\"type\":\"string\"}],\"name\":\"ContractLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + }, + { + "name": "XSC", + "address": "0x0F513fFb4926ff82D7F60A05069047AcA295C413", + "abi": + "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"initialSupply\",\"type\":\"uint256\"},{\"name\":\"tokenName\",\"type\":\"string\"},{\"name\":\"tokenSymbol\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + } +] diff --git a/common/v2/config/contracts/exp.json b/common/v2/config/contracts/exp.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/common/v2/config/contracts/exp.json @@ -0,0 +1 @@ +[] diff --git a/common/v2/config/contracts/goerli.json b/common/v2/config/contracts/goerli.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/common/v2/config/contracts/goerli.json @@ -0,0 +1 @@ +[] diff --git a/common/v2/config/contracts/index.ts b/common/v2/config/contracts/index.ts new file mode 100644 index 000000000..41b44d523 --- /dev/null +++ b/common/v2/config/contracts/index.ts @@ -0,0 +1,37 @@ +import ETC from './etc.json'; +import ETH from './eth.json'; +import EXP from './exp.json'; +import Rinkeby from './rinkeby.json'; +import Ropsten from './ropsten.json'; +import Goerli from './goerli.json'; +import RSK from './rsk.json'; +import UBQ from './ubq.json'; +import ESN from './esn.json'; +import ARTIS_SIGMA1 from './artis_sigma1.json'; +import ARTIS_TAU1 from './artis_tau1.json'; +import PIRL from './pirl.json'; + +export interface Network { + name: string; + address: string; + abi: string; +} + +export interface Networks { + [key: string]: [Network]; +} + +export default { + ETC, + ETH, + EXP, + Rinkeby, + Ropsten, + Goerli, + RSK, + UBQ, + ESN, + ARTIS_SIGMA1, + ARTIS_TAU1, + PIRL +} as Networks; diff --git a/common/v2/config/contracts/pirl.json b/common/v2/config/contracts/pirl.json new file mode 100644 index 000000000..93c9721b9 --- /dev/null +++ b/common/v2/config/contracts/pirl.json @@ -0,0 +1,14 @@ +[ + { + "name": "Premium Masternode Administration", + "address": "0x256b2b26Fe8eCAd201103946F8C603b401cE16EC", + "abi": + "[{\"constant\":false,\"inputs\":[],\"name\":\"nodeRegistration\",\"outputs\":[{\"name\":\"paid\",\"type\":\"bool\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getNodeAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"moderators\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"nodes\",\"outputs\":[{\"name\":\"pirlAddress\",\"type\":\"address\"},{\"name\":\"nodeStake\",\"type\":\"uint256\"},{\"name\":\"nodeHash\",\"type\":\"bytes20\"},{\"name\":\"stakeLocked\",\"type\":\"bool\"},{\"name\":\"nodeEnabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"disableNodeRegistration\",\"outputs\":[{\"name\":\"disabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nodeCost\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getStakeLockedStatus\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nodeCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[{\"name\":\"set\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"enableNode\",\"outputs\":[{\"name\":\"enabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nodeRegistrationEnabled\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"disableNode\",\"outputs\":[{\"name\":\"disabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawStake\",\"outputs\":[{\"name\":\"withdrawn\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"nodeAddresses\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getNodeEnabledStatus\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getNodeStake\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"enableNodeRegistration\",\"outputs\":[{\"name\":\"enabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getNodeHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes20\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nodeFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_nodeRegistered\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_dateRegistered\",\"type\":\"uint256\"}],\"name\":\"MasterNodeRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_nodeDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_dateDisabled\",\"type\":\"uint256\"}],\"name\":\"MasterNodeDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_nodeEnabled\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_dateEnabled\",\"type\":\"uint256\"}],\"name\":\"MasterNodeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_nodePaid\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_datePaid\",\"type\":\"uint256\"}],\"name\":\"MasterNodeRewarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_stakeWithdrawn\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_dateWithdrawn\",\"type\":\"uint256\"}],\"name\":\"StakeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_invoker\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_dateEnabled\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_registrationEnabled\",\"type\":\"bool\"}],\"name\":\"MasterNodeRegistrationEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_invoker\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_dateDisabled\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_registrationDisabled\",\"type\":\"bool\"}],\"name\":\"MasterNodeRegistrationDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_invoker\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_admin\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_adminSet\",\"type\":\"bool\"}],\"name\":\"SetAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_invoker\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_newOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_ownerChanged\",\"type\":\"bool\"}],\"name\":\"TransferOwnership\",\"type\":\"event\"}]" + }, + { + "name": "Content Node Administration", + "address": "0x6c042141C302C354509d2bff30EEFDEF24dE1047", + "abi": + "[{\"constant\":false,\"inputs\":[],\"name\":\"nodeRegistration\",\"outputs\":[{\"name\":\"paid\",\"type\":\"bool\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getNodeAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"moderators\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"nodes\",\"outputs\":[{\"name\":\"pirlAddress\",\"type\":\"address\"},{\"name\":\"nodeStake\",\"type\":\"uint256\"},{\"name\":\"nodeHash\",\"type\":\"bytes20\"},{\"name\":\"stakeLocked\",\"type\":\"bool\"},{\"name\":\"nodeEnabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"disableNodeRegistration\",\"outputs\":[{\"name\":\"disabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nodeCost\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getStakeLockedStatus\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nodeCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[{\"name\":\"set\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"enableNode\",\"outputs\":[{\"name\":\"enabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nodeRegistrationEnabled\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"disableNode\",\"outputs\":[{\"name\":\"disabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawStake\",\"outputs\":[{\"name\":\"withdrawn\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"nodeAddresses\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getNodeEnabledStatus\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getNodeStake\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"enableNodeRegistration\",\"outputs\":[{\"name\":\"enabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pirlAddress\",\"type\":\"address\"}],\"name\":\"getNodeHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes20\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nodeFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_nodeRegistered\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_dateRegistered\",\"type\":\"uint256\"}],\"name\":\"MasterNodeRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_nodeDisabled\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_dateDisabled\",\"type\":\"uint256\"}],\"name\":\"MasterNodeDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_nodeEnabled\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_dateEnabled\",\"type\":\"uint256\"}],\"name\":\"MasterNodeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_nodePaid\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_datePaid\",\"type\":\"uint256\"}],\"name\":\"MasterNodeRewarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_pirlAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_nodeHash\",\"type\":\"bytes20\"},{\"indexed\":true,\"name\":\"_stakeWithdrawn\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_dateWithdrawn\",\"type\":\"uint256\"}],\"name\":\"StakeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_invoker\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_dateEnabled\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_registrationEnabled\",\"type\":\"bool\"}],\"name\":\"MasterNodeRegistrationEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_invoker\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_dateDisabled\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"_registrationDisabled\",\"type\":\"bool\"}],\"name\":\"MasterNodeRegistrationDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_invoker\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_admin\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_adminSet\",\"type\":\"bool\"}],\"name\":\"SetAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_invoker\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_newOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_ownerChanged\",\"type\":\"bool\"}],\"name\":\"TransferOwnership\",\"type\":\"event\"}]" + } +] diff --git a/common/v2/config/contracts/rinkeby.json b/common/v2/config/contracts/rinkeby.json new file mode 100644 index 000000000..a6f21fea4 --- /dev/null +++ b/common/v2/config/contracts/rinkeby.json @@ -0,0 +1,12 @@ +[ + { + "name": "ENS - Eth Registrar (Auction)", + "address": "0x21397c1a1f4acd9132fe36df011610564b87e24b", + "abi": "[{\"constant\":true,\"inputs\":[],\"name\":\"ens\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"expiryTimes\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"subnode\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rootNode\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"ensAddr\",\"type\":\"address\"},{\"name\":\"node\",\"type\":\"bytes32\"}],\"type\":\"constructor\"}]" + }, + { + "name": "ENS - Registry", + "address": "0xe7410170f87102df0055eb195163a03b7f2bff4a", + "abi": "[{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"resolver\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"label\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"setSubnodeOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"setTTL\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"ttl\",\"outputs\":[{\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"setResolver\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NewOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"NewResolver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"NewTTL\",\"type\":\"event\"}]" + } +] diff --git a/common/v2/config/contracts/ropsten.json b/common/v2/config/contracts/ropsten.json new file mode 100644 index 000000000..798eb1fda --- /dev/null +++ b/common/v2/config/contracts/ropsten.json @@ -0,0 +1,26 @@ +[ + { + "name": "??? ENS - Eth Registrar (Auction) ??? ", + "address": "0x21397c1a1f4acd9132fe36df011610564b87e24b", + "abi": "[{\"constant\":true,\"inputs\":[],\"name\":\"ens\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"expiryTimes\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"subnode\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rootNode\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"ensAddr\",\"type\":\"address\"},{\"name\":\"node\",\"type\":\"bytes32\"}],\"type\":\"constructor\"}]" + }, + { + "name": "??? ENS - Eth Registrar (Auction) ??? ", + "address": "0xc19fd9004b5c9789391679de6d766b981db94610", + "abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"releaseDeed\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"getAllowedTime\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"unhashedName\",\"type\":\"string\"}],\"name\":\"invalidateName\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"salt\",\"type\":\"bytes32\"}],\"name\":\"shaBid\",\"outputs\":[{\"name\":\"sealedBid\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\"},{\"name\":\"seal\",\"type\":\"bytes32\"}],\"name\":\"cancelBid\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"entries\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"},{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ens\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"unsealBid\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"transferRegistrars\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"sealedBids\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"state\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"},{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"},{\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"isAllowed\",\"outputs\":[{\"name\":\"allowed\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"finalizeAuction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"registryStarted\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"launchLength\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sealedBid\",\"type\":\"bytes32\"}],\"name\":\"newBid\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"labels\",\"type\":\"bytes32[]\"}],\"name\":\"eraseNode\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hashes\",\"type\":\"bytes32[]\"}],\"name\":\"startAuctions\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"},{\"name\":\"deed\",\"type\":\"address\"},{\"name\":\"registrationDate\",\"type\":\"uint256\"}],\"name\":\"acceptRegistrarTransfer\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"startAuction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rootNode\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"hashes\",\"type\":\"bytes32[]\"},{\"name\":\"sealedBid\",\"type\":\"bytes32\"}],\"name\":\"startAuctionsAndBid\",\"outputs\":[],\"payable\":true,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_ens\",\"type\":\"address\"},{\"name\":\"_rootNode\",\"type\":\"bytes32\"},{\"name\":\"_startDate\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"registrationDate\",\"type\":\"uint256\"}],\"name\":\"AuctionStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"bidder\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"deposit\",\"type\":\"uint256\"}],\"name\":\"NewBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"BidRevealed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"registrationDate\",\"type\":\"uint256\"}],\"name\":\"HashRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"HashReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"registrationDate\",\"type\":\"uint256\"}],\"name\":\"HashInvalidated\",\"type\":\"event\"}]" + }, + { + "name": "ENS - Registry", + "address": "0x112234455c3a32fd11230c42e7bccd4a84e02010", + "abi": "[{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"resolver\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"label\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"setSubnodeOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"setTTL\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"ttl\",\"outputs\":[{\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"setResolver\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NewOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"NewResolver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"NewTTL\",\"type\":\"event\"}]" + }, + { + "name": "ENS - Public Resolver", + "address": "0x4c641fb9bad9b60ef180c31f56051ce826d21a9a", + "abi": "[{\"constant\":true,\"inputs\":[{\"name\":\"interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"addr\",\"outputs\":[{\"name\":\"ret\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"kind\",\"type\":\"bytes32\"}],\"name\":\"has\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setAddr\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"content\",\"outputs\":[{\"name\":\"ret\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"setContent\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"ensAddr\",\"type\":\"address\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"}]" + }, + { + "name": "Mist's Multisig Contract", + "abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_numOwners\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_lastDay\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"resetSpentToday\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_spentToday\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_required\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_h\",\"type\":\"bytes32\"}],\"name\":\"confirm\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newLimit\",\"type\":\"uint256\"}],\"name\":\"setDailyLimit\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"name\":\"_r\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_operation\",\"type\":\"bytes32\"}],\"name\":\"revoke\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newRequired\",\"type\":\"uint256\"}],\"name\":\"changeRequirement\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_operation\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"hasConfirmed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"kill\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"m_dailyLimit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"inputs\":[{\"name\":\"_owners\",\"type\":\"address[]\"},{\"name\":\"_required\",\"type\":\"uint256\"},{\"name\":\"_daylimit\",\"type\":\"uint256\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"Confirmation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"Revoke\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldOwner\",\"type\":\"address\"}],\"name\":\"OwnerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"newRequirement\",\"type\":\"uint256\"}],\"name\":\"RequirementChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"SingleTransact\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"MultiTransact\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ConfirmationNeeded\",\"type\":\"event\"}]" + } +] diff --git a/common/v2/config/contracts/rsk.json b/common/v2/config/contracts/rsk.json new file mode 100644 index 000000000..2d0cede5d --- /dev/null +++ b/common/v2/config/contracts/rsk.json @@ -0,0 +1,27 @@ +[ + { + "name": "Bridge", + "address": "0x0000000000000000000000000000000001000006", + "abi": "[{ \"name\": \"getFederationAddress\", \"type\": \"function\", \"constant\": true, \"inputs\": [], \"outputs\": [{ \"name\": \"\", \"type\": \"string\" }] }]" + }, + { + "name": "RIF", + "address": "0x2acc95758f8b5f583470ba265eb685a8f45fc9d5", + "abi": "[ { \"constant\": true, \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"name\": \"\", \"type\": \"string\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"isOriginalOrRedeemedContributor\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint8\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"distributionTime\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"enableManagerContract\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"_owner\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"owner\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"name\": \"\", \"type\": \"string\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"isRedeemed\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"isInitialContributor\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"redirect\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"authorizedManagerContract\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"_owner\", \"type\": \"address\" }, { \"name\": \"_spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"minimumLeftFromSale\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" }, { \"indexed\": false, \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"previousOwner\", \"type\": \"address\" } ], \"name\": \"OwnershipRenounced\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"previousOwner\", \"type\": \"address\" }, { \"indexed\": true, \"name\": \"newOwner\", \"type\": \"address\" } ], \"name\": \"OwnershipTransferred\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"a\", \"type\": \"address\" } ], \"name\": \"getMinimumLeftFromSale\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"redeemIsAllowed\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [], \"name\": \"redeemToSameAddress\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"contributorAddress\", \"type\": \"address\" }, { \"name\": \"chainId\", \"type\": \"uint256\" }, { \"name\": \"redeemAddressAsString\", \"type\": \"string\" }, { \"name\": \"sig_v\", \"type\": \"uint8\" }, { \"name\": \"sig_r\", \"type\": \"bytes32\" }, { \"name\": \"sig_s\", \"type\": \"bytes32\" } ], \"name\": \"redeem\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"a\", \"type\": \"address\" } ], \"name\": \"getRedirectedAddress\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"a\", \"type\": \"address\" } ], \"name\": \"validAddress\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"pure\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"a\", \"type\": \"address\" } ], \"name\": \"wasRedirected\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_to\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_to\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" }, { \"name\": \"_data\", \"type\": \"bytes\" } ], \"name\": \"transferAndCall\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_from\", \"type\": \"address\" }, { \"name\": \"_to\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_spender\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_spender\", \"type\": \"address\" }, { \"name\": \"_addedValue\", \"type\": \"uint256\" } ], \"name\": \"increaseApproval\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_spender\", \"type\": \"address\" }, { \"name\": \"_subtractedValue\", \"type\": \"uint256\" } ], \"name\": \"decreaseApproval\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]" + }, + { + "name": "RNS Registry", + "address": "0xcb868aeabd31e2b66f74e9a55cf064abb31a4ad5", + "abi": "[ { \"inputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"node\", \"type\": \"bytes32\" }, { \"indexed\": true, \"name\": \"label\", \"type\": \"bytes32\" }, { \"indexed\": false, \"name\": \"ownerAddress\", \"type\": \"address\" } ], \"name\": \"NewOwner\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"node\", \"type\": \"bytes32\" }, { \"indexed\": false, \"name\": \"ownerAddress\", \"type\": \"address\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"node\", \"type\": \"bytes32\" }, { \"indexed\": false, \"name\": \"resolverAddress\", \"type\": \"address\" } ], \"name\": \"NewResolver\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"node\", \"type\": \"bytes32\" }, { \"indexed\": false, \"name\": \"ttlValue\", \"type\": \"uint64\" } ], \"name\": \"NewTTL\", \"type\": \"event\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" } ], \"name\": \"owner\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" } ], \"name\": \"resolver\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" } ], \"name\": \"ttl\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint64\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" }, { \"name\": \"ownerAddress\", \"type\": \"address\" } ], \"name\": \"setOwner\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" }, { \"name\": \"label\", \"type\": \"bytes32\" }, { \"name\": \"ownerAddress\", \"type\": \"address\" } ], \"name\": \"setSubnodeOwner\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" }, { \"name\": \"resolverAddress\", \"type\": \"address\" } ], \"name\": \"setResolver\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" }, { \"name\": \"ttlValue\", \"type\": \"uint64\" } ], \"name\": \"setTTL\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"resolver\", \"type\": \"address\" } ], \"name\": \"setDefaultResolver\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]" + }, + { + "name": "RNS Registrar", + "address": "0x5269f5bc51cdd8aa62755c97229b7eeddd8e69a6", + "abi": "[ { \"constant\": true, \"inputs\": [], \"name\": \"tokenContract\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" }, { \"name\": \"\", \"type\": \"bytes32\" } ], \"name\": \"sealedBids\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"rns\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"rootNode\", \"outputs\": [ { \"name\": \"\", \"type\": \"bytes32\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"name\": \"_rns\", \"type\": \"address\" }, { \"name\": \"_rootNode\", \"type\": \"bytes32\" }, { \"name\": \"_tokenAddr\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"hash\", \"type\": \"bytes32\" }, { \"indexed\": false, \"name\": \"registrationDate\", \"type\": \"uint256\" } ], \"name\": \"AuctionStarted\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"hash\", \"type\": \"bytes32\" }, { \"indexed\": true, \"name\": \"bidder\", \"type\": \"address\" }, { \"indexed\": false, \"name\": \"deposit\", \"type\": \"uint256\" } ], \"name\": \"NewBid\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"hash\", \"type\": \"bytes32\" }, { \"indexed\": true, \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" }, { \"indexed\": false, \"name\": \"status\", \"type\": \"uint8\" } ], \"name\": \"BidRevealed\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"hash\", \"type\": \"bytes32\" }, { \"indexed\": true, \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" }, { \"indexed\": false, \"name\": \"registrationDate\", \"type\": \"uint256\" } ], \"name\": \"HashRegistered\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"hash\", \"type\": \"bytes32\" }, { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"HashReleased\", \"type\": \"event\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" } ], \"name\": \"startAuction\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_hashes\", \"type\": \"bytes32[]\" } ], \"name\": \"startAuctions\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_sealedBid\", \"type\": \"bytes32\" }, { \"name\": \"_tokenQuantity\", \"type\": \"uint256\" } ], \"name\": \"newBid\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_from\", \"type\": \"address\" }, { \"name\": \"_tokenQuantity\", \"type\": \"uint256\" }, { \"name\": \"_sealedBid\", \"type\": \"bytes32\" } ], \"name\": \"newBidWithToken\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_hashes\", \"type\": \"bytes32[]\" }, { \"name\": \"_sealedBid\", \"type\": \"bytes32\" }, { \"name\": \"_tokenQuantity\", \"type\": \"uint256\" } ], \"name\": \"startAuctionsAndBid\", \"outputs\": [], \"payable\": true, \"stateMutability\": \"payable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" }, { \"name\": \"_value\", \"type\": \"uint256\" }, { \"name\": \"_salt\", \"type\": \"bytes32\" } ], \"name\": \"unsealBid\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" } ], \"name\": \"finalizeAuction\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" }, { \"name\": \"_newOwner\", \"type\": \"address\" } ], \"name\": \"transfer\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" } ], \"name\": \"releaseDeed\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_labels\", \"type\": \"bytes32[]\" } ], \"name\": \"eraseNode\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" } ], \"name\": \"transferRegistrars\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" } ], \"name\": \"payRent\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_from\", \"type\": \"address\" }, { \"name\": \"_tokenQuantity\", \"type\": \"uint256\" }, { \"name\": \"_hash\", \"type\": \"bytes32\" } ], \"name\": \"payRentWithToken\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" }, { \"name\": \"_deed\", \"type\": \"address\" }, { \"name\": \"_registrationDate\", \"type\": \"uint256\" } ], \"name\": \"acceptRegistrarTransfer\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"pure\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" } ], \"name\": \"state\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint8\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" } ], \"name\": \"entries\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint8\" }, { \"name\": \"\", \"type\": \"address\" }, { \"name\": \"\", \"type\": \"uint256\" }, { \"name\": \"\", \"type\": \"uint256\" }, { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"_hash\", \"type\": \"bytes32\" }, { \"name\": \"_owner\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" }, { \"name\": \"_salt\", \"type\": \"bytes32\" } ], \"name\": \"shaBid\", \"outputs\": [ { \"name\": \"\", \"type\": \"bytes32\" } ], \"payable\": false, \"stateMutability\": \"pure\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_from\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" }, { \"name\": \"_data\", \"type\": \"bytes\" } ], \"name\": \"tokenFallback\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]" + }, + { + "name": "RNS Resolver", + "address": "0x4efd25e3d348f8f25a14fb7655fba6f72edfe93a", + "abi": "[ { \"inputs\": [ { \"name\": \"rnsAddr\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"fallback\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" }, { \"name\": \"kind\", \"type\": \"bytes32\" } ], \"name\": \"has\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"interfaceID\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"pure\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" } ], \"name\": \"addr\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" }, { \"name\": \"addrValue\", \"type\": \"address\" } ], \"name\": \"setAddr\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" } ], \"name\": \"content\", \"outputs\": [ { \"name\": \"\", \"type\": \"bytes32\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"node\", \"type\": \"bytes32\" }, { \"name\": \"hash\", \"type\": \"bytes32\" } ], \"name\": \"setContent\", \"outputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]" + } +] diff --git a/common/v2/config/contracts/rsk_testnet.json b/common/v2/config/contracts/rsk_testnet.json new file mode 100644 index 000000000..99581dd3a --- /dev/null +++ b/common/v2/config/contracts/rsk_testnet.json @@ -0,0 +1,12 @@ +[ + { + "name": "Bridge", + "address": "0x0000000000000000000000000000000001000006", + "abi": "[{ \"name\": \"getFederationAddress\", \"type\": \"function\", \"constant\": true, \"inputs\": [], \"outputs\": [{ \"name\": \"\", \"type\": \"string\" }] }]" + }, + { + "name": "tRIF", + "address": "0xd8c5adcac8d465c5a2d0772b86788e014ddec516", + "abi": "[ { \"constant\": true, \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"name\": \"\", \"type\": \"string\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"isOriginalOrRedeemedContributor\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint8\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"distributionTime\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"enableManagerContract\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"_owner\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"owner\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"name\": \"\", \"type\": \"string\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"isRedeemed\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"isInitialContributor\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"redirect\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"authorizedManagerContract\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"_owner\", \"type\": \"address\" }, { \"name\": \"_spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"name\": \"minimumLeftFromSale\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" }, { \"indexed\": false, \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"previousOwner\", \"type\": \"address\" } ], \"name\": \"OwnershipRenounced\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"previousOwner\", \"type\": \"address\" }, { \"indexed\": true, \"name\": \"newOwner\", \"type\": \"address\" } ], \"name\": \"OwnershipTransferred\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"a\", \"type\": \"address\" } ], \"name\": \"getMinimumLeftFromSale\", \"outputs\": [ { \"name\": \"\", \"type\": \"uint256\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [], \"name\": \"redeemIsAllowed\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [], \"name\": \"redeemToSameAddress\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"contributorAddress\", \"type\": \"address\" }, { \"name\": \"chainId\", \"type\": \"uint256\" }, { \"name\": \"redeemAddressAsString\", \"type\": \"string\" }, { \"name\": \"sig_v\", \"type\": \"uint8\" }, { \"name\": \"sig_r\", \"type\": \"bytes32\" }, { \"name\": \"sig_s\", \"type\": \"bytes32\" } ], \"name\": \"redeem\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"a\", \"type\": \"address\" } ], \"name\": \"getRedirectedAddress\", \"outputs\": [ { \"name\": \"\", \"type\": \"address\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"a\", \"type\": \"address\" } ], \"name\": \"validAddress\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"pure\", \"type\": \"function\" }, { \"constant\": true, \"inputs\": [ { \"name\": \"a\", \"type\": \"address\" } ], \"name\": \"wasRedirected\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"view\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_to\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_to\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" }, { \"name\": \"_data\", \"type\": \"bytes\" } ], \"name\": \"transferAndCall\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_from\", \"type\": \"address\" }, { \"name\": \"_to\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_spender\", \"type\": \"address\" }, { \"name\": \"_value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_spender\", \"type\": \"address\" }, { \"name\": \"_addedValue\", \"type\": \"uint256\" } ], \"name\": \"increaseApproval\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"constant\": false, \"inputs\": [ { \"name\": \"_spender\", \"type\": \"address\" }, { \"name\": \"_subtractedValue\", \"type\": \"uint256\" } ], \"name\": \"decreaseApproval\", \"outputs\": [ { \"name\": \"\", \"type\": \"bool\" } ], \"payable\": false, \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]" + } +] diff --git a/common/v2/config/contracts/ubq.json b/common/v2/config/contracts/ubq.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/common/v2/config/contracts/ubq.json @@ -0,0 +1 @@ +[] diff --git a/common/v2/config/data.tsx b/common/v2/config/data.tsx new file mode 100644 index 000000000..44133b152 --- /dev/null +++ b/common/v2/config/data.tsx @@ -0,0 +1,108 @@ +import React from 'react'; // For ANNOUNCEMENT_MESSAGE jsx +import { getValues, makeExplorer } from 'utils/helpers'; +import packageJson from '../../package.json'; +import { GasPriceSetting } from 'types/network'; +import translate from 'translations'; + +export const languages = require('./languages.json'); +export const discordURL = 'https://discord.gg/VSaTXEA'; + +// Displays in the footer +export const VERSION = packageJson.version; +export const N_FACTOR = 8192; + +// Displays at the top of the site, make message empty string to remove. +// Type can be primary, warning, danger, success, info, or blank for grey. +// Message must be a JSX element if you want to use HTML. +export const ANNOUNCEMENT_TYPE = ''; +export const ANNOUNCEMENT_MESSAGE = ( + {translate('ANNOUNCEMENT_MESSAGE')} +); + +const etherScan = 'https://etherscan.io'; +const blockChainInfo = 'https://blockchain.info'; +export const ethPlorer = 'https://ethplorer.io'; + +export const ETHTxExplorer = (txHash: string): string => `${etherScan}/tx/${txHash}`; +export const BTCTxExplorer = (txHash: string): string => `${blockChainInfo}/tx/${txHash}`; +export const ETHAddressExplorer = (address: string): string => `${etherScan}/address/${address}`; +export const ETHTokenExplorer = (address: string): string => `${ethPlorer}/address/${address}`; + +export const etherChainExplorerInst = makeExplorer({ + name: 'Etherchain', + origin: 'https://www.etherchain.org', + addressPath: 'account' +}); + +export const donationAddressMap = { + BTC: '32oirLEzZRhi33RCXDF9WHJjEb8RsrSss3', + ETH: '0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520', + REP: '0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520', + XMR: + '4GdoN7NCTi8a5gZug7PrwZNKjvHFmKeV11L6pNJPgj5QNEHsN6eeX3DaAQFwZ1ufD4LYCZKArktt113W7QjWvQ7CW7F7tDFvS511SNfZV7' +}; + +export const gasEstimateCacheTime = 60000; +export const gasPriceDefaults: GasPriceSetting = { + min: 1, + max: 60, + initial: 20 +}; + +export const MINIMUM_PASSWORD_LENGTH = 12; + +export const knowledgeBaseURL = 'https://support.mycrypto.com'; +export const ledgerReferralURL = 'https://www.ledgerwallet.com/r/1985?path=/products/'; +export const trezorReferralURL = 'https://shop.trezor.io/?offer_id=10&aff_id=1735'; +// TODO - Update url +export const safeTReferralURL = + 'https://www.archos.com/fr/products/crypto/archos_safetmini/index.html'; +export const bitboxReferralURL = 'https://digitalbitbox.com/?ref=mycrypto'; +// TODO - Update url, this is MEW's +export const bityReferralURL = 'https://bity.com/af/jshkb37v'; +// TODO - add the real referral url once you know it +export const shapeshiftReferralURL = 'https://shapeshift.io'; +export const ethercardReferralURL = + 'https://ether.cards/?utm_source=mycrypto&utm_medium=cpm&utm_campaign=site'; +export const keepkeyReferralURL = 'https://keepkey.go2cloud.org/aff_c?offer_id=1&aff_id=4086'; +export const steelyReferralURL = 'https://stee.ly/2Hcl4RE'; + +export enum SecureWalletName { + WEB3 = 'web3', + LEDGER_NANO_S = 'ledgerNanoS', + TREZOR = 'trezor', + SAFE_T = 'safeTmini', + PARITY_SIGNER = 'paritySigner' +} + +export enum HardwareWalletName { + LEDGER_NANO_S = 'ledgerNanoS', + TREZOR = 'trezor', + SAFE_T = 'safeTmini' +} + +export enum InsecureWalletName { + PRIVATE_KEY = 'privateKey', + KEYSTORE_FILE = 'keystoreFile', + MNEMONIC_PHRASE = 'mnemonicPhrase' +} + +export enum MiscWalletName { + VIEW_ONLY = 'viewOnly' +} + +export const walletNames = getValues( + SecureWalletName, + HardwareWalletName, + InsecureWalletName, + MiscWalletName +); + +export type WalletName = SecureWalletName | InsecureWalletName | MiscWalletName; + +export enum Theme { + DARK = 'dark', + LIGHT = 'light' +} + +export type ThemeType = 'dark' | 'light'; diff --git a/common/v2/config/dpaths.ts b/common/v2/config/dpaths.ts new file mode 100644 index 000000000..a32c23d4d --- /dev/null +++ b/common/v2/config/dpaths.ts @@ -0,0 +1,216 @@ +export const ETH_DEFAULT: DPath = { + label: 'Default (ETH)', + value: "m/44'/60'/0'/0" +}; + +export const ETH_TREZOR: DPath = { + label: 'TREZOR (ETH)', + value: "m/44'/60'/0'/0" +}; + +export const ETH_SAFE_T: DPath = { + label: 'Safe-T (ETH)', + value: "m/44'/60'/0'/0" +}; + +export const ETH_LEDGER: DPath = { + label: 'Ledger (ETH)', + value: "m/44'/60'/0'" +}; + +export const ETC_LEDGER: DPath = { + label: 'Ledger (ETC)', + value: "m/44'/60'/160720'/0'" +}; + +export const ETC_TREZOR: DPath = { + label: 'TREZOR (ETC)', + value: "m/44'/61'/0'/0" +}; + +export const ETC_SAFE_T: DPath = { + label: 'Safe-T (ETC)', + value: "m/44'/61'/0'/0" +}; + +export const ETH_TESTNET: DPath = { + label: 'Testnet (ETH)', + value: "m/44'/1'/0'/0" +}; + +export const EXP_DEFAULT: DPath = { + label: 'Default (EXP)', + value: "m/44'/40'/0'/0" +}; + +export const UBQ_DEFAULT: DPath = { + label: 'Default (UBQ)', + value: "m/44'/108'/0'/0" +}; + +export const POA_DEFAULT: DPath = { + label: 'Default (POA)', + value: "m/44'/60'/0'/0" +}; + +export const TOMO_DEFAULT: DPath = { + label: 'Default (TOMO)', + value: "m/44'/889'/0'/0" +}; + +export const ELLA_DEFAULT: DPath = { + label: 'Default (ELLA)', + value: "m/44'/163'/0'/0" +}; + +export const MUSIC_DEFAULT: DPath = { + label: 'Default (MUSIC)', + value: "m/44'/184'/0'/0" +}; + +export const ETSC_DEFAULT: DPath = { + label: 'Default (ETSC)', + value: "m/44'/1128'/0'/0" +}; + +export const EGEM_DEFAULT: DPath = { + label: 'Default (EGEM)', + value: "m/44'/1987'/0'/0" +}; + +export const CLO_DEFAULT: DPath = { + label: 'Default (CLO)', + value: "m/44'/820'/0'/0" +}; + +export const ETH_SINGULAR: DPath = { + label: 'SingularDTV', + value: "m/0'/0'/0'" +}; + +export const RSK_TESTNET: DPath = { + label: 'Testnet (RSK)', + value: "m/44'/37310'/0'/0" +}; + +export const RSK_MAINNET: DPath = { + label: 'Mainnet (RSK)', + value: "m/44'/137'/0'/0" +}; + +export const GO_DEFAULT: DPath = { + label: 'Default (GO)', + value: "m/44'/6060'/0'/0" +}; + +export const EOSC_DEFAULT: DPath = { + label: 'Default (EOSC)', + value: "m/44'/2018'/0'/0" +}; + +export const ESN_DEFAULT: DPath = { + label: 'Default (ESN)', + value: "m/44'/31102'/0'/0" +}; + +export const AQUA_DEFAULT: DPath = { + label: 'Default (AQUA)', + value: "m/44'/60'/0'/0" +}; + +export const AKA_DEFAULT: DPath = { + label: 'Default (AKA)', + value: "m/44'/200625'/0'/0" +}; + +export const PIRL_DEFAULT: DPath = { + label: 'Default (PIRL)', + value: "m/44'/164'/0'/0" +}; + +export const ATH_DEFAULT: DPath = { + label: 'Default (ATH)', + value: "m/44'/1620'/0'/0" +}; + +export const ETHO_DEFAULT: DPath = { + label: 'Default (ETHO)', + value: "m/44'/1313114'/0'/0" +}; + +export const MIX_DEFAULT: DPath = { + label: 'Default (MIX)', + value: "m/44'/76'/0'/0" +}; + +export const REOSC_DEFAULT: DPath = { + label: 'Default (REOSC)', + value: "m/44'/2894'/0'/0" +}; + +export const ARTIS_SIGMA1: DPath = { + label: 'Sigma1 (ATS)', + value: "m/44'/60'/0'/0" +}; + +export const ARTIS_TAU1: DPath = { + label: 'Tau1 (ATS)', + value: "m/44'/60'/0'/0" +}; + +export const THUNDERCORE_DEFAULT: DPath = { + label: 'Default (THUNDERCORE)', + value: "m/44'/1001'/0'/0" +}; + +export const DPaths: DPath[] = [ + ETH_DEFAULT, + ETH_TREZOR, + ETH_SAFE_T, + ETH_LEDGER, + ETC_LEDGER, + ETC_TREZOR, + ETC_SAFE_T, + ETH_TESTNET, + EXP_DEFAULT, + UBQ_DEFAULT, + POA_DEFAULT, + TOMO_DEFAULT, + ELLA_DEFAULT, + MUSIC_DEFAULT, + ETSC_DEFAULT, + EGEM_DEFAULT, + CLO_DEFAULT, + RSK_MAINNET, + RSK_TESTNET, + GO_DEFAULT, + EOSC_DEFAULT, + ESN_DEFAULT, + AQUA_DEFAULT, + AKA_DEFAULT, + PIRL_DEFAULT, + ATH_DEFAULT, + ETHO_DEFAULT, + MIX_DEFAULT, + REOSC_DEFAULT, + ARTIS_SIGMA1, + ARTIS_TAU1, + THUNDERCORE_DEFAULT +]; + +// PATHS TO BE INCLUDED REGARDLESS OF WALLET FORMAT +export const EXTRA_PATHS = [ETH_SINGULAR]; + +// Full length deterministic wallet paths from BIP44 +// https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki +// normal path length is 4, ledger is the exception at 3 + +// m / purpose' / coin_type' / account' / change / address_index +// | | | | | +// | constant | index | index | 0 or 1 | +// |__________|____________|__________|________| + +// whitespace strings are evaluated the same way as nospace strings, except they allow optional spaces between each portion of the string +// ie. "m / 44' / 0' / 0'" is valid, "m / 4 4' / 0' / 0'" is invalid +export const dPathRegex = /m\/4[4,9]'\/[0-9]+\'\/[0-9]+(\'+$|\'+(\/[0-1]+$))/; +// export const whitespaceDPathRegex = /m\s*\/\s*44'\s*\/\s*[0-9]+\'\s*\/\s*[0-9]+(\'+$|\'+\s*(\/\s*[0-1]+$))/; diff --git a/common/v2/config/helpArticles.ts b/common/v2/config/helpArticles.ts new file mode 100644 index 000000000..cbd779e34 --- /dev/null +++ b/common/v2/config/helpArticles.ts @@ -0,0 +1,17 @@ +export enum HELP_ARTICLE { + HOME = '', + ENS = 'how-to/ens', + ENS_BAD_REVEAL = 'troubleshooting/ens/ens-debugging-a-bad-instruction-reveal', + DIFFERENCE_BETWEEN_PKEY_AND_KEYSTORE = 'general-knowledge/ethereum-blockchain/difference-between-wallet-types', + RUNNING_LOCALLY = 'how-to/offline/how-to-run-mycrypto-offline-and-locally', + MIGRATE_TO_METAMASK = 'how-to/migrating/moving-from-mycrypto-to-metamask', + MIGRATE_TO_LEDGER = 'how-to/migrating/moving-from-mycrypto-to-ledger', + ADDING_NEW_TOKENS = 'troubleshooting/tokens/adding-new-token-and-sending-custom-tokens', + HARDWARE_WALLET_RECOMMENDATIONS = 'staying-safe/hardware-wallet-recommendations', + SENDING_TO_TREZOR = 'how-to/sending/trezor-sending-to', + HOW_TO_USE_LEDGER = 'how-to/migrating/moving-from-mycrypto-to-ledger', + SECURING_YOUR_ETH = 'staying-safe/protecting-yourself-and-your-funds', + PROTECT_YOUR_FUNDS = 'staying-safe/protecting-yourself-and-your-funds', + WHAT_IS_NONCE = 'general-knowledge/ethereum-blockchain/what-is-nonce', + WHAT_IS_GAS = 'general-knowledge/ethereum-blockchain/what-is-gas' +} diff --git a/common/v2/config/index.ts b/common/v2/config/index.ts index 17b4021b0..32bf22909 100644 --- a/common/v2/config/index.ts +++ b/common/v2/config/index.ts @@ -1,2 +1,10 @@ +export * from './data'; export * from './donations'; +export * from './bity'; +export * from './addressMessages'; +export * from './helpArticles'; +export * from './dpaths'; +export * from './cacheData'; +export * from './navigation'; +export * from './links'; export * from './accountTypes'; diff --git a/common/v2/config/languages.json b/common/v2/config/languages.json new file mode 100644 index 000000000..7e1c42aff --- /dev/null +++ b/common/v2/config/languages.json @@ -0,0 +1,22 @@ +{ + "en": "English", + "de": "Deutsch", + "el": "Ελληνικά", + "es": "Español", + "fi": "Suomi", + "fr": "Français", + "hu": "Magyar", + "id": "Indonesian", + "it": "Italiano", + "ja": "日本語", + "nl": "Nederlands", + "no": "Norsk Bokmål", + "pl": "Polski", + "pt": "Português", + "ru": "Русский", + "ko": "한국어", + "tr": "Türkçe", + "vi": "Tiếng Việt", + "zhcn": "简体中文", + "zhtw": "繁體中文" +} diff --git a/common/v2/config/links.ts b/common/v2/config/links.ts new file mode 100644 index 000000000..0b35dda9a --- /dev/null +++ b/common/v2/config/links.ts @@ -0,0 +1,123 @@ +import { translateRaw } from 'translations'; +import { + discordURL, + ledgerReferralURL, + trezorReferralURL, + safeTReferralURL, + ethercardReferralURL, + keepkeyReferralURL, + steelyReferralURL +} from './data'; + +interface Link { + link: string; + text: string; +} + +export const DOWNLOAD_MYCRYPTO_LINK = 'https://download.mycrypto.com/'; + +export const socialMediaLinks: Link[] = [ + { + link: 'https://twitter.com/mycrypto', + text: 'twitter' + }, + { + link: 'https://www.facebook.com/mycryptoHQ/', + text: 'facebook' + }, + { + link: 'https://medium.com/@mycrypto', + text: 'medium' + }, + { + link: 'https://www.linkedin.com/company/mycrypto', + text: 'linkedin' + }, + { + link: 'https://github.com/MyCryptoHQ', + text: 'github' + }, + { + link: 'https://www.reddit.com/r/mycrypto/', + text: 'reddit' + }, + { + link: discordURL, + text: 'discord' + } +]; + +export const productLinks: Link[] = [ + { + link: 'https://legacy.mycrypto.com/', + text: translateRaw('OLD_MYCRYPTO') + }, + { + link: + 'https://chrome.google.com/webstore/detail/etheraddresslookup/pdknmigbbbhmllnmgdfalmedcmcefdfn', + text: translateRaw('ETHER_ADDRESS_LOOKUP') + }, + { + link: + 'https://chrome.google.com/webstore/detail/ethersecuritylookup/bhhfhgpgmifehjdghlbbijjaimhmcgnf', + text: translateRaw('ETHER_SECURITY_LOOKUP') + }, + { + link: 'https://etherscamdb.info/', + text: translateRaw('ETHERSCAMDB') + }, + { + link: 'https://legacy.mycrypto.com/helpers.html', + text: translateRaw('FOOTER_HELP_AND_DEBUGGING') + }, + { + link: 'https://hackerone.com/mycrypto', + text: translateRaw('FOOTER_HACKERONE') + } +]; + +export const affiliateLinks: Link[] = [ + { + link: ledgerReferralURL, + text: translateRaw('LEDGER_REFERRAL_1') + }, + { + link: trezorReferralURL, + text: translateRaw('TREZOR_REFERAL') + }, + { + link: safeTReferralURL, + text: translateRaw('SAFE_T_REFERAL') + }, + { + link: keepkeyReferralURL, + text: translateRaw('KEEPKEY_REFERRAL') + }, + { + link: steelyReferralURL, + text: translateRaw('STEELY_REFERRAL') + }, + { + link: ethercardReferralURL, + text: translateRaw('ETHERCARD_REFERAL') + } +]; + +export const partnerLinks: Link[] = [ + { + link: 'https://metamask.io/', + text: 'MetaMask' + }, + { + link: 'https://infura.io/', + text: 'Infura' + }, + { + link: 'https://etherscan.io/', + text: 'Etherscan' + }, + { + link: 'https://etherchain.org/', + text: 'Etherchain' + } +]; diff --git a/common/v2/config/navigation.ts b/common/v2/config/navigation.ts new file mode 100644 index 000000000..e7a7edd42 --- /dev/null +++ b/common/v2/config/navigation.ts @@ -0,0 +1,53 @@ +import { knowledgeBaseURL } from './data'; + +export interface NavigationLink { + name: string; + to: string; + external?: boolean; + disabled?: boolean; +} + +export const navigationLinks: NavigationLink[] = [ + { + name: 'NAV_VIEW', + to: '/account' + }, + { + name: 'NAV_GENERATEWALLET', + to: '/generate' + }, + { + name: 'NAV_SWAP', + to: '/swap' + }, + { + name: 'NAV_CONTRACTS', + to: '/contracts' + }, + { + name: 'NAV_ENS', + to: '/ens' + }, + { + name: 'NAV_SIGN', + to: '/sign-and-verify-message' + }, + { + name: 'NAV_TXSTATUS', + to: '/tx-status' + }, + { + name: 'NAV_BROADCAST', + to: '/pushTx' + }, + { + name: 'NAV_SUPPORT_US', + to: '/support-us', + disabled: !process.env.BUILD_ELECTRON + }, + { + name: 'NAV_HELP', + to: knowledgeBaseURL, + external: true + } +].filter(link => !link.disabled); diff --git a/common/v2/config/tokens/artis_sigma1.json b/common/v2/config/tokens/artis_sigma1.json new file mode 100644 index 000000000..2085b094e --- /dev/null +++ b/common/v2/config/tokens/artis_sigma1.json @@ -0,0 +1,8 @@ +[ + { + "address": "0x4dA499dDF9a465e4D47C099B11e8e699894bcA24", + "symbol": "lab10", + "name": "lab10", + "decimal": 18 + } +] \ No newline at end of file diff --git a/common/v2/config/tokens/artis_tau1.json b/common/v2/config/tokens/artis_tau1.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/common/v2/config/tokens/artis_tau1.json @@ -0,0 +1 @@ +[] diff --git a/common/v2/config/tokens/ella.json b/common/v2/config/tokens/ella.json new file mode 100644 index 000000000..c51bbe645 --- /dev/null +++ b/common/v2/config/tokens/ella.json @@ -0,0 +1,8 @@ +[ + { + "address": "0x991e7fe4b05f2b3db1d788e705963f5d647b0044", + "symbol": "MINING", + "decimal": 18, + "type": "default" + } +] diff --git a/common/v2/config/tokens/esn.json b/common/v2/config/tokens/esn.json new file mode 100644 index 000000000..217a8fe67 --- /dev/null +++ b/common/v2/config/tokens/esn.json @@ -0,0 +1,16 @@ +[ + { + "address": "0x72ea3508d9d817a91465abb59be10fef9857a055", + "symbol": "DGT", + "name": "DGT", + "decimal": 0, + "type": "default" + }, + { + "address": "0x0146b9dcd9fb2abc1b5b136c28d20d0037526961", + "symbol": "TOPM", + "name": "TOPM", + "decimal": 18, + "type": "default" + } +] diff --git a/common/v2/config/tokens/etc.json b/common/v2/config/tokens/etc.json new file mode 100644 index 000000000..8faa2e57c --- /dev/null +++ b/common/v2/config/tokens/etc.json @@ -0,0 +1,9 @@ +[ + { + "address": "0x085fb4f24031eaedbc2b611aa528f22343eb52db", + "symbol": "BEC", + "name": "BEC", + "decimal": 8, + "type": "default" + } +] diff --git a/common/v2/config/tokens/eth.json b/common/v2/config/tokens/eth.json new file mode 100644 index 000000000..77426cf24 --- /dev/null +++ b/common/v2/config/tokens/eth.json @@ -0,0 +1,7520 @@ +[ + { + "address": "0x4E84E9e5fb0A972628Cf4568c403167EF1D40431", + "symbol": "$FFC", + "decimal": 18, + "name": "$Fluzcoin" + }, + { + "address": "0xA024E8057EEC474a9b2356833707Dd0579E26eF3", + "symbol": "$FXY", + "decimal": 18, + "name": "$FIXY NETWORK" + }, + { + "address": "0xCDB7eCFd3403Eef3882c65B761ef9B5054890a47", + "symbol": "$HUR", + "decimal": 18, + "name": "$Hurify Token" + }, + { + "address": "0x7DD7F56D697Cc0f2b52bD55C057f378F1fE6Ab4b", + "symbol": "$TEAK", + "decimal": 18, + "name": "$TEAK" + }, + { + "address": "0xB6eD7644C69416d67B522e20bC294A9a9B405B31", + "symbol": "0xBTC", + "decimal": 8, + "name": "0xBitcoin" + }, + { + "address": "0x0F72714B35a366285Df85886A2eE174601292A17", + "symbol": "1SG", + "decimal": 18, + "name": "1SG" + }, + { + "address": "0xAf30D2a7E90d7DC361c8C4585e9BB7D2F6f15bc7", + "symbol": "1ST", + "decimal": 18, + "name": "FirstBlood" + }, + { + "address": "0xfDBc1aDc26F0F8f8606a5d63b7D3a3CD21c22B23", + "symbol": "1WO", + "decimal": 8, + "name": "1World" + }, + { + "address": "0x0073e5E52E2B4fE218D75d994eE2B3c82f9C87EA", + "symbol": "22x", + "decimal": 8, + "name": "22x Fund" + }, + { + "address": "0x9fC0583220eB44fAeE9e2dc1E63F39204DDD9090", + "symbol": "2DC", + "decimal": 18, + "name": "DualChain" + }, + { + "address": "0xaEc98A708810414878c3BCDF46Aad31dEd4a4557", + "symbol": "300", + "decimal": 18, + "name": "300 Token Sparta" + }, + { + "address": "0x430241368c1D293fdA21DBa8Bb7aF32007c59109", + "symbol": "3LT", + "decimal": 8, + "name": "TrillionToken" + }, + { + "address": "0xBDe8f7820b5544a49D34F9dDeaCAbEDC7C0B5adc", + "symbol": "A18", + "decimal": 0, + "name": "Apollo18" + }, + { + "address": "0xBa7DCBa2Ade319Bc772DB4df75A76BA00dFb31b0", + "symbol": "A18 (1)", + "decimal": 0, + "name": "Apollo18" + }, + { + "address": "0xcc7d26D8eA6281BB363C8448515F2C61F7BC19F0", + "symbol": "ABCH", + "decimal": 18, + "name": "ABBC Cash" + }, + { + "address": "0xB98d4C97425d9908E66E53A6fDf673ACcA0BE986", + "symbol": "ABT", + "decimal": 18, + "name": "ArcBlock Token" + }, + { + "address": "0x0E8d6b471e332F140e7d9dbB99E5E3822F728DA6", + "symbol": "ABYSS", + "decimal": 18, + "name": "The Abyss" + }, + { + "address": "0x13F1b7FDFbE1fc66676D56483e21B1ecb40b58E2", + "symbol": "ACC", + "decimal": 18, + "name": "Accelerator Network" + }, + { + "address": "0x06147110022B768BA8F99A8f385df11a151A9cc8", + "symbol": "ACE", + "decimal": 0, + "name": "ACE (TokenStars)" + }, + { + "address": "0x2baac9330Cf9aC479D819195794d79AD0c7616e3", + "symbol": "ADB", + "decimal": 18, + "name": "adbank" + }, + { + "address": "0xE69a353b3152Dd7b706ff7dD40fe1d18b7802d31", + "symbol": "ADH", + "decimal": 18, + "name": "AdHive Token" + }, + { + "address": "0x8810C63470d38639954c6B41AaC545848C46484a", + "symbol": "ADI", + "decimal": 18, + "name": "Aditus" + }, + { + "address": "0x660e71483785f66133548B10f6926dC332b06e61", + "symbol": "ADL", + "decimal": 18, + "name": "Adelphoi" + }, + { + "address": "0x422866a8F0b032c5cf1DfBDEf31A20F4509562b0", + "symbol": "ADST", + "decimal": 0, + "name": "AdShares" + }, + { + "address": "0xD0D6D6C5Fe4a677D343cC433536BB717bAe167dD", + "symbol": "ADT", + "decimal": 9, + "name": "AdToken" + }, + { + "address": "0x4470BB87d77b963A013DB939BE332f927f2b992e", + "symbol": "ADX", + "decimal": 4, + "name": "AdEx Network" + }, + { + "address": "0x5CA9a71B1d01849C0a95490Cc00559717fCF0D1d", + "symbol": "AE", + "decimal": 18, + "name": "aeternity" + }, + { + "address": "0xc994a2dEb02543Db1f48688438b9903c4b305ce3", + "symbol": "AEUR", + "decimal": 2, + "name": "Augmint Euro" + }, + { + "address": "0xfB48E0DEa837f9438309a7e9F0cFe7EE3353A84e", + "symbol": "AFA", + "decimal": 2, + "name": "Africahead Ipparts" + }, + { + "address": "0x8eB24319393716668D768dCEC29356ae9CfFe285", + "symbol": "AGI", + "decimal": 8, + "name": "SingularityNET" + }, + { + "address": "0x5121E348e897dAEf1Eef23959Ab290e5557CF274", + "symbol": "AI", + "decimal": 18, + "name": "POLY AI" + }, + { + "address": "0x37E8789bB9996CaC9156cD5F5Fd32599E6b91289", + "symbol": "AID", + "decimal": 18, + "name": "AidCoin" + }, + { + "address": "0x4CEdA7906a5Ed2179785Cd3A40A69ee8bc99C466", + "symbol": "AION", + "decimal": 8, + "name": "Aion" + }, + { + "address": "0x27Dce1eC4d3f72C3E457Cc50354f1F975dDEf488", + "symbol": "AIR", + "decimal": 8, + "name": "AirToken" + }, + { + "address": "0x1063ce524265d5a3A624f4914acd573dD89ce988", + "symbol": "AIX", + "decimal": 18, + "name": "Aigang" + }, + { + "address": "0x1Ca43a170BaD619322e6f54d46b57e504dB663aA", + "symbol": "AKC", + "decimal": 18, + "name": "ARTWOOK COIN" + }, + { + "address": "0x181a63746d3Adcf356CBc73aCE22832FFBB1EE5A", + "symbol": "ALCO", + "decimal": 8, + "name": "ALCO" + }, + { + "address": "0x4289c043A12392F1027307fB58272D8EBd853912", + "symbol": "ALI", + "decimal": 18, + "name": "AiLink Token" + }, + { + "address": "0xEA610B1153477720748DC13ED378003941d84fAB", + "symbol": "ALIS", + "decimal": 18, + "name": "ALIS Token" + }, + { + "address": "0x638AC149eA8EF9a1286C41B977017AA7359E6Cfa", + "symbol": "ALTS", + "decimal": 18, + "name": "ALTS Token" + }, + { + "address": "0x49b127Bc33ce7E1586EC28CEC6a65b112596C822", + "symbol": "ALX", + "decimal": 18, + "name": "ALAX" + }, + { + "address": "0x4DC3643DbC642b72C158E7F3d2ff232df61cb6CE", + "symbol": "AMB", + "decimal": 18, + "name": "Amber Token" + }, + { + "address": "0x949bEd886c739f1A3273629b3320db0C5024c719", + "symbol": "AMIS", + "decimal": 9, + "name": "AMIS" + }, + { + "address": "0xCA0e7269600d353F70b14Ad118A49575455C0f2f", + "symbol": "AMLT", + "decimal": 18, + "name": "AMLT" + }, + { + "address": "0x737F98AC8cA59f2C68aD658E3C3d8C8963E40a4c", + "symbol": "AMN", + "decimal": 18, + "name": "Amon" + }, + { + "address": "0x38c87AA89B2B8cD9B95b736e1Fa7b612EA972169", + "symbol": "AMO", + "decimal": 18, + "name": "AMO Coin" + }, + { + "address": "0x84936cF7630AA3e27Dd9AfF968b140d5AEE49F5a", + "symbol": "AMTC", + "decimal": 8, + "name": "AmberTime Coin" + }, + { + "address": "0x960b236A07cf122663c4303350609A66A7B288C0", + "symbol": "ANT", + "decimal": 18, + "name": "Aragon" + }, + { + "address": "0x9ab165D795019b6d8B3e971DdA91071421305e5a", + "symbol": "AOA", + "decimal": 18, + "name": "Aurora" + }, + { + "address": "0x4C0fBE1BB46612915E7967d2C3213cd4d87257AD", + "symbol": "APIS", + "decimal": 18, + "name": "APIS" + }, + { + "address": "0x1a7a8BD9106F2B8D977E08582DC7d24c723ab0DB", + "symbol": "APPC", + "decimal": 18, + "name": "AppCoins" + }, + { + "address": "0x23aE3C5B39B12f0693e05435EeaA1e51d8c61530", + "symbol": "APT", + "decimal": 18, + "name": "AIGang" + }, + { + "address": "0xaFBeC4D65BC7b116d85107FD05d912491029Bf46", + "symbol": "ARB", + "decimal": 18, + "name": "ARBITRAGE" + }, + { + "address": "0xAc709FcB44a43c35F0DA4e3163b117A17F3770f5", + "symbol": "ARC", + "decimal": 18, + "name": "Arcade Token" + }, + { + "address": "0x1245ef80F4d9e02ED9425375e8F649B9221b31D8", + "symbol": "ARCT", + "decimal": 8, + "name": "ArbitrageCT" + }, + { + "address": "0x75Aa7B0d02532f3833b66c7f0Ad35376d373ddF8", + "symbol": "ARD", + "decimal": 18, + "name": "Accord" + }, + { + "address": "0xBA5F11b16B155792Cf3B2E6880E8706859A8AEB6", + "symbol": "ARN", + "decimal": 8, + "name": "Aeron" + }, + { + "address": "0xfec0cF7fE078a500abf15F1284958F22049c2C7e", + "symbol": "ART", + "decimal": 18, + "name": "Maecenas" + }, + { + "address": "0x7705FaA34B16EB6d77Dfc7812be2367ba6B0248e", + "symbol": "ARX", + "decimal": 8, + "name": "ARX" + }, + { + "address": "0xb0D926c1BC3d78064F3e1075D5bD9A24F35Ae6C5", + "symbol": "ARXT", + "decimal": 18, + "name": "Assistive Reality ARX" + }, + { + "address": "0xa5F8fC0921880Cb7342368BD128eb8050442B1a1", + "symbol": "ARY", + "decimal": 18, + "name": "Block Array" + }, + { + "address": "0x27054b13b1B798B345b591a4d22e6562d47eA75a", + "symbol": "AST", + "decimal": 4, + "name": "Airswap" + }, + { + "address": "0x7B22938ca841aA392C93dBB7f4c42178E3d65E88", + "symbol": "ASTRO", + "decimal": 4, + "name": "AstroTokens" + }, + { + "address": "0x17052d51E954592C1046320c2371AbaB6C73Ef10", + "symbol": "ATH", + "decimal": 18, + "name": "Athenian Warrior Token" + }, + { + "address": "0x1543d0F83489e82A1344DF6827B23d541F235A50", + "symbol": "ATH (AIgatha Token)", + "decimal": 18, + "name": "AIgatha Token" + }, + { + "address": "0x78B7FADA55A64dD895D8c8c35779DD8b67fA8a05", + "symbol": "ATL", + "decimal": 18, + "name": "ATLANT" + }, + { + "address": "0x9B11EFcAAA1890f6eE52C6bB7CF8153aC5d74139", + "symbol": "ATM", + "decimal": 8, + "name": "ATMChain" + }, + { + "address": "0x97AEB5066E1A590e868b511457BEb6FE99d329F5", + "symbol": "ATMI", + "decimal": 18, + "name": "Atonomi" + }, + { + "address": "0x2dAEE1AA61D60A252DC80564499A69802853583A", + "symbol": "ATS", + "decimal": 4, + "name": "Authorship" + }, + { + "address": "0x887834D3b8D450B6bAB109c252Df3DA286d73CE4", + "symbol": "ATT", + "decimal": 18, + "name": "Atmatrix Token" + }, + { + "address": "0x6339784d9478dA43106A429196772A029C2f177d", + "symbol": "ATTN", + "decimal": 18, + "name": "Attention Token" + }, + { + "address": "0x1A0F2aB46EC630F9FD638029027b552aFA64b94c", + "symbol": "ATX", + "decimal": 18, + "name": "Aston" + }, + { + "address": "0xc12d099be31567add4e4e4d0D45691C3F58f5663", + "symbol": "AUC", + "decimal": 18, + "name": "Auctus" + }, + { + "address": "0xCdCFc0f66c522Fd086A1b725ea3c0Eeb9F9e8814", + "symbol": "AURA", + "decimal": 18, + "name": "Aurora DAO" + }, + { + "address": "0x622dFfCc4e83C64ba959530A5a5580687a57581b", + "symbol": "AUTO", + "decimal": 18, + "name": "Cube" + }, + { + "address": "0xeD247980396B10169BB1d36f6e278eD16700a60f", + "symbol": "AVA", + "decimal": 4, + "name": "AVA" + }, + { + "address": "0x0d88eD6E74bbFD96B831231638b66C05571e824F", + "symbol": "AVT", + "decimal": 18, + "name": "Aventus" + }, + { + "address": "0xCd4b4b0F3284a33AC49C67961EC6e111708318Cf", + "symbol": "AX1", + "decimal": 5, + "name": "AX1 Mining Token" + }, + { + "address": "0x9af2c6B1A28D3d6BC084bd267F70e90d49741D5B", + "symbol": "AXP", + "decimal": 8, + "name": "AXP" + }, + { + "address": "0xC39E626A04C5971D770e319760D7926502975e47", + "symbol": "AXPR", + "decimal": 18, + "name": "aXpire" + }, + { + "address": "0x5d51FCceD3114A8bb5E90cDD0f9d682bCbCC5393", + "symbol": "B2BX", + "decimal": 18, + "name": "B2BX" + }, + { + "address": "0x998b3B82bC9dBA173990Be7afb772788B5aCB8Bd", + "symbol": "BANCA", + "decimal": 18, + "name": "Banca" + }, + { + "address": "0xF87F0D9153fea549c728Ad61cb801595a68b73de", + "symbol": "BANX", + "decimal": 18, + "name": "BANX" + }, + { + "address": "0xc73f2474001aD1D6aEd615aF53631148CF98dE6b", + "symbol": "BAR", + "decimal": 18, + "name": "Billionaire Ambition" + }, + { + "address": "0x2A05d22DB079BC40C2f77a1d1fF703a56E631cc1", + "symbol": "BAS", + "decimal": 8, + "name": "BitAsean" + }, + { + "address": "0x0D8775F648430679A709E98d2b0Cb6250d2887EF", + "symbol": "BAT", + "decimal": 18, + "name": "Basic Attention Token" + }, + { + "address": "0x9a0242b7a33DAcbe40eDb927834F96eB39f8fBCB", + "symbol": "BAX", + "decimal": 18, + "name": "BABB" + }, + { + "address": "0xe7D3e4413E29ae35B0893140F4500965c74365e5", + "symbol": "BBC", + "decimal": 18, + "name": "TraDove B2BCoin" + }, + { + "address": "0x37D40510a2F5Bc98AA7a0f7BF4b3453Bcfb90Ac1", + "symbol": "BBI", + "decimal": 18, + "name": "Beluga Banking Infrastructure Token" + }, + { + "address": "0x4a6058666cf1057eaC3CD3A5a614620547559fc9", + "symbol": "BBK", + "decimal": 18, + "name": "BRICKBLOCK TOKEN" + }, + { + "address": "0x35a69642857083BA2F30bfaB735dacC7F0bac969", + "symbol": "BBN", + "decimal": 18, + "name": "Banyan Network" + }, + { + "address": "0x84F7c44B6Fed1080f647E354D552595be2Cc602F", + "symbol": "BBO", + "decimal": 18, + "name": "Bigbom" + }, + { + "address": "0x2ecB13A8c458c379c4d9a7259e202De03c8F3D19", + "symbol": "BC", + "decimal": 18, + "name": "Block-Chain.com" + }, + { + "address": "0x1f41E42D0a9e3c0Dd3BA15B527342783B43200A9", + "symbol": "BCAP", + "decimal": 0, + "name": "BCAP" + }, + { + "address": "0xFf3519eeeEA3e76F1F699CCcE5E23ee0bdDa41aC", + "symbol": "BCAP (1)", + "decimal": 0, + "name": "BCAP" + }, + { + "address": "0xb5BB48567BfD0bFE9e4B08EF8b7f91556CC2a112", + "symbol": "BCASH", + "decimal": 18, + "name": "Bankcoin" + }, + { + "address": "0x7367A68039d4704f30BfBF6d948020C3B07DFC59", + "symbol": "BCBC", + "decimal": 18, + "name": "Beercoin" + }, + { + "address": "0x1e797Ce986C3CFF4472F7D38d5C4aba55DfEFE40", + "symbol": "BCDN", + "decimal": 15, + "name": "BlockCDN" + }, + { + "address": "0xAcfa209Fb73bF3Dd5bBfb1101B9Bc999C49062a5", + "symbol": "BCDT", + "decimal": 18, + "name": "Blockchain Certified Data Token" + }, + { + "address": "0xbc1234552EBea32B5121190356bBa6D3Bb225bb5", + "symbol": "BCL", + "decimal": 18, + "name": "BCL" + }, + { + "address": "0x1c4481750daa5Ff521A2a7490d9981eD46465Dbd", + "symbol": "BCPT", + "decimal": 18, + "name": "BlockMason Credit Protocol Token" + }, + { + "address": "0x1014613E2B3CBc4d575054D4982E580d9b99d7B1", + "symbol": "BCV", + "decimal": 8, + "name": "BitCapitalVendor Token" + }, + { + "address": "0x1961B3331969eD52770751fC718ef530838b6dEE", + "symbol": "BDG", + "decimal": 18, + "name": "BitDegree Token" + }, + { + "address": "0x4D8fc1453a0F359e99c9675954e656D80d996FbF", + "symbol": "BEE", + "decimal": 18, + "name": "Bee Token" + }, + { + "address": "0x74C1E4b8caE59269ec1D85D3D4F324396048F4ac", + "symbol": "BeerCoin", + "decimal": 0, + "name": "BeerCoin" + }, + { + "address": "0x6aEB95F06CDA84cA345c2dE0F3B7f96923a44f4c", + "symbol": "BERRY", + "decimal": 14, + "name": "Berry" + }, + { + "address": "0x8aA33A7899FCC8eA5fBe6A608A109c3893A1B8b2", + "symbol": "BET", + "decimal": 18, + "name": "DAO.Casino" + }, + { + "address": "0x14C926F2290044B647e1Bf2072e67B495eff1905", + "symbol": "BETHER", + "decimal": 18, + "name": "Bethereum" + }, + { + "address": "0x763186eB8d4856D536eD4478302971214FEbc6A9", + "symbol": "BETR", + "decimal": 18, + "name": "BetterBetting" + }, + { + "address": "0x3839d8ba312751Aa0248fEd6a8bACB84308E20Ed", + "symbol": "BEZ", + "decimal": 18, + "name": "Bezop" + }, + { + "address": "0xEE74110fB5A1007b06282e0DE5d73A61bf41d9Cd", + "symbol": "BHPC", + "decimal": 18, + "name": "BHPCash" + }, + { + "address": "0xfe5D908c9Ad85f651185dAa6a4770726E2b27d09", + "symbol": "BHR", + "decimal": 18, + "name": "BETHER" + }, + { + "address": "0x089B85FA15f72c1088CBbef23a49DB80B91DD521", + "symbol": "BIT", + "decimal": 8, + "name": "BlockEstate Investment Token" + }, + { + "address": "0x08b4c866aE9D1bE56a06e0C302054B4FFe067b43", + "symbol": "BITCAR", + "decimal": 8, + "name": "BitCar Token" + }, + { + "address": "0xF3d29Fb98D2DC5E78c87198DEEF99377345fD6F1", + "symbol": "BITPARK", + "decimal": 8, + "name": "BITPARK" + }, + { + "address": "0xb3104b4B9Da82025E8b9F8Fb28b3553ce2f67069", + "symbol": "BIX", + "decimal": 18, + "name": "Bibox Token" + }, + { + "address": "0x5c39bC68e58a242A624E4FC96be77A383C52002D", + "symbol": "BKB", + "decimal": 18, + "name": "BitKeep Token" + }, + { + "address": "0xB2Bfeb70B903F1BAaC7f2ba2c62934C7e5B974C4", + "symbol": "BKB (BetKing Bankroll Token)", + "decimal": 8, + "name": "BetKing Bankroll Token" + }, + { + "address": "0xc88Be04c809856B75E3DfE19eB4dCf0a3B15317a", + "symbol": "BKC", + "decimal": 8, + "name": "Bankcoin Cash" + }, + { + "address": "0x3cf9E0c385a5ABEC9FD2a71790AA344C4e8E3570", + "symbol": "BKRx", + "decimal": 18, + "name": "BlockRx" + }, + { + "address": "0x45245bc59219eeaAF6cD3f382e078A461FF9De7B", + "symbol": "BKX", + "decimal": 18, + "name": "BANKEX" + }, + { + "address": "0xCA29db4221c111888a7e80b12eAc8a266Da3Ee0d", + "symbol": "BLN", + "decimal": 18, + "name": "Bolenum" + }, + { + "address": "0x1C3BB10dE15C31D5DBE48fbB7B87735d1B7d8c32", + "symbol": "BLO", + "decimal": 18, + "name": "BLONDCOIN" + }, + { + "address": "0x107c4504cd79C5d2696Ea0030a8dD4e92601B82e", + "symbol": "BLT", + "decimal": 18, + "name": "Bloom" + }, + { + "address": "0x539EfE69bCDd21a83eFD9122571a64CC25e0282b", + "symbol": "BLUE", + "decimal": 8, + "name": "Ethereum Blue" + }, + { + "address": "0xcE59d29b09aAE565fEEEf8E52f47c3CD5368C663", + "symbol": "BLX (Bullion)", + "decimal": 18, + "name": "Bullion Crypto" + }, + { + "address": "0xE5a7c12972f3bbFe70ed29521C8949b8Af6a0970", + "symbol": "BLX (Iconomi)", + "decimal": 18, + "name": "Iconomi" + }, + { + "address": "0x5732046A883704404F284Ce41FfADd5b007FD668", + "symbol": "BLZ", + "decimal": 18, + "name": "Bluzelle" + }, + { + "address": "0xDf6Ef343350780BF8C3410BF062e0C015B1DD671", + "symbol": "BMC", + "decimal": 8, + "name": "Blackmoon Crypto BMC Token" + }, + { + "address": "0xf028ADEe51533b1B47BEaa890fEb54a457f51E89", + "symbol": "BMT", + "decimal": 18, + "name": "BMT" + }, + { + "address": "0x986EE2B944c42D017F52Af21c4c69B84DBeA35d8", + "symbol": "BMX", + "decimal": 18, + "name": "BitMart Token" + }, + { + "address": "0xB8c77482e45F1F44dE1745F52C74426C631bDD52", + "symbol": "BNB", + "decimal": 18, + "name": "Binance Coin" + }, + { + "address": "0xEf51c9377FeB29856E61625cAf9390bD0B67eA18", + "symbol": "BNC", + "decimal": 8, + "name": "Bionic" + }, + { + "address": "0xdD6Bf56CA2ada24c683FAC50E37783e55B57AF9F", + "symbol": "BNC (BNC)", + "decimal": 12, + "name": "BNC" + }, + { + "address": "0xdA2C424Fc98c741c2d4ef2f42897CEfed897CA75", + "symbol": "BNFT", + "decimal": 9, + "name": "Benefits Coin" + }, + { + "address": "0xDA80B20038BDF968C7307BB5907A469482CF6251", + "symbol": "BNN", + "decimal": 8, + "name": "BrokerNekoNetwork" + }, + { + "address": "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C", + "symbol": "BNT", + "decimal": 18, + "name": "Bancor" + }, + { + "address": "0xd2d6158683aeE4Cc838067727209a0aAF4359de3", + "symbol": "BNTY", + "decimal": 18, + "name": "Bounty0x Token" + }, + { + "address": "0xDF347911910b6c9A4286bA8E2EE5ea4a39eB2134", + "symbol": "BOB", + "decimal": 18, + "name": "Bob's repair" + }, + { + "address": "0xCc34366E3842cA1BD36c1f324d15257960fCC801", + "symbol": "BON", + "decimal": 18, + "name": "Bonpay" + }, + { + "address": "0x7F1E2C7d6A69bf34824D72C53B4550E895C0D8C2", + "symbol": "BOP", + "decimal": 8, + "name": "BlockOptiopns Token" + }, + { + "address": "0xC2C63F23ec5E97efbD7565dF9Ec764FDc7d4e91d", + "symbol": "BOU", + "decimal": 18, + "name": "Boule Coin" + }, + { + "address": "0x139d9397274bb9E2C29A9aa8Aa0b5874d30D62E3", + "symbol": "BOUTS", + "decimal": 18, + "name": "BoutsPro" + }, + { + "address": "0xe1A178B681BD05964d3e3Ed33AE731577d9d96dD", + "symbol": "BOX", + "decimal": 18, + "name": "BOX Token" + }, + { + "address": "0x63f584FA56E60e4D0fE8802b27C7e6E3b33E007f", + "symbol": "BOX (ContentBox)", + "decimal": 18, + "name": "ContentBox" + }, + { + "address": "0x780116D91E5592E58a3b3c76A351571b39abCEc6", + "symbol": "BOXX", + "decimal": 15, + "name": "BOXX Token [Blockparty]" + }, + { + "address": "0x327682779bAB2BF4d1337e8974ab9dE8275A7Ca8", + "symbol": "BPT", + "decimal": 18, + "name": "Blockport Token" + }, + { + "address": "0x5Af2Be193a6ABCa9c8817001F45744777Db30756", + "symbol": "BQX", + "decimal": 8, + "name": "Bitquence" + }, + { + "address": "0x9E77D5a1251b6F7D456722A6eaC6D2d5980bd891", + "symbol": "BRAT", + "decimal": 8, + "name": "BROTHER" + }, + { + "address": "0x558EC3152e2eb2174905cd19AeA4e34A23DE9aD6", + "symbol": "BRD", + "decimal": 18, + "name": "Bread" + }, + { + "address": "0x80046305aaab08F6033b56a360c184391165dc2d", + "symbol": "BRLN", + "decimal": 18, + "name": "Berlin Coin" + }, + { + "address": "0xB22c2786a549B008517B67625f5296E8fAf9589e", + "symbol": "BRP", + "decimal": 18, + "name": "Rental Processor Token" + }, + { + "address": "0xF26ef5E0545384b7Dcc0f297F2674189586830DF", + "symbol": "BSDC", + "decimal": 18, + "name": "BSDC" + }, + { + "address": "0x509A38b7a1cC0dcd83Aa9d06214663D9eC7c7F4a", + "symbol": "BST", + "decimal": 18, + "name": "BlocksquareToken" + }, + { + "address": "0x02725836ebF3eCDb1cDf1c7b02FcbBfaa2736AF8", + "symbol": "BTCA", + "decimal": 8, + "name": "BitAir" + }, + { + "address": "0x0886949c1b8C412860c4264Ceb8083d1365e86CF", + "symbol": "BTCE", + "decimal": 8, + "name": "EthereumBitcoin" + }, + { + "address": "0x5acD19b9c91e596b1f062f18e3D02da7eD8D1e50", + "symbol": "BTCL", + "decimal": 8, + "name": "BTC Lite" + }, + { + "address": "0x87f5E8c3425218837f3CB67dB941aF0C01323E56", + "symbol": "BTCONE", + "decimal": 18, + "name": "BitCoin One" + }, + { + "address": "0x6Aac8CB9861E42bf8259F5AbDC6aE3Ae89909E11", + "symbol": "BTCR", + "decimal": 8, + "name": "BitCoin Red" + }, + { + "address": "0x73dD069c299A5d691E9836243BcaeC9c8C1D8734", + "symbol": "BTE", + "decimal": 8, + "name": "BTE" + }, + { + "address": "0xFAd572db566E5234AC9Fc3d570c4EdC0050eAA92", + "symbol": "BTH", + "decimal": 18, + "name": "Bytether" + }, + { + "address": "0xa02e3bB9cEbc03952601B3724B4940e0845BeBcf", + "symbol": "BTHR", + "decimal": 18, + "name": "Bethereum" + }, + { + "address": "0xdb8646F5b487B5Dd979FAC618350e85018F557d4", + "symbol": "BTK", + "decimal": 18, + "name": "Bitcoin Token" + }, + { + "address": "0x2accaB9cb7a48c3E82286F0b2f8798D201F4eC3f", + "symbol": "BTL (Battle)", + "decimal": 18, + "name": "BTL (Battle)" + }, + { + "address": "0x92685E93956537c25Bb75D5d47fca4266dd628B8", + "symbol": "BTL (Bitlle)", + "decimal": 4, + "name": "Bitlle Token" + }, + { + "address": "0xcB97e65F07DA24D46BcDD078EBebd7C6E6E3d750", + "symbol": "BTM", + "decimal": 8, + "name": "Bytom" + }, + { + "address": "0x36905Fc93280f52362A1CBAB151F25DC46742Fb5", + "symbol": "BTO", + "decimal": 18, + "name": "Bottos" + }, + { + "address": "0x16B0E62aC13a2fAeD36D18bce2356d25Ab3CfAD3", + "symbol": "BTQ", + "decimal": 18, + "name": "Bitcoin Boutique" + }, + { + "address": "0xcbf15FB8246F679F9Df0135881CB29a3746f734b", + "symbol": "BTR", + "decimal": 18, + "name": "Bither Platform Token" + }, + { + "address": "0x499A6B77bc25C26bCf8265E2102B1B3dd1617024", + "symbol": "BTR (1)", + "decimal": 18, + "name": "Bitether" + }, + { + "address": "0x03C780cD554598592B97b7256dDAad759945b125", + "symbol": "BTRN", + "decimal": 18, + "name": "Biotron" + }, + { + "address": "0x080aa07E2C7185150d7e4DA98838A8d2feac3dfC", + "symbol": "BTT", + "decimal": 0, + "name": "Bitether" + }, + { + "address": "0xFA456Cf55250A839088b27EE32A424d7DAcB54Ff", + "symbol": "BTTX", + "decimal": 18, + "name": "Blocktrade.com" + }, + { + "address": "0xb683D83a532e2Cb7DFa5275eED3698436371cc9f", + "symbol": "BTU", + "decimal": 18, + "name": "BTU Protocol" + }, + { + "address": "0xE5f867dE1EA81346df5181b8b48DD6B0BB3357B0", + "symbol": "BTZ", + "decimal": 18, + "name": "BTZ by Bunz" + }, + { + "address": "0xCa3c18a65b802eC267f8f4802545e7F53D24C75e", + "symbol": "BUC", + "decimal": 18, + "name": "BeeUnity Chain" + }, + { + "address": "0xbD168CbF9d3a375B38dC51A202B5E8a4E52069Ed", + "symbol": "BWX", + "decimal": 18, + "name": "Blue Whale Token" + }, + { + "address": "0x4375E7aD8A01B8eC3Ed041399f62D9Cd120e0063", + "symbol": "BZ", + "decimal": 18, + "name": "Bit-Z Token" + }, + { + "address": "0xE1Aee98495365fc179699C1bB3E761FA716beE62", + "symbol": "BZNT", + "decimal": 18, + "name": "Bezant" + }, + { + "address": "0x26E75307Fc0C021472fEb8F727839531F112f317", + "symbol": "C20", + "decimal": 18, + "name": "Crypto20's Token" + }, + { + "address": "0xd42debE4eDc92Bd5a3FBb4243e1ecCf6d63A4A5d", + "symbol": "C8", + "decimal": 18, + "name": "Carboneum" + }, + { + "address": "0x7d4b8Cce0591C9044a22ee543533b72E976E36C3", + "symbol": "CAG", + "decimal": 18, + "name": "Change Bank" + }, + { + "address": "0x1d462414fe14cf489c7A21CaC78509f4bF8CD7c0", + "symbol": "CAN", + "decimal": 6, + "name": "CanYaCoin" + }, + { + "address": "0x04F2E7221fdb1B52A68169B25793E51478fF0329", + "symbol": "CAPP", + "decimal": 2, + "name": "Cappasity" + }, + { + "address": "0x423e4322CDDa29156b49a17dfbd2aCC4b280600D", + "symbol": "CAR", + "decimal": 9, + "name": "Car Sharing Community" + }, + { + "address": "0x4D9e23a3842fE7Eb7682B9725cF6c507C424A41B", + "symbol": "CAR (CarBlock)", + "decimal": 18, + "name": "CarBlock" + }, + { + "address": "0xA517a46Baad6B054A76bD19c46844f717fe69fea", + "symbol": "CARB", + "decimal": 8, + "name": "CarbCoin" + }, + { + "address": "0x2108E62D335Bbdc89eC3E9d8582F18DCFB0cDFf4", + "symbol": "CARCO", + "decimal": 8, + "name": "CARCO" + }, + { + "address": "0x1ed2B1eaEd8e968bc36EB90a914660A71827A5E9", + "symbol": "CARD", + "decimal": 0, + "name": "Cardstack Token" + }, + { + "address": "0x954b890704693af242613edEf1B603825afcD708", + "symbol": "CARD (1)", + "decimal": 18, + "name": "Cardstack Token" + }, + { + "address": "0xB07ec2c28834B889b1CE527Ca0F19364cD38935c", + "symbol": "CARD (2)", + "decimal": 0, + "name": "Cardstack Token" + }, + { + "address": "0xbF18F246B9301F231e9561B35A3879769BB46375", + "symbol": "CARE", + "decimal": 18, + "name": "Token CARE" + }, + { + "address": "0xe8780B48bdb05F928697A5e8155f672ED91462F7", + "symbol": "CAS", + "decimal": 18, + "name": "Cashaa" + }, + { + "address": "0x779492d3644dDF4495Aa2d80C468E1B7be6AF1d2", + "symbol": "CAS (CAS Coin)", + "decimal": 2, + "name": "CAS Coin" + }, + { + "address": "0x1234567461d3f8Db7496581774Bd869C83D51c93", + "symbol": "CAT (BitClave)", + "decimal": 18, + "name": "BitClave" + }, + { + "address": "0x56ba2Ee7890461f463F7be02aAC3099f6d5811A8", + "symbol": "CAT (BlockCAT)", + "decimal": 18, + "name": "BlockCAT" + }, + { + "address": "0x8293bBd92C42608B20af588620a76128A33e4De9", + "symbol": "CATS", + "decimal": 6, + "name": "CATCOIN" + }, + { + "address": "0x68e14bb5A45B9681327E16E528084B9d962C1a39", + "symbol": "CATs (BitClave)_Old", + "decimal": 18, + "name": "CATs (BitClave)_Old" + }, + { + "address": "0x26DB5439F651CAF491A87d48799dA81F191bDB6b", + "symbol": "CBC", + "decimal": 8, + "name": "CashBet Coin" + }, + { + "address": "0x05C3617cBf1304b9260AA61ec960F115D67beCEA", + "symbol": "CBIX", + "decimal": 18, + "name": "Cubrix" + }, + { + "address": "0x95eFD1Fe6099F65a7ED524DEF487483221094947", + "symbol": "CBM", + "decimal": 18, + "name": "CryptoBonusMiles" + }, + { + "address": "0x076C97e1c869072eE22f8c91978C99B4bcB02591", + "symbol": "CBT", + "decimal": 18, + "name": "CommerceBlock" + }, + { + "address": "0xc166038705FFBAb3794185b3a9D925632A1DF37D", + "symbol": "CC3", + "decimal": 18, + "name": "Coal Coin" + }, + { + "address": "0x28577A6d31559bd265Ce3ADB62d0458550F7b8a7", + "symbol": "CCC (CryptoCrashCourse)", + "decimal": 18, + "name": "CryptoCrashCourse" + }, + { + "address": "0xBE11eEb186e624b8f26A5045575a1340E4054552", + "symbol": "CCC (ICONOMI)", + "decimal": 18, + "name": "CCC (ICONOMI)" + }, + { + "address": "0x378903a03FB2C3AC76BB52773e3CE11340377A32", + "symbol": "CCCX", + "decimal": 18, + "name": "Clipper Coin" + }, + { + "address": "0xd348e07A2806505B856123045d27aeeD90924b50", + "symbol": "CCLC", + "decimal": 8, + "name": "Christ Coin" + }, + { + "address": "0x679BADc551626e01B23CeecEFBc9B877EA18fc46", + "symbol": "CCO", + "decimal": 18, + "name": "Ccore" + }, + { + "address": "0x315cE59FAFd3A8d562b7Ec1C8542382d2710b06c", + "symbol": "CCS", + "decimal": 18, + "name": "CacaoShares" + }, + { + "address": "0x336F646F87D9f6bC6Ed42Dd46E8b3fD9DbD15C22", + "symbol": "CCT", + "decimal": 18, + "name": "Crystal Clear Token" + }, + { + "address": "0x8a95ca448A52C0ADf0054bB3402dC5e09CD6B232", + "symbol": "CDL", + "decimal": 18, + "name": "Confideal" + }, + { + "address": "0x177d39AC676ED1C67A2b268AD7F1E58826E5B0af", + "symbol": "CDT", + "decimal": 18, + "name": "CoinDash" + }, + { + "address": "0x2cb101d7dA0ebaA57D3F2fEf46D7FFB7BB64592B", + "symbol": "CDX", + "decimal": 0, + "name": "Carbon Dollar X" + }, + { + "address": "0x6fFF3806Bbac52A20e0d79BC538d527f6a22c96b", + "symbol": "CDX (Commodity Ad Network)", + "decimal": 18, + "name": "Commodity Ad Network" + }, + { + "address": "0xb056c38f6b7Dc4064367403E26424CD2c60655e1", + "symbol": "CEEK", + "decimal": 18, + "name": "CEEK VR Token" + }, + { + "address": "0x1122B6a0E00DCe0563082b6e2953f3A943855c1F", + "symbol": "CENNZ", + "decimal": 18, + "name": "Centrality" + }, + { + "address": "0xF660cA1e228e7BE1fA8B4f5583145E31147FB577", + "symbol": "CET", + "decimal": 18, + "name": "DICE Money Dicet" + }, + { + "address": "0x5Dff89a2caa4D76bc286F74D67Bd718eb834da61", + "symbol": "CFC", + "decimal": 18, + "name": "CryptFillCoin" + }, + { + "address": "0x12FEF5e57bF45873Cd9B62E9DBd7BFb99e32D73e", + "symbol": "CFI", + "decimal": 18, + "name": "Cofound.it" + }, + { + "address": "0x6956983F8B3Ce173B4AB84361AA0ad52f38D936f", + "symbol": "CFTY", + "decimal": 8, + "name": "Crafty Token" + }, + { + "address": "0xf3db7560E820834658B590C96234c333Cd3D5E5e", + "symbol": "CHP", + "decimal": 18, + "name": "CoinPoker" + }, + { + "address": "0xba9d4199faB4f26eFE3551D490E3821486f135Ba", + "symbol": "CHSB", + "decimal": 8, + "name": "SwissBorg" + }, + { + "address": "0x1460a58096d80a50a2F1f956DDA497611Fa4f165", + "symbol": "CHX", + "decimal": 18, + "name": "Own" + }, + { + "address": "0xf75fBfa2f681860B9A6D19FC3FF3D34CB322E2D6", + "symbol": "CIYA", + "decimal": 18, + "name": "CRYPTORIYA" + }, + { + "address": "0x3abdfF32F76b42E7635bdb7e425f0231A5F3aB17", + "symbol": "CJT", + "decimal": 18, + "name": "ConnectJob" + }, + { + "address": "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d", + "symbol": "CK", + "decimal": 0, + "name": "CK" + }, + { + "address": "0xe81D72D14B1516e68ac3190a46C93302Cc8eD60f", + "symbol": "CL", + "decimal": 18, + "name": "Coinlancer" + }, + { + "address": "0xb1c1Cb8C7c1992dba24e628bF7d38E71daD46aeB", + "symbol": "CLB", + "decimal": 18, + "name": "Cloudbric" + }, + { + "address": "0x3dC9a42fa7Afe57BE03c58fD7F4411b1E466C508", + "symbol": "CLL", + "decimal": 18, + "name": "CryptoLiveLeak" + }, + { + "address": "0x4162178B78D6985480A308B2190EE5517460406D", + "symbol": "CLN", + "decimal": 18, + "name": "ColuLocalNetwork" + }, + { + "address": "0x7FCE2856899a6806eeEf70807985fc7554C66340", + "symbol": "CLP", + "decimal": 9, + "name": "CryptoLending" + }, + { + "address": "0x3EDD235C3E840C1F29286B2e39370a255C7B6fdb", + "symbol": "CMBT", + "decimal": 8, + "name": "CMBToken" + }, + { + "address": "0x7e667525521cF61352e2E01b50FaaaE7Df39749a", + "symbol": "CMC", + "decimal": 18, + "name": "CryptoMart" + }, + { + "address": "0x47bc01597798DCD7506DCCA36ac4302fc93a8cFb", + "symbol": "CMCT", + "decimal": 8, + "name": "Crowd Machine Compute Token" + }, + { + "address": "0xf85fEea2FdD81d51177F6b8F35F0e6734Ce45F5F", + "symbol": "CMT", + "decimal": 18, + "name": "CyberMiles Token" + }, + { + "address": "0xEBf2F9E8De960f64ec0fDCDa6Cb282423133347B", + "symbol": "CNB", + "decimal": 8, + "name": "Canabio" + }, + { + "address": "0xd4c435F5B09F855C3317c8524Cb1F586E42795fa", + "symbol": "CND", + "decimal": 18, + "name": "Cindicator" + }, + { + "address": "0x8713d26637CF49e1b6B4a7Ce57106AaBc9325343", + "symbol": "CNN", + "decimal": 18, + "name": "Content Neutrality Network" + }, + { + "address": "0xB4b1D2C217EC0776584CE08D3DD98F90EDedA44b", + "symbol": "CO2", + "decimal": 18, + "name": "Climatecoin" + }, + { + "address": "0x574B36BceD443338875d171CC377E691f7d4F887", + "symbol": "CO2Bit", + "decimal": 18, + "name": "CO2Bit" + }, + { + "address": "0xb2F7EB1f2c37645bE61d73953035360e768D81E6", + "symbol": "COB", + "decimal": 18, + "name": "Cobinhood Token" + }, + { + "address": "0x3136eF851592aCf49CA4C825131E364170FA32b3", + "symbol": "COFI", + "decimal": 18, + "name": "CoinFi Token" + }, + { + "address": "0x0C91B015AbA6f7B4738dcD36E7410138b29ADC29", + "symbol": "COIL", + "decimal": 8, + "name": "CoinOil" + }, + { + "address": "0x5e8F855966D638135a968861E80DdA722291B06d", + "symbol": "COIN", + "decimal": 18, + "name": "Coinvest V2 Token" + }, + { + "address": "0xeb547ed1D8A3Ff1461aBAa7F0022FED4836E00A4", + "symbol": "COIN (Coinvest V3 Token)", + "decimal": 18, + "name": "Coinvest V3 Token" + }, + { + "address": "0x725B190Bc077FFde17Cf549AA8ba25e298550B18", + "symbol": "CORI", + "decimal": 2, + "name": "Corrently Invest Token" + }, + { + "address": "0xC4Bcd64CB216D49fD3C643A32762F34626b45a1a", + "symbol": "COSM", + "decimal": 18, + "name": "Cosmo Coin" + }, + { + "address": "0x65292EeadF1426Cd2dF1C4793a3d7519f253913b", + "symbol": "COSS", + "decimal": 18, + "name": "Coss Token" + }, + { + "address": "0x9e96604445Ec19fFed9a5e8dd7B50a29C899A10C", + "symbol": "COSS (1)", + "decimal": 18, + "name": "Coss Token" + }, + { + "address": "0xE2FB6529EF566a080e6d23dE0bd351311087D567", + "symbol": "COV", + "decimal": 18, + "name": "Covesting" + }, + { + "address": "0x31910AFF5545784755970aE1fBE7fE65d5F0eEa2", + "symbol": "CPAL", + "decimal": 8, + "name": "CreatorPAL" + }, + { + "address": "0x0Ebb614204E47c09B6C3FeB9AAeCad8EE060E23E", + "symbol": "CPAY", + "decimal": 0, + "name": "Cryptopay" + }, + { + "address": "0xfAE4Ee59CDd86e3Be9e8b90b53AA866327D7c090", + "symbol": "CPC", + "decimal": 18, + "name": "CPChain" + }, + { + "address": "0xb787d4eAc8899730bb8C57fc3c998c49c5244ec0", + "symbol": "CPEX", + "decimal": 8, + "name": "CoinPulseToken" + }, + { + "address": "0x7064aAb39A0Fcf7221c3396719D0917a65E35515", + "symbol": "CPLO", + "decimal": 18, + "name": "CPOLLO" + }, + { + "address": "0x9B62513c8a27290CF6A7A9e29386e600245EA819", + "symbol": "CPT", + "decimal": 18, + "name": "Contents Protocol Token" + }, + { + "address": "0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1", + "symbol": "CPT (Cryptaur)", + "decimal": 8, + "name": "Cryptaur" + }, + { + "address": "0xf44745fBd41F6A1ba151df190db0564c5fCc4410", + "symbol": "CPY", + "decimal": 18, + "name": "COPYTRACK" + }, + { + "address": "0x7F585B9130c64e9e9F470b618A7badD03D79cA7E", + "symbol": "CR7", + "decimal": 18, + "name": "CR7Coin" + }, + { + "address": "0xAef38fBFBF932D1AeF3B808Bc8fBd8Cd8E1f8BC5", + "symbol": "CRB", + "decimal": 8, + "name": "Creditbit" + }, + { + "address": "0x2cF618c19041D9Db330d8222B860A624021F30fb", + "symbol": "CRBT", + "decimal": 18, + "name": "Cruisebit" + }, + { + "address": "0xF41e5Fbc2F6Aac200Dd8619E121CE1f05D150077", + "symbol": "CRC", + "decimal": 18, + "name": "CryCash" + }, + { + "address": "0x672a1AD4f667FB18A333Af13667aa0Af1F5b5bDD", + "symbol": "CRED", + "decimal": 18, + "name": "Verify" + }, + { + "address": "0x4E0603e2A27A30480E5e3a4Fe548e29EF12F64bE", + "symbol": "CREDO", + "decimal": 18, + "name": "Credo / Bitbounce" + }, + { + "address": "0xf49CDD50aD408d387d611F88A647179C3de3492b", + "symbol": "CRGO", + "decimal": 18, + "name": "CargoCoin" + }, + { + "address": "0x9238bfB781A55eACC3Cf05F7DF94038c198CD9B9", + "symbol": "CRMT", + "decimal": 8, + "name": "Cremit" + }, + { + "address": "0x80A7E048F37A50500351C204Cb407766fA3baE7f", + "symbol": "CRPT", + "decimal": 18, + "name": "CrypteriumToken" + }, + { + "address": "0xF0da1186a4977226b9135d0613ee72e229EC3F4d", + "symbol": "CRT", + "decimal": 18, + "name": "CreamtoeCoin" + }, + { + "address": "0xE4c94d45f7Aef7018a5D66f44aF780ec6023378e", + "symbol": "CryptoCarbon", + "decimal": 6, + "name": "CryptoCarbon" + }, + { + "address": "0x46b9Ad944d1059450Da1163511069C718F699D31", + "symbol": "CS", + "decimal": 6, + "name": "Credits" + }, + { + "address": "0x29D75277aC7F0335b2165D0895E8725cbF658d73", + "symbol": "CSNO", + "decimal": 8, + "name": "BitDice" + }, + { + "address": "0xBB49A51Ee5a66ca3a8CbE529379bA44Ba67E6771", + "symbol": "CST", + "decimal": 18, + "name": "Cryptosolartech" + }, + { + "address": "0x4545750F39aF6Be4F237B6869D4EccA928Fd5A85", + "symbol": "CTF", + "decimal": 18, + "name": "CryptoTask" + }, + { + "address": "0xC87c5dD86A3d567fF28701886fB0745aaa898da4", + "symbol": "CTG", + "decimal": 18, + "name": "CT Global Token" + }, + { + "address": "0x9E7D29bd499B6c7da2a5B2EaFCF4A39d3BD845D1", + "symbol": "CTGC", + "decimal": 18, + "name": "Convenient To Go" + }, + { + "address": "0xBf4cFD7d1eDeeEA5f6600827411B41A21eB08abd", + "symbol": "CTL", + "decimal": 2, + "name": "CTL" + }, + { + "address": "0x96A65609a7B84E8842732DEB08f56C3E21aC6f8a", + "symbol": "CTR", + "decimal": 18, + "name": "Centra" + }, + { + "address": "0xE3Fa177AcecfB86721Cf6f9f4206bd3Bd672D7d5", + "symbol": "CTT", + "decimal": 18, + "name": "ChainTrade Token" + }, + { + "address": "0x662aBcAd0b7f345AB7FfB1b1fbb9Df7894f18e66", + "symbol": "CTX", + "decimal": 18, + "name": "CarTaxi" + }, + { + "address": "0xEa11755Ae41D889CeEc39A63E6FF75a02Bc1C00d", + "symbol": "CTXC", + "decimal": 18, + "name": "Cortex" + }, + { + "address": "0xdA6cb58A0D0C01610a29c5A65c303e13e885887C", + "symbol": "cV", + "decimal": 18, + "name": "carVertical" + }, + { + "address": "0x41e5560054824eA6B0732E656E3Ad64E20e94E45", + "symbol": "CVC", + "decimal": 8, + "name": "Civic" + }, + { + "address": "0xBe428c3867F05deA2A89Fc76a102b544eaC7f772", + "symbol": "CVT", + "decimal": 18, + "name": "CyberVein" + }, + { + "address": "0x2134057C0b461F898D375Cead652Acae62b59541", + "symbol": "CXC", + "decimal": 18, + "name": "CoxxxCoin" + }, + { + "address": "0xb6EE9668771a79be7967ee29a63D4184F8097143", + "symbol": "CXO", + "decimal": 18, + "name": "CargoX" + }, + { + "address": "0x3f06B5D78406cD97bdf10f5C420B241D32759c80", + "symbol": "CYFM", + "decimal": 18, + "name": "CyberFM" + }, + { + "address": "0x78c292D1445E6b9558bf42e8BC369271DeD062eA", + "symbol": "CYMT", + "decimal": 8, + "name": "CyberMusic" + }, + { + "address": "0x0223fc70574214F65813fE336D870Ac47E147fAe", + "symbol": "CZR", + "decimal": 18, + "name": "CanonChain" + }, + { + "address": "0xdab0C31BF34C897Fb0Fe90D12EC9401caf5c36Ec", + "symbol": "DAB", + "decimal": 0, + "name": "DAB" + }, + { + "address": "0xA31108E5BAB5494560Db34c95492658AF239357C", + "symbol": "DACS", + "decimal": 18, + "name": "DACSEE" + }, + { + "address": "0xFb2f26F266Fb2805a387230f2aa0a331b4d96Fba", + "symbol": "DADI", + "decimal": 18, + "name": "DADI" + }, + { + "address": "0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359", + "symbol": "DAI", + "decimal": 18, + "name": "Dai Stablecoin v1.0" + }, + { + "address": "0x07D9e49Ea402194bf48A8276dAfB16E4eD633317", + "symbol": "DALC", + "decimal": 8, + "name": "DaleCoin" + }, + { + "address": "0x9B70740e708a083C6fF38Df52297020f5DfAa5EE", + "symbol": "DAN", + "decimal": 10, + "name": "DaneelToken" + }, + { + "address": "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413", + "symbol": "DAO", + "decimal": 16, + "name": "DAO" + }, + { + "address": "0x81c9151de0C8bafCd325a57E3dB5a5dF1CEBf79c", + "symbol": "DAT", + "decimal": 18, + "name": "Datum Token" + }, + { + "address": "0x0Cf0Ee63788A0849fE5297F3407f701E122cC023", + "symbol": "DATA", + "decimal": 18, + "name": "Streamr DATAcoin" + }, + { + "address": "0x1B5f21ee98eed48d292e8e2d3Ed82b40a9728A22", + "symbol": "DATABroker", + "decimal": 18, + "name": "DataBrokerDAO Token" + }, + { + "address": "0xaBbBB6447B68ffD6141DA77C18c7B5876eD6c5ab", + "symbol": "DATX", + "decimal": 18, + "name": "DATx" + }, + { + "address": "0xd82Df0ABD3f51425Eb15ef7580fDA55727875f14", + "symbol": "DAV", + "decimal": 18, + "name": "DAV Token" + }, + { + "address": "0x0B4BdC478791897274652DC15eF5C135cae61E60", + "symbol": "DAX", + "decimal": 18, + "name": "DAEX" + }, + { + "address": "0x61725f3db4004AFE014745B21DAb1E1677CC328b", + "symbol": "DAXT", + "decimal": 18, + "name": "Digital Asset Exchange Token" + }, + { + "address": "0xE814aeE960a85208C3dB542C53E7D4a6C8D5f60F", + "symbol": "DAY", + "decimal": 18, + "name": "ChronoLogic DAY" + }, + { + "address": "0x9b68bFaE21DF5A510931A262CECf63f41338F264", + "symbol": "DBET", + "decimal": 18, + "name": "DecentBet" + }, + { + "address": "0x386Faa4703a34a7Fdb19Bec2e14Fd427C9638416", + "symbol": "DCA", + "decimal": 18, + "name": "DoBetAcceptBet" + }, + { + "address": "0xFFa93Aacf49297D51E211817452839052FDFB961", + "symbol": "DCC", + "decimal": 18, + "name": "Distributed Credit Chain" + }, + { + "address": "0x399A0e6FbEb3d74c85357439f4c8AeD9678a5cbF", + "symbol": "DCL", + "decimal": 3, + "name": "DCL" + }, + { + "address": "0x08d32b0da63e2C3bcF8019c9c5d849d7a9d791e6", + "symbol": "DCN", + "decimal": 0, + "name": "Dentacoin" + }, + { + "address": "0xcC4eF9EEAF656aC1a2Ab886743E98e97E090ed38", + "symbol": "DDF", + "decimal": 18, + "name": "DDF" + }, + { + "address": "0x151202C9c18e495656f372281F493EB7698961D5", + "symbol": "DEB", + "decimal": 18, + "name": "DEBITUM" + }, + { + "address": "0x075c60EE2cD308ff47873b38Bd9A0Fa5853382c4", + "symbol": "DEEZ", + "decimal": 18, + "name": "DeezNuts" + }, + { + "address": "0xDE1E0AE6101b46520cF66fDC0B1059c5cC3d106c", + "symbol": "DELTA", + "decimal": 8, + "name": "DeltaChain" + }, + { + "address": "0x3597bfD533a99c9aa083587B074434E61Eb0A258", + "symbol": "DENT", + "decimal": 8, + "name": "DENT" + }, + { + "address": "0x7cF271966F36343Bf0150F25E5364f7961c58201", + "symbol": "DEPO", + "decimal": 0, + "name": "CRYPTODEPOZIT" + }, + { + "address": "0x89cbeAC5E8A13F0Ebb4C74fAdFC69bE81A501106", + "symbol": "DEPO (Depository Network)", + "decimal": 18, + "name": "DEPO (Depository Network)" + }, + { + "address": "0xdd94De9cFE063577051A5eb7465D08317d8808B6", + "symbol": "Devcon2 Token", + "decimal": 0, + "name": "Devcon2 Token" + }, + { + "address": "0x20E94867794dBA030Ee287F1406E100d03C84Cd3", + "symbol": "DEW", + "decimal": 18, + "name": "DEW" + }, + { + "address": "0x497bAEF294c11a5f0f5Bea3f2AdB3073DB448B56", + "symbol": "DEX", + "decimal": 18, + "name": "DEX" + }, + { + "address": "0xE0B7927c4aF23765Cb51314A0E0521A9645F0E2A", + "symbol": "DGD", + "decimal": 9, + "name": "Digix DAO" + }, + { + "address": "0xf6cFe53d6FEbaEEA051f400ff5fc14F0cBBDacA1", + "symbol": "DGPT", + "decimal": 18, + "name": "DigiPulse" + }, + { + "address": "0x6aEDbF8dFF31437220dF351950Ba2a3362168d1b", + "symbol": "DGS", + "decimal": 8, + "name": "Dragonglass" + }, + { + "address": "0x1C83501478f1320977047008496DACBD60Bb15ef", + "symbol": "DGTX", + "decimal": 18, + "name": "DigitexFutures" + }, + { + "address": "0x4f3AfEC4E5a3F2A6a1A411DEF7D7dFe50eE057bF", + "symbol": "DGX", + "decimal": 9, + "name": "Digix Gold Token" + }, + { + "address": "0x55b9a11c2e8351b4Ffc7b11561148bfaC9977855", + "symbol": "DGX1", + "decimal": 9, + "name": "Digix Gold Token 1.0" + }, + { + "address": "0x2e071D2966Aa7D8dECB1005885bA1977D6038A65", + "symbol": "DICE", + "decimal": 16, + "name": "Etheroll" + }, + { + "address": "0xc719d010B63E5bbF2C0551872CD5316ED26AcD83", + "symbol": "DIP", + "decimal": 18, + "name": "Decentralized Insurance Protocol" + }, + { + "address": "0xf14922001A2FB8541a433905437ae954419C2439", + "symbol": "DIT", + "decimal": 8, + "name": "Digital Insurance Token" + }, + { + "address": "0x13f11C9905A08ca76e3e853bE63D4f0944326C72", + "symbol": "DIVX", + "decimal": 18, + "name": "DIVX" + }, + { + "address": "0xBA187B09fFA8DDdc80d2571eD3cbC4Be0Af69E0c", + "symbol": "DKP", + "decimal": 18, + "name": "Draggin Karma Points" + }, + { + "address": "0x07e3c70653548B04f0A75970C1F81B4CBbFB606f", + "symbol": "DLT", + "decimal": 18, + "name": "Agrello" + }, + { + "address": "0x2ccbFF3A042c68716Ed2a2Cb0c544A9f1d1935E1", + "symbol": "DMT", + "decimal": 8, + "name": "DMarket Token" + }, + { + "address": "0x82b0E50478eeaFde392D45D1259Ed1071B6fDa81", + "symbol": "DNA", + "decimal": 18, + "name": "EncrypGen" + }, + { + "address": "0x0AbdAce70D3790235af448C88547603b945604ea", + "symbol": "DNT", + "decimal": 18, + "name": "District0x Network Token" + }, + { + "address": "0xE43E2041dc3786e166961eD9484a5539033d10fB", + "symbol": "DNX", + "decimal": 18, + "name": "DenCity" + }, + { + "address": "0xE5Dada80Aa6477e85d09747f2842f7993D0Df71C", + "symbol": "DOCK", + "decimal": 18, + "name": "Dock" + }, + { + "address": "0x906b3f8b7845840188Eab53c3f5AD348A787752f", + "symbol": "DOR", + "decimal": 15, + "name": "Dorado" + }, + { + "address": "0xac3211a5025414Af2866FF09c23FC18bc97e79b1", + "symbol": "DOV", + "decimal": 18, + "name": "Dovu" + }, + { + "address": "0x76974C7B79dC8a6a109Fd71fd7cEb9E40eff5382", + "symbol": "DOW", + "decimal": 18, + "name": "DOW" + }, + { + "address": "0xEEF6E90034eEa89E31Eb4B8eaCd323F28A92eaE4", + "symbol": "DOW (1)", + "decimal": 18, + "name": "DOW" + }, + { + "address": "0x01b3Ec4aAe1B8729529BEB4965F27d008788B0EB", + "symbol": "DPP", + "decimal": 18, + "name": "Digital Assets Power Play" + }, + { + "address": "0x82f4dED9Cec9B5750FBFf5C2185AEe35AfC16587", + "symbol": "DREAM", + "decimal": 6, + "name": "DREAM" + }, + { + "address": "0x419c4dB4B9e25d6Db2AD9691ccb832C8D9fDA05E", + "symbol": "DRGN", + "decimal": 18, + "name": "Dragon" + }, + { + "address": "0x3c75226555FC496168d48B88DF83B95F16771F37", + "symbol": "DROP", + "decimal": 0, + "name": "Droplex" + }, + { + "address": "0x4672bAD527107471cB5067a887f4656D585a8A31", + "symbol": "DROP (dropil)", + "decimal": 18, + "name": "Dropil" + }, + { + "address": "0x2799D90C6d44Cb9Aa5fBC377177F16C33E056b82", + "symbol": "DRP", + "decimal": 0, + "name": "Dripcoin" + }, + { + "address": "0x621d78f2EF2fd937BFca696CabaF9A779F59B3Ed", + "symbol": "DRP (DCorp)", + "decimal": 2, + "name": "DCorp" + }, + { + "address": "0xe30e02f049957e2A5907589e06Ba646fB2c321bA", + "symbol": "DRPU", + "decimal": 8, + "name": "DCORP Utility" + }, + { + "address": "0x9AF4f26941677C706cfEcf6D3379FF01bB85D5Ab", + "symbol": "DRT", + "decimal": 8, + "name": "DomRaider" + }, + { + "address": "0x62D4c04644314F35868Ba4c65cc27a77681dE7a9", + "symbol": "DRVH", + "decimal": 18, + "name": "Driveholic Token" + }, + { + "address": "0x1e09BD8Cadb441632e441Db3e1D79909EE0A2256", + "symbol": "DSC", + "decimal": 1, + "name": "Digital Safe Coin" + }, + { + "address": "0x03e3f0c25965f13DbbC58246738C183E27b26a56", + "symbol": "DSCP", + "decimal": 18, + "name": "Disciplina Token" + }, + { + "address": "0x68d53441c0e253f76c500e551bdeA3D102206C9a", + "symbol": "DST", + "decimal": 18, + "name": "Dimensions Strike Token" + }, + { + "address": "0x5adc961D6AC3f7062D2eA45FEFB8D8167d44b190", + "symbol": "DTH", + "decimal": 18, + "name": "dether" + }, + { + "address": "0xd234BF2410a0009dF9c3C63b610c09738f18ccD7", + "symbol": "DTR", + "decimal": 8, + "name": "Dynamic Trading Rights" + }, + { + "address": "0xc20464e0C373486d2B3335576e83a218b1618A5E", + "symbol": "DTRC", + "decimal": 18, + "name": "Datarius Credit" + }, + { + "address": "0xf9F7c29CFdf19FCf1f2AA6B84aA367Bcf1bD1676", + "symbol": "DTT", + "decimal": 18, + "name": "Delphi Tech Token" + }, + { + "address": "0x82fdedfB7635441aA5A92791D001fA7388da8025", + "symbol": "DTx", + "decimal": 18, + "name": "DigitalTicks" + }, + { + "address": "0x765f0C16D1Ddc279295c1a7C24B0883F62d33F75", + "symbol": "DTX", + "decimal": 18, + "name": "DaTa eXchange Token" + }, + { + "address": "0xD4CffeeF10F60eCA581b5E1146B5Aca4194a4C3b", + "symbol": "DUBI", + "decimal": 18, + "name": "Decentralized Universal Basic Income" + }, + { + "address": "0x9c6Fa42209169bCeA032e401188a6fc3e9C9f59c", + "symbol": "DUBI (1)", + "decimal": 18, + "name": "Decentralized Universal Basic Income" + }, + { + "address": "0xEd7fEA78C393cF7B17B152A8c2D0CD97aC31790B", + "symbol": "DUBI (DUBI)", + "decimal": 18, + "name": "DUBI" + }, + { + "address": "0x8dB54ca569D3019A2ba126D03C37c44b5eF81EF6", + "symbol": "DXT", + "decimal": 8, + "name": "Datawallet" + }, + { + "address": "0xb67734521eAbBE9C773729dB73E16CC2dfb20A58", + "symbol": "E₹", + "decimal": 2, + "name": "eRupee" + }, + { + "address": "0xCe5c603C78d047Ef43032E96b5B785324f753a4F", + "symbol": "E4ROW", + "decimal": 2, + "name": "E4ROW" + }, + { + "address": "0x994f0DffdbaE0BbF09b652D6f11A493fd33F42B9", + "symbol": "EAGLE", + "decimal": 18, + "name": "EagleCoin" + }, + { + "address": "0x900b4449236a7bb26b286601dD14d2bDe7a6aC6c", + "symbol": "EARTH", + "decimal": 8, + "name": "Earth Token" + }, + { + "address": "0x31f3D9D1BeCE0c033fF78fA6DA60a6048F3E13c5", + "symbol": "EBC", + "decimal": 18, + "name": "EBCoin" + }, + { + "address": "0xaFC39788c51f0c1Ff7B55317f3e70299e521Fff6", + "symbol": "eBCH", + "decimal": 8, + "name": "eBCH" + }, + { + "address": "0xeB7C20027172E5d143fB030d50f91Cece2D1485D", + "symbol": "EBTC", + "decimal": 8, + "name": "eBitcoin" + }, + { + "address": "0xa578aCc0cB7875781b7880903F4594D13cFa8B98", + "symbol": "ECN", + "decimal": 2, + "name": "ECN" + }, + { + "address": "0x17F93475d2A978f527c3f7c44aBf44AdfBa60D5C", + "symbol": "ECO2", + "decimal": 2, + "name": "EtherCO2" + }, + { + "address": "0x171D750d42d661B62C277a6B486ADb82348c3Eca", + "symbol": "ECOM", + "decimal": 18, + "name": "Omnitude" + }, + { + "address": "0xAEA1C18A992984831002D0cf90E291FB52d72649", + "symbol": "ECP", + "decimal": 18, + "name": "ECRYPTO COIN" + }, + { + "address": "0x8869b1F9bC8B246a4D7220F834E56ddfdd8255E7", + "symbol": "ECP (ECrypto Coin)", + "decimal": 18, + "name": "ECrypto Coin" + }, + { + "address": "0xFA1DE2Ee97e4c10C94C91Cb2b5062b89Fb140b82", + "symbol": "EDC", + "decimal": 6, + "name": "Education Credits" + }, + { + "address": "0x08711D3B02C8758F2FB3ab4e80228418a7F8e39c", + "symbol": "EDG", + "decimal": 0, + "name": "Edgeless" + }, + { + "address": "0xCeD4E93198734dDaFf8492d525Bd258D49eb388E", + "symbol": "EDO", + "decimal": 18, + "name": "Eidoo" + }, + { + "address": "0xc528c28FEC0A90C083328BC45f587eE215760A0F", + "symbol": "EDR", + "decimal": 18, + "name": "Endor Protocol Token" + }, + { + "address": "0x2A22e5cCA00a3D63308fa39f29202eB1b39eEf52", + "symbol": "EDU", + "decimal": 18, + "name": "EDU Token" + }, + { + "address": "0xb53A96bcBdD9CF78dfF20BAB6C2be7bAec8f00f8", + "symbol": "eGAS", + "decimal": 8, + "name": "ETH GAS" + }, + { + "address": "0x8e1b448EC7aDFc7Fa35FC2e885678bD323176E34", + "symbol": "EGT", + "decimal": 18, + "name": "Egretia Token" + }, + { + "address": "0xf9F0FC7167c311Dd2F1e21E9204F87EBA9012fB2", + "symbol": "EHT", + "decimal": 8, + "name": "EasyHomes" + }, + { + "address": "0xa6a840E50bCaa50dA017b91A0D86B8b2d41156EE", + "symbol": "EKO", + "decimal": 18, + "name": "EchoLink" + }, + { + "address": "0xBAb165dF9455AA0F2AeD1f2565520B91DDadB4c8", + "symbol": "EKT", + "decimal": 8, + "name": "EDUCare" + }, + { + "address": "0xD49ff13661451313cA1553fd6954BD1d9b6E02b9", + "symbol": "ELEC", + "decimal": 18, + "name": "Electrify.Asia" + }, + { + "address": "0xbf2179859fc6D5BEE9Bf9158632Dc51678a4100e", + "symbol": "ELF", + "decimal": 18, + "name": "ELF Token" + }, + { + "address": "0xc8C6A31A4A806d3710A7B38b7B296D2fABCCDBA8", + "symbol": "ELIX", + "decimal": 18, + "name": "Elixir Token" + }, + { + "address": "0x44197A4c44D6A059297cAf6be4F7e172BD56Caaf", + "symbol": "ELTCOIN", + "decimal": 8, + "name": "ELTCOIN" + }, + { + "address": "0xa95592DCFfA3C080B4B40E459c5f5692F67DB7F8", + "symbol": "ELY", + "decimal": 18, + "name": "ELYCOIN" + }, + { + "address": "0x28B94F58B11aC945341329dBf2e5EF7F8Bd44225", + "symbol": "EMB", + "decimal": 8, + "name": "Emblem" + }, + { + "address": "0xb67b88a25708a35AE7c2d736D398D268CE4f7F83", + "symbol": "EMON", + "decimal": 8, + "name": "Etheremon" + }, + { + "address": "0x95dAaaB98046846bF4B2853e23cba236fa394A31", + "symbol": "EMONT", + "decimal": 8, + "name": "Etheremon Token" + }, + { + "address": "0x9501BFc48897DCEEadf73113EF635d2fF7ee4B97", + "symbol": "EMT", + "decimal": 18, + "name": "easyMINE Token" + }, + { + "address": "0xB802b24E0637c2B87D2E8b7784C055BBE921011a", + "symbol": "EMV", + "decimal": 2, + "name": "EMovieVenture" + }, + { + "address": "0x039F5050dE4908f9b5ddF40A4F3Aa3f329086387", + "symbol": "ENC", + "decimal": 18, + "name": "Ethernet.Cash" + }, + { + "address": "0xf0Ee6b27b759C9893Ce4f094b49ad28fd15A23e4", + "symbol": "ENG", + "decimal": 8, + "name": "Enigma" + }, + { + "address": "0x5DBAC24e98E2a4f43ADC0DC82Af403fca063Ce2c", + "symbol": "ENGT", + "decimal": 18, + "name": "Engagement Token" + }, + { + "address": "0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c", + "symbol": "ENJ", + "decimal": 18, + "name": "ENJIN" + }, + { + "address": "0x5BC7e5f0Ab8b2E10D2D0a3F21739FCe62459aeF3", + "symbol": "ENTRP", + "decimal": 18, + "name": "Hut34 Entropy Token" + }, + { + "address": "0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0", + "symbol": "EOS", + "decimal": 18, + "name": "EOS" + }, + { + "address": "0x7e9e431a0B8c4D532C745B1043c7FA29a48D4fBa", + "symbol": "eosDAC", + "decimal": 18, + "name": "eosDAC" + }, + { + "address": "0x35BAA72038F127f9f8C8f9B491049f64f377914d", + "symbol": "EPX", + "decimal": 4, + "name": "ethPoker.io EPX" + }, + { + "address": "0x50Ee674689d75C0f88E8f83cfE8c4B69E8fd590D", + "symbol": "EPY", + "decimal": 8, + "name": "Emphy" + }, + { + "address": "0x47dD62D4D075DeAd71d0e00299fc56a2d747beBb", + "symbol": "EQL", + "decimal": 18, + "name": "Equal" + }, + { + "address": "0x74CEDa77281b339142A36817Fa5F9E29412bAb85", + "symbol": "ERO", + "decimal": 8, + "name": "Eroscoin" + }, + { + "address": "0x92A5B04D0ED5D94D7a193d1d334D3D16996f4E13", + "symbol": "ERT", + "decimal": 18, + "name": "Eristica" + }, + { + "address": "0xe8A1Df958bE379045E2B46a31A98B93A2eCDfDeD", + "symbol": "ESZ", + "decimal": 18, + "name": "ESZCoin" + }, + { + "address": "0x1B9743f556D65e757c4c650B4555bAF354cB8bd3", + "symbol": "ETBS", + "decimal": 12, + "name": "Ethbits" + }, + { + "address": "0xDd74a7A3769fA72561B3A69e65968F49748c690c", + "symbol": "ETCH", + "decimal": 18, + "name": "ETCH" + }, + { + "address": "0x28c8d01FF633eA9Cd8fc6a451D7457889E698de6", + "symbol": "ETG", + "decimal": 0, + "name": "Ethereum Gold" + }, + { + "address": "0x3a26746Ddb79B1B8e4450e3F4FFE3285A307387E", + "symbol": "ETHB", + "decimal": 8, + "name": "EtherBTC" + }, + { + "address": "0xdbFb423E9bBF16294388e07696A5120E4CeBA0C5", + "symbol": "ETHD", + "decimal": 18, + "name": "Ethereum Dark" + }, + { + "address": "0x3c4a3ffd813a107febd57B2f01BC344264D90FdE", + "symbol": "ETK", + "decimal": 2, + "name": "EnergiToken" + }, + { + "address": "0x6927C69fb4daf2043fbB1Cb7b86c5661416bea29", + "symbol": "ETR", + "decimal": 18, + "name": "Etheruem Risen" + }, + { + "address": "0xdB25f211AB05b1c97D595516F45794528a807ad8", + "symbol": "EURS", + "decimal": 2, + "name": "STASIS EURS" + }, + { + "address": "0xAbdf147870235FcFC34153828c769A70B3FAe01F", + "symbol": "EURT", + "decimal": 6, + "name": "EUR Tether (erc20)" + }, + { + "address": "0x523630976eB6147621B5c31c781eBe2Ec2a806E0", + "symbol": "eUSD", + "decimal": 18, + "name": "Ether-Backed USD Nomins (erc20)" + }, + { + "address": "0xb62d18DeA74045E822352CE4B3EE77319DC5ff2F", + "symbol": "EVC", + "decimal": 18, + "name": "EventChain" + }, + { + "address": "0x923108a439C4e8C2315c4f6521E5cE95B44e9B4c", + "symbol": "EVE", + "decimal": 18, + "name": "Devery" + }, + { + "address": "0x68909e586eeAC8F47315e84B4c9788DD54Ef65Bb", + "symbol": "EVN", + "decimal": 18, + "name": "EvenCoin" + }, + { + "address": "0xd780Ae2Bf04cD96E577D3D014762f831d97129d0", + "symbol": "EVN (Envion AG)", + "decimal": 18, + "name": "Envion AG" + }, + { + "address": "0xf3Db5Fa2C66B7aF3Eb0C0b782510816cbe4813b8", + "symbol": "EVX", + "decimal": 4, + "name": "EVX Token" + }, + { + "address": "0x444997b7e7fC830E20089afea3078cd518fCF2A2", + "symbol": "EWO", + "decimal": 18, + "name": "EWO Token" + }, + { + "address": "0x9e4C143Bfe35f855624B3F84465AB7401A17A120", + "symbol": "EXC", + "decimal": 18, + "name": "EXCOIN CASH " + }, + { + "address": "0x00c4B398500645eb5dA00a1a379a88B11683ba01", + "symbol": "EXC (Eximchain Token)", + "decimal": 18, + "name": "Eximchain Token" + }, + { + "address": "0xc98e0639c6d2EC037A615341c369666B110e80E5", + "symbol": "EXMR", + "decimal": 8, + "name": "eXMRcoin" + }, + { + "address": "0xe469c4473af82217B30CF17b10BcDb6C8c796e75", + "symbol": "EXRN", + "decimal": 0, + "name": "EXRNchain" + }, + { + "address": "0x5c743a35E903F6c584514ec617ACEe0611Cf44f3", + "symbol": "EXY", + "decimal": 18, + "name": "Experty" + }, + { + "address": "0x5e6016Ae7d7C49d347dcF834860B9f3Ee282812b", + "symbol": "EZT", + "decimal": 8, + "name": "EZToken" + }, + { + "address": "0x0a1D2fF7156a48131553CF381F220bbedB4eFa37", + "symbol": "FABA", + "decimal": 18, + "name": "FABA" + }, + { + "address": "0x1CCAA0F2a7210d76E1fDec740d5F323E2E1b1672", + "symbol": "FACE", + "decimal": 18, + "name": "Faceter" + }, + { + "address": "0x190e569bE071F40c704e15825F285481CB74B6cC", + "symbol": "FAM", + "decimal": 12, + "name": "FAM" + }, + { + "address": "0x90162f41886c0946D09999736f1C15c8a105A421", + "symbol": "FAN", + "decimal": 18, + "name": "Fan Token" + }, + { + "address": "0x7dCB3B2356C822d3577D4d060D0D5D78C860488C", + "symbol": "FANX", + "decimal": 18, + "name": "FANX Token" + }, + { + "address": "0x7f6715c3FC4740A02F70De85B9FD50ac6001fEd9", + "symbol": "FANX (1)", + "decimal": 18, + "name": "FANX Token" + }, + { + "address": "0x7cf6dC769482AbEe2FF75795d000F381A8062DEC", + "symbol": "FAR", + "decimal": 18, + "name": "Far Token" + }, + { + "address": "0x23352036E911A22Cfc692B5E2E196692658ADED9", + "symbol": "FDZ", + "decimal": 18, + "name": "Friendz" + }, + { + "address": "0xd9A8cfe21C232D485065cb62a96866799d4645f7", + "symbol": "FGP", + "decimal": 18, + "name": "FingerPrint" + }, + { + "address": "0x52fb36C83ad33C1824912FC81071cA5eEB8AB390", + "symbol": "FID", + "decimal": 18, + "name": "Fidelium" + }, + { + "address": "0xdfC3e857c8cCEA7657E0ed98AB92e048e38deE0f", + "symbol": "FIH", + "decimal": 18, + "name": "FidelityHouse Token" + }, + { + "address": "0x009e864923b49263c7F10D19B7f8Ab7a9A5AAd33", + "symbol": "FKX", + "decimal": 18, + "name": "Knoxstertoken" + }, + { + "address": "0xf04a8ac553FceDB5BA99A64799155826C136b0Be", + "symbol": "FLIXX", + "decimal": 18, + "name": "Flixxo" + }, + { + "address": "0x04cC783b450b8D11F3C7d00DD03fDF7FB51fE9F2", + "symbol": "FLMC", + "decimal": 18, + "name": "Filmscoin" + }, + { + "address": "0x5976F7dac1525eF3277836043bA474a35E6B4272", + "symbol": "FLMC (1)", + "decimal": 0, + "name": "Filmscoin" + }, + { + "address": "0x049399a6B048D52971F7D122aE21A1532722285F", + "symbol": "FLOT", + "decimal": 18, + "name": "Fire Lotto" + }, + { + "address": "0x3a1Bda28AdB5B0a812a7CF10A1950c920F79BcD3", + "symbol": "FLP", + "decimal": 18, + "name": "FLIP Token" + }, + { + "address": "0x9aeFBE0b3C3ba9Eab262CB9856E8157AB7648e09", + "symbol": "FLR", + "decimal": 18, + "name": "Flair Coin" + }, + { + "address": "0x954b5De09A55e59755aCBda29e1Eb74A45D30175", + "symbol": "FLUZ", + "decimal": 18, + "name": "Fluz Fluz Global" + }, + { + "address": "0x70b147E01E9285E7cE68B9BA437Fe3a9190E756a", + "symbol": "FLX", + "decimal": 18, + "name": "BitFlux" + }, + { + "address": "0xb4d0FDFC8497AEF97d3c2892AE682eE06064A2BC", + "symbol": "FMF", + "decimal": 18, + "name": "Formosa Financial Token" + }, + { + "address": "0x4DF47B4969B2911C966506E3592c41389493953b", + "symbol": "FND", + "decimal": 18, + "name": "FundRequest" + }, + { + "address": "0x0707681F344dEB24184037fC0228856F2137B02E", + "symbol": "FNKOS", + "decimal": 18, + "name": "FNKOS" + }, + { + "address": "0xbD4B60a138b3fce3584EA01f50c0908c18f9677A", + "symbol": "FNTB", + "decimal": 8, + "name": "Fintab" + }, + { + "address": "0x4946Fcea7C692606e8908002e55A582af44AC121", + "symbol": "FOAM", + "decimal": 18, + "name": "FOAM Token" + }, + { + "address": "0x2a093BcF0C98Ef744Bb6F69D74f2F85605324290", + "symbol": "FOOD", + "decimal": 8, + "name": "FoodCoin" + }, + { + "address": "0x5bB1632fA0023e1AA76a1AE92B4635C8DBa49Fa2", + "symbol": "FORK", + "decimal": 18, + "name": "GastroAdvisorToken" + }, + { + "address": "0x4270bb238f6DD8B1c3ca01f96CA65b2647c06D3C", + "symbol": "FOTA", + "decimal": 18, + "name": "Fortuna" + }, + { + "address": "0x8c39afDf7B17F12c553208555E51ab86E69C35aA", + "symbol": "FR8", + "decimal": 8, + "name": "Fr8 Network" + }, + { + "address": "0x0ABeFb7611Cb3A01EA3FaD85f33C3C934F8e2cF4", + "symbol": "FRD", + "decimal": 18, + "name": "FARAD Cryptoken" + }, + { + "address": "0x17e67d1CB4e349B9CA4Bc3e17C7DF2a397A7BB64", + "symbol": "FREC", + "decimal": 18, + "name": "Freyrchain" + }, + { + "address": "0x48DF4E0296f908CEAb0428A5182D19B31fC037d6", + "symbol": "FRV", + "decimal": 8, + "name": "Fitrova" + }, + { + "address": "0x36a73557f5BDE5195EC39eCA82d28b8A36D21141", + "symbol": "FRX", + "decimal": 18, + "name": "Forex Coin" + }, + { + "address": "0xD0352a019e9AB9d757776F532377aAEbd36Fd541", + "symbol": "FSN", + "decimal": 18, + "name": "Fusion" + }, + { + "address": "0x78a73B6CBc5D183CE56e786f6e905CaDEC63547B", + "symbol": "FT", + "decimal": 18, + "name": "Fabric Token" + }, + { + "address": "0xe6f74dcfa0E20883008d8C16b6d9a329189D0C30", + "symbol": "FTC", + "decimal": 2, + "name": "FTC" + }, + { + "address": "0x943ED852DadB5C3938ECdC6883718df8142DE4C8", + "symbol": "FTI", + "decimal": 18, + "name": "FansTime" + }, + { + "address": "0x2023DCf7c438c8C8C0B0F28dBaE15520B4f3Ee20", + "symbol": "FTR", + "decimal": 18, + "name": "Futourist Token" + }, + { + "address": "0x2AEC18c5500f21359CE1BEA5Dc1777344dF4C0Dc", + "symbol": "FTT", + "decimal": 18, + "name": "FarmaTrust Token" + }, + { + "address": "0xd559f20296FF4895da39b5bd9ADd54b442596a61", + "symbol": "FTX", + "decimal": 18, + "name": "FintruX Network" + }, + { + "address": "0x41875C2332B0877cDFAA699B641402b7D4642c32", + "symbol": "FTXT", + "decimal": 8, + "name": "FUTURAX" + }, + { + "address": "0x65Be44C747988fBF606207698c944Df4442efE19", + "symbol": "FUCK", + "decimal": 4, + "name": "Finally Usable Crypto Karma" + }, + { + "address": "0xAb16E0d25c06CB376259cc18C1de4ACA57605589", + "symbol": "FUCK (FinallyUsableCryptoKarma)", + "decimal": 4, + "name": "FinallyUsableCryptoKarma" + }, + { + "address": "0xEA38eAa3C86c8F9B751533Ba2E562deb9acDED40", + "symbol": "FUEL", + "decimal": 18, + "name": "Etherparty FUEL" + }, + { + "address": "0x419D0d8BdD9aF5e606Ae2232ed285Aff190E711b", + "symbol": "FUN", + "decimal": 8, + "name": "Funfair" + }, + { + "address": "0xc92D6E3E64302C59d734f3292E2A13A13D7E1817", + "symbol": "FXC", + "decimal": 8, + "name": "FUTURAX" + }, + { + "address": "0x4a57E687b9126435a9B19E4A802113e266AdeBde", + "symbol": "FXC (Flexacoin)", + "decimal": 18, + "name": "Flexacoin" + }, + { + "address": "0x1829aA045E21E0D59580024A951DB48096e01782", + "symbol": "FXT", + "decimal": 18, + "name": "FuzeX" + }, + { + "address": "0x88FCFBc22C6d3dBaa25aF478C578978339BDe77a", + "symbol": "FYN", + "decimal": 18, + "name": "Fund Yourself Now" + }, + { + "address": "0x8F0921f30555624143d427b340b1156914882C10", + "symbol": "FYP", + "decimal": 18, + "name": "FlypMe" + }, + { + "address": "0xE5aeE163513119F4F750376C718766B40fA37A5F", + "symbol": "Fzcoin", + "decimal": 18, + "name": "Frozencoin Network" + }, + { + "address": "0xF67451Dc8421F0e0afEB52faa8101034ed081Ed9", + "symbol": "GAM", + "decimal": 8, + "name": "Gambit" + }, + { + "address": "0x6754e21b9EAa053c62d7854dD6561ae451B0cBCf", + "symbol": "GANA", + "decimal": 18, + "name": "GANA" + }, + { + "address": "0xc0EA6306F6360FE7dCAB65D16Bf1a3AF92C79Aa2", + "symbol": "GANA (1)", + "decimal": 18, + "name": "GANA" + }, + { + "address": "0x687174f8C49ceb7729D925C3A961507ea4Ac7b28", + "symbol": "GAT", + "decimal": 18, + "name": "Global Awards Token" + }, + { + "address": "0x708876f486e448Ee89eB332bFbC8E593553058b9", + "symbol": "GAVEL", + "decimal": 18, + "name": "GAVEL" + }, + { + "address": "0x7585F835ae2d522722d2684323a0ba83401f32f5", + "symbol": "GBT", + "decimal": 18, + "name": "GBT" + }, + { + "address": "0x12fCd6463E66974cF7bBC24FFC4d40d6bE458283", + "symbol": "GBX", + "decimal": 18, + "name": "Globitex" + }, + { + "address": "0xdb0F69306FF8F949f258E83f6b87ee5D052d0b23", + "symbol": "GCP", + "decimal": 18, + "name": "Globcoin Crypto Platform" + }, + { + "address": "0xa4ec83c8907888d006A37debF755ee39766f38ae", + "symbol": "GCU", + "decimal": 18, + "name": "Global Currency Unit" + }, + { + "address": "0x44A67C8570a61A28bAfd0035042f2F0A73a64428", + "symbol": "GCX", + "decimal": 6, + "name": "GermanCoin" + }, + { + "address": "0x4F4f0Db4de903B88f2B1a2847971E231D54F8fd3", + "symbol": "GEE", + "decimal": 8, + "name": "Geens NPO" + }, + { + "address": "0x24083Bb30072643C3bB90B44B7285860a755e687", + "symbol": "GELD", + "decimal": 18, + "name": "GELD" + }, + { + "address": "0xc7BbA5b765581eFb2Cdd2679DB5Bea9eE79b201f", + "symbol": "GEM", + "decimal": 18, + "name": "Gems" + }, + { + "address": "0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf", + "symbol": "GEN", + "decimal": 18, + "name": "DAOstack" + }, + { + "address": "0x6DD4e4Aad29A40eDd6A409b9c1625186C9855b4D", + "symbol": "GENE", + "decimal": 8, + "name": "Parkgene" + }, + { + "address": "0x8a854288a5976036A725879164Ca3e91d30c6A1B", + "symbol": "GET", + "decimal": 18, + "name": "GET Protocol" + }, + { + "address": "0xFcD862985628b254061F7A918035B80340D045d3", + "symbol": "GIF", + "decimal": 18, + "name": "GIFcoin Token" + }, + { + "address": "0xaE4f56F072c34C0a65B3ae3E4DB797D831439D93", + "symbol": "GIM", + "decimal": 8, + "name": "Gimli" + }, + { + "address": "0x71D01dB8d6a2fBEa7f8d434599C237980C234e4C", + "symbol": "GLA", + "decimal": 8, + "name": "Gladius" + }, + { + "address": "0xb3Bd49E28f8F832b8d1E246106991e546c323502", + "symbol": "GMT", + "decimal": 18, + "name": "GMT" + }, + { + "address": "0x6810e776880C02933D47DB1b9fc05908e5386b96", + "symbol": "GNO", + "decimal": 18, + "name": "Gnosis" + }, + { + "address": "0xa74476443119A942dE498590Fe1f2454d7D4aC0d", + "symbol": "GNT", + "decimal": 18, + "name": "Golem" + }, + { + "address": "0x6EC8a24CaBdc339A06a172F8223ea557055aDAa5", + "symbol": "GNX", + "decimal": 9, + "name": "Genaro Network" + }, + { + "address": "0x247551F2EB3362E222c742E9c788B8957D9BC87e", + "symbol": "GNY", + "decimal": 18, + "name": "GNY" + }, + { + "address": "0xeAb43193CF0623073Ca89DB9B712796356FA7414", + "symbol": "GOLDX", + "decimal": 18, + "name": "GOLDX" + }, + { + "address": "0x423b5F62b328D0D6D44870F4Eee316befA0b2dF5", + "symbol": "GOT", + "decimal": 18, + "name": "GoNetwork" + }, + { + "address": "0x12B19D3e2ccc14Da04FAe33e63652ce469b3F2FD", + "symbol": "GRID", + "decimal": 12, + "name": "Grid+" + }, + { + "address": "0xb444208cB0516C150178fCf9a52604BC04A1aCEa", + "symbol": "GRMD", + "decimal": 18, + "name": "GreenMed" + }, + { + "address": "0xC17195bde49D70CefCF8A9F2ee1759FFC27BF0B1", + "symbol": "GROO", + "decimal": 18, + "name": "Groocoin" + }, + { + "address": "0x0a9A9ce600D08BF9b76F49FA4e7b38A67EBEB1E6", + "symbol": "GROW", + "decimal": 8, + "name": "Growchain" + }, + { + "address": "0x228ba514309FFDF03A81a205a6D040E429d6E80C", + "symbol": "GSC", + "decimal": 18, + "name": "Global Social Chain" + }, + { + "address": "0xe530441f4f73bDB6DC2fA5aF7c3fC5fD551Ec838", + "symbol": "GSE", + "decimal": 4, + "name": "GSENetwork" + }, + { + "address": "0xB70835D7822eBB9426B56543E391846C107bd32C", + "symbol": "GTC", + "decimal": 18, + "name": "GTC Token" + }, + { + "address": "0x025abAD9e518516fdaAFBDcdB9701b37fb7eF0FA", + "symbol": "GTKT", + "decimal": 0, + "name": "GTKT" + }, + { + "address": "0xC5bBaE50781Be1669306b9e001EFF57a2957b09d", + "symbol": "GTO", + "decimal": 5, + "name": "Gifto" + }, + { + "address": "0xBDCFbf5C4D91Abc0bC9709C7286d00063c0e6F22", + "symbol": "GUESS", + "decimal": 2, + "name": "Peerguess" + }, + { + "address": "0x9847345de8b614c956146bbea549336d9C8d26b6", + "symbol": "GULD", + "decimal": 8, + "name": "GULD ERC20" + }, + { + "address": "0xf7B098298f7C69Fc14610bf71d5e02c60792894C", + "symbol": "GUP", + "decimal": 3, + "name": "Matchpool" + }, + { + "address": "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd", + "symbol": "GUSD", + "decimal": 2, + "name": "Gemini dollar" + }, + { + "address": "0x103c3A209da59d3E7C4A89307e66521e081CFDF0", + "symbol": "GVT", + "decimal": 18, + "name": "Genesis Vision" + }, + { + "address": "0x58ca3065C0F24C7c96Aee8d6056b5B5deCf9c2f8", + "symbol": "GXC", + "decimal": 10, + "name": "GXC" + }, + { + "address": "0x22F0AF8D78851b72EE799e05F54A77001586B18A", + "symbol": "GXVC", + "decimal": 10, + "name": "Genevieve VC" + }, + { + "address": "0x9DAe8b7F6D37ea8e5d32C6c3E856a6d8a1d3B363", + "symbol": "GZB", + "decimal": 18, + "name": "GigziBlack" + }, + { + "address": "0x8C65e992297d5f092A756dEf24F4781a280198Ff", + "symbol": "GZE", + "decimal": 18, + "name": "GazeCoin" + }, + { + "address": "0xE638dc39b6aDBEE8526b5C22380b4b45dAf46d8e", + "symbol": "GZR", + "decimal": 6, + "name": "Gizer" + }, + { + "address": "0x93a7174dafd31d13400cD9fa01f4e5B5BAa00D39", + "symbol": "HAK", + "decimal": 18, + "name": "Shaka" + }, + { + "address": "0x48C1B2f3eFA85fbafb2ab951bF4Ba860a08cdBB7", + "symbol": "HAND", + "decimal": 0, + "name": "ShowHand" + }, + { + "address": "0x5A567e28dbFa2bBD3ef13C0a01be114745349657", + "symbol": "HAPPY", + "decimal": 2, + "name": "Happiness" + }, + { + "address": "0x9002D4485b7594e3E850F0a206713B305113f69e", + "symbol": "HAT", + "decimal": 18, + "name": "Hawala Today" + }, + { + "address": "0xE2492F8D2A2618d8709Ca99b1d8d75713Bd84089", + "symbol": "HB", + "decimal": 18, + "name": "HeartBout" + }, + { + "address": "0xDd6C68bb32462e01705011a4e2Ad1a60740f217F", + "symbol": "HBT", + "decimal": 15, + "name": "Hubii Network" + }, + { + "address": "0xE34e1944E776f39B9252790a0527eBDa647aE668", + "symbol": "HBZ", + "decimal": 18, + "name": "HBZ coin" + }, + { + "address": "0xfFe8196bc259E8dEDc544d935786Aa4709eC3E64", + "symbol": "HDG", + "decimal": 18, + "name": "Hedge Crypto" + }, + { + "address": "0x95C4be8534d69C248C0623c4C9a7A2a001c17337", + "symbol": "HDL", + "decimal": 18, + "name": "HOLDER.TECH" + }, + { + "address": "0xE9fF07809CCff05daE74990e25831d0Bc5cbe575", + "symbol": "Hdp", + "decimal": 18, + "name": "HEdpAY" + }, + { + "address": "0x84543F868eC1b1FAC510d49d13C069f64cD2d5f9", + "symbol": "Hdp.ф", + "decimal": 18, + "name": "HEdpAY" + }, + { + "address": "0x491C9A23DB85623EEd455a8EfDd6AbA9b911C5dF", + "symbol": "HER", + "decimal": 18, + "name": "HeroNode" + }, + { + "address": "0xe9C9e7E1DaBea830C958C39D6b25964a6F52143A", + "symbol": "HEY", + "decimal": 18, + "name": "HeyToken" + }, + { + "address": "0xba2184520A1cC49a6159c57e61E1844E085615B6", + "symbol": "HGT", + "decimal": 8, + "name": "HelloGold" + }, + { + "address": "0x9bb1Db1445b83213a56d90d331894b3f26218e4e", + "symbol": "HIBT", + "decimal": 18, + "name": "HiBTC Token" + }, + { + "address": "0xa9240fBCAC1F0b9A6aDfB04a53c8E3B0cC1D1444", + "symbol": "HIG", + "decimal": 18, + "name": "ethereumhigh" + }, + { + "address": "0x14F37B574242D366558dB61f3335289a5035c506", + "symbol": "HKG", + "decimal": 3, + "name": "HKG" + }, + { + "address": "0x9e6B2B11542f2BC52f3029077acE37E8fD838D7F", + "symbol": "HKN", + "decimal": 8, + "name": "Hacken" + }, + { + "address": "0x88aC94D5d175130347Fc95E109d77AC09dbF5ab7", + "symbol": "HKY", + "decimal": 18, + "name": "Hicky" + }, + { + "address": "0x66eb65D7Ab8e9567ba0fa6E37c305956c5341574", + "symbol": "HLX", + "decimal": 5, + "name": "Helex" + }, + { + "address": "0xAa0bb10CEc1fa372eb3Abc17C933FC6ba863DD9E", + "symbol": "HMC", + "decimal": 18, + "name": "Hms Token" + }, + { + "address": "0xcbCC0F036ED4788F63FC0fEE32873d6A7487b908", + "symbol": "HMQ", + "decimal": 8, + "name": "Humaniq" + }, + { + "address": "0x9C9Fe3bD60b22A9735908B9589011E78F2025C11", + "symbol": "HNST", + "decimal": 18, + "name": "Honest" + }, + { + "address": "0xb45d7Bc4cEBcAB98aD09BABDF8C818B2292B672c", + "symbol": "HODL", + "decimal": 18, + "name": "HODLCoin" + }, + { + "address": "0x5B0751713b2527d7f002c0c4e2a37e1219610A6B", + "symbol": "HORSE", + "decimal": 18, + "name": "Ethorse" + }, + { + "address": "0x6c6EE5e31d828De241282B9606C8e98Ea48526E2", + "symbol": "HOT (Holo)", + "decimal": 18, + "name": "Holo Token" + }, + { + "address": "0x9AF839687F6C94542ac5ece2e317dAAE355493A1", + "symbol": "HOT (Hydro)", + "decimal": 18, + "name": "Hydro Protocol" + }, + { + "address": "0x38c6A68304cdEfb9BEc48BbFaABA5C5B47818bb2", + "symbol": "HPB", + "decimal": 18, + "name": "HPBCoin" + }, + { + "address": "0x554C20B7c486beeE439277b4540A434566dC4C02", + "symbol": "HST", + "decimal": 18, + "name": "Decision Token" + }, + { + "address": "0x6f259637dcD74C767781E37Bc6133cd6A68aa161", + "symbol": "HT", + "decimal": 18, + "name": "Huobi Token" + }, + { + "address": "0x141ABB03F001dEDED9A0223d4ff26d929117B72e", + "symbol": "HV", + "decimal": 18, + "name": "HighVibe" + }, + { + "address": "0xC0Eb85285d83217CD7c891702bcbC0FC401E2D9D", + "symbol": "HVN", + "decimal": 8, + "name": "Hiveterminal Token" + }, + { + "address": "0xEBBdf302c940c6bfd49C6b165f457fdb324649bc", + "symbol": "HYDRO", + "decimal": 18, + "name": "Hydro" + }, + { + "address": "0xC1E2097d788d33701BA3Cc2773BF67155ec93FC4", + "symbol": "IAD", + "decimal": 18, + "name": "IADOWR Coin" + }, + { + "address": "0x3c20d67b6B1aE0985F913aBb7397babc2fBb1A1F", + "symbol": "ICD", + "decimal": 18, + "name": "ICEDIUM" + }, + { + "address": "0x5a84969bb663fb64F6d015DcF9F622Aedc796750", + "symbol": "ICE", + "decimal": 18, + "name": "ICE" + }, + { + "address": "0x888666CA69E0f178DED6D75b5726Cee99A87D698", + "symbol": "ICN", + "decimal": 18, + "name": "ICONOMI" + }, + { + "address": "0xa33e729bf4fdeb868B534e1f20523463D9C46bEe", + "symbol": "ICO", + "decimal": 10, + "name": "ICO" + }, + { + "address": "0x014B50466590340D41307Cc54DCee990c8D58aa8", + "symbol": "ICOS", + "decimal": 6, + "name": "ICOS" + }, + { + "address": "0xb5A5F22694352C15B00323844aD545ABb2B11028", + "symbol": "ICX", + "decimal": 18, + "name": "ICON" + }, + { + "address": "0x814CAfd4782d2e728170FDA68257983F03321c58", + "symbol": "IDEA", + "decimal": 0, + "name": "IDEA Token" + }, + { + "address": "0x5136C98A80811C3f46bDda8B5c4555CFd9f812F0", + "symbol": "IDH", + "decimal": 6, + "name": "indaHash" + }, + { + "address": "0xCc13Fc627EFfd6E35D2D2706Ea3C4D7396c610ea", + "symbol": "IDXM", + "decimal": 8, + "name": "IDEX Membership" + }, + { + "address": "0x859a9C0b44cb7066D956a958B0b82e54C9e44b4B", + "symbol": "IETH", + "decimal": 8, + "name": "iEthereum" + }, + { + "address": "0x7654915A1b82D6D2D0AFc37c52Af556eA8983c7E", + "symbol": "IFT", + "decimal": 18, + "name": "InvestFeed" + }, + { + "address": "0x8a88f04e0c905054D2F33b26BB3A46D7091A039A", + "symbol": "IG", + "decimal": 18, + "name": "IGToken" + }, + { + "address": "0xEda8B016efA8b1161208Cf041cD86972eeE0F31E", + "symbol": "IHT", + "decimal": 18, + "name": "I HOUSE TOKEN" + }, + { + "address": "0x16662F73dF3e79e54c6c5938b4313f92C524C120", + "symbol": "IIC", + "decimal": 18, + "name": "IIC" + }, + { + "address": "0x88AE96845e157558ef59e9Ff90E766E22E480390", + "symbol": "IKB", + "decimal": 0, + "name": "IKB" + }, + { + "address": "0xe3831c5A982B279A198456D577cfb90424cb6340", + "symbol": "IMC", + "decimal": 6, + "name": "Immune Coin" + }, + { + "address": "0x13119E34E140097a507B07a5564bDe1bC375D9e6", + "symbol": "IMT", + "decimal": 18, + "name": "Moneytoken" + }, + { + "address": "0x22E5F62D0FA19974749faa194e3d3eF6d89c08d7", + "symbol": "IMT (IMT)", + "decimal": 0, + "name": "IMT" + }, + { + "address": "0xf8e386EDa857484f5a12e4B5DAa9984E06E73705", + "symbol": "IND", + "decimal": 18, + "name": "Indorse" + }, + { + "address": "0x24dDFf6D8B8a42d835af3b440De91f3386554Aa4", + "symbol": "ING", + "decimal": 18, + "name": "Iungo" + }, + { + "address": "0x48e5413b73add2434e47504E2a22d14940dBFe78", + "symbol": "INRM", + "decimal": 3, + "name": "Integrated Money" + }, + { + "address": "0x5B2e4a700dfBc560061e957edec8F6EeEb74a320", + "symbol": "INS", + "decimal": 10, + "name": "Insolar" + }, + { + "address": "0xc72fe8e3Dd5BeF0F9f31f259399F301272eF2a2D", + "symbol": "INSTAR", + "decimal": 18, + "name": "Insights Network" + }, + { + "address": "0x0b76544F6C413a555F309Bf76260d1E02377c02A", + "symbol": "INT", + "decimal": 6, + "name": "Internet Node Token" + }, + { + "address": "0xEcE83617Db208Ad255Ad4f45Daf81E25137535bb", + "symbol": "INV", + "decimal": 8, + "name": "Invacio" + }, + { + "address": "0xa8006C4ca56F24d6836727D106349320dB7fEF82", + "symbol": "INXT", + "decimal": 8, + "name": "Internxt" + }, + { + "address": "0xFA1a856Cfa3409CFa145Fa4e20Eb270dF3EB21ab", + "symbol": "IOST", + "decimal": 18, + "name": "IOSToken" + }, + { + "address": "0xC34B21f6F8e51cC965c2393B3ccFa3b82BEb2403", + "symbol": "IoT", + "decimal": 6, + "name": "IoTコイン" + }, + { + "address": "0x6fB3e0A217407EFFf7Ca062D46c26E5d60a14d69", + "symbol": "IOTX", + "decimal": 18, + "name": "IoTeX Network" + }, + { + "address": "0x64CdF819d3E75Ac8eC217B3496d7cE167Be42e80", + "symbol": "IPL", + "decimal": 18, + "name": "InsurePal token" + }, + { + "address": "0x001F0aA5dA15585e5b2305DbaB2bac425ea71007", + "symbol": "IPSX", + "decimal": 18, + "name": "IP Exchange" + }, + { + "address": "0x0DB8D8b76BC361bAcbB72E2C491E06085A97Ab31", + "symbol": "IQN", + "decimal": 18, + "name": "IQeon" + }, + { + "address": "0x0cF713b11C9b986EC40D65bD4F7fbd50F6ff2d64", + "symbol": "IST34", + "decimal": 18, + "name": "IST34 Token" + }, + { + "address": "0x5E6b6d9aBAd9093fdc861Ea1600eBa1b355Cd940", + "symbol": "ITC", + "decimal": 18, + "name": "IoT Chain" + }, + { + "address": "0x0aeF06DcCCC531e581f0440059E6FfCC206039EE", + "symbol": "ITT", + "decimal": 8, + "name": "ITT Token" + }, + { + "address": "0xA4eA687A2A7F29cF2dc66B39c68e4411C0D00C49", + "symbol": "IVY", + "decimal": 18, + "name": "IvyKoin Public Network Tokens" + }, + { + "address": "0xfcA47962D45ADFdfd1Ab2D972315dB4ce7CCf094", + "symbol": "IXT", + "decimal": 8, + "name": "InsureX" + }, + { + "address": "0x0D262e5dC4A06a0F1c90cE79C7a60C09DfC884E4", + "symbol": "J8T", + "decimal": 8, + "name": "J8T Token" + }, + { + "address": "0x884e3902C4d5cFA86de4aCE7A96AA91EbC25C0Ff", + "symbol": "JBX", + "decimal": 18, + "name": "JBOX" + }, + { + "address": "0x0Aaf561eFF5BD9c8F911616933F84166A17cfE0C", + "symbol": "JBX (JBX)", + "decimal": 0, + "name": "JBX" + }, + { + "address": "0xE2D82Dc7dA0E6f882E96846451F4faBcc8f90528", + "symbol": "JC", + "decimal": 18, + "name": "Jesus Coin" + }, + { + "address": "0x8727c112C712c4a03371AC87a74dD6aB104Af768", + "symbol": "JET", + "decimal": 18, + "name": "JET" + }, + { + "address": "0x773450335eD4ec3DB45aF74f34F2c85348645D39", + "symbol": "JetCoins", + "decimal": 18, + "name": "JetCoins" + }, + { + "address": "0xa5Fd1A791C4dfcaacC963D4F73c6Ae5824149eA7", + "symbol": "JNT", + "decimal": 18, + "name": "Jibrel Network" + }, + { + "address": "0x17280DA053596E097604839C61A2eF5efb7d493f", + "symbol": "JOB", + "decimal": 8, + "name": "JOBCHAIN" + }, + { + "address": "0xdb455c71C1bC2de4e80cA451184041Ef32054001", + "symbol": "JOT", + "decimal": 18, + "name": "Jury.Online Token" + }, + { + "address": "0xDDe12a12A6f67156e0DA672be05c374e1B0a3e57", + "symbol": "JOY", + "decimal": 6, + "name": "JOYSO" + }, + { + "address": "0x1410434b0346f5bE678d0FB554E5c7ab620f8f4a", + "symbol": "KAN", + "decimal": 18, + "name": "BitKan" + }, + { + "address": "0x0D6DD9f68d24EC1d5fE2174f3EC8DAB52B52BaF5", + "symbol": "KC", + "decimal": 18, + "name": "KMCC" + }, + { + "address": "0x039B5649A59967e3e936D7471f9c3700100Ee1ab", + "symbol": "KCS", + "decimal": 6, + "name": "KuCoin" + }, + { + "address": "0x72D32ac1c5E66BfC5b08806271f8eEF915545164", + "symbol": "KEE", + "decimal": 0, + "name": "CryptoKEE" + }, + { + "address": "0x4CC19356f2D37338b9802aa8E8fc58B0373296E7", + "symbol": "KEY", + "decimal": 18, + "name": "SelfKey" + }, + { + "address": "0x4Cd988AfBad37289BAAf53C13e98E2BD46aAEa8c", + "symbol": "KEY (BihuKey)", + "decimal": 18, + "name": "BihuKey" + }, + { + "address": "0x27695E09149AdC738A978e9A678F99E4c39e9eb9", + "symbol": "KICK", + "decimal": 8, + "name": "KICK" + }, + { + "address": "0x818Fc6C2Ec5986bc6E2CBf00939d90556aB12ce5", + "symbol": "KIN", + "decimal": 18, + "name": "Kin Foundation" + }, + { + "address": "0x4618519de4C304F3444ffa7f812dddC2971cc688", + "symbol": "KIND", + "decimal": 8, + "name": "Kind Ads Token" + }, + { + "address": "0x2BDD6c9bf1bf396a37501AAE53751B9946B503Da", + "symbol": "KMTBA", + "decimal": 18, + "name": "Korea Medical TBA" + }, + { + "address": "0xdd974D5C2e2928deA5F71b9825b8b646686BD200", + "symbol": "KNC", + "decimal": 18, + "name": "Kyber Network" + }, + { + "address": "0x8E5610ab5E39d26828167640EA29823fe1dD5843", + "symbol": "KNDC", + "decimal": 8, + "name": "KanadeCoin" + }, + { + "address": "0xfF5c25D2F40B47C4a37f989DE933E26562Ef0Ac0", + "symbol": "KNT", + "decimal": 16, + "name": "Kora Network Token" + }, + { + "address": "0xb5C33F965C8899D255c34CDD2A3efA8AbCbB3DeA", + "symbol": "KPR", + "decimal": 18, + "name": "KPRCoin" + }, + { + "address": "0x464eBE77c293E473B48cFe96dDCf88fcF7bFDAC0", + "symbol": "KRL", + "decimal": 18, + "name": "Kryll" + }, + { + "address": "0xbD4AB8b9C26c4888e2792cAC6d5793Efea9eBb20", + "symbol": "KRTY", + "decimal": 18, + "name": "KARTIY" + }, + { + "address": "0xdf1338FbAfe7aF1789151627B886781ba556eF9a", + "symbol": "KUE", + "decimal": 18, + "name": "Kuende Token" + }, + { + "address": "0x241bA672574A78a3A604CDd0a94429A73a84a324", + "symbol": "KWATT", + "decimal": 18, + "name": "4NEW" + }, + { + "address": "0x9541FD8B9b5FA97381783783CeBF2F5fA793C262", + "symbol": "KZN", + "decimal": 8, + "name": "KaizenCoin" + }, + { + "address": "0xE50365f5D679CB98a1dd62D6F6e58e59321BcdDf", + "symbol": "LA", + "decimal": 18, + "name": "LATOKEN" + }, + { + "address": "0xfD107B473AB90e8Fbd89872144a3DC92C40Fa8C9", + "symbol": "LALA", + "decimal": 18, + "name": "LALA World Token" + }, + { + "address": "0x2f85E502a988AF76f7ee6D83b7db8d6c0A823bf9", + "symbol": "LATX", + "decimal": 8, + "name": "LatiumX" + }, + { + "address": "0xfe5F141Bf94fE84bC28deD0AB966c16B17490657", + "symbol": "LBA", + "decimal": 18, + "name": "Cred" + }, + { + "address": "0xAA19961b6B858D9F18a115f25aa1D98ABc1fdBA8", + "symbol": "LCS", + "decimal": 18, + "name": "LocalCoinSwap" + }, + { + "address": "0x4A37A91eec4C97F9090CE66d21D3B3Aadf1aE5aD", + "symbol": "LCT", + "decimal": 18, + "name": "LiquorChain Token" + }, + { + "address": "0x05C7065d644096a4E4C3FE24AF86e36dE021074b", + "symbol": "LCT (LendConnect)", + "decimal": 18, + "name": "LendConnect" + }, + { + "address": "0x5102791cA02FC3595398400BFE0e33d7B6C82267", + "symbol": "LDC", + "decimal": 18, + "name": "LEADCOIN" + }, + { + "address": "0x9eFa0e2387E4CBA02a6E4E6594b8f4Dd209a0b93", + "symbol": "LDX", + "decimal": 0, + "name": "LondonCoin" + }, + { + "address": "0x5b26C5D0772E5bbaC8b3182AE9a13f9BB2D03765", + "symbol": "LEDU", + "decimal": 8, + "name": "Education Ecosystem" + }, + { + "address": "0x60C24407d01782C2175D32fe7C8921ed732371D1", + "symbol": "LEMO", + "decimal": 18, + "name": "Lemo" + }, + { + "address": "0xB5AE848EdB296C21259b7467331467d2647eEcDf", + "symbol": "LEMO (1)", + "decimal": 18, + "name": "Lemo" + }, + { + "address": "0xd6e354F07319e2474491D8c7c712137bEe6862a2", + "symbol": "LEMO (2)", + "decimal": 0, + "name": "Lemo" + }, + { + "address": "0x80fB784B7eD66730e8b1DBd9820aFD29931aab03", + "symbol": "LEND", + "decimal": 18, + "name": "EHTLend" + }, + { + "address": "0xf97b5d65Da6b0468b90D531ddae2a69843e6797d", + "symbol": "LEO", + "decimal": 18, + "name": "LEOcoin" + }, + { + "address": "0x0F4CA92660Efad97a9a70CB0fe969c755439772C", + "symbol": "LEV", + "decimal": 9, + "name": "Leverj" + }, + { + "address": "0xc798cd1c49db0E297312E4c682752668CE1dB2AD", + "symbol": "LFR", + "decimal": 5, + "name": "LifeRun Coin" + }, + { + "address": "0xc520F3Ac303a107D8F4B08b326B6ea66A4f961cd", + "symbol": "LG", + "decimal": 18, + "name": "LG" + }, + { + "address": "0x123aB195DD38B1b40510d467a6a359b201af056f", + "symbol": "LGO", + "decimal": 8, + "name": "LGO Exchange" + }, + { + "address": "0x2eb86e8fC520E0F6Bb5D9Af08F924fe70558Ab89", + "symbol": "LGR", + "decimal": 8, + "name": "Logarithm" + }, + { + "address": "0xE6DfBF1FAcA95036B8E76e1Fb28933D025B76Cc0", + "symbol": "LIBER", + "decimal": 18, + "name": "Libereum" + }, + { + "address": "0xEB9951021698B42e4399f9cBb6267Aa35F82D59D", + "symbol": "LIF", + "decimal": 18, + "name": "Winding Tree" + }, + { + "address": "0xfF18DBc487b4c2E3222d115952bABfDa8BA52F5F", + "symbol": "LIFE", + "decimal": 18, + "name": "LIFE" + }, + { + "address": "0x02F61Fd266DA6E8B102D4121f5CE7b992640CF98", + "symbol": "LIKE", + "decimal": 18, + "name": "LikeCoin" + }, + { + "address": "0x514910771AF9Ca656af840dff83E8264EcF986CA", + "symbol": "LINK (Chainlink)", + "decimal": 18, + "name": "LINK Chainlink" + }, + { + "address": "0xE2E6D4BE086c6938B53B22144855eef674281639", + "symbol": "LINK Platform", + "decimal": 18, + "name": "Link Platform" + }, + { + "address": "0x24A77c1F17C547105E14813e517be06b0040aa76", + "symbol": "LIVE", + "decimal": 18, + "name": "LIVE Token" + }, + { + "address": "0x49bD2DA75b1F7AF1E4dFd6b1125FEcDe59dBec58", + "symbol": "LKY", + "decimal": 18, + "name": "Linkey" + }, + { + "address": "0x25B6325f5BB1c1E03cfbC3e53F470E1F1ca022E3", + "symbol": "LML", + "decimal": 18, + "name": "Lisk Machine Learning" + }, + { + "address": "0x63e634330A20150DbB61B15648bC73855d6CCF07", + "symbol": "LNC", + "decimal": 18, + "name": "Lancer Token" + }, + { + "address": "0x6BEB418Fc6E1958204aC8baddCf109B8E9694966", + "symbol": "LNC (Linker Coin)", + "decimal": 18, + "name": "Linker Coin" + }, + { + "address": "0x0947b0e6D821378805c9598291385CE7c791A6B2", + "symbol": "LND", + "decimal": 18, + "name": "Lendingblock" + }, + { + "address": "0x5e3346444010135322268a4630d2ED5F8D09446c", + "symbol": "LOC", + "decimal": 18, + "name": "LockChain" + }, + { + "address": "0x9c23D67AEA7B95D80942e3836BCDF7E708A747C2", + "symbol": "LOCI", + "decimal": 18, + "name": "LOCIcoin" + }, + { + "address": "0xC64500DD7B0f1794807e67802F8Abbf5F8Ffb054", + "symbol": "LOCUS", + "decimal": 18, + "name": "Locus Chain" + }, + { + "address": "0x21aE23B882A340A22282162086bC98D3E2B73018", + "symbol": "LOK", + "decimal": 18, + "name": "LOK" + }, + { + "address": "0x253C7dd074f4BaCb305387F922225A4f737C08bd", + "symbol": "LOOK", + "decimal": 18, + "name": "LookRev" + }, + { + "address": "0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0", + "symbol": "LOOM", + "decimal": 18, + "name": "Loom Network" + }, + { + "address": "0x58b6A8A3302369DAEc383334672404Ee733aB239", + "symbol": "LPT", + "decimal": 18, + "name": "Livepeer Token" + }, + { + "address": "0xEF68e7C694F40c8202821eDF525dE3782458639f", + "symbol": "LRC", + "decimal": 18, + "name": "Loopring" + }, + { + "address": "0x5dbe296F97B23C4A6AA6183D73e574D02bA5c719", + "symbol": "LUC", + "decimal": 18, + "name": "LUCToken" + }, + { + "address": "0xFB12e3CcA983B9f59D90912Fd17F8D745A8B2953", + "symbol": "LUCK", + "decimal": 0, + "name": "LUCK" + }, + { + "address": "0xA89b5934863447f6E4Fc53B315a93e873bdA69a3", + "symbol": "LUM", + "decimal": 18, + "name": "Lumino Coin" + }, + { + "address": "0xfa05A73FfE78ef8f1a739473e462c54bae6567D9", + "symbol": "LUN", + "decimal": 18, + "name": "Lunyr" + }, + { + "address": "0x57aD67aCf9bF015E4820Fbd66EA1A21BED8852eC", + "symbol": "LYM", + "decimal": 18, + "name": "Lympo" + }, + { + "address": "0xc690F7C7FcfFA6a82b79faB7508c466FEfdfc8c5", + "symbol": "LYM (1)", + "decimal": 18, + "name": "Lympo" + }, + { + "address": "0xdD41fBd1Ae95C5D9B198174A28e04Be6b3d1aa27", + "symbol": "LYS", + "decimal": 8, + "name": "Lightyears" + }, + { + "address": "0x3f4B726668da46f5e0E75aA5D478ACEc9f38210F", + "symbol": "M-ETH", + "decimal": 18, + "name": "M-ETH" + }, + { + "address": "0x5B09A0371C1DA44A8E24D36Bf5DEb1141a84d875", + "symbol": "MAD", + "decimal": 18, + "name": "MAD" + }, + { + "address": "0xe25bCec5D3801cE3a794079BF94adF1B8cCD802D", + "symbol": "MAN", + "decimal": 18, + "name": "Matrix AI Network" + }, + { + "address": "0x0F5D2fB29fb7d3CFeE444a200298f468908cC942", + "symbol": "MANA", + "decimal": 18, + "name": "Decentraland MANA" + }, + { + "address": "0xfdcc07Ab60660de533b5Ad26e1457b565a9D59Bd", + "symbol": "MART", + "decimal": 18, + "name": "Martcoin" + }, + { + "address": "0x23Ccc43365D9dD3882eab88F43d515208f832430", + "symbol": "MAS", + "decimal": 18, + "name": "MIDAS PROTOCOL" + }, + { + "address": "0xEfbB3F1058fd8E0C9d7204f532E17d7572AFfc3e", + "symbol": "MBCASH", + "decimal": 18, + "name": "MBCash" + }, + { + "address": "0x386467F1f3ddbE832448650418311a479EECFC57", + "symbol": "MBRS", + "decimal": 0, + "name": "Embers" + }, + { + "address": "0x93E682107d1E9defB0b5ee701C71707a4B2E46Bc", + "symbol": "MCAP", + "decimal": 8, + "name": "MCAP" + }, + { + "address": "0x138A8752093F4f9a79AaeDF48d4B9248fab93c9C", + "symbol": "MCI", + "decimal": 18, + "name": "Musiconomi" + }, + { + "address": "0xB63B606Ac810a52cCa15e44bB630fd42D8d1d83d", + "symbol": "MCO", + "decimal": 8, + "name": "Crypto.com" + }, + { + "address": "0x51DB5Ad35C671a87207d88fC11d593AC0C8415bd", + "symbol": "MDA", + "decimal": 18, + "name": "Moeda Loyalty Points" + }, + { + "address": "0x66186008C1050627F979d464eABb258860563dbE", + "symbol": "MDS", + "decimal": 18, + "name": "MediShares" + }, + { + "address": "0x814e0908b12A99FeCf5BC101bB5d0b8B5cDf7d26", + "symbol": "MDT", + "decimal": 18, + "name": "Measurable Data Token" + }, + { + "address": "0xfd1e80508F243E64CE234eA88A5Fd2827c71D4b7", + "symbol": "MEDX", + "decimal": 8, + "name": "MediBloc [ERC20]" + }, + { + "address": "0x420167D87d35c3A249b32Ef6225872fBD9aB85D2", + "symbol": "MESG", + "decimal": 18, + "name": "MESG" + }, + { + "address": "0xF03045a4C8077e38f3B8e2Ed33b8aEE69edF869F", + "symbol": "MESH", + "decimal": 18, + "name": "BlockMesh" + }, + { + "address": "0x01F2AcF2914860331C1Cb1a9AcecDa7475e06Af8", + "symbol": "MESH (Meshbox)", + "decimal": 18, + "name": "Meshbox" + }, + { + "address": "0x5B8D43FfdE4a2982B9A5387cDF21D54Ead64Ac8d", + "symbol": "MEST", + "decimal": 18, + "name": "Monaco Estate" + }, + { + "address": "0xa3d58c4E56fedCae3a7c43A725aeE9A71F0ece4e", + "symbol": "MET", + "decimal": 18, + "name": "Metronome" + }, + { + "address": "0xFEF3884b603C33EF8eD4183346E093A173C94da6", + "symbol": "METM", + "decimal": 18, + "name": "MetaMorph" + }, + { + "address": "0x6710c63432A2De02954fc0f851db07146a6c0312", + "symbol": "MFG", + "decimal": 18, + "name": "SyncFab Smart Manufacturing Blockchain" + }, + { + "address": "0xDF2C7238198Ad8B389666574f2d8bc411A4b7428", + "symbol": "MFT", + "decimal": 18, + "name": "Mainframe Token" + }, + { + "address": "0x05D412CE18F24040bB3Fa45CF2C69e506586D8e8", + "symbol": "MFTU", + "decimal": 18, + "name": "Mainstream For The Underground" + }, + { + "address": "0x40395044Ac3c0C57051906dA938B54BD6557F212", + "symbol": "MGO", + "decimal": 8, + "name": "MobileGo" + }, + { + "address": "0x3A1237D38D0Fb94513f85D61679cAd7F38507242", + "symbol": "MIC", + "decimal": 18, + "name": "Mindexcoin" + }, + { + "address": "0xD717B75404022fb1C8582ADf1c66B9A553811754", + "symbol": "MILC", + "decimal": 18, + "name": "Micro Licensing Coin" + }, + { + "address": "0xe23cd160761f63FC3a1cF78Aa034b6cdF97d3E0C", + "symbol": "MIT", + "decimal": 18, + "name": "MIT" + }, + { + "address": "0xAd8DD4c725dE1D31b9E8F8D146089e9DC6882093", + "symbol": "MIT (Mychatcoin)", + "decimal": 6, + "name": "Mychatcoin" + }, + { + "address": "0x3893b9422Cd5D70a81eDeFfe3d5A1c6A978310BB", + "symbol": "MITH", + "decimal": 18, + "name": "Mithril" + }, + { + "address": "0x4a527d8fc13C5203AB24BA0944F4Cb14658D1Db6", + "symbol": "MITX", + "decimal": 18, + "name": "Morpheus Infrastructure Token" + }, + { + "address": "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2", + "symbol": "MKR", + "decimal": 18, + "name": "MakerDAO" + }, + { + "address": "0x7939882b54fcf0bCAe6b53dEc39Ad6e806176442", + "symbol": "MKT", + "decimal": 8, + "name": "Mikado" + }, + { + "address": "0xec67005c4E498Ec7f55E092bd1d35cbC47C91892", + "symbol": "MLN (new)", + "decimal": 18, + "name": "Melonport" + }, + { + "address": "0xBEB9eF514a379B997e0798FDcC901Ee474B6D9A1", + "symbol": "MLN (old)", + "decimal": 18, + "name": "Melonport" + }, + { + "address": "0x1a95B271B0535D15fa49932Daba31BA612b52946", + "symbol": "MNE", + "decimal": 8, + "name": "Minereum" + }, + { + "address": "0xA9877b1e05D035899131DBd1e403825166D09f92", + "symbol": "MNT", + "decimal": 18, + "name": "Media Network Token" + }, + { + "address": "0x83cee9e086A77e492eE0bB93C2B0437aD6fdECCc", + "symbol": "MNTP", + "decimal": 18, + "name": "Goldmint MNT Prelaunch Token" + }, + { + "address": "0x865ec58b06bF6305B886793AA20A2da31D034E68", + "symbol": "MOC", + "decimal": 18, + "name": "Moss Coin" + }, + { + "address": "0x957c30aB0426e0C93CD8241E2c60392d08c6aC8e", + "symbol": "MOD", + "decimal": 0, + "name": "Modum" + }, + { + "address": "0x59061b6f26BB4A9cE5828A19d35CFD5A4B80F056", + "symbol": "MORE", + "decimal": 8, + "name": "More Coin" + }, + { + "address": "0x501262281B2Ba043e2fbf14904980689CDDB0C78", + "symbol": "MORE (Mithril Ore)", + "decimal": 2, + "name": "Mithril Ore" + }, + { + "address": "0x263c618480DBe35C300D8d5EcDA19bbB986AcaeD", + "symbol": "MOT", + "decimal": 18, + "name": "Olympus Labs" + }, + { + "address": "0x44bf22949F9cc84b61B9328a9d885d1b5C806b41", + "symbol": "MOZO", + "decimal": 2, + "name": "Mozo Token" + }, + { + "address": "0xf453B5B9d4E0B5c62ffB256BB2378cc2BC8e8a89", + "symbol": "MRK", + "decimal": 8, + "name": "MARK.SPACE" + }, + { + "address": "0x82125AFe01819Dff1535D0D6276d57045291B6c0", + "symbol": "MRL", + "decimal": 18, + "name": "Marcelo" + }, + { + "address": "0x21f0F0fD3141Ee9E11B3d7f13a1028CD515f459c", + "symbol": "MRP", + "decimal": 18, + "name": "MoneyRebel Token" + }, + { + "address": "0xAB6CF87a50F17d7F5E1FEaf81B6fE9FfBe8EBF84", + "symbol": "MRV", + "decimal": 18, + "name": "MRV" + }, + { + "address": "0x68AA3F232dA9bdC2343465545794ef3eEa5209BD", + "symbol": "MSP", + "decimal": 18, + "name": "Mothership" + }, + { + "address": "0x905E337c6c8645263D3521205Aa37bf4d034e745", + "symbol": "MTC", + "decimal": 18, + "name": "Medical Token Currency" + }, + { + "address": "0xdfdc0D82d96F8fd40ca0CFB4A288955bECEc2088", + "symbol": "MTC (MTC Mesh Network)", + "decimal": 18, + "name": "MTC Mesh Network" + }, + { + "address": "0xaF4DcE16Da2877f8c9e00544c93B62Ac40631F16", + "symbol": "MTH", + "decimal": 5, + "name": "Monetha" + }, + { + "address": "0xF433089366899D83a9f26A773D59ec7eCF30355e", + "symbol": "MTL", + "decimal": 8, + "name": "Metal" + }, + { + "address": "0x41dBECc1cdC5517C6f76f6a6E836aDbEe2754DE3", + "symbol": "MTN", + "decimal": 18, + "name": "MedToken" + }, + { + "address": "0x7FC408011165760eE31bE2BF20dAf450356692Af", + "symbol": "MTR", + "decimal": 8, + "name": "Mitrav" + }, + { + "address": "0x1e49fF77c355A3e38D6651ce8404AF0E48c5395f", + "symbol": "MTRc", + "decimal": 18, + "name": "MTRCToken" + }, + { + "address": "0x0AF44e2784637218dD1D32A322D44e603A8f0c6A", + "symbol": "MTX", + "decimal": 18, + "name": "Matryx" + }, + { + "address": "0xA52383B665b91DCe42dD4b6d1E0Fb37d3EFFe489", + "symbol": "MUSD", + "decimal": 18, + "name": "MASTER USD" + }, + { + "address": "0x515669d308f887Fd83a471C7764F5d084886D34D", + "symbol": "MUXE", + "decimal": 18, + "name": "MUXE" + }, + { + "address": "0xA849EaaE994fb86Afa73382e9Bd88c2B6b18Dc71", + "symbol": "MVL", + "decimal": 18, + "name": "Mass Vehicle Ledger Token" + }, + { + "address": "0x8a77e40936BbC27e80E9a3F526368C967869c86D", + "symbol": "MVP", + "decimal": 18, + "name": "Merculet" + }, + { + "address": "0x6425c6BE902d692AE2db752B3c268AFAdb099D3b", + "symbol": "MWAT", + "decimal": 18, + "name": "RED MWAT" + }, + { + "address": "0xf7e983781609012307f2514f63D526D83D24F466", + "symbol": "MYD", + "decimal": 16, + "name": "MYD" + }, + { + "address": "0xa645264C5603E96c3b0B078cdab68733794B0A71", + "symbol": "MYST", + "decimal": 8, + "name": "Mysterium" + }, + { + "address": "0x8d80de8A78198396329dfA769aD54d24bF90E7aa", + "symbol": "NAC", + "decimal": 18, + "name": "Nami ICO" + }, + { + "address": "0xFFE02ee4C69eDf1b340fCaD64fbd6b37a7b9e265", + "symbol": "NANJ", + "decimal": 8, + "name": "NANJCOIN" + }, + { + "address": "0x5d65D971895Edc438f465c17DB6992698a52318D", + "symbol": "NAS", + "decimal": 18, + "name": "Nebula" + }, + { + "address": "0x588047365dF5BA589F923604AAC23d673555c623", + "symbol": "NAVI", + "decimal": 18, + "name": "NaviToken" + }, + { + "address": "0x17f8aFB63DfcDcC90ebE6e84F060Cc306A98257D", + "symbol": "NBAI", + "decimal": 18, + "name": "NebulaAiToken" + }, + { + "address": "0x9F195617fA8fbAD9540C5D113A99A0a0172aaEDC", + "symbol": "NBC", + "decimal": 18, + "name": "Niobium Coin" + }, + { + "address": "0x809826cceAb68c387726af962713b64Cb5Cb3CCA", + "symbol": "NCASH", + "decimal": 18, + "name": "Nucleus Vision" + }, + { + "address": "0x9344b383b1D59b5ce3468B234DAB43C7190ba735", + "symbol": "NCC", + "decimal": 18, + "name": "NeedsCoin" + }, + { + "address": "0x5d48F293BaED247A2D0189058bA37aa238bD4725", + "symbol": "NCC (NeuroChain)", + "decimal": 18, + "name": "NeuroChain" + }, + { + "address": "0x9E46A38F5DaaBe8683E10793b06749EEF7D733d1", + "symbol": "NCT", + "decimal": 18, + "name": "Nectar" + }, + { + "address": "0xA54ddC7B3CcE7FC8b1E3Fa0256D0DB80D2c10970", + "symbol": "NDC", + "decimal": 18, + "name": "Neverdie" + }, + { + "address": "0x1966d718A565566e8E202792658D7b5Ff4ECe469", + "symbol": "NDX", + "decimal": 18, + "name": "nDEX" + }, + { + "address": "0xCc80C051057B774cD75067Dc48f8987C4Eb97A5e", + "symbol": "NEC", + "decimal": 18, + "name": "Ethfinex Nectar Token" + }, + { + "address": "0xd8446236FA95b9b5f9fd0f8E7Df1a944823c683d", + "symbol": "NEEO", + "decimal": 18, + "name": "NEEO" + }, + { + "address": "0xcfb98637bcae43C13323EAa1731cED2B716962fD", + "symbol": "NET", + "decimal": 18, + "name": "NIMIQ" + }, + { + "address": "0xA823E6722006afe99E91c30FF5295052fe6b8E32", + "symbol": "NEU", + "decimal": 18, + "name": "NEU Fund" + }, + { + "address": "0x814964b1bceAf24e26296D031EaDf134a2Ca4105", + "symbol": "NEWB", + "decimal": 0, + "name": "Newbium" + }, + { + "address": "0xB62132e35a6c13ee1EE0f84dC5d40bad8d815206", + "symbol": "NEXO", + "decimal": 18, + "name": "Nexo" + }, + { + "address": "0x72dD4b6bd852A3AA172Be4d6C5a6dbEc588cf131", + "symbol": "NGC", + "decimal": 18, + "name": "NAGA Coin" + }, + { + "address": "0xe26517A9967299453d3F1B48Aa005E6127e67210", + "symbol": "NIMFA", + "decimal": 18, + "name": "Ninfa Money" + }, + { + "address": "0x5554e04e76533E1d14c52f05beEF6c9d329E1E30", + "symbol": "NIO", + "decimal": 0, + "name": "Autonio" + }, + { + "address": "0xCeE4019Fd41ECDc8bae9EFDd20510f4b6FAA6197", + "symbol": "NLYA", + "decimal": 18, + "name": "Nollya Coin" + }, + { + "address": "0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671", + "symbol": "NMR", + "decimal": 18, + "name": "Numerai" + }, + { + "address": "0x58a4884182d9E835597f405e5F258290E46ae7C2", + "symbol": "NOAH", + "decimal": 18, + "name": "Noah Coin" + }, + { + "address": "0xF4FaEa455575354d2699BC209B0a65CA99F69982", + "symbol": "NOBS", + "decimal": 18, + "name": "No BS Crypto" + }, + { + "address": "0x643B6870beabee941B9260a0A878bcF4A61Fb0f1", + "symbol": "NONE", + "decimal": 0, + "name": "None" + }, + { + "address": "0xeC46f8207D766012454c408De210BCBc2243E71c", + "symbol": "NOX", + "decimal": 18, + "name": "Nitro" + }, + { + "address": "0x4cE6B362Bc77A24966Dda9078f9cEF81b3B886a7", + "symbol": "NPER", + "decimal": 18, + "name": "NPER" + }, + { + "address": "0x28b5E12CcE51f15594B0b91d5b5AdaA70F684a02", + "symbol": "NPX", + "decimal": 2, + "name": "NaPoleonX" + }, + { + "address": "0xA15C7Ebe1f07CaF6bFF097D8a589fb8AC49Ae5B3", + "symbol": "NPXS", + "decimal": 18, + "name": "Pundi X Token" + }, + { + "address": "0x5D4d57cd06Fa7fe99e26fdc481b468f77f05073C", + "symbol": "NTK", + "decimal": 18, + "name": "NetKoin" + }, + { + "address": "0x69BEaB403438253f13b6e92Db91F7FB849258263", + "symbol": "NTK (Neurotoken)", + "decimal": 18, + "name": "Neurotoken" + }, + { + "address": "0x8A99ED8a1b204903Ee46e733f2c1286F6d20b177", + "symbol": "NTO", + "decimal": 18, + "name": "Fujinto" + }, + { + "address": "0x2233799Ee2683d75dfefAcbCd2A26c78D34b470d", + "symbol": "NTWK", + "decimal": 18, + "name": "Network" + }, + { + "address": "0x245ef47D4d0505ECF3Ac463F4d81f41ADE8f1fd1", + "symbol": "NUG", + "decimal": 18, + "name": "Nuggets Token" + }, + { + "address": "0xB91318F35Bdb262E9423Bc7c7c2A3A93DD93C92C", + "symbol": "NULS", + "decimal": 18, + "name": "NULS" + }, + { + "address": "0x45e42D659D9f9466cD5DF622506033145a9b89Bc", + "symbol": "NxC", + "decimal": 3, + "name": "Nexium" + }, + { + "address": "0x7627de4B93263a6a7570b8dAfa64bae812e5c394", + "symbol": "NXX", + "decimal": 8, + "name": "NXX" + }, + { + "address": "0x5c6183d10A00CD747a6Dbb5F658aD514383e9419", + "symbol": "NXX OLD", + "decimal": 8, + "name": "NXX OLD" + }, + { + "address": "0x5e888B83B7287EED4fB7DA7b7d0A0D4c735d94b3", + "symbol": "OAK", + "decimal": 18, + "name": "OAK" + }, + { + "address": "0x701C244b988a513c945973dEFA05de933b23Fe1D", + "symbol": "OAX", + "decimal": 18, + "name": "OAX" + }, + { + "address": "0x0235fE624e044A05eeD7A43E16E3083bc8A4287A", + "symbol": "OCC", + "decimal": 18, + "name": "Original Crypto Coin" + }, + { + "address": "0x4092678e4E78230F46A1534C0fbc8fA39780892B", + "symbol": "OCN", + "decimal": 18, + "name": "Odyssey" + }, + { + "address": "0xbf52F2ab39e26E0951d2a02b49B7702aBe30406a", + "symbol": "ODE", + "decimal": 18, + "name": "ODEM Token" + }, + { + "address": "0x8207c1FfC5B6804F6024322CcF34F29c3541Ae26", + "symbol": "OGN", + "decimal": 18, + "name": "OriginToken" + }, + { + "address": "0x6f539a9456A5BCb6334A1A41207c3788f5825207", + "symbol": "OHNI", + "decimal": 18, + "name": "Ohni" + }, + { + "address": "0x7F2176cEB16dcb648dc924eff617c3dC2BEfd30d", + "symbol": "OHNI (OHNI)", + "decimal": 0, + "name": "OHNI" + }, + { + "address": "0xBeef546ac8a4e0a80DC1E2d696968Ef54138f1d4", + "symbol": "OJX", + "decimal": 18, + "name": "Ojooo Coin" + }, + { + "address": "0xC66eA802717bFb9833400264Dd12c2bCeAa34a6d", + "symbol": "OLD_MKR", + "decimal": 18, + "name": "MakerDAO" + }, + { + "address": "0x3618516F45CD3c913F81F9987AF41077932Bc40d", + "symbol": "OLDPCL", + "decimal": 8, + "name": "OLDPeculium" + }, + { + "address": "0x9d9223436dDD466FC247e9dbbD20207e640fEf58", + "symbol": "OLE", + "decimal": 18, + "name": "Olive" + }, + { + "address": "0x64A60493D888728Cf42616e034a0dfEAe38EFCF0", + "symbol": "OLT", + "decimal": 18, + "name": "OneLedger Token" + }, + { + "address": "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07", + "symbol": "OMG", + "decimal": 18, + "name": "OmiseGO" + }, + { + "address": "0x047187e53477be70DBe8Ea5B799318f2e165052F", + "symbol": "OMT", + "decimal": 18, + "name": "OTCMAKER Token" + }, + { + "address": "0xB5DBC6D3cf380079dF3b27135664b6BCF45D1869", + "symbol": "OMX", + "decimal": 8, + "name": "Shivom" + }, + { + "address": "0x4D807509aECe24C0fa5A102b6a3B059Ec6E14392", + "symbol": "ONE", + "decimal": 18, + "name": "Menlo One" + }, + { + "address": "0xB23be73573bC7E03DB6e5dfc62405368716d28a8", + "symbol": "ONEK", + "decimal": 18, + "name": "One K Token" + }, + { + "address": "0xd341d1680Eeee3255b8C4c75bCCE7EB57f144dAe", + "symbol": "ONG", + "decimal": 18, + "name": "SoMee.Social" + }, + { + "address": "0x6863bE0e7CF7ce860A574760e9020D519a8bDC47", + "symbol": "ONL", + "decimal": 18, + "name": "On.Live" + }, + { + "address": "0xB31C219959E06f9aFBeB36b388a4BaD13E802725", + "symbol": "ONOT", + "decimal": 18, + "name": "ONO Token" + }, + { + "address": "0x69c4BB240cF05D51eeab6985Bab35527d04a8C64", + "symbol": "OPEN", + "decimal": 8, + "name": "OPEN Platform" + }, + { + "address": "0xe9dE1C630753A15d7021Cc563429c21d4887506F", + "symbol": "OPEN (OPEN)", + "decimal": 8, + "name": "OPEN" + }, + { + "address": "0x77599D2C6DB170224243e255e6669280F11F1473", + "symbol": "OPQ", + "decimal": 18, + "name": "Opacity" + }, + { + "address": "0x4355fC160f74328f9b383dF2EC589bB3dFd82Ba0", + "symbol": "OPT", + "decimal": 18, + "name": "Opus Foundation" + }, + { + "address": "0x832904863978b94802123106e6eB491BDF0Df928", + "symbol": "OPTI", + "decimal": 18, + "name": "OptiToken" + }, + { + "address": "0xff56Cc6b1E6dEd347aA0B7676C85AB0B3D08B0FA", + "symbol": "ORBS", + "decimal": 18, + "name": "Orbs" + }, + { + "address": "0x6F59e0461Ae5E2799F1fB3847f05a63B16d0DbF8", + "symbol": "ORCA", + "decimal": 18, + "name": "ORCA Token" + }, + { + "address": "0xd2Fa8f92Ea72AbB35dBD6DECa57173d22db2BA49", + "symbol": "ORI", + "decimal": 18, + "name": "Origami" + }, + { + "address": "0x516E5436bAfdc11083654DE7Bb9b95382d08d5DE", + "symbol": "ORME", + "decimal": 8, + "name": "Ormeus Coin" + }, + { + "address": "0xc96DF921009B790dfFcA412375251ed1A2b75c60", + "symbol": "ORME (1)", + "decimal": 8, + "name": "Ormeus Coin" + }, + { + "address": "0xEB9A4B185816C354dB92DB09cC3B50bE60b901b6", + "symbol": "ORS", + "decimal": 18, + "name": "Origin Sport" + }, + { + "address": "0x2C4e8f2D746113d0696cE89B35F0d8bF88E0AEcA", + "symbol": "OST", + "decimal": 18, + "name": "Simple Token 'OST'" + }, + { + "address": "0x881Ef48211982D01E2CB7092C915E647Cd40D85C", + "symbol": "OTN", + "decimal": 18, + "name": "Open Trading Network" + }, + { + "address": "0x170b275CEd089FffAEBFe927F445a350ED9160DC", + "symbol": "OWN", + "decimal": 8, + "name": "OWNDATA" + }, + { + "address": "0xC2494604e9DcEfa2A70dCEbf81e6D7BE064a334e", + "symbol": "OWT", + "decimal": 18, + "name": "OpenWeb Token" + }, + { + "address": "0x65A15014964F2102Ff58647e16a16a6B9E14bCF6", + "symbol": "Ox Fina", + "decimal": 3, + "name": "Ox Fina" + }, + { + "address": "0xB9bb08AB7E9Fa0A1356bd4A39eC0ca267E03b0b3", + "symbol": "PAI", + "decimal": 18, + "name": "PCHAIN" + }, + { + "address": "0xfeDAE5642668f8636A11987Ff386bfd215F942EE", + "symbol": "PAL", + "decimal": 18, + "name": "PolicyPal Network" + }, + { + "address": "0xea5f88E54d982Cbb0c441cde4E79bC305e5b43Bc", + "symbol": "PARETO", + "decimal": 18, + "name": "PARETO" + }, + { + "address": "0xeE4458e052B533b1aABD493B5f8c4d85D7B263Dc", + "symbol": "PASS", + "decimal": 6, + "name": "Blockpass" + }, + { + "address": "0x77761e63C05aeE6648FDaeaa9B94248351AF9bCd", + "symbol": "PASS (PASS Token)", + "decimal": 18, + "name": "PASS Token" + }, + { + "address": "0xF3b3Cad094B89392fcE5faFD40bC03b80F2Bc624", + "symbol": "PAT", + "decimal": 18, + "name": "Patron" + }, + { + "address": "0x694404595e3075A942397F466AAcD462FF1a7BD0", + "symbol": "PATENTS", + "decimal": 18, + "name": "PATENTS" + }, + { + "address": "0xF813F3902bBc00A6DCe378634d3B79D84F9803d7", + "symbol": "PATH", + "decimal": 18, + "name": "PATH" + }, + { + "address": "0x9FbA684D77D2d6A1408C24b60A1f5534e71f5b75", + "symbol": "PATR", + "decimal": 18, + "name": "PATRIOT" + }, + { + "address": "0x8E870D67F660D95d5be530380D0eC0bd388289E1", + "symbol": "PAX", + "decimal": 18, + "name": "Paxos Standard (PAX)" + }, + { + "address": "0xB97048628DB6B661D4C2aA833e95Dbe1A905B280", + "symbol": "PAY", + "decimal": 18, + "name": "TenX" + }, + { + "address": "0x55648De19836338549130B1af587F16beA46F66B", + "symbol": "PBL", + "decimal": 18, + "name": "PBL" + }, + { + "address": "0xF4c07b1865bC326A3c01339492Ca7538FD038Cc0", + "symbol": "PBT", + "decimal": 4, + "name": "Primalbase Token (PBT)" + }, + { + "address": "0xE3F4b4A5d91e5cB9435B947F090A319737036312", + "symbol": "PCH", + "decimal": 18, + "name": "POPCHAIN" + }, + { + "address": "0xfcAC7A7515e9A9d7619fA77A1fa738111f66727e", + "symbol": "PCH (PITCH)", + "decimal": 18, + "name": "PITCH" + }, + { + "address": "0x0F02e27745e3b6e9e1310d19469e2b5D7B5eC99A", + "symbol": "PCL", + "decimal": 8, + "name": "Peculium" + }, + { + "address": "0x53148Bb4551707edF51a1e8d7A93698d18931225", + "symbol": "PCLOLD", + "decimal": 8, + "name": "PeculiumOLD" + }, + { + "address": "0x0db03B6CDe0B2d427C64a04FeAfd825938368f1F", + "symbol": "PDATA", + "decimal": 18, + "name": "PDATA" + }, + { + "address": "0x8Ae56a6850a7cbeaC3c3Ab2cB311e7620167eAC8", + "symbol": "PEG", + "decimal": 18, + "name": "PEG Network Token" + }, + { + "address": "0xBb0eF9e617FADdf54B8D16e29046F72B4D3ec77F", + "symbol": "PEP", + "decimal": 18, + "name": "PEP Token" + }, + { + "address": "0x5884969Ec0480556E11d119980136a4C17eDDEd1", + "symbol": "PET", + "decimal": 18, + "name": "PETHEREUM" + }, + { + "address": "0xeC18f898B4076A3E18f1089D33376CC380BDe61D", + "symbol": "PETRO", + "decimal": 18, + "name": "PETRO" + }, + { + "address": "0x55c2A0C171D920843560594dE3d6EEcC09eFc098", + "symbol": "PEXT", + "decimal": 4, + "name": "PEX-Token" + }, + { + "address": "0x2FA32a39fc1c399E0Cc7B2935868f5165De7cE97", + "symbol": "PFR", + "decimal": 8, + "name": "Payfair" + }, + { + "address": "0x13C2fab6354d3790D8ece4f0f1a3280b4A25aD96", + "symbol": "PHI", + "decimal": 18, + "name": "PHI Token" + }, + { + "address": "0xE64509F0bf07ce2d29A7eF19A8A9bc065477C1B4", + "symbol": "PIPL", + "decimal": 8, + "name": "PIPL Coin" + }, + { + "address": "0x0fF161071e627A0E6de138105C73970F86ca7922", + "symbol": "PIT", + "decimal": 18, + "name": "Paypite v2" + }, + { + "address": "0x8eFFd494eB698cc399AF6231fCcd39E08fd20B15", + "symbol": "PIX", + "decimal": 0, + "name": "Lampix" + }, + { + "address": "0x02F2D4a04E6E01aCE88bD2Cd632875543b2eF577", + "symbol": "PKG", + "decimal": 18, + "name": "PKG Token" + }, + { + "address": "0x2604FA406Be957E542BEb89E6754fCdE6815e83f", + "symbol": "PKT", + "decimal": 18, + "name": "Playkey" + }, + { + "address": "0x59416A25628A76b4730eC51486114c32E0B582A1", + "symbol": "PLASMA", + "decimal": 6, + "name": "PLASMA" + }, + { + "address": "0xE477292f1B3268687A29376116B0ED27A9c76170", + "symbol": "PLAY", + "decimal": 18, + "name": "HeroCoin" + }, + { + "address": "0x0AfFa06e7Fbe5bC9a764C979aA66E8256A631f02", + "symbol": "PLBT", + "decimal": 6, + "name": "Polybius" + }, + { + "address": "0xe3818504c1B32bF1557b16C238B2E01Fd3149C17", + "symbol": "PLR", + "decimal": 18, + "name": "Pillar Project" + }, + { + "address": "0xe43ac1714F7394173b15E7CfF31A63d523Ce4fB9", + "symbol": "PLS", + "decimal": 18, + "name": "DACPLAY Token" + }, + { + "address": "0xD8912C10681D8B21Fd3742244f44658dBA12264E", + "symbol": "PLU", + "decimal": 18, + "name": "Pluton" + }, + { + "address": "0x846C66cf71C43f80403B51fE3906B3599D63336f", + "symbol": "PMA", + "decimal": 18, + "name": "PumaPay" + }, + { + "address": "0x81b4D08645DA11374a03749AB170836E4e539767", + "symbol": "PMNT", + "decimal": 9, + "name": "Paymon" + }, + { + "address": "0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d", + "symbol": "PNK", + "decimal": 18, + "name": "Pinakion" + }, + { + "address": "0x6758B7d441a9739b98552B373703d8d3d14f9e62", + "symbol": "POA20", + "decimal": 18, + "name": "POA ERC20 on Foundation" + }, + { + "address": "0x0e0989b1f9B8A38983c2BA8053269Ca62Ec9B195", + "symbol": "POE", + "decimal": 8, + "name": "Po.et Tokens" + }, + { + "address": "0x43F6a1BE992deE408721748490772B15143CE0a7", + "symbol": "POIN", + "decimal": 0, + "name": "Potatoin" + }, + { + "address": "0x705EE96c1c160842C92c1aeCfCFfccc9C412e3D9", + "symbol": "POLL", + "decimal": 18, + "name": "ClearPoll" + }, + { + "address": "0x9992eC3cF6A55b00978cdDF2b27BC6882d88D1eC", + "symbol": "POLY", + "decimal": 18, + "name": "Polymath Network" + }, + { + "address": "0x779B7b713C86e3E6774f5040D9cCC2D43ad375F8", + "symbol": "POOL", + "decimal": 8, + "name": "Stake Pool" + }, + { + "address": "0x5D858bcd53E085920620549214a8b27CE2f04670", + "symbol": "POP", + "decimal": 18, + "name": "POP Network Token" + }, + { + "address": "0xEe609fE292128Cad03b786DBb9Bc2634Ccdbe7fC", + "symbol": "POS", + "decimal": 18, + "name": "PoSToken" + }, + { + "address": "0x595832F8FC6BF59c85C527fEC3740A1b7a361269", + "symbol": "POWR", + "decimal": 6, + "name": "PowerLedger" + }, + { + "address": "0xc42209aCcC14029c1012fB5680D95fBd6036E2a0", + "symbol": "PPP", + "decimal": 18, + "name": "PayPie" + }, + { + "address": "0xd4fa1460F537bb9085d22C7bcCB5DD450Ef28e3a", + "symbol": "PPT", + "decimal": 8, + "name": "Populous" + }, + { + "address": "0x88A3E4F35D64aAD41A6d4030ac9AFE4356cB84fA", + "symbol": "PRE", + "decimal": 18, + "name": "Presearch" + }, + { + "address": "0x7728dFEF5aBd468669EB7f9b48A7f70a501eD29D", + "symbol": "PRG", + "decimal": 6, + "name": "Paragon" + }, + { + "address": "0x3ADfc4999F77D04c8341BAC5F3A76f58DfF5B37A", + "symbol": "PRIX", + "decimal": 8, + "name": "Privatix" + }, + { + "address": "0x1844b21593262668B7248d0f57a220CaaBA46ab9", + "symbol": "PRL", + "decimal": 18, + "name": "Oyster Pearl" + }, + { + "address": "0x9041Fe5B3FDEA0f5e4afDC17e75180738D877A01", + "symbol": "PRO", + "decimal": 18, + "name": "Pro" + }, + { + "address": "0x226bb599a12C826476e3A771454697EA52E9E220", + "symbol": "PRO (Propy)", + "decimal": 8, + "name": "Propy" + }, + { + "address": "0xA3149E0fA0061A9007fAf307074cdCd290f0e2Fd", + "symbol": "PRON", + "decimal": 8, + "name": "PronCoin" + }, + { + "address": "0x6fe56C0bcdD471359019FcBC48863d6c3e9d4F41", + "symbol": "PROPS", + "decimal": 18, + "name": "Props" + }, + { + "address": "0xd94F2778e2B3913C53637Ae60647598bE588c570", + "symbol": "PRPS", + "decimal": 18, + "name": "Purpose" + }, + { + "address": "0xE40C374d8805b1dD58CDcEFf998A2F6920Cb52FD", + "symbol": "PRPS (1)", + "decimal": 18, + "name": "Purpose" + }, + { + "address": "0x7641b2Ca9DDD58adDf6e3381c1F994Aac5f1A32f", + "symbol": "PRPS (2)", + "decimal": 18, + "name": "Purpose" + }, + { + "address": "0x163733bcc28dbf26B41a8CfA83e369b5B3af741b", + "symbol": "PRS", + "decimal": 18, + "name": "Persians" + }, + { + "address": "0x0C04d4f331DA8dF75f9E2e271E3f3F1494C66C36", + "symbol": "PRSP", + "decimal": 9, + "name": "PRSP" + }, + { + "address": "0x5d4ABC77B8405aD177d8ac6682D584ecbFd46CEc", + "symbol": "PST", + "decimal": 18, + "name": "Primas" + }, + { + "address": "0x66497A283E0a007bA3974e837784C6AE323447de", + "symbol": "PT", + "decimal": 18, + "name": "PornToken" + }, + { + "address": "0x2a8E98e256f32259b5E5Cb55Dd63C8e891950666", + "symbol": "PTC", + "decimal": 18, + "name": "ParrotCoin" + }, + { + "address": "0x4946583c5b86E01cCD30c71a05617D06E3E73060", + "symbol": "PTON", + "decimal": 18, + "name": "PTON" + }, + { + "address": "0x8Ae4BF2C33a8e667de34B54938B0ccD03Eb8CC06", + "symbol": "PTOY", + "decimal": 8, + "name": "Patientory" + }, + { + "address": "0x4689a4e169eB39cC9078C0940e21ff1Aa8A39B9C", + "symbol": "PTT", + "decimal": 18, + "name": "Proton Token" + }, + { + "address": "0x5512e1D6A7BE424b4323126B4f9E86D023F95764", + "symbol": "PTWO", + "decimal": 18, + "name": "PornTokenV2" + }, + { + "address": "0xEf6B4cE8C9Bc83744fbcdE2657b32eC18790458A", + "symbol": "PUC", + "decimal": 0, + "name": "Pour Coin" + }, + { + "address": "0xe25ff6Eb959BCE67975778e46A47750C243B6B99", + "symbol": "PURC", + "decimal": 18, + "name": "PureCarbon" + }, + { + "address": "0x47e67BA66b0699500f18A53F94E2b9dB3D47437e", + "symbol": "PXG", + "decimal": 18, + "name": "PlayGame" + }, + { + "address": "0xc14830E53aA344E8c14603A91229A0b925b0B262", + "symbol": "PXT", + "decimal": 8, + "name": "Populous XBRL Token (PXT)" + }, + { + "address": "0x7703C35CfFdC5CDa8D27aa3df2F9ba6964544b6e", + "symbol": "PYLNT", + "decimal": 18, + "name": "Pylon Network" + }, + { + "address": "0x618E75Ac90b12c6049Ba3b27f5d5F8651b0037F6", + "symbol": "QASH", + "decimal": 6, + "name": "QASH" + }, + { + "address": "0x671AbBe5CE652491985342e85428EB1b07bC6c64", + "symbol": "QAU", + "decimal": 8, + "name": "QAU" + }, + { + "address": "0x1602af2C782cC03F9241992E243290Fccf73Bb13", + "symbol": "QBIT", + "decimal": 18, + "name": "Qubitica" + }, + { + "address": "0xCb5ea3c190d8f82DEADF7ce5Af855dDbf33e3962", + "symbol": "QBIT (1)", + "decimal": 6, + "name": "Qubitica" + }, + { + "address": "0x2467AA6B5A2351416fD4C3DeF8462d841feeecEC", + "symbol": "QBX", + "decimal": 18, + "name": "qiibeeToken" + }, + { + "address": "0xEA26c4aC16D4a5A106820BC8AEE85fd0b7b2b664", + "symbol": "QKC", + "decimal": 18, + "name": "QuarkChain" + }, + { + "address": "0x4a220E6096B25EADb88358cb44068A3248254675", + "symbol": "QNT", + "decimal": 18, + "name": "Quant" + }, + { + "address": "0xFFAA5ffc455d9131f8A2713A741fD1960330508B", + "symbol": "QRG", + "decimal": 18, + "name": "QRG" + }, + { + "address": "0x697beac28B09E122C4332D163985e8a73121b97F", + "symbol": "QRL", + "decimal": 8, + "name": "QRL" + }, + { + "address": "0x99ea4dB9EE77ACD40B119BD1dC4E33e1C070b80d", + "symbol": "QSP", + "decimal": 18, + "name": "Quantstamp Token" + }, + { + "address": "0x2C3C1F05187dBa7A5f2Dd47Dca57281C4d4F183F", + "symbol": "QTQ", + "decimal": 18, + "name": "TiiQu's Q Token" + }, + { + "address": "0x9a642d6b3368ddc662CA244bAdf32cDA716005BC", + "symbol": "QTUM", + "decimal": 18, + "name": "Qtum" + }, + { + "address": "0x264Dc2DedCdcbb897561A57CBa5085CA416fb7b4", + "symbol": "QUN", + "decimal": 18, + "name": "QunQun" + }, + { + "address": "0x1183F92A5624D68e85FFB9170F16BF0443B4c242", + "symbol": "QVT", + "decimal": 18, + "name": "QVT" + }, + { + "address": "0x48f775EFBE4F5EcE6e0DF2f7b5932dF56823B990", + "symbol": "R", + "decimal": 0, + "name": "Revain" + }, + { + "address": "0x45eDb535942a8C84D9f4b5D37e1b25F91Ea4804c", + "symbol": "RAO", + "decimal": 18, + "name": "RadioYo" + }, + { + "address": "0xE8663A64A96169ff4d95b4299E7ae9a76b905B31", + "symbol": "RATING", + "decimal": 8, + "name": "DPRating" + }, + { + "address": "0xFc2C4D8f95002C14eD0a7aA65102Cac9e5953b5E", + "symbol": "RBLX", + "decimal": 18, + "name": "Rublix" + }, + { + "address": "0xF970b8E36e23F7fC3FD752EeA86f8Be8D83375A6", + "symbol": "RCN", + "decimal": 18, + "name": "Ripio Credit Network" + }, + { + "address": "0x2a3Aa9ECA41E720Ed46B5A70D6C37EfA47f768Ac", + "symbol": "RCT", + "decimal": 18, + "name": "RCT" + }, + { + "address": "0x13f25cd52b21650caa8225C9942337d914C9B030", + "symbol": "RCT (RealChain)", + "decimal": 18, + "name": "RealChain" + }, + { + "address": "0x255Aa6DF07540Cb5d3d297f0D0D4D84cb52bc8e6", + "symbol": "RDN", + "decimal": 18, + "name": "Raiden Network" + }, + { + "address": "0x767bA2915EC344015a7938E3eEDfeC2785195D05", + "symbol": "REA", + "decimal": 18, + "name": "Realisto" + }, + { + "address": "0x9214eC02CB71CbA0ADA6896b8dA260736a67ab10", + "symbol": "REAL", + "decimal": 18, + "name": "Real Estate Asset Ledger" + }, + { + "address": "0x5F53f7A8075614b699Baad0bC2c899f4bAd8FBBF", + "symbol": "REBL", + "decimal": 18, + "name": "Rebellious" + }, + { + "address": "0x76960Dccd5a1fe799F7c29bE9F19ceB4627aEb2f", + "symbol": "RED", + "decimal": 18, + "name": "Red Community Token" + }, + { + "address": "0xB563300A3BAc79FC09B93b6F84CE0d4465A2AC27", + "symbol": "REDC", + "decimal": 18, + "name": "RedCab" + }, + { + "address": "0x89303500a7Abfb178B274FD89F2469C264951e1f", + "symbol": "REF", + "decimal": 8, + "name": "RefToken" + }, + { + "address": "0x83984d6142934bb535793A82ADB0a46EF0F66B6d", + "symbol": "REM", + "decimal": 4, + "name": "Remme" + }, + { + "address": "0x13cb85823f78Cff38f0B0E90D3e975b8CB3AAd64", + "symbol": "REMI", + "decimal": 18, + "name": "REMI" + }, + { + "address": "0x408e41876cCCDC0F92210600ef50372656052a38", + "symbol": "REN", + "decimal": 18, + "name": "Republic Token" + }, + { + "address": "0x1985365e9f78359a9B6AD760e32412f4a445E862", + "symbol": "REP", + "decimal": 18, + "name": "Augur" + }, + { + "address": "0x8f8221aFbB33998d8584A2B05749bA73c37a938a", + "symbol": "REQ", + "decimal": 18, + "name": "Request Network" + }, + { + "address": "0xf05a9382A4C3F29E2784502754293D88b835109C", + "symbol": "REX", + "decimal": 18, + "name": "imbrex" + }, + { + "address": "0xd0929d411954c47438dc1d871dd6081F5C5e149c", + "symbol": "RFR", + "decimal": 4, + "name": "Refereum" + }, + { + "address": "0x4c383bDCae52a6e1cb810C76C70d6f31A249eC9B", + "symbol": "RGS", + "decimal": 8, + "name": "Rusgas" + }, + { + "address": "0x168296bb09e24A88805CB9c33356536B980D3fC5", + "symbol": "RHOC", + "decimal": 8, + "name": "RChain" + }, + { + "address": "0x86E56f3c89a14528858e58B3De48c074538BAf2c", + "symbol": "RING", + "decimal": 18, + "name": "Evolution Land Global Token" + }, + { + "address": "0x9469D013805bFfB7D3DEBe5E7839237e535ec483", + "symbol": "RING (1)", + "decimal": 18, + "name": "Evolution Land Global Token" + }, + { + "address": "0xdd007278B667F6bef52fD0a4c23604aA1f96039a", + "symbol": "RIPT", + "decimal": 8, + "name": "RiptideCoin" + }, + { + "address": "0x0b1724cc9FDA0186911EF6a75949e9c0d3F0f2F3", + "symbol": "RIYA", + "decimal": 8, + "name": "Etheriya" + }, + { + "address": "0x106Aa49295B525fcf959aA75eC3f7dCbF5352f1C", + "symbol": "RKT", + "decimal": 18, + "name": "Rock" + }, + { + "address": "0x607F4C5BB672230e8672085532f7e901544a7375", + "symbol": "RLC", + "decimal": 9, + "name": "IEx.ec" + }, + { + "address": "0xcCeD5B8288086BE8c38E23567e684C3740be4D48", + "symbol": "RLT", + "decimal": 10, + "name": "RouletteToken" + }, + { + "address": "0xbe99B09709fc753b09BCf557A992F6605D5997B0", + "symbol": "RLTY", + "decimal": 8, + "name": "SMARTRealty" + }, + { + "address": "0x4A42d2c580f83dcE404aCad18dab26Db11a1750E", + "symbol": "RLX", + "decimal": 18, + "name": "Relex" + }, + { + "address": "0x7Dc4f41294697a7903C4027f6Ac528C5d14cd7eB", + "symbol": "RMC", + "decimal": 8, + "name": "RemiCoin" + }, + { + "address": "0x8D5682941cE456900b12d47ac06a88b47C764CE1", + "symbol": "RMESH", + "decimal": 18, + "name": "RightMesh Token" + }, + { + "address": "0x0996bFb5D057faa237640E2506BE7B4f9C46de0B", + "symbol": "RNDR", + "decimal": 18, + "name": "Render Token" + }, + { + "address": "0xFF603F43946A3A28DF5E6A73172555D8C8b02386", + "symbol": "RNT", + "decimal": 18, + "name": "OneRoot Network" + }, + { + "address": "0x1FE70bE734e473e5721ea57C8B5B01e6Caa52686", + "symbol": "RNTB", + "decimal": 18, + "name": "BitRent" + }, + { + "address": "0x1BcBc54166F6bA149934870b60506199b6C9dB6D", + "symbol": "ROC", + "decimal": 10, + "name": "ROC" + }, + { + "address": "0xA40106134c5bF4c41411554e6db99B95A15ed9d8", + "symbol": "ROCK", + "decimal": 18, + "name": "Rocket Token" + }, + { + "address": "0xC16b542ff490e01fcc0DC58a60e1EFdc3e357cA6", + "symbol": "ROCK2", + "decimal": 0, + "name": "ICE ROCK MINING" + }, + { + "address": "0x0E3de3B0E3D617FD8D1D8088639bA877feb4d742", + "symbol": "ROCK2PAY", + "decimal": 18, + "name": "ICE ROCK MINING" + }, + { + "address": "0xc9De4B7F0C3d991e967158E4D4bFA4b51Ec0b114", + "symbol": "ROK", + "decimal": 18, + "name": "Rocketchain" + }, + { + "address": "0x4993CB95c7443bdC06155c5f5688Be9D8f6999a5", + "symbol": "ROUND", + "decimal": 18, + "name": "ROUND" + }, + { + "address": "0xB4EFd85c19999D84251304bDA99E90B92300Bd93", + "symbol": "RPL", + "decimal": 18, + "name": "Rocket Pool" + }, + { + "address": "0xEC491c1088Eae992B7A214efB0a266AD0927A72A", + "symbol": "RTB", + "decimal": 18, + "name": "AB-Chain RTB" + }, + { + "address": "0x3FD8f39A962eFDA04956981C31AB89FAB5FB8bC8", + "symbol": "RTH", + "decimal": 18, + "name": "Rotharium" + }, + { + "address": "0x54b293226000ccBFC04DF902eEC567CB4C35a903", + "symbol": "RTN", + "decimal": 18, + "name": "RiderToken" + }, + { + "address": "0xf278c1CA969095ffddDED020290cf8B5C424AcE2", + "symbol": "RUFF", + "decimal": 18, + "name": "Ruff" + }, + { + "address": "0xdEE02D94be4929d26f67B64Ada7aCf1914007F10", + "symbol": "RUNE", + "decimal": 18, + "name": "Rune" + }, + { + "address": "0x41f615E24fAbd2b097a320E9E6c1f448cb40521c", + "symbol": "RVL", + "decimal": 18, + "name": "RVL" + }, + { + "address": "0x3d1BA9be9f66B8ee101911bC36D3fB562eaC2244", + "symbol": "RVT", + "decimal": 18, + "name": "Rivetz" + }, + { + "address": "0xd30a2e9347Ad48Ea208ee563a9CdfD80E962a727", + "symbol": "RYLT", + "decimal": 18, + "name": "RoyaltyCOIN" + }, + { + "address": "0x1EC8fE51a9B6A3a6C427D17d9ECC3060fbc4a45c", + "symbol": "S-A-PAT", + "decimal": 18, + "name": "S-A-PAT" + }, + { + "address": "0x3eb91D237e491E0DEE8582c402D85CB440fb6b54", + "symbol": "S-ETH", + "decimal": 18, + "name": "S-ETH" + }, + { + "address": "0xabC1280A0187a2020cC675437aed400185F86Db6", + "symbol": "SAC", + "decimal": 18, + "name": "Smart Application Chain" + }, + { + "address": "0x4156D3342D5c385a87D264F90653733592000581", + "symbol": "SALT", + "decimal": 8, + "name": "Salt Lending Token" + }, + { + "address": "0x7C5A0CE9267ED19B22F8cae653F198e3E8daf098", + "symbol": "SAN", + "decimal": 18, + "name": "Santiment" + }, + { + "address": "0x78fE18e41f436e1981a3a60D1557c8a7a9370461", + "symbol": "SCANDI", + "decimal": 2, + "name": "Scandiweb Coin" + }, + { + "address": "0xd7631787B4dCc87b1254cfd1e5cE48e96823dEe8", + "symbol": "SCL", + "decimal": 8, + "name": "SocialCoin" + }, + { + "address": "0x24DCc881E7Dd730546834452F21872D5cb4b5293", + "symbol": "SCRL", + "decimal": 18, + "name": "SCRL" + }, + { + "address": "0xB1eeF147028E9f480DbC5ccaA3277D417D1b85F0", + "symbol": "SEELE", + "decimal": 18, + "name": "Seele" + }, + { + "address": "0xA13f0743951B4f6E3e3AA039f682E17279f52bc3", + "symbol": "SENC", + "decimal": 18, + "name": "Sentinel Chain" + }, + { + "address": "0x4cA74185532DC1789527194e5B9c866dD33F4E82", + "symbol": "SenSatorI", + "decimal": 18, + "name": "SenSatorI Token" + }, + { + "address": "0x6745fAB6801e376cD24F03572B9C9B0D4EdDDCcf", + "symbol": "SENSE", + "decimal": 8, + "name": "Sensay" + }, + { + "address": "0xa44E5137293E855B1b7bC7E2C6f8cD796fFCB037", + "symbol": "SENT", + "decimal": 8, + "name": "SENTinel" + }, + { + "address": "0xe06eda7435bA749b047380CEd49121ddE93334Ae", + "symbol": "SET", + "decimal": 0, + "name": "SET" + }, + { + "address": "0x98F5e9b7F0e33956C0443E81bF7deB8B5b1ed545", + "symbol": "SEXY", + "decimal": 18, + "name": "Sexy Token" + }, + { + "address": "0xa1ccc166faf0E998b3E33225A1A0301B1C86119D", + "symbol": "SGEL", + "decimal": 18, + "name": "SGELDER" + }, + { + "address": "0xB2135AB9695a7678Dd590B1A996CB0f37BCB0718", + "symbol": "SGN", + "decimal": 9, + "name": "Signals Network" + }, + { + "address": "0x33C623a2BAAfEb8D15DfaF3cE44095efec83D72C", + "symbol": "SGP", + "decimal": 18, + "name": "SGPay" + }, + { + "address": "0xCB5A05beF3257613E984C17DbcF039952B6d883F", + "symbol": "SGR", + "decimal": 8, + "name": "Sugar Exchange" + }, + { + "address": "0x37427576324fE1f3625c9102674772d7CF71377d", + "symbol": "SGT", + "decimal": 18, + "name": "SelfieYo Gold Token" + }, + { + "address": "0xd248B0D48E44aaF9c49aea0312be7E13a6dc1468", + "symbol": "SGT (SGT)", + "decimal": 1, + "name": "SGT" + }, + { + "address": "0xe25b0BBA01Dc5630312B6A21927E578061A13f55", + "symbol": "SHIP", + "decimal": 18, + "name": "ShipChain" + }, + { + "address": "0xEF2E9966eb61BB494E5375d5Df8d67B7dB8A780D", + "symbol": "SHIT", + "decimal": 0, + "name": "SHIT" + }, + { + "address": "0x8542325B72C6D9fC0aD2Ca965A78435413a915A0", + "symbol": "SHL", + "decimal": 18, + "name": "Oyster Shell" + }, + { + "address": "0xEF2463099360a085f1f10b076Ed72Ef625497a06", + "symbol": "SHP", + "decimal": 18, + "name": "Sharpe Platform Token" + }, + { + "address": "0x8a187D5285d316bcBC9ADafc08b51d70a0d8e000", + "symbol": "SIFT", + "decimal": 0, + "name": "SIFT" + }, + { + "address": "0x6888a16eA9792c15A4DCF2f6C623D055c8eDe792", + "symbol": "SIG", + "decimal": 18, + "name": "Signal" + }, + { + "address": "0x4aF328C52921706dCB739F25786210499169AFe6", + "symbol": "SKB", + "decimal": 8, + "name": "Sakura Bloom" + }, + { + "address": "0x13DB74B3cf512F65C4b91683940B4f3955E05085", + "symbol": "SKE", + "decimal": 8, + "name": "Super Keep Token" + }, + { + "address": "0x2bDC0D42996017fCe214b21607a515DA41A9E0C5", + "symbol": "SKIN", + "decimal": 6, + "name": "SKIN" + }, + { + "address": "0xd99b8A7fA48E25Cce83B81812220A3E03Bf64e5f", + "symbol": "SKM", + "decimal": 18, + "name": "Skrumble Network" + }, + { + "address": "0x4994e81897a920c0FEA235eb8CEdEEd3c6fFF697", + "symbol": "SKO1", + "decimal": 18, + "name": "Sikoba" + }, + { + "address": "0x4c382F8E09615AC86E08CE58266CC227e7d4D913", + "symbol": "SKR", + "decimal": 6, + "name": "SKR Token" + }, + { + "address": "0xfdFE8b7aB6CF1bD1E3d14538Ef40686296C42052", + "symbol": "SKRP", + "decimal": 18, + "name": "Skraps" + }, + { + "address": "0x324A48eBCbB46e61993931eF9D35F6697CD2901b", + "symbol": "SKRP (1)", + "decimal": 18, + "name": "Skraps" + }, + { + "address": "0x6E34d8d84764D40f6D7b39cd569Fd017bF53177D", + "symbol": "SKRP (2)", + "decimal": 18, + "name": "Skraps" + }, + { + "address": "0x7297862B9670fF015192799cc849726c88bf1d77", + "symbol": "SKYM", + "decimal": 18, + "name": "Skymap Token" + }, + { + "address": "0x7A5fF295Dc8239d5C2374E4D894202aAF029Cab6", + "symbol": "SLT", + "decimal": 3, + "name": "Smartlands" + }, + { + "address": "0x7928c8aBF1F74eF9F96D4D0a44e3b4209d360785", + "symbol": "SLY", + "decimal": 18, + "name": "Selfllery" + }, + { + "address": "0x6F6DEb5db0C4994A8283A01D6CFeEB27Fc3bBe9C", + "symbol": "SMART", + "decimal": 0, + "name": "Smart Billions" + }, + { + "address": "0x39013F961c378f02C2b82A6E1d31E9812786FD9D", + "symbol": "SMS", + "decimal": 3, + "name": "Speed Mining Service" + }, + { + "address": "0x78Eb8DC641077F049f910659b6d580E80dC4d237", + "symbol": "SMT", + "decimal": 8, + "name": "Social Media Market" + }, + { + "address": "0x2dCFAAc11c9EebD8C6C42103Fe9e2a6AD237aF27", + "symbol": "SMT (Smart Node)", + "decimal": 18, + "name": "Smart Node" + }, + { + "address": "0x55F93985431Fc9304077687a35A1BA103dC1e081", + "symbol": "SMT (SmartMesh)", + "decimal": 18, + "name": "SmartMesh" + }, + { + "address": "0x198A87b3114143913d4229Fb0f6D4BCb44aa8AFF", + "symbol": "SNBL", + "decimal": 8, + "name": "Snowball" + }, + { + "address": "0xF4134146AF2d511Dd5EA8cDB1C4AC88C57D60404", + "symbol": "SNC", + "decimal": 18, + "name": "SunContract" + }, + { + "address": "0xf333b2Ace992ac2bBD8798bF57Bc65a06184afBa", + "symbol": "SND", + "decimal": 0, + "name": "Sandcoin" + }, + { + "address": "0xcFD6Ae8BF13f42DE14867351eAff7A8A3b9FbBe7", + "symbol": "SNG", + "decimal": 8, + "name": "SINERGIA" + }, + { + "address": "0xaeC2E87E0A235266D9C5ADc9DEb4b2E29b54D009", + "symbol": "SNGLS", + "decimal": 0, + "name": "SingularDTV" + }, + { + "address": "0x44F588aEeB8C44471439D1270B3603c66a9262F1", + "symbol": "SNIP", + "decimal": 18, + "name": "SNIP" + }, + { + "address": "0x983F6d60db79ea8cA4eB9968C6aFf8cfA04B3c63", + "symbol": "SNM", + "decimal": 18, + "name": "SONM" + }, + { + "address": "0xBDC5bAC39Dbe132B1E030e898aE3830017D7d969", + "symbol": "SNOV", + "decimal": 18, + "name": "Snovian.Space" + }, + { + "address": "0x744d70FDBE2Ba4CF95131626614a1763DF805B9E", + "symbol": "SNT", + "decimal": 18, + "name": "Status Network Token" + }, + { + "address": "0x2859021eE7F2Cb10162E67F33Af2D22764B31aFf", + "symbol": "SNTR", + "decimal": 4, + "name": "Silent Notary" + }, + { + "address": "0xC011A72400E58ecD99Ee497CF89E3775d4bd732F", + "symbol": "SNX", + "decimal": 18, + "name": "Synthetix Network Token" + }, + { + "address": "0xD65960FAcb8E4a2dFcb2C2212cb2e44a02e2a57E", + "symbol": "SOAR", + "decimal": 6, + "name": "Soarcoin" + }, + { + "address": "0x2d0E95bd4795D7aCe0da3C0Ff7b706a5970eb9D3", + "symbol": "SOC", + "decimal": 18, + "name": "All Sports" + }, + { + "address": "0x1F54638b7737193FFd86c19Ec51907A7c41755D8", + "symbol": "SOL", + "decimal": 6, + "name": "Sola Token" + }, + { + "address": "0x1C62aCa2b7605Db3606eAcdA7Bc67A1857DDb8FF", + "symbol": "SONIQ", + "decimal": 18, + "name": "Soniq" + }, + { + "address": "0xBb1f24C0c1554b9990222f036b0AaD6Ee4CAec29", + "symbol": "SOUL", + "decimal": 18, + "name": "CryptoSoul" + }, + { + "address": "0x42d6622deCe394b54999Fbd73D108123806f6a18", + "symbol": "SPANK", + "decimal": 18, + "name": "SpankChain" + }, + { + "address": "0x58bf7df57d9DA7113c4cCb49d8463D4908C735cb", + "symbol": "SPARC", + "decimal": 18, + "name": "SPARC" + }, + { + "address": "0x24AEF3BF1A47561500f9430D74Ed4097C47F51F2", + "symbol": "SPARTA", + "decimal": 4, + "name": "SPARTA" + }, + { + "address": "0x1dEa979ae76f26071870F824088dA78979eb91C8", + "symbol": "SPD", + "decimal": 18, + "name": "SPINDLE" + }, + { + "address": "0x85089389C14Bd9c77FC2b8F0c3d1dC3363Bf06Ef", + "symbol": "SPF", + "decimal": 18, + "name": "Sportify" + }, + { + "address": "0x3833ddA0AEB6947b98cE454d89366cBA8Cc55528", + "symbol": "SPHTX", + "decimal": 18, + "name": "SPHTX" + }, + { + "address": "0x0324dd195D0Cd53F9F07bEe6a48eE7a20bad738f", + "symbol": "SPICE", + "decimal": 8, + "name": "SPiCE VC Token" + }, + { + "address": "0x20F7A3DdF244dc9299975b4Da1C39F8D5D75f05A", + "symbol": "SPN", + "decimal": 6, + "name": "Sapien" + }, + { + "address": "0x05aAaA829Afa407D83315cDED1d45EB16025910c", + "symbol": "SPX", + "decimal": 18, + "name": "Sp8de" + }, + { + "address": "0x68d57c9a1C35f63E2c83eE8e49A64e9d70528D25", + "symbol": "SRN", + "decimal": 18, + "name": "Sirin Labs" + }, + { + "address": "0xB15fE5a123e647ba594CEa7A1E648646f95EB4AA", + "symbol": "SS", + "decimal": 18, + "name": "Sharder" + }, + { + "address": "0xbbFF862d906E348E9946Bfb2132ecB157Da3D4b4", + "symbol": "SS (1)", + "decimal": 18, + "name": "Sharder" + }, + { + "address": "0x6e2050CBFB3eD8A4d39b64cC9f47E711a03a5a89", + "symbol": "SSH", + "decimal": 18, + "name": "StreamShares" + }, + { + "address": "0x624d520BAB2E4aD83935Fa503fB130614374E850", + "symbol": "SSP", + "decimal": 4, + "name": "Smartshare" + }, + { + "address": "0x4A89cD486fA996ad50c0a63C35c78702f5422a50", + "symbol": "STABIT", + "decimal": 3, + "name": "StabitCoin" + }, + { + "address": "0x9a005c9a89BD72a4Bd27721E7a09A3c11D2b03C4", + "symbol": "STAC", + "decimal": 18, + "name": "Starter Coin" + }, + { + "address": "0x286708f069225905194673755F12359e6afF6FE1", + "symbol": "STACS", + "decimal": 18, + "name": "STACS" + }, + { + "address": "0xF70a642bD387F94380fFb90451C2c81d4Eb82CBc", + "symbol": "STAR", + "decimal": 18, + "name": "Star Token" + }, + { + "address": "0x09BcA6eBAb05Ee2ae945BE4edA51393d94Bf7b99", + "symbol": "STB", + "decimal": 4, + "name": "STABLE Token" + }, + { + "address": "0x629aEe55ed49581C33ab27f9403F7992A289ffd5", + "symbol": "STC", + "decimal": 18, + "name": "StrikeCoin Token" + }, + { + "address": "0xaE73B38d1c9A8b274127ec30160a4927C4d71824", + "symbol": "STK", + "decimal": 18, + "name": "STK Token" + }, + { + "address": "0x599346779e90fc3F5F997b5ea715349820F91571", + "symbol": "STN", + "decimal": 4, + "name": "Saturn Network" + }, + { + "address": "0xB64ef51C888972c908CFacf59B47C1AfBC0Ab8aC", + "symbol": "STORJ", + "decimal": 8, + "name": "STORJ" + }, + { + "address": "0xD0a4b8946Cb52f0661273bfbC6fD0E0C75Fc6433", + "symbol": "STORM", + "decimal": 18, + "name": "Storm Token" + }, + { + "address": "0xecd570bBf74761b960Fa04Cc10fe2c4e86FfDA36", + "symbol": "STP", + "decimal": 8, + "name": "StashPay" + }, + { + "address": "0x5c3a228510D246b78a3765C20221Cbf3082b44a4", + "symbol": "STQ", + "decimal": 18, + "name": "Storiqa" + }, + { + "address": "0xBAE235823D7255D9D48635cEd4735227244Cd583", + "symbol": "STR", + "decimal": 18, + "name": "Staker" + }, + { + "address": "0x46492473755e8dF960F8034877F61732D718CE96", + "symbol": "STRC", + "decimal": 8, + "name": "STRC" + }, + { + "address": "0x0371A82e4A9d0A4312f3ee2Ac9c6958512891372", + "symbol": "STU", + "decimal": 18, + "name": "bitJob" + }, + { + "address": "0x006BeA43Baa3f7A6f765F14f10A1a1b08334EF45", + "symbol": "STX", + "decimal": 18, + "name": "StoxToken" + }, + { + "address": "0x8D75959f1E61EC2571aa72798237101F084DE63a", + "symbol": "SUB", + "decimal": 18, + "name": "Substratum" + }, + { + "address": "0x12480E24eb5bec1a9D4369CaB6a80caD3c0A377A", + "symbol": "SUB (old)", + "decimal": 2, + "name": "Substratum (old contract)" + }, + { + "address": "0xe120c1ECBfdFeA7F0A8f0Ee30063491E8c26fedf", + "symbol": "SUR", + "decimal": 8, + "name": "Suretly" + }, + { + "address": "0x57Ab1E02fEE23774580C119740129eAC7081e9D3", + "symbol": "sUSD", + "decimal": 18, + "name": "USD Synth (sUSD)" + }, + { + "address": "0xbdEB4b83251Fb146687fa19D1C660F99411eefe3", + "symbol": "SVD", + "decimal": 18, + "name": "savedroid" + }, + { + "address": "0x0bb217E40F8a5Cb79Adf04E1aAb60E5abd0dfC1e", + "symbol": "SWFTC", + "decimal": 8, + "name": "SwftCoin" + }, + { + "address": "0x9e88613418cF03dCa54D6a2cf6Ad934A78C7A17A", + "symbol": "SWM", + "decimal": 18, + "name": "Swarm Fund Token" + }, + { + "address": "0xB9e7F8568e08d5659f5D29C4997173d84CdF2607", + "symbol": "SWT", + "decimal": 18, + "name": "Swarm City Token" + }, + { + "address": "0x12B306fA98F4CbB8d4457FdFf3a0A0a56f07cCdf", + "symbol": "SXDT", + "decimal": 18, + "name": "Spectre.ai D-Token" + }, + { + "address": "0x2C82c73d5B34AA015989462b2948cd616a37641F", + "symbol": "SXUT", + "decimal": 18, + "name": "Spectre.ai U-Token" + }, + { + "address": "0x10B123FdDde003243199aaD03522065dC05827A0", + "symbol": "SYN", + "decimal": 18, + "name": "Synapse" + }, + { + "address": "0xE7775A6e9Bcf904eb39DA2b68c5efb4F9360e08C", + "symbol": "TaaS", + "decimal": 6, + "name": "Token-as-a-Service" + }, + { + "address": "0x1D4cCC31dAB6EA20f461d329a0562C1c58412515", + "symbol": "TALAO", + "decimal": 18, + "name": "Talao" + }, + { + "address": "0x2C36204a0712A2a50E54A62F7c4F01867e78cB53", + "symbol": "TAN", + "decimal": 18, + "name": "Taklimakan Network" + }, + { + "address": "0xc27A2F05fa577a83BA0fDb4c38443c0718356501", + "symbol": "TAU", + "decimal": 18, + "name": "Lamden Tau" + }, + { + "address": "0xFACCD5Fc83c3E4C3c1AC1EF35D15adf06bCF209C", + "symbol": "TBC2", + "decimal": 8, + "name": "TBC2" + }, + { + "address": "0xAFe60511341a37488de25Bef351952562E31fCc1", + "symbol": "TBT", + "decimal": 8, + "name": "TBitBot" + }, + { + "address": "0x3A92bD396aEf82af98EbC0Aa9030D25a23B11C6b", + "symbol": "TBX", + "decimal": 18, + "name": "Tokenbox" + }, + { + "address": "0xfA0eF5E034CaE1AE752d59bdb8aDcDe37Ed7aB97", + "symbol": "TCA", + "decimal": 18, + "name": "TangguoTao Token" + }, + { + "address": "0x9972A0F24194447E73a7e8b6CD26a52e02DDfAD5", + "symbol": "TCH", + "decimal": 0, + "name": "Thore Cash" + }, + { + "address": "0x28d7F432d24ba6020d1cbD4f28BEDc5a82F24320", + "symbol": "TCNX", + "decimal": 18, + "name": "Tercet Network" + }, + { + "address": "0x2a1dbabe65c595B0022e75208C34014139d5d357", + "symbol": "TDH", + "decimal": 18, + "name": "TrustedHealth" + }, + { + "address": "0x1c79ab32C66aCAa1e9E81952B8AAa581B43e54E7", + "symbol": "TEAM", + "decimal": 4, + "name": "TEAM (TokenStars)" + }, + { + "address": "0x85e076361cc813A908Ff672F9BAd1541474402b2", + "symbol": "TEL", + "decimal": 2, + "name": "Telcoin" + }, + { + "address": "0xEc32A9725C59855d841ba7d8D9c99c84ff754688", + "symbol": "TEL (Meditel)", + "decimal": 18, + "name": "Meditel" + }, + { + "address": "0xDD16eC0F66E54d453e6756713E533355989040E4", + "symbol": "TEN", + "decimal": 18, + "name": "Tokenomy" + }, + { + "address": "0xE5F166c0D8872B68790061317BB6CcA04582C912", + "symbol": "TFD", + "decimal": 18, + "name": "TE-FOOD" + }, + { + "address": "0xa7f976C360ebBeD4465c2855684D1AAE5271eFa9", + "symbol": "TFL", + "decimal": 8, + "name": "TrueFlip" + }, + { + "address": "0xF8e06E4e4A80287FDCa5b02dcCecAa9D0954840F", + "symbol": "TGAME", + "decimal": 18, + "name": "Truegame" + }, + { + "address": "0xAc3Da587eac229C9896D919aBC235CA4Fd7f72c1", + "symbol": "TGT", + "decimal": 1, + "name": "Target Coin" + }, + { + "address": "0x96c30D5499EF6eA96A9c221Bc18BC39D29c97F27", + "symbol": "Thar", + "decimal": 18, + "name": "Thar token" + }, + { + "address": "0x3883f5e181fccaF8410FA61e12b59BAd963fb645", + "symbol": "THETA", + "decimal": 18, + "name": "Theta Token" + }, + { + "address": "0x1Cb3209D45B2a60B7fBCA1cCDBF87f674237A4aa", + "symbol": "THR", + "decimal": 4, + "name": "ThoreCoin" + }, + { + "address": "0x4f27053F32edA8Af84956437Bc00e5fFa7003287", + "symbol": "THRT", + "decimal": 18, + "name": "Thrive Token" + }, + { + "address": "0xfe7B915A0bAA0E79f85c5553266513F7C1c03Ed0", + "symbol": "THUG", + "decimal": 18, + "name": "THUG" + }, + { + "address": "0x72430A612Adc007c50e3b6946dBb1Bb0fd3101D1", + "symbol": "TIC", + "decimal": 8, + "name": "Thingschain" + }, + { + "address": "0x614b9802D45Aa1bC2282651dC1408632F9027A6e", + "symbol": "TIC (Trust Invest)", + "decimal": 18, + "name": "Trust Invest" + }, + { + "address": "0xa5dB1d6F7A0D5Bccc17d0bFD39D7AF32d5E5EDc6", + "symbol": "TICO", + "decimal": 5, + "name": "Topinvestmentcoin" + }, + { + "address": "0x7F4B2A690605A7cbb66F7AA6885EbD906a5e2E9E", + "symbol": "TICO (1)", + "decimal": 8, + "name": "Topinvestmentcoin" + }, + { + "address": "0x999967E2Ec8A74B7c8E9dB19E039d920B31d39D0", + "symbol": "TIE", + "decimal": 18, + "name": "Ties.DB" + }, + { + "address": "0xEee2d00Eb7DEB8Dd6924187f5AA3496B7d06E62A", + "symbol": "TIG", + "decimal": 18, + "name": "Tigereum" + }, + { + "address": "0x6531f133e6DeeBe7F2dcE5A0441aA7ef330B4e53", + "symbol": "TIME", + "decimal": 8, + "name": "Chronobank" + }, + { + "address": "0x80BC5512561c7f85A3A9508c7df7901b370Fa1DF", + "symbol": "TIO", + "decimal": 18, + "name": "TIO" + }, + { + "address": "0xEa1f346faF023F974Eb5adaf088BbCdf02d761F4", + "symbol": "TIX", + "decimal": 18, + "name": "Blocktix" + }, + { + "address": "0xdaE1Baf249964bc4b6aC98c3122f0e3E785fd279", + "symbol": "TKA", + "decimal": 18, + "name": "Tokia" + }, + { + "address": "0x0675DAa94725A528b05A3A88635C03EA964BFA7E", + "symbol": "TKLN", + "decimal": 18, + "name": "Taklimakan Network" + }, + { + "address": "0xaAAf91D9b90dF800Df4F55c205fd6989c977E73a", + "symbol": "TKN", + "decimal": 8, + "name": "TokenCard" + }, + { + "address": "0xB45a50545bEEAB73F38F31E5973768C421805E5E", + "symbol": "TKR", + "decimal": 18, + "name": "TKRToken" + }, + { + "address": "0xb3616550aBc8AF79c7A5902DEF9Efa3bC9A95200", + "symbol": "TLX", + "decimal": 8, + "name": "Telex" + }, + { + "address": "0x3209f98BeBF0149B769ce26D71F7aEA8E435EfEa", + "symbol": "TMT", + "decimal": 18, + "name": "TRAXIA" + }, + { + "address": "0x10086399DD8c1e3De736724AF52587a2044c9fA2", + "symbol": "TMTG", + "decimal": 18, + "name": "TMTG" + }, + { + "address": "0xF7920B0768Ecb20A123fAc32311d07D193381d6f", + "symbol": "TNB", + "decimal": 18, + "name": "Time Bank" + }, + { + "address": "0xb0280743b44bF7db4B6bE482b2Ba7b75E5dA096C", + "symbol": "TNS", + "decimal": 18, + "name": "Transcodium" + }, + { + "address": "0x08f5a9235B08173b7569F83645d2c7fB55e8cCD8", + "symbol": "TNT", + "decimal": 8, + "name": "Tierion Network Token" + }, + { + "address": "0x9a49f02e128a8E989b443a8f94843C0918BF45E7", + "symbol": "TOK", + "decimal": 8, + "name": "TOKOK" + }, + { + "address": "0x8b353021189375591723E7384262F45709A3C3dC", + "symbol": "TOMO", + "decimal": 18, + "name": "Tomocoin" + }, + { + "address": "0x8eb965ee9cCFBCE76c0a06264492c0afEfc2826d", + "symbol": "TOOR", + "decimal": 18, + "name": "ToorCoin" + }, + { + "address": "0xaA7a9CA87d3694B5755f213B5D04094b8d0F0A6F", + "symbol": "TRAC", + "decimal": 18, + "name": "OriginTrail" + }, + { + "address": "0x12759512D326303B45f1ceC8F7B6fd96F387778E", + "symbol": "TRAK", + "decimal": 18, + "name": "TrakInvest" + }, + { + "address": "0xcB3F902bf97626391bF8bA87264bbC3DC13469be", + "symbol": "TRC", + "decimal": 18, + "name": "The Real Coin" + }, + { + "address": "0x566Fd7999B1Fc3988022bD38507A48F0bCf22c77", + "symbol": "TRCN", + "decimal": 18, + "name": "The Real Coin" + }, + { + "address": "0x30ceCB5461A449A90081F5a5F55db4e048397BAB", + "symbol": "TRCT", + "decimal": 8, + "name": "Tracto" + }, + { + "address": "0x33f90Dee07c6E8B9682dD20F73E6C358B2ED0f03", + "symbol": "TRDT", + "decimal": 0, + "name": "Trident Group" + }, + { + "address": "0xCb94be6f13A1182E4A4B6140cb7bf2025d28e41B", + "symbol": "TRST", + "decimal": 6, + "name": "WeTrust" + }, + { + "address": "0xf230b790E05390FC8295F4d3F60332c93BEd42e2", + "symbol": "TRX", + "decimal": 6, + "name": "Tron Lab Token" + }, + { + "address": "0x6B87999bE87358065bBdE41e8a0fe0B7b1cd2514", + "symbol": "TSW", + "decimal": 18, + "name": "TeslaWatt" + }, + { + "address": "0xaaB606817809841E8b1168be8779Eeaf6744Ef64", + "symbol": "TTA", + "decimal": 18, + "name": "Tend Token" + }, + { + "address": "0x9389434852b94bbaD4c8AfEd5B7BDBc5Ff0c2275", + "symbol": "TTC", + "decimal": 18, + "name": "TTC Protocol" + }, + { + "address": "0x9CDa8A60dd5AfA156c95Bd974428d91a0812e054", + "symbol": "TTU", + "decimal": 18, + "name": "TaTaTu" + }, + { + "address": "0xa838be6E4b760E6061D4732D6B9F11Bf578f9A76", + "symbol": "TTV", + "decimal": 18, + "name": "TV-TWO: Token for Television" + }, + { + "address": "0x0000000000085d4780B73119b644AE5ecd22b376", + "symbol": "TUSD", + "decimal": 18, + "name": "TrueUSD" + }, + { + "address": "0x8dd5fbCe2F6a956C3022bA3663759011Dd51e73E", + "symbol": "TUSD (OLD)", + "decimal": 18, + "name": "TrueUSD" + }, + { + "address": "0x2eF1aB8a26187C58BB8aAeB11B2fC6D25C5c0716", + "symbol": "TWN", + "decimal": 18, + "name": "The World News" + }, + { + "address": "0xfbd0d1c77B501796A35D86cF91d65D9778EeE695", + "symbol": "TWNKL", + "decimal": 3, + "name": "Twinkle" + }, + { + "address": "0x8400D94A5cb0fa0D041a3788e395285d61c9ee5e", + "symbol": "UBT", + "decimal": 8, + "name": "Unibright" + }, + { + "address": "0x92e52a1A235d9A103D970901066CE910AAceFD37", + "symbol": "UCASH", + "decimal": 8, + "name": "U.CASH" + }, + { + "address": "0xAAf37055188Feee4869dE63464937e683d61b2a1", + "symbol": "UCN", + "decimal": 18, + "name": "UChain" + }, + { + "address": "0xEA097A2b1dB00627B2Fa17460Ad260c016016977", + "symbol": "UFR", + "decimal": 18, + "name": "Upfiring" + }, + { + "address": "0x24692791Bc444c5Cd0b81e3CBCaba4b04Acd1F3B", + "symbol": "UKG", + "decimal": 18, + "name": "UnikoinGold" + }, + { + "address": "0x105d97ef2E723f1cfb24519Bc6fF15a6D091a3F1", + "symbol": "UMKA", + "decimal": 4, + "name": "UMKA" + }, + { + "address": "0x8e5afc69f6227A3ad75eD346c8723Bc62ce97123", + "symbol": "UMKA (1)", + "decimal": 4, + "name": "UMKA" + }, + { + "address": "0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7", + "symbol": "Unicorn", + "decimal": 0, + "name": "Unicorn" + }, + { + "address": "0x6Ba460AB75Cd2c56343b3517ffeBA60748654D26", + "symbol": "UP", + "decimal": 8, + "name": "UpToken" + }, + { + "address": "0xC86D054809623432210c107af2e3F619DcFbf652", + "symbol": "UPP", + "decimal": 18, + "name": "Sentinel Protocol" + }, + { + "address": "0xD01DB73E047855Efb414e6202098C4Be4Cd2423B", + "symbol": "UQC", + "decimal": 18, + "name": "Uquid Coin" + }, + { + "address": "0x931684139f756C24eC0731E9F74FE50e5548dDeF", + "symbol": "URB", + "decimal": 18, + "name": "Urbit Data" + }, + { + "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "symbol": "USDC", + "decimal": 6, + "name": "USD//Coin" + }, + { + "address": "0xD760ADdFb24D9C01Fe4Bfea7475C5e3636684058", + "symbol": "USDM", + "decimal": 2, + "name": "Mether (USDM)" + }, + { + "address": "0xA4Bdb11dc0a2bEC88d24A3aa1E6Bb17201112eBe", + "symbol": "USDS", + "decimal": 6, + "name": "StableUSD" + }, + { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "symbol": "USDT", + "decimal": 6, + "name": "USD Tether (erc20)" + }, + { + "address": "0x70a72833d6bF7F508C8224CE59ea1Ef3d0Ea3A38", + "symbol": "UTK", + "decimal": 18, + "name": "UTRUST" + }, + { + "address": "0x9e3319636e2126e3c0bc9e3134AEC5e1508A46c7", + "symbol": "UTNP", + "decimal": 18, + "name": "Universa" + }, + { + "address": "0x16f812Be7FfF02cAF662B85d5d58a5da6572D4Df", + "symbol": "UTT", + "decimal": 8, + "name": "United Traders Token" + }, + { + "address": "0x3543638eD4a9006E4840B105944271Bcea15605D", + "symbol": "UUU", + "decimal": 18, + "name": "U Networks" + }, + { + "address": "0x9a9bB9b4b11BF8eccff84B58a6CCCCD4058A7f0D", + "symbol": "VD", + "decimal": 8, + "name": "Bitcoin Card" + }, + { + "address": "0x57C75ECCc8557136D32619a191fBCDc88560d711", + "symbol": "VDG", + "decimal": 0, + "name": "VeriDocGlobal" + }, + { + "address": "0x82BD526bDB718C6d4DD2291Ed013A5186cAE2DCa", + "symbol": "VDOC", + "decimal": 18, + "name": "Duty of Care Token" + }, + { + "address": "0x340D2bdE5Eb28c1eed91B2f790723E3B160613B7", + "symbol": "VEE", + "decimal": 18, + "name": "BLOCKv" + }, + { + "address": "0xFADe17a07ba3B480aA1714c3724a52D4C57d410E", + "symbol": "VEGAN", + "decimal": 8, + "name": "Vegan" + }, + { + "address": "0xD850942eF8811f2A866692A623011bDE52a462C1", + "symbol": "VEN", + "decimal": 18, + "name": "VeChain" + }, + { + "address": "0xEbeD4fF9fe34413db8fC8294556BBD1528a4DAca", + "symbol": "VENUS", + "decimal": 3, + "name": "VENUS" + }, + { + "address": "0x8f3470A7388c05eE4e7AF3d01D8C722b0FF52374", + "symbol": "VERI", + "decimal": 18, + "name": "Veritaseum" + }, + { + "address": "0x1B879d3812F2Ade1214264655B473910e0caF1e6", + "symbol": "VERSI", + "decimal": 18, + "name": "VersiCoin" + }, + { + "address": "0x2C974B2d0BA1716E644c1FC59982a89DDD2fF724", + "symbol": "VIB", + "decimal": 18, + "name": "Viberate" + }, + { + "address": "0xe8Ff5C9c75dEb346acAc493C463C8950Be03Dfba", + "symbol": "VIBE", + "decimal": 18, + "name": "VIBE Coin" + }, + { + "address": "0x882448f83d90B2bf477Af2eA79327fDEA1335D93", + "symbol": "VIBEX", + "decimal": 18, + "name": "VIBEX Exchange Token" + }, + { + "address": "0x445f51299Ef3307dBD75036dd896565F5B4BF7A5", + "symbol": "VIDT", + "decimal": 18, + "name": "V-ID Token" + }, + { + "address": "0xF03f8D65BaFA598611C3495124093c56e8F638f0", + "symbol": "VIEW", + "decimal": 18, + "name": "Viewly" + }, + { + "address": "0xd2946be786F35c3Cc402C29b323647aBda799071", + "symbol": "VIKKY", + "decimal": 8, + "name": "VikkyToken" + }, + { + "address": "0xF3e014fE81267870624132ef3A646B8E83853a96", + "symbol": "VIN", + "decimal": 18, + "name": "VIN" + }, + { + "address": "0x23b75Bc7AaF28e2d6628C3f424B3882F8f072a3c", + "symbol": "VIT", + "decimal": 18, + "name": "Vice Industry Token" + }, + { + "address": "0x1b793E49237758dBD8b752AFC9Eb4b329d5Da016", + "symbol": "VITE", + "decimal": 18, + "name": "Vite" + }, + { + "address": "0x519475b31653E46D20cD09F9FdcF3B12BDAcB4f5", + "symbol": "VIU", + "decimal": 18, + "name": "Viuly" + }, + { + "address": "0x922aC473A3cC241fD3a0049Ed14536452D58D73c", + "symbol": "VLD", + "decimal": 18, + "name": "VETRI" + }, + { + "address": "0xc3bC9Eb71f75Ec439A6b6C8E8b746fCF5b62F703", + "symbol": "VOC", + "decimal": 18, + "name": "VORMACOIN" + }, + { + "address": "0x83eEA00D838f92dEC4D1475697B9f4D3537b56E3", + "symbol": "VOISE", + "decimal": 8, + "name": "Voise" + }, + { + "address": "0xF722B01910F93B84EDa9CA128b9F05821A41EAe1", + "symbol": "VRE", + "decimal": 18, + "name": "Vrenelium" + }, + { + "address": "0x92E78dAe1315067a8819EFD6dCA432de9DCdE2e9", + "symbol": "VRS", + "decimal": 6, + "name": "Veros" + }, + { + "address": "0xeDBaF3c5100302dCddA53269322f3730b1F0416d", + "symbol": "VRS (1)", + "decimal": 5, + "name": "Veros" + }, + { + "address": "0xBA3a79D758f19eFe588247388754b8e4d6EddA81", + "symbol": "VSF", + "decimal": 18, + "name": "VeriSafe" + }, + { + "address": "0x5c543e7AE0A1104f78406C340E9C64FD9fCE5170", + "symbol": "VSL", + "decimal": 18, + "name": "Vdice" + }, + { + "address": "0x4b96bf1feF93A216914fc843D81207A027ce52b3", + "symbol": "VUU", + "decimal": 18, + "name": "Vuulr Token" + }, + { + "address": "0x9720b467a710382A232a32F540bDCed7d662a10B", + "symbol": "VZT", + "decimal": 18, + "name": "Vezt" + }, + { + "address": "0x4BBbC57aF270138Ef2FF2C50DbfAD684e9E0e604", + "symbol": "WAB", + "decimal": 18, + "name": "WABnetwork" + }, + { + "address": "0x286BDA1413a2Df81731D4930ce2F862a35A609fE", + "symbol": "WABI", + "decimal": 18, + "name": "Tael" + }, + { + "address": "0x9f6513ED2b0DE89218E97DB4A5115ba04Be449f1", + "symbol": "WAK", + "decimal": 18, + "name": "Wak Coin" + }, + { + "address": "0x829A4cA1303383F1082B6B1fB937116e4b3b5605", + "symbol": "WATT", + "decimal": 18, + "name": "WorkChain App Token" + }, + { + "address": "0x39Bb259F66E1C59d5ABEF88375979b4D20D98022", + "symbol": "WAX", + "decimal": 8, + "name": "WAX" + }, + { + "address": "0x74951B677de32D596EE851A233336926e6A2cd09", + "symbol": "WBA", + "decimal": 7, + "name": "WeBetCrypto" + }, + { + "address": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", + "symbol": "WBTC", + "decimal": 8, + "name": "Wrapped Bitcoin" + }, + { + "address": "0x8F936fE0faF0604c9C0Ef2406bde0A65365515d6", + "symbol": "WCN", + "decimal": 18, + "name": "WorldCoinNetwork" + }, + { + "address": "0x6a0A97E47d15aAd1D132a1Ac79a480E3F2079063", + "symbol": "WCT", + "decimal": 18, + "name": "WePower" + }, + { + "address": "0x840fe75ABfaDc0F2d54037829571B2782e919ce4", + "symbol": "WEB", + "decimal": 18, + "name": "Webcoin" + }, + { + "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "symbol": "WETH", + "decimal": 18, + "name": "WETH" + }, + { + "address": "0xF4FE95603881D0e07954fD7605E0e9a916e42C44", + "symbol": "WHEN", + "decimal": 18, + "name": "WHEN Token" + }, + { + "address": "0xe200641890772FCe8eE6EDc5354cCEa30ac92F49", + "symbol": "WHO", + "decimal": 18, + "name": "WhoHas" + }, + { + "address": "0xe933c0Cd9784414d5F278C114904F5A84b396919", + "symbol": "WHO (1)", + "decimal": 18, + "name": "WhoHas" + }, + { + "address": "0x3F17Dd476faF0a4855572F0B6ed5115D9bBA22AD", + "symbol": "WIB", + "decimal": 18, + "name": "Wibson Token" + }, + { + "address": "0x5e4ABE6419650CA839Ce5BB7Db422b881a6064bB", + "symbol": "WiC", + "decimal": 18, + "name": "Wi Coin" + }, + { + "address": "0x62CD07D414Ec50B68C7EcAa863a23d344f2d062f", + "symbol": "WIC", + "decimal": 0, + "name": "WickNote" + }, + { + "address": "0xD3C00772B24D997A812249ca637a921e81357701", + "symbol": "WILD", + "decimal": 18, + "name": "WILD Token" + }, + { + "address": "0x899338b84D25aC505a332aDCE7402d697D947494", + "symbol": "WIN", + "decimal": 8, + "name": "WCOIN" + }, + { + "address": "0x667088b212ce3d06a1b553a7221E1fD19000d9aF", + "symbol": "WINGS", + "decimal": 18, + "name": "WINGS" + }, + { + "address": "0x1b22C32cD936cB97C28C5690a0695a82Abf688e6", + "symbol": "WISH", + "decimal": 18, + "name": "MyWish" + }, + { + "address": "0xBFbe5332f172d77811bC6c272844f3e54A7B23bB", + "symbol": "WMK", + "decimal": 18, + "name": "WemarkToken" + }, + { + "address": "0xd73A66B8FB26Be8B0AcD7c52Bd325054Ac7d468b", + "symbol": "WNK", + "decimal": 18, + "name": "Woonk" + }, + { + "address": "0xF9D9702D031407F425a4412682fDc56b07d05262", + "symbol": "WOC", + "decimal": 0, + "name": "WallOfChain" + }, + { + "address": "0xF6B55acBBC49f4524Aa48D19281A9A77c54DE10f", + "symbol": "WOLK", + "decimal": 18, + "name": "Wolk Token" + }, + { + "address": "0x728781E75735dc0962Df3a51d7Ef47E798A7107E", + "symbol": "WOLK (WOLK)", + "decimal": 18, + "name": "WOLK" + }, + { + "address": "0xA686514FAF7d54289266F483D1e4852C99E13EC7", + "symbol": "WORK", + "decimal": 8, + "name": "Aworker" + }, + { + "address": "0xD18e454D844eb0009D32E07A0Cde89E18d64CFb4", + "symbol": "WORK (workTOKEN)", + "decimal": 18, + "name": "workTOKEN" + }, + { + "address": "0x62087245087125d3DB5B9A3D713d78E7BBc31e54", + "symbol": "WPC", + "decimal": 18, + "name": "WorldPeaceCoin" + }, + { + "address": "0x4CF488387F035FF08c371515562CBa712f9015d4", + "symbol": "WPR", + "decimal": 18, + "name": "WePower Token" + }, + { + "address": "0x72aDadb447784dd7AB1F472467750fC485e4cb2d", + "symbol": "WRC", + "decimal": 6, + "name": "Worldcore" + }, + { + "address": "0x71e8d74fF1C923E369D0e70DFb09866629C4DD35", + "symbol": "WRK", + "decimal": 18, + "name": "WorkCoin" + }, + { + "address": "0xb7cB1C96dB6B22b0D3d9536E0108d062BD488F74", + "symbol": "WTC", + "decimal": 18, + "name": "Waltonchain" + }, + { + "address": "0x84119cb33E8F590D75c2D6Ea4e6B0741a7494EDA", + "symbol": "WTT", + "decimal": 0, + "name": "WTT" + }, + { + "address": "0xd8950fDeaa10304B7A7Fd03a2FC66BC39f3c711a", + "symbol": "WYS", + "decimal": 18, + "name": "wystoken" + }, + { + "address": "0x056017c55aE7AE32d12AeF7C679dF83A85ca75Ff", + "symbol": "WYV", + "decimal": 18, + "name": "WyvernToken" + }, + { + "address": "0x910Dfc18D6EA3D6a7124A6F8B5458F281060fa4c", + "symbol": "X8X", + "decimal": 18, + "name": "X8X" + }, + { + "address": "0x4DF812F6064def1e5e029f1ca858777CC98D2D81", + "symbol": "XAUR", + "decimal": 8, + "name": "Xaurum" + }, + { + "address": "0x49AeC0752E68D0282Db544C677f6BA407BA17ED7", + "symbol": "XBL", + "decimal": 18, + "name": "Billionaire Token" + }, + { + "address": "0x28dee01D53FED0Edf5f6E310BF8Ef9311513Ae40", + "symbol": "XBP", + "decimal": 18, + "name": "BlitzPredict" + }, + { + "address": "0x4d829f8C92a6691c56300D020c9e0dB984Cfe2BA", + "symbol": "XCC", + "decimal": 18, + "name": "CoinCrowd" + }, + { + "address": "0xB4272071eCAdd69d933AdcD19cA99fe80664fc08", + "symbol": "XCHF", + "decimal": 18, + "name": "CryptoFranc" + }, + { + "address": "0x0843971B4ac6e842a518AA184e0271d88B5cB74F", + "symbol": "XCL", + "decimal": 8, + "name": "CLASSIE" + }, + { + "address": "0x1E26b3D07E57F453caE30F7DDd2f945f5bF3EF33", + "symbol": "XCLR", + "decimal": 8, + "name": "ClearCoin" + }, + { + "address": "0x41AB1b6fcbB2fA9DCEd81aCbdeC13Ea6315F2Bf2", + "symbol": "XDCE", + "decimal": 18, + "name": "XinFin Network" + }, + { + "address": "0xA017ac5faC5941f95010b12570B812C974469c2C", + "symbol": "XES", + "decimal": 18, + "name": "Proxeus" + }, + { + "address": "0x054C64741dBafDC19784505494029823D89c3b13", + "symbol": "XET", + "decimal": 8, + "name": "ETERNAL TOKEN" + }, + { + "address": "0x16aF5bfb4Ae7E475b9aDC3Bf5Cb2f1E6a50d7940", + "symbol": "XFS", + "decimal": 8, + "name": "Fanship" + }, + { + "address": "0xf6b6AA0Ef0f5Edc2C1c5d925477F97eAF66303e7", + "symbol": "XGG", + "decimal": 8, + "name": "Going Gems" + }, + { + "address": "0x533ef0984b2FAA227AcC620C67cce12aA39CD8CD", + "symbol": "XGM", + "decimal": 8, + "name": "XGM" + }, + { + "address": "0x30f4A3e0aB7a76733D8b60b89DD93c3D0b4c9E2f", + "symbol": "XGT", + "decimal": 18, + "name": "XGT" + }, + { + "address": "0xB110eC7B1dcb8FAB8dEDbf28f53Bc63eA5BEdd84", + "symbol": "XID", + "decimal": 8, + "name": "Sphere Identity" + }, + { + "address": "0x44449Fa4d607F807d1eD4a69ad942971728391C8", + "symbol": "XMCT", + "decimal": 18, + "name": "XMED Chain" + }, + { + "address": "0x0f8c45B896784A1E408526B9300519ef8660209c", + "symbol": "XMX", + "decimal": 8, + "name": "XMax" + }, + { + "address": "0xBC86727E770de68B1060C91f6BB6945c73e10388", + "symbol": "XNK", + "decimal": 18, + "name": "Ink Protocol" + }, + { + "address": "0xab95E915c123fdEd5BDfB6325e35ef5515F1EA69", + "symbol": "XNN", + "decimal": 18, + "name": "XENON" + }, + { + "address": "0x572E6f318056ba0C5d47A422653113843D250691", + "symbol": "XNT", + "decimal": 0, + "name": "XNT" + }, + { + "address": "0x153eD9CC1b792979d2Bde0BBF45CC2A7e436a5F9", + "symbol": "XOV", + "decimal": 18, + "name": "XOVBank" + }, + { + "address": "0x90528aeb3a2B736B780fD1B6C478bB7E1d643170", + "symbol": "XPA", + "decimal": 18, + "name": "XPA" + }, + { + "address": "0xBB1fA4FdEB3459733bF67EbC6f893003fA976a82", + "symbol": "XPAT", + "decimal": 18, + "name": "Pangea Arbitration Token" + }, + { + "address": "0xB24754bE79281553dc1adC160ddF5Cd9b74361a4", + "symbol": "XRL", + "decimal": 9, + "name": "XRL" + }, + { + "address": "0x0F513fFb4926ff82D7F60A05069047AcA295C413", + "symbol": "XSC", + "decimal": 18, + "name": "XSC" + }, + { + "address": "0x55296f69f40Ea6d20E478533C15A6B08B654E758", + "symbol": "XYO", + "decimal": 18, + "name": "XYO" + }, + { + "address": "0x922105fAd8153F516bCfB829f56DC097a0E1D705", + "symbol": "YEE", + "decimal": 18, + "name": "Yee Token" + }, + { + "address": "0x6F7A4bac3315B5082F793161a22e26666d22717f", + "symbol": "YEED", + "decimal": 18, + "name": "YEED" + }, + { + "address": "0xcA2796F9F61dc7b238Aab043971e49c6164DF375", + "symbol": "YEED (YGGDRASH)", + "decimal": 18, + "name": "YGGDRASH" + }, + { + "address": "0x1BC7C1dE0AC6eF4fDeC35c053030D90cf54c7e9A", + "symbol": "YNN", + "decimal": 18, + "name": "YANG" + }, + { + "address": "0xcbeAEc699431857FDB4d37aDDBBdc20E132D4903", + "symbol": "YOYOW", + "decimal": 18, + "name": "YOYOW" + }, + { + "address": "0xD9A12Cde03a86E800496469858De8581D3A5353d", + "symbol": "YUP", + "decimal": 18, + "name": "Crowdholding" + }, + { + "address": "0x0F33bb20a282A7649C7B3AFf644F084a9348e933", + "symbol": "YUPIE", + "decimal": 18, + "name": "YUPIE" + }, + { + "address": "0x6781a0F84c7E9e846DCb84A9a5bd49333067b104", + "symbol": "ZAP", + "decimal": 18, + "name": "ZAP" + }, + { + "address": "0xb9EF770B6A5e12E45983C5D80545258aA38F3B78", + "symbol": "ZCN", + "decimal": 10, + "name": "0chain" + }, + { + "address": "0x2008e3057BD734e10AD13c9EAe45Ff132aBc1722", + "symbol": "ZCO", + "decimal": 8, + "name": "Zebi" + }, + { + "address": "0x7A41e0517a5ecA4FdbC7FbebA4D4c47B9fF6DC63", + "symbol": "ZCS", + "decimal": 18, + "name": "Zeusshield" + }, + { + "address": "0xe7E4279b80D319EDe2889855135A22021baf0907", + "symbol": "ZEUS", + "decimal": 18, + "name": "ZeusNetwork" + }, + { + "address": "0x05f4a42e251f2d52b8ed15E9FEdAacFcEF1FAD27", + "symbol": "ZIL", + "decimal": 12, + "name": "Zilliqa" + }, + { + "address": "0x4AaC461C86aBfA71e9d00d9a2cde8d74E4E1aeEa", + "symbol": "ZINC", + "decimal": 18, + "name": "ZINC" + }, + { + "address": "0xA9d2927d3a04309E008B6af6E2e282AE2952e7fD", + "symbol": "ZIP", + "decimal": 18, + "name": "Zipper" + }, + { + "address": "0xEDD7c94FD7B4971b916d15067Bc454b9E1bAD980", + "symbol": "ZIPT", + "decimal": 18, + "name": "Zippie" + }, + { + "address": "0xf3C092cA8CD6D3d4ca004Dc1d0f1fe8CcAB53599", + "symbol": "ZIX", + "decimal": 18, + "name": "ZIX" + }, + { + "address": "0xfd8971d5E8E1740cE2d0A84095fCA4De729d0c16", + "symbol": "ZLA", + "decimal": 18, + "name": "Zilla" + }, + { + "address": "0x554FFc77F4251a9fB3c0E3590a6a205f8d4e067D", + "symbol": "ZMN", + "decimal": 18, + "name": "ZMINE" + }, + { + "address": "0xb5b8F5616Fe42d5ceCA3e87F3FddbDd8F496d760", + "symbol": "ZPR", + "decimal": 18, + "name": "ZPER" + }, + { + "address": "0xE41d2489571d322189246DaFA5ebDe1F4699F498", + "symbol": "ZRX", + "decimal": 18, + "name": "0x Project" + }, + { + "address": "0xe386B139Ed3715Ca4B18Fd52671bDcea1cdFE4b1", + "symbol": "ZST", + "decimal": 8, + "name": "Zeus Exchange" + }, + { + "address": "0xE8F9fa977ea585591d9F394681318C16552577fB", + "symbol": "ZTX", + "decimal": 18, + "name": "ZTX" + }, + { + "address": "0x83e2BE8d114F9661221384B3a50d24B96a5653F5", + "symbol": "ZXC", + "decimal": 18, + "name": "0xcert Protocol Token" + } +] \ No newline at end of file diff --git a/common/v2/config/tokens/exp.json b/common/v2/config/tokens/exp.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/common/v2/config/tokens/exp.json @@ -0,0 +1 @@ +[] diff --git a/common/v2/config/tokens/goerli.json b/common/v2/config/tokens/goerli.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/common/v2/config/tokens/goerli.json @@ -0,0 +1 @@ +[] diff --git a/common/v2/config/tokens/index.ts b/common/v2/config/tokens/index.ts new file mode 100644 index 000000000..4955e5dce --- /dev/null +++ b/common/v2/config/tokens/index.ts @@ -0,0 +1,46 @@ +import ETC from './etc.json'; +import ETH from './eth.json'; +import EXP from './exp.json'; +import Kovan from './kovan.json'; +import Rinkeby from './rinkeby.json'; +import Ropsten from './ropsten.json'; +import Goerli from './goerli.json'; +import RSK from './rsk.json'; +import UBQ from './ubq.json'; +import ESN from './esn.json'; +import ARTIS_SIGMA1 from './artis_sigma1.json'; +import ARTIS_TAU1 from './artis_tau1.json'; + +export interface Asset { + address: string; + symbol: string; + decimal: number; + name: string; +} + +export interface NetworksAssets { + [key: string]: [Asset]; +} + +export interface ExtendedToken { + address: string; + symbol: string; + decimal: number; + name: string; + error?: string | null; +} + +export default { + ETC, + ETH, + EXP, + Kovan, + Rinkeby, + Ropsten, + Goerli, + RSK, + UBQ, + ESN, + ARTIS_SIGMA1, + ARTIS_TAU1 +} as NetworksAssets; diff --git a/common/v2/config/tokens/kovan.json b/common/v2/config/tokens/kovan.json new file mode 100644 index 000000000..0b0c1bd39 --- /dev/null +++ b/common/v2/config/tokens/kovan.json @@ -0,0 +1,16 @@ +[ + { + "address": "0x3C67f7D4decF7795225f51b54134F81137385f83", + "symbol": "GUP", + "name": "GUP", + "decimal": 3, + "type": "default" + }, + { + "address": "0x8667559254241ddeD4d11392f868d72092765367", + "symbol": "Aeternity", + "name": "Aeternity", + "decimal": 18, + "type": "default" + } +] diff --git a/common/v2/config/tokens/rinkeby.json b/common/v2/config/tokens/rinkeby.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/common/v2/config/tokens/rinkeby.json @@ -0,0 +1 @@ +[] diff --git a/common/v2/config/tokens/ropsten.json b/common/v2/config/tokens/ropsten.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/common/v2/config/tokens/ropsten.json @@ -0,0 +1 @@ +[] diff --git a/common/v2/config/tokens/rsk.json b/common/v2/config/tokens/rsk.json new file mode 100644 index 000000000..cbc51c65e --- /dev/null +++ b/common/v2/config/tokens/rsk.json @@ -0,0 +1,8 @@ +[ + { + "address": "0x2acc95758f8b5f583470ba265eb685a8f45fc9d5", + "symbol": "RIF", + "name": "RIF", + "decimal": 18 + } +] diff --git a/common/v2/config/tokens/rsk_testnet.json b/common/v2/config/tokens/rsk_testnet.json new file mode 100644 index 000000000..c4195fab9 --- /dev/null +++ b/common/v2/config/tokens/rsk_testnet.json @@ -0,0 +1,8 @@ +[ + { + "address": "0xd8c5adcac8d465c5a2d0772b86788e014ddec516", + "symbol": "tRIF", + "name": "tRIF", + "decimal": 18 + } +] diff --git a/common/v2/config/tokens/ubq.json b/common/v2/config/tokens/ubq.json new file mode 100644 index 000000000..83e00e6c4 --- /dev/null +++ b/common/v2/config/tokens/ubq.json @@ -0,0 +1,16 @@ +[ + { + "address": "0xd245207cfbf6eb6f34970db2a807ab1d178fde6c", + "symbol": "APX", + "name": "APX", + "decimal": 8, + "type": "default" + }, + { + "address": "0x4b4899a10f3e507db207b0ee2426029efa168a67", + "symbol": "QWARK", + "name": "QWARK", + "decimal": 8, + "type": "default" + } +] diff --git a/common/v2/index.ts b/common/v2/index.ts index cacd0dc82..878206d8e 100644 --- a/common/v2/index.ts +++ b/common/v2/index.ts @@ -1,3 +1,4 @@ export * from './features'; export * from './routing'; export * from './services'; +export * from './config'; diff --git a/common/v2/services/AssetOption/types.ts b/common/v2/services/AssetOption/types.ts index fe67e89a7..cd2bffcb5 100644 --- a/common/v2/services/AssetOption/types.ts +++ b/common/v2/services/AssetOption/types.ts @@ -4,7 +4,7 @@ export interface AssetOption { ticker: string; type: string; decimal: number; - contractAddress: null; + contractAddress: string | null; } export interface ExtendedAssetOption extends AssetOption { diff --git a/common/v2/services/LocalCache/LocalCache.ts b/common/v2/services/LocalCache/LocalCache.ts index 3b968ecaa..4e764a3ea 100644 --- a/common/v2/services/LocalCache/LocalCache.ts +++ b/common/v2/services/LocalCache/LocalCache.ts @@ -1,15 +1,8 @@ import * as utils from 'v2/libs'; import * as types from 'v2/services'; -import { - CACHE_INIT, - CACHE_INIT_DEV, - CACHE_KEY, - ENCRYPTED_CACHE_KEY, - LocalCache -} from './constants'; -import { isDevelopment } from 'v2/utils'; +import { CACHE_INIT, CACHE_KEY, ENCRYPTED_CACHE_KEY, LocalCache } from './constants'; import { DPaths, Fiats } from 'config'; -import { ContractsData } from 'config/cacheData'; +import { ContractsData, AssetOptionsData } from 'v2/config/cacheData'; import { ACCOUNTTYPES } from 'v2/config'; import { NODE_CONFIGS } from 'libs/nodes'; import { STATIC_NETWORKS_INITIAL_STATE } from 'features/config/networks/static/reducer'; @@ -19,25 +12,23 @@ import { STATIC_NETWORKS_INITIAL_STATE } from 'features/config/networks/static/r export const initializeCache = () => { const check = localStorage.getItem(CACHE_KEY); if (!check || check === '[]' || check === '{}') { - if (isDevelopment) { - setCache(CACHE_INIT_DEV); - } else { - hardRefreshCache(); + hardRefreshCache(); - initDerivationPathOptions(); + initDerivationPathOptions(); - initFiatCurrencies(); + initFiatCurrencies(); - initNetworkOptions(); + initNetworkOptions(); - initNodeOptions(); + initNodeOptions(); - initAccountTypes(); + initAccountTypes(); - initGlobalSettings(); + initGlobalSettings(); - initContractOptions(); - } + initContractOptions(); + + initAssetOptions(); } }; @@ -82,17 +73,23 @@ export const initNodeOptions = () => { export const initNetworkOptions = () => { const newStorage = getCacheRaw(); - const length: string[] = Object.keys(STATIC_NETWORKS_INITIAL_STATE); - length.map((en: any) => { + const allNetworks: string[] = Object.keys(STATIC_NETWORKS_INITIAL_STATE); + allNetworks.map((en: any) => { const newContracts: string[] = []; + const newAssetOptions: string[] = []; Object.keys(newStorage.contractOptions).map(entry => { if (newStorage.contractOptions[entry].network === en) { newContracts.push(entry); } }); + Object.keys(newStorage.assetOptions).map(entry => { + if (newStorage.assetOptions[entry].network === en) { + newAssetOptions.push(entry); + } + }); const newLocalNetwork: types.NetworkOptions = { contracts: newContracts, - assets: [], + assets: [STATIC_NETWORKS_INITIAL_STATE[en].id, ...newAssetOptions], nodes: [], id: STATIC_NETWORKS_INITIAL_STATE[en].id, name: STATIC_NETWORKS_INITIAL_STATE[en].name, @@ -107,7 +104,26 @@ export const initNetworkOptions = () => { gasPriceSettings: STATIC_NETWORKS_INITIAL_STATE[en].gasPriceSettings, shouldEstimateGasPrice: STATIC_NETWORKS_INITIAL_STATE[en].shouldEstimateGasPrice }; + const newLocalAssetOption: types.AssetOption = { + name: STATIC_NETWORKS_INITIAL_STATE[en].name, + network: en, + ticker: en, + type: 'base', + decimal: 18, + contractAddress: null + }; newStorage.networkOptions[en] = newLocalNetwork; + newStorage.assetOptions[STATIC_NETWORKS_INITIAL_STATE[en].id] = newLocalAssetOption; + }); + setCache(newStorage); +}; + +export const initAssetOptions = () => { + const newStorage = getCacheRaw(); + const contracts = AssetOptionsData(); + Object.keys(contracts).map(en => { + newStorage.assetOptions[en] = contracts[en]; + newStorage.networkOptions[contracts[en].network].contracts.push(en); }); setCache(newStorage); }; diff --git a/scripts/update-tokens-utils.ts b/scripts/update-tokens-utils.ts index b6e44a8b2..015af4537 100644 --- a/scripts/update-tokens-utils.ts +++ b/scripts/update-tokens-utils.ts @@ -1,5 +1,6 @@ import { RawTokenJSON, ValidatedTokenJSON, NormalizedTokenJSON } from './types/TokensJson'; import { Token } from '../shared/types/network'; +import { ExtendedToken } from 'v2/config/tokens'; interface StrIdx { [key: string]: T; } @@ -8,13 +9,19 @@ const excludedTokens: string[] = [ '0xE94327D07Fc17907b4DB788E5aDf2ed424adDff6' ]; -function processTokenJson(tokensJson: RawTokenJSON[]): Token[] { +function processTokenJson(tokensJson: RawTokenJSON[]): {tokens: Token[], extendedTokens: ExtendedToken[]} { const normalizedTokens = tokensJson.map(validateTokenJSON).map(normalizeTokenJSON); checkForDuplicateAddresses(normalizedTokens); - return handleDuplicateSymbols(normalizedTokens) - .map(({ name: _, ...rest }) => rest) - .filter(filterExcludedTokens) - .sort((a, b) => a.symbol.localeCompare(b.symbol)); + return { + tokens: handleDuplicateSymbols(normalizedTokens) + .map(({ name: _, ...rest }) => rest) + .filter(filterExcludedTokens) + .sort((a, b) => a.symbol.localeCompare(b.symbol)), + extendedTokens: handleDuplicateSymbols(normalizedTokens) + .map(({ ...rest }) => rest) + .filter(filterExcludedTokens) + .sort((a, b) => a.symbol.localeCompare(b.symbol)) + }; } function validateTokenJSON(token: RawTokenJSON): ValidatedTokenJSON { diff --git a/scripts/update-tokens.ts b/scripts/update-tokens.ts index a4ee08ae0..08d6e4df8 100644 --- a/scripts/update-tokens.ts +++ b/scripts/update-tokens.ts @@ -1,6 +1,8 @@ import { GitCommit } from './types/GitCommit'; import { CommitStatus } from './types/CommitStatus'; import { RawTokenJSON } from './types/TokensJson'; +import { Token } from 'shared/types/network'; +import { ExtendedToken } from 'v2/config/tokens'; const { processTokenJson } = require('./update-tokens-utils'); const https = require('https'); @@ -60,18 +62,30 @@ async function run() { const tokensJson: RawTokenJSON[] = JSON.parse(await httpsGet(tokensUrl)); // Format the json to match our format in common/config/tokens/eth.json - const tokens = processTokenJson(tokensJson); + const tokensLists: {tokens: Token[], extendedTokens: ExtendedToken[]} = processTokenJson(tokensJson); - // Write to the file + // Write to the tokens file console.log('Writing Tokens JSON to common/config/tokens/eth.json...'); - const filePath = path.resolve(__dirname, '../common/config/tokens/eth.json'); - fs.writeFile(filePath, JSON.stringify(tokens, null, 2), 'utf8', (err: any) => { + const tokensFilePath = path.resolve(__dirname, '../common/config/tokens/eth.json'); + fs.writeFile(tokensFilePath, JSON.stringify(tokensLists.tokens, null, 2), 'utf8', (err: any) => { if (err) { console.error(err); throw new Error('Failed to write tokens json to file, see above error'); } - console.log('Succesfully imported', tokens.length, 'tokens!'); + console.log('Succesfully imported', tokensLists.tokens.length, 'tokens!'); + }); + + // Write to the extendedTokens file + console.log('Writing Tokens JSON to common/v2/config/tokens/eth.json...'); + const extendedTokensFilePath = path.resolve(__dirname, '../common/v2/config/tokens/eth.json'); + fs.writeFile(extendedTokensFilePath, JSON.stringify(tokensLists.extendedTokens, null, 2), 'utf8', (err: any) => { + if (err) { + console.error(err); + throw new Error('Failed to write tokens json to file, see above error'); + } + + console.log('Succesfully imported', tokensLists.extendedTokens.length, 'tokens!'); }); } From 04e3d40e2dcaa0210d84e693b2cac6735524bb84 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 7 May 2019 13:40:39 -0400 Subject: [PATCH 0454/1466] fix tests --- common/v2/config/data.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/config/data.tsx b/common/v2/config/data.tsx index 44133b152..7156fffc1 100644 --- a/common/v2/config/data.tsx +++ b/common/v2/config/data.tsx @@ -1,6 +1,6 @@ import React from 'react'; // For ANNOUNCEMENT_MESSAGE jsx import { getValues, makeExplorer } from 'utils/helpers'; -import packageJson from '../../package.json'; +import packageJson from '../../../package.json'; import { GasPriceSetting } from 'types/network'; import translate from 'translations'; From bdd7eb9887ca1b30a8bec4773688287dd966d0bb Mon Sep 17 00:00:00 2001 From: Azarielle Date: Tue, 7 May 2019 14:59:13 -0400 Subject: [PATCH 0455/1466] toggle password eye styled to designs --- common/assets/images/icn-show-closed-eye-svg.svg | 13 +++++++++++++ common/assets/images/icn-show-eye.svg | 6 ++++++ common/components/TogglablePassword.tsx | 4 +++- common/sass/styles/overrides/input-groups.scss | 3 +++ common/translations/lang/en.json | 2 +- 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 common/assets/images/icn-show-closed-eye-svg.svg create mode 100644 common/assets/images/icn-show-eye.svg diff --git a/common/assets/images/icn-show-closed-eye-svg.svg b/common/assets/images/icn-show-closed-eye-svg.svg new file mode 100644 index 000000000..9712dd5cd --- /dev/null +++ b/common/assets/images/icn-show-closed-eye-svg.svg @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/common/assets/images/icn-show-eye.svg b/common/assets/images/icn-show-eye.svg new file mode 100644 index 000000000..24027768f --- /dev/null +++ b/common/assets/images/icn-show-eye.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/common/components/TogglablePassword.tsx b/common/components/TogglablePassword.tsx index a5c25ebae..0f95f5dc8 100644 --- a/common/components/TogglablePassword.tsx +++ b/common/components/TogglablePassword.tsx @@ -6,6 +6,8 @@ import React from 'react'; import { Input, TextArea } from 'components/ui'; import './TogglablePassword.scss'; +import openEye from 'common/assets/images/icn-show-eye.svg'; +import closedEye from 'common/assets/images/icn-show-closed-eye-svg.svg'; interface Props { // Shared props @@ -106,7 +108,7 @@ export default class TogglablePassword extends React.PureComponent role="button" className="TogglablePassword-toggle input-group-addon" > - + {isVisible ? : }
              ); diff --git a/common/sass/styles/overrides/input-groups.scss b/common/sass/styles/overrides/input-groups.scss index 06d0a9f9a..d4fc7efb2 100644 --- a/common/sass/styles/overrides/input-groups.scss +++ b/common/sass/styles/overrides/input-groups.scss @@ -24,6 +24,9 @@ label { line-height: 1.4; margin-bottom: 1rem; padding: 0.75rem 1rem; + background-color: transparent; + border-left: none; + &--transparent { background-color: transparent; border: none; diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 0c3327d81..e0fc0bf53 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -836,6 +836,6 @@ "SCREEN_LOCK_TAB_TITLE_LOCKED": "MyCrypto (Locked)", "SCREEN_LOCK_TAB_TITLE_LOCKING": "Locking Screen in", "KEYSTORE_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-keystore-file)", - "MNEMONIC_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-mnemonic-phrase)]" + "MNEMONIC_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-mnemonic-phrase)" } } From e77a5cc4ba2ee9b1b26fb5afa317041bcc74e70b Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 7 May 2019 15:09:50 -0400 Subject: [PATCH 0456/1466] update most fields --- .../Dashboard/SendAssets/SendAssets.tsx | 18 +++-- .../components/ConfirmTransaction.tsx | 4 +- .../SendAssets/components/SendAssetsForm.tsx | 71 +++++++++++++------ .../components/TransactionComplete.tsx | 4 +- .../components/fields/AmountField.tsx | 10 +-- .../components/fields/AssetField.tsx | 14 ---- .../components/fields/DataField.tsx | 22 +++++- .../components/fields/GasLimitField.tsx | 20 +++++- .../components/fields/GasPriceField.tsx | 20 +++++- .../components/fields/NonceField.tsx | 20 +++++- 10 files changed, 141 insertions(+), 62 deletions(-) diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx index 93928ddec..b0521d7d4 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/Dashboard/SendAssets/SendAssets.tsx @@ -23,6 +23,7 @@ export interface TransactionFields { gasLimitField: string; // Use only if advanced tab is open AND isGasLimitManual is true gasPriceField: string; // Use only if advanced tab is open AND user has input gas price nonceField: string; // Use only if user has input a manual nonce value. + isAdvancedTransaction: boolean; // Used to indicate whether transaction fee slider should be displayed and if Advanced Tab fields should be displayed. } export interface RawTransactionValues { @@ -46,7 +47,6 @@ export interface SendState { isFetchingAssetPricing: boolean; // Used to indicate fetching CC rates for currently-selected asset. isEstimatingGasLimit: boolean; // Used to indicate that gas limit is being estimated using `eth_estimateGas` jsonrpc call. isGasLimitManual: boolean; // Used to indicate that user has un-clicked the user-input gas-limit checkbox. - isAdvancedTransaction: boolean; // Used to indicate whether transaction fee slider should be displayed and if Advanced Tab fields should be displayed. resolvedNSAddress: string; // Address returned when attempting to resolve an ENS/RNS address. recipientAddressLabel: string; // Recipient-address label found in address book. @@ -69,7 +69,8 @@ const getInitialState = (): SendState => { gasLimitEstimated: '21000', nonceEstimated: '0', nonceField: '0', - data: '' + data: '', + isAdvancedTransaction: isAdvancedQueryTransaction(location.search) || false // Used to indicate whether transaction fee slider should be displayed and if Advanced Tab fields should be displayed. }, rawTransactionValues: { from: '', @@ -86,7 +87,6 @@ const getInitialState = (): SendState => { isFetchingAssetPricing: false, // Used to indicate fetching CC rates for currently-selected asset. isEstimatingGasLimit: false, // Used to indicate that gas limit is being estimated using `eth_estimateGas` jsonrpc call. isGasLimitManual: false, // Used to indicate that user has un-clicked the user-input gas-limit checkbox. - isAdvancedTransaction: isAdvancedQueryTransaction(location.search) || false, // Used to indicate whether transaction fee slider should be displayed and if Advanced Tab fields should be displayed. resolvedNSAddress: '', // Address returned when attempting to resolve an ENS/RNS address. recipientAddressLabel: '', // Recipient-address label found in address book. @@ -120,10 +120,11 @@ export class SendAssets extends Component> { }} > @@ -141,6 +142,13 @@ export class SendAssets extends Component> { step: Math.min(0, prevState.step - 1) })); + private updateTransactionFields = (transactionFields: TransactionFields) => { + this.setState({ + ...this.state, + transactionFields + }); + }; + private updateState = (state: SendState) => { this.setState({ ...state diff --git a/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx b/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx index a67de9949..2257c6814 100644 --- a/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx @@ -11,7 +11,7 @@ import feeIcon from 'common/assets/images/icn-fee.svg'; import { AddressMetadataContext } from 'v2/providers'; interface Props { - values: SendState; + stateValues: SendState; onNext(): void; } @@ -30,7 +30,7 @@ export default class ConfirmTransaction extends Component { public render() { const { - values: { transactionFields: { senderAddress, recipientAddress } }, + stateValues: { transactionFields: { senderAddress, recipientAddress } }, onNext } = this.props; const { showingDetails } = this.state; diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx index 8f7d9f286..6fff1cf9b 100644 --- a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Formik, Form, Field } from 'formik'; import { Button, Heading, Typography } from '@mycrypto/ui'; -import { SendState } from '../SendAssets'; +import { SendState, TransactionFields } from '../SendAssets'; import './SendAssetsForm.scss'; // Legacy @@ -22,10 +22,11 @@ import { } from './fields'; interface Props { - values: SendState; + stateValues: SendState; + transactionFields: TransactionFields; onNext(): void; - onSubmit(values: SendState): void; - updateState(values: SendState): void; + onSubmit(transactionFields: TransactionFields): void; + updateState(state: SendState): void; } const QueryWarning: React.SFC<{}> = () => ( @@ -38,13 +39,19 @@ const QueryWarning: React.SFC<{}> = () => ( /> ); -export default function SendAssetsForm({ values, onNext, onSubmit, updateState }: Props) { +export default function SendAssetsForm({ + stateValues, + transactionFields, + onNext, + onSubmit, + updateState +}: Props) { return (
              {'RawValues: '}
              - {JSON.stringify(values.rawTransactionValues, null, 2)} + {JSON.stringify(stateValues.rawTransactionValues, null, 2)}


              @@ -52,17 +59,17 @@ export default function SendAssetsForm({ values, onNext, onSubmit, updateState } {'Fields: '}
              - {JSON.stringify(values.transactionFields, null, 2)} + {JSON.stringify(stateValues.transactionFields, null, 2)}
              { + initialValues={transactionFields} + onSubmit={(fields: TransactionFields) => { onSubmit(fields); onNext(); }} render={({ setFieldValue, - values: { transactionFields: { gasPriceField }, isAdvancedTransaction }, + values: { gasPriceField, isAdvancedTransaction }, handleChange }) => { const toggleAdvancedOptions = () => @@ -77,17 +84,19 @@ export default function SendAssetsForm({ values, onNext, onSubmit, updateState } return (
              - - {/* Amount / Asset */} - - + {/* Asset */} + {/* Sender Address */}
              {translate('X_ADDRESS')}
              {/* Recipient Address */} @@ -96,9 +105,15 @@ export default function SendAssetsForm({ values, onNext, onSubmit, updateState }
              + {/* Amount */} + {/* You'll Send */}
              @@ -158,20 +173,36 @@ export default function SendAssetsForm({ values, onNext, onSubmit, updateState }
              - +
              - +
              - +
              - +
              0 + 13000000000 * 1500000 + 20000000000 * (180000 + 53000) = 0.02416 ETH ~={/* TRANSLATE THIS */} diff --git a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx index 7c24dd51c..a633c91f6 100644 --- a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx @@ -10,7 +10,7 @@ import './TransactionComplete.scss'; import sentIcon from 'common/assets/images/icn-sent.svg'; interface Props { - values: SendState; + stateValues: SendState; onReset(): void; } @@ -19,7 +19,7 @@ const truncate = (children: string) => { }; export default function TransactionComplete({ - values: { transactionFields: { recipientAddress, senderAddress } }, + stateValues: { transactionFields: { recipientAddress, senderAddress } }, onReset }: Props) { return ( diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx index bef931c00..6eb267554 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx @@ -22,7 +22,6 @@ interface OwnProps { type Props = OwnProps; // & StateProps; export default class AmountField extends Component { - public values = this.props.values; public isValidAmount = (value: any) => { const valid = value >= 0; // && value <= (this.balance - this.gasCost); this.setState({ isValidAmount: valid }); @@ -30,14 +29,11 @@ export default class AmountField extends Component { }; public handleAmountField = (e: ChangeEvent) => { + const { values } = this.props; this.props.updateState({ - ...this.values, - transactionFields: { - ...this.values.transactionFields, - amount: e.target.value - }, + ...values, rawTransactionValues: { - ...this.values.rawTransactionValues, + ...values.rawTransactionValues, value: e.target.value } }); diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx index 481765bfe..4184dd2ae 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx @@ -37,20 +37,6 @@ export default class AssetField extends Component { const assetType: AssetOption | undefined = getAssetByTicker(e.target.value); this.props.updateState({ ...values, - transactionFields: { - ...values.transactionFields, - asset: e.target.value, - senderAddress: '', - recipientAddress: '', - amount: '0.00', - gasPriceSlider: '20', - gasPriceField: '20', - gasLimitField: '21000', - gasLimitEstimated: '21000', - nonceEstimated: '0', - nonceField: '0', - data: '' - }, rawTransactionValues: { from: '', to: '', diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx index 0c2fd50f7..c0829763b 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx @@ -1,16 +1,18 @@ import React, { ChangeEvent, Component } from 'react'; import { Field, FieldProps } from 'formik'; -import { TransactionFields } from '../../SendAssets'; +import { TransactionFields, SendState } from '../../SendAssets'; import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; interface OwnProps { + values: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent ? void : (e: string | ChangeEvent) => void; }; + updateState(values: SendState): void; } /*interface StateProps { @@ -26,18 +28,32 @@ export default class DataField extends Component { return valid; }; + public handleDataField = (e: ChangeEvent) => { + const { values } = this.props; + this.props.updateState({ + ...values, + rawTransactionValues: { + ...values.rawTransactionValues, + data: e.target.value + } + }); + // Conduct estimateGas + // Conduct clearFields + this.props.handleChange(e); + }; + public render() { //const { handleChange } = this.props; return ( ) => ( + render={({ field }: FieldProps) => ( form.setFieldValue(field.name, value)} + onChange={this.handleDataField} placeholder="0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520" className="SendAssetsForm-fieldset-input" /> diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx index 318f1425c..f32a49749 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx @@ -1,16 +1,18 @@ import React, { ChangeEvent, Component } from 'react'; import { Field, FieldProps } from 'formik'; -import { TransactionFields } from '../../SendAssets'; +import { TransactionFields, SendState } from '../../SendAssets'; import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; interface OwnProps { + values: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent ? void : (e: string | ChangeEvent) => void; }; + updateState(values: SendState): void; } /*interface StateProps { @@ -26,17 +28,29 @@ export default class GasLimitField extends Component { return valid; }; + public handleGasLimitField = (e: ChangeEvent) => { + const { values } = this.props; + this.props.updateState({ + ...values, + rawTransactionValues: { + ...values.rawTransactionValues, + gasLimit: e.target.value + } + }); + this.props.handleChange(e); + }; + public render() { //const { handleChange } = this.props; return ( ) => ( + render={({ field }: FieldProps) => ( form.setFieldValue(field.name, value)} + onChange={this.handleGasLimitField} placeholder="21000" className="SendAssetsForm-fieldset-input" /> diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx index c4ebf6ea6..35d2855f4 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx @@ -1,16 +1,18 @@ import React, { ChangeEvent, Component } from 'react'; import { Field, FieldProps } from 'formik'; -import { TransactionFields } from '../../SendAssets'; +import { TransactionFields, SendState } from '../../SendAssets'; import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; interface OwnProps { + values: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent ? void : (e: string | ChangeEvent) => void; }; + updateState(values: SendState): void; } /*interface StateProps { @@ -26,15 +28,27 @@ export default class GasPriceField extends Component { return valid; }; + public handleGasPriceField = (e: ChangeEvent) => { + const { values } = this.props; + this.props.updateState({ + ...values, + rawTransactionValues: { + ...values.rawTransactionValues, + gasPrice: e.target.value + } + }); + this.props.handleChange(e); + }; + public render() { return ( ) => ( + render={({ field }: FieldProps) => ( form.setFieldValue(field.name, value)} + onChange={this.handleGasPriceField} placeholder="20" className="SendAssetsForm-fieldset-input" /> diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx index 48395cc41..e275b7873 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx @@ -1,16 +1,18 @@ import React, { ChangeEvent, Component } from 'react'; import { Field, FieldProps } from 'formik'; -import { TransactionFields } from '../../SendAssets'; +import { TransactionFields, SendState } from '../../SendAssets'; import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; interface OwnProps { + values: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent ? void : (e: string | ChangeEvent) => void; }; + updateState(values: SendState): void; } /*interface StateProps { @@ -26,16 +28,28 @@ export default class NonceField extends Component { return valid; }; + public handleNonceField = (e: ChangeEvent) => { + const { values } = this.props; + this.props.updateState({ + ...values, + rawTransactionValues: { + ...values.rawTransactionValues, + nonce: e.target.value + } + }); + this.props.handleChange(e); + }; + public render() { return ( ) => ( + render={({ field }: FieldProps) => ( form.setFieldValue(field.name, value)} + onChange={this.handleNonceField} placeholder="0" className="SendAssetsForm-fieldset-input" /> From 51883a52d1de08d899935f6fd163ca0aeac16e11 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 7 May 2019 15:47:17 -0400 Subject: [PATCH 0457/1466] updated fields --- .../SendAssets/components/SendAssetsForm.tsx | 45 +++++++++---------- .../components/fields/AmountField.tsx | 8 ++-- .../components/fields/AssetField.tsx | 6 +-- .../components/fields/GasLimitField.tsx | 8 ++-- .../components/fields/GasPriceField.tsx | 8 ++-- .../components/fields/NonceField.tsx | 8 ++-- .../fields/RecipientAddressField.tsx | 14 +++--- .../components/fields/SenderAddressField.tsx | 10 ++--- 8 files changed, 53 insertions(+), 54 deletions(-) diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx index 6fff1cf9b..5f780cb3c 100644 --- a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx @@ -53,27 +53,15 @@ export default function SendAssetsForm({
              {JSON.stringify(stateValues.rawTransactionValues, null, 2)} -
              -
              -
              - - {'Fields: '} -
              - {JSON.stringify(stateValues.transactionFields, null, 2)} -
              { onSubmit(fields); onNext(); }} - render={({ - setFieldValue, - values: { gasPriceField, isAdvancedTransaction }, - handleChange - }) => { + render={({ setFieldValue, values, handleChange }) => { const toggleAdvancedOptions = () => - setFieldValue('isAdvancedTransaction', !isAdvancedTransaction); + setFieldValue('isAdvancedTransaction', !values.isAdvancedTransaction); const gasEstimates = { fastest: 20, fast: 18, @@ -84,11 +72,20 @@ export default function SendAssetsForm({ return ( + + +
              +
              +
              + {'Formik Fields: '} +
              + {JSON.stringify(values, null, 2)} +
              {/* Asset */} {/* Sender Address */}
              @@ -96,7 +93,7 @@ export default function SendAssetsForm({
              {/* Recipient Address */} @@ -105,14 +102,14 @@ export default function SendAssetsForm({
              {/* Amount */} {/* You'll Send */}
              @@ -144,7 +141,7 @@ export default function SendAssetsForm({
              Cheap
              @@ -160,9 +157,9 @@ export default function SendAssetsForm({ onClick={toggleAdvancedOptions} className="SendAssetsForm-advancedOptions-button" > - {isAdvancedTransaction ? 'Hide' : 'Show'} Advanced Options + {values.isAdvancedTransaction ? 'Hide' : 'Show'} Advanced Options - {isAdvancedTransaction && ( + {values.isAdvancedTransaction && (
              @@ -176,7 +173,7 @@ export default function SendAssetsForm({
              @@ -184,7 +181,7 @@ export default function SendAssetsForm({
              @@ -192,7 +189,7 @@ export default function SendAssetsForm({
              diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx index 6eb267554..ba930b936 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx @@ -5,7 +5,7 @@ import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; interface OwnProps { - values: SendState; + stateValues: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent @@ -29,11 +29,11 @@ export default class AmountField extends Component { }; public handleAmountField = (e: ChangeEvent) => { - const { values } = this.props; + const { stateValues } = this.props; this.props.updateState({ - ...values, + ...stateValues, rawTransactionValues: { - ...values.rawTransactionValues, + ...stateValues.rawTransactionValues, value: e.target.value } }); diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx index 4184dd2ae..dca86068b 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx @@ -9,7 +9,7 @@ import { AssetOption } from 'v2/services/AssetOption/types'; //import { donationAddressMap } from ''; interface OwnProps { - values: SendState; + stateValues: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent @@ -33,10 +33,10 @@ export default class AssetField extends Component { }; public handleAssetField = (e: ChangeEvent) => { - const { values } = this.props; + const { stateValues } = this.props; const assetType: AssetOption | undefined = getAssetByTicker(e.target.value); this.props.updateState({ - ...values, + ...stateValues, rawTransactionValues: { from: '', to: '', diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx index f32a49749..432b83cc8 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx @@ -5,7 +5,7 @@ import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; interface OwnProps { - values: SendState; + stateValues: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent @@ -29,11 +29,11 @@ export default class GasLimitField extends Component { }; public handleGasLimitField = (e: ChangeEvent) => { - const { values } = this.props; + const { stateValues } = this.props; this.props.updateState({ - ...values, + ...stateValues, rawTransactionValues: { - ...values.rawTransactionValues, + ...stateValues.rawTransactionValues, gasLimit: e.target.value } }); diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx index 35d2855f4..161d7d50c 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx @@ -5,7 +5,7 @@ import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; interface OwnProps { - values: SendState; + stateValues: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent @@ -29,11 +29,11 @@ export default class GasPriceField extends Component { }; public handleGasPriceField = (e: ChangeEvent) => { - const { values } = this.props; + const { stateValues } = this.props; this.props.updateState({ - ...values, + ...stateValues, rawTransactionValues: { - ...values.rawTransactionValues, + ...stateValues.rawTransactionValues, gasPrice: e.target.value } }); diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx index e275b7873..c77300586 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx @@ -5,7 +5,7 @@ import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; interface OwnProps { - values: SendState; + stateValues: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent @@ -29,11 +29,11 @@ export default class NonceField extends Component { }; public handleNonceField = (e: ChangeEvent) => { - const { values } = this.props; + const { stateValues } = this.props; this.props.updateState({ - ...values, + ...stateValues, rawTransactionValues: { - ...values.rawTransactionValues, + ...stateValues.rawTransactionValues, nonce: e.target.value } }); diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx index 284faf673..fc2cd6161 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx @@ -7,7 +7,7 @@ import { getAssetByTicker } from 'v2/libs'; import { AssetOption } from 'v2/services/AssetOption/types'; interface OwnProps { - values: SendState; + stateValues: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent @@ -27,16 +27,18 @@ export default class RecipientAddressField extends Component { }; public handleRecipientAddress = (e: ChangeEvent) => { - const { values } = this.props; - const assetType: AssetOption | undefined = getAssetByTicker(values.transactionFields.asset); + const { stateValues } = this.props; + const assetType: AssetOption | undefined = getAssetByTicker( + stateValues.transactionFields.asset + ); this.props.updateState({ - ...values, + ...stateValues, transactionFields: { - ...values.transactionFields, + ...stateValues.transactionFields, recipientAddress: e.target.value }, rawTransactionValues: { - ...values.rawTransactionValues, + ...stateValues.rawTransactionValues, to: assetType ? assetType.type === 'base' ? e.target.value : assetType.contractAddress : 'base' diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx b/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx index 3a067a40c..34d0f8807 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx +++ b/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx @@ -6,7 +6,7 @@ import { AccountContext } from 'v2/providers'; import { isValidETHAddress } from 'libs/validators'; interface OwnProps { - values: SendState; + stateValues: SendState; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent @@ -23,15 +23,15 @@ export default class SenderAddressField extends Component { return isValidETHAddress(value); }; public handleSenderAddress = (e: ChangeEvent) => { - const { values } = this.props; + const { stateValues } = this.props; this.props.updateState({ - ...values, + ...stateValues, transactionFields: { - ...values.transactionFields, + ...stateValues.transactionFields, senderAddress: e.target.value }, rawTransactionValues: { - ...values.rawTransactionValues, + ...stateValues.rawTransactionValues, from: e.target.value } }); From 5d6b4bbc302fafd7ee2583b23b6fededf39423ae Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Tue, 7 May 2019 17:16:00 -0400 Subject: [PATCH 0458/1466] Implement custom radio buttons with images --- common/assets/images/radio-checked.svg | 6 ++++++ common/assets/images/radio.svg | 3 +++ .../components/DeterministicWallets.scss | 7 +------ .../components/DeterministicWallets.tsx | 20 +++++++++++++------ 4 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 common/assets/images/radio-checked.svg create mode 100644 common/assets/images/radio.svg diff --git a/common/assets/images/radio-checked.svg b/common/assets/images/radio-checked.svg new file mode 100644 index 000000000..8fcbc5ba3 --- /dev/null +++ b/common/assets/images/radio-checked.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/common/assets/images/radio.svg b/common/assets/images/radio.svg new file mode 100644 index 000000000..b8ec4cd09 --- /dev/null +++ b/common/assets/images/radio.svg @@ -0,0 +1,3 @@ + + + diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index c267e2f82..c7d96c779 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -55,12 +55,7 @@ &-address-select { display: flex; - align-items: center; - - input[type='radio'] { - margin-top: 0; - margin-left: 0.5rem; - } + justify-content: space-between; } &-more { diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index c64bc46dc..f110d15fe 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { MouseEvent } from 'react'; import Select, { Option } from 'react-select'; import { connect } from 'react-redux'; import { Table, Address, IconLink, Typography, Button } from '@mycrypto/ui'; @@ -17,6 +17,18 @@ import './DeterministicWallets.scss'; import { truncate } from 'v2/libs'; import nextIcon from 'assets/images/next-page-button.svg'; import prevIcon from 'assets/images/previous-page-button.svg'; +import radio from 'assets/images/radio.svg'; +import radioChecked from 'assets/images/radio-checked.svg'; + +function Radio({ + checked, + onClick +}: { + checked: boolean; + onClick(event: MouseEvent): void; +}) { + return ; +} const WALLETS_PER_PAGE = 5; @@ -249,12 +261,8 @@ class DeterministicWalletsClass extends React.PureComponent { return [
              {wallet.index + 1} -
              , From d92248746c71fa6451ef83f26e28728ac089824e Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 7 May 2019 17:41:42 -0400 Subject: [PATCH 0459/1466] move shit around --- common/v2/features/Dashboard/SendAssets/SendAssets.scss | 2 -- common/v2/features/Dashboard/SendAssets/constants.js | 5 ----- common/v2/features/Dashboard/routes.ts | 2 +- common/v2/features/{Dashboard => }/SendAssets/SendAssets.tsx | 1 - .../SendAssets/components/ConfirmTransaction.scss | 0 .../SendAssets/components/ConfirmTransaction.tsx | 0 .../SendAssets/components/TransactionComplete.scss | 0 .../SendAssets/components/TransactionComplete.tsx | 0 .../components/TransactionFormData.scss} | 0 .../components/TransactionFormData.tsx} | 3 ++- .../SendAssets/components/fields/AmountField.tsx | 2 +- .../SendAssets/components/fields/AssetField.tsx | 2 +- .../SendAssets/components/fields/DataField.tsx | 0 .../SendAssets/components/fields/GasLimitField.tsx | 0 .../SendAssets/components/fields/GasPriceField.tsx | 0 .../SendAssets/components/fields/GasPriceSlider.tsx | 0 .../SendAssets/components/fields/NonceField.tsx | 0 .../SendAssets/components/fields/RecipientAddressField.tsx | 2 +- .../SendAssets/components/fields/SenderAddressField.tsx | 0 .../{Dashboard => }/SendAssets/components/fields/index.ts | 0 .../SendAssets/components/fields/styles/GasPriceSlider.scss | 0 .../features/{Dashboard => }/SendAssets/components/index.ts | 2 +- common/v2/features/SendAssets/constants.js | 5 +++++ common/v2/features/{Dashboard => }/SendAssets/index.ts | 0 common/v2/features/index.ts | 1 + 25 files changed, 13 insertions(+), 14 deletions(-) delete mode 100644 common/v2/features/Dashboard/SendAssets/SendAssets.scss delete mode 100644 common/v2/features/Dashboard/SendAssets/constants.js rename common/v2/features/{Dashboard => }/SendAssets/SendAssets.tsx (99%) rename common/v2/features/{Dashboard => }/SendAssets/components/ConfirmTransaction.scss (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/ConfirmTransaction.tsx (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/TransactionComplete.scss (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/TransactionComplete.tsx (100%) rename common/v2/features/{Dashboard/SendAssets/components/SendAssetsForm.scss => SendAssets/components/TransactionFormData.scss} (100%) rename common/v2/features/{Dashboard/SendAssets/components/SendAssetsForm.tsx => SendAssets/components/TransactionFormData.tsx} (99%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/AmountField.tsx (95%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/AssetField.tsx (97%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/DataField.tsx (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/GasLimitField.tsx (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/GasPriceField.tsx (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/GasPriceSlider.tsx (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/NonceField.tsx (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/RecipientAddressField.tsx (95%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/SenderAddressField.tsx (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/index.ts (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/fields/styles/GasPriceSlider.scss (100%) rename common/v2/features/{Dashboard => }/SendAssets/components/index.ts (77%) create mode 100644 common/v2/features/SendAssets/constants.js rename common/v2/features/{Dashboard => }/SendAssets/index.ts (100%) diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.scss b/common/v2/features/Dashboard/SendAssets/SendAssets.scss deleted file mode 100644 index c8c7f9228..000000000 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.scss +++ /dev/null @@ -1,2 +0,0 @@ -.SendAssets { -} diff --git a/common/v2/features/Dashboard/SendAssets/constants.js b/common/v2/features/Dashboard/SendAssets/constants.js deleted file mode 100644 index 087eed523..000000000 --- a/common/v2/features/Dashboard/SendAssets/constants.js +++ /dev/null @@ -1,5 +0,0 @@ -import { ConfirmTransaction, SendAssetsForm, TransactionComplete } from './components'; - -export const steps = [SendAssetsForm, ConfirmTransaction, TransactionComplete]; - -export const headings = ['Send Assets', 'Confirm Transaction', 'Transaction Complete']; diff --git a/common/v2/features/Dashboard/routes.ts b/common/v2/features/Dashboard/routes.ts index e9c271643..1eabc3ae7 100644 --- a/common/v2/features/Dashboard/routes.ts +++ b/common/v2/features/Dashboard/routes.ts @@ -1,6 +1,6 @@ import Dashboard from './Dashboard'; import { RequestAssets } from './RequestAssets'; -import { SendAssets } from './SendAssets'; +import { SendAssets } from 'v2/features/SendAssets'; import { Settings } from './Settings'; export default [ diff --git a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx b/common/v2/features/SendAssets/SendAssets.tsx similarity index 99% rename from common/v2/features/Dashboard/SendAssets/SendAssets.tsx rename to common/v2/features/SendAssets/SendAssets.tsx index b0521d7d4..5e6aa3c57 100644 --- a/common/v2/features/Dashboard/SendAssets/SendAssets.tsx +++ b/common/v2/features/SendAssets/SendAssets.tsx @@ -4,7 +4,6 @@ import { withRouter, RouteComponentProps } from 'react-router-dom'; import { ContentPanel } from 'v2/components'; import { Layout } from 'v2/features'; import { headings, steps } from './constants'; -import './SendAssets.scss'; // Legacy import sendIcon from 'common/assets/images/icn-send.svg'; diff --git a/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.scss b/common/v2/features/SendAssets/components/ConfirmTransaction.scss similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.scss rename to common/v2/features/SendAssets/components/ConfirmTransaction.scss diff --git a/common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx b/common/v2/features/SendAssets/components/ConfirmTransaction.tsx similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/ConfirmTransaction.tsx rename to common/v2/features/SendAssets/components/ConfirmTransaction.tsx diff --git a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.scss b/common/v2/features/SendAssets/components/TransactionComplete.scss similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/TransactionComplete.scss rename to common/v2/features/SendAssets/components/TransactionComplete.scss diff --git a/common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx b/common/v2/features/SendAssets/components/TransactionComplete.tsx similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/TransactionComplete.tsx rename to common/v2/features/SendAssets/components/TransactionComplete.tsx diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.scss b/common/v2/features/SendAssets/components/TransactionFormData.scss similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.scss rename to common/v2/features/SendAssets/components/TransactionFormData.scss diff --git a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx b/common/v2/features/SendAssets/components/TransactionFormData.tsx similarity index 99% rename from common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx rename to common/v2/features/SendAssets/components/TransactionFormData.tsx index 5f780cb3c..6b0453e70 100644 --- a/common/v2/features/Dashboard/SendAssets/components/SendAssetsForm.tsx +++ b/common/v2/features/SendAssets/components/TransactionFormData.tsx @@ -3,7 +3,7 @@ import { Formik, Form, Field } from 'formik'; import { Button, Heading, Typography } from '@mycrypto/ui'; import { SendState, TransactionFields } from '../SendAssets'; -import './SendAssetsForm.scss'; +import './TransactionFormData.scss'; // Legacy import sendIcon from 'common/assets/images/icn-send.svg'; @@ -53,6 +53,7 @@ export default function SendAssetsForm({
              {JSON.stringify(stateValues.rawTransactionValues, null, 2)} + { diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx b/common/v2/features/SendAssets/components/fields/AmountField.tsx similarity index 95% rename from common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx rename to common/v2/features/SendAssets/components/fields/AmountField.tsx index ba930b936..e8c9fa511 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/AmountField.tsx +++ b/common/v2/features/SendAssets/components/fields/AmountField.tsx @@ -1,6 +1,6 @@ import React, { ChangeEvent, Component } from 'react'; import { Field, FieldProps } from 'formik'; -import { TransactionFields, SendState } from 'v2/features/Dashboard/SendAssets/SendAssets'; +import { TransactionFields, SendState } from 'v2/features/SendAssets/SendAssets'; import { Input } from '@mycrypto/ui'; //import { donationAddressMap } from ''; diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx b/common/v2/features/SendAssets/components/fields/AssetField.tsx similarity index 97% rename from common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx rename to common/v2/features/SendAssets/components/fields/AssetField.tsx index dca86068b..c22ace879 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/AssetField.tsx +++ b/common/v2/features/SendAssets/components/fields/AssetField.tsx @@ -3,7 +3,7 @@ import { Field, FieldProps } from 'formik'; import { TransactionFields } from '../../SendAssets'; import { ComboBox } from '@mycrypto/ui'; import { AssetOptionsContext } from 'v2/providers'; -import { SendState } from 'v2/features/Dashboard/SendAssets/SendAssets'; +import { SendState } from 'v2/features/SendAssets/SendAssets'; import { getAssetByTicker } from 'v2/libs'; import { AssetOption } from 'v2/services/AssetOption/types'; //import { donationAddressMap } from ''; diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx b/common/v2/features/SendAssets/components/fields/DataField.tsx similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/fields/DataField.tsx rename to common/v2/features/SendAssets/components/fields/DataField.tsx diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx b/common/v2/features/SendAssets/components/fields/GasLimitField.tsx similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/fields/GasLimitField.tsx rename to common/v2/features/SendAssets/components/fields/GasLimitField.tsx diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx b/common/v2/features/SendAssets/components/fields/GasPriceField.tsx similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/fields/GasPriceField.tsx rename to common/v2/features/SendAssets/components/fields/GasPriceField.tsx diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/GasPriceSlider.tsx b/common/v2/features/SendAssets/components/fields/GasPriceSlider.tsx similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/fields/GasPriceSlider.tsx rename to common/v2/features/SendAssets/components/fields/GasPriceSlider.tsx diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx b/common/v2/features/SendAssets/components/fields/NonceField.tsx similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/fields/NonceField.tsx rename to common/v2/features/SendAssets/components/fields/NonceField.tsx diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx b/common/v2/features/SendAssets/components/fields/RecipientAddressField.tsx similarity index 95% rename from common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx rename to common/v2/features/SendAssets/components/fields/RecipientAddressField.tsx index fc2cd6161..cf8e978b4 100644 --- a/common/v2/features/Dashboard/SendAssets/components/fields/RecipientAddressField.tsx +++ b/common/v2/features/SendAssets/components/fields/RecipientAddressField.tsx @@ -1,6 +1,6 @@ import React, { Component, ChangeEvent } from 'react'; import { Field, FieldProps } from 'formik'; -import { TransactionFields, SendState } from 'v2/features/Dashboard/SendAssets/SendAssets'; +import { TransactionFields, SendState } from 'v2/features/SendAssets/SendAssets'; import { Input } from '@mycrypto/ui'; import { isValidETHAddress } from 'libs/validators'; import { getAssetByTicker } from 'v2/libs'; diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx b/common/v2/features/SendAssets/components/fields/SenderAddressField.tsx similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/fields/SenderAddressField.tsx rename to common/v2/features/SendAssets/components/fields/SenderAddressField.tsx diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/index.ts b/common/v2/features/SendAssets/components/fields/index.ts similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/fields/index.ts rename to common/v2/features/SendAssets/components/fields/index.ts diff --git a/common/v2/features/Dashboard/SendAssets/components/fields/styles/GasPriceSlider.scss b/common/v2/features/SendAssets/components/fields/styles/GasPriceSlider.scss similarity index 100% rename from common/v2/features/Dashboard/SendAssets/components/fields/styles/GasPriceSlider.scss rename to common/v2/features/SendAssets/components/fields/styles/GasPriceSlider.scss diff --git a/common/v2/features/Dashboard/SendAssets/components/index.ts b/common/v2/features/SendAssets/components/index.ts similarity index 77% rename from common/v2/features/Dashboard/SendAssets/components/index.ts rename to common/v2/features/SendAssets/components/index.ts index d220236b8..75673f723 100644 --- a/common/v2/features/Dashboard/SendAssets/components/index.ts +++ b/common/v2/features/SendAssets/components/index.ts @@ -1,5 +1,5 @@ export { default as ConfirmTransaction } from './ConfirmTransaction'; -export { default as SendAssetsForm } from './SendAssetsForm'; +export { default as TransactionFormData } from './TransactionFormData'; export { default as TransactionComplete } from './TransactionComplete'; //export { default as RecipientAddressField } from './fields/RecipientAddressField'; diff --git a/common/v2/features/SendAssets/constants.js b/common/v2/features/SendAssets/constants.js new file mode 100644 index 000000000..106bf1885 --- /dev/null +++ b/common/v2/features/SendAssets/constants.js @@ -0,0 +1,5 @@ +import { TransactionFormData, ConfirmTransaction, TransactionComplete } from './components'; + +export const steps = [TransactionFormData, ConfirmTransaction, TransactionComplete]; + +export const headings = ['Send Assets', 'Confirm Transaction', 'Transaction Complete']; diff --git a/common/v2/features/Dashboard/SendAssets/index.ts b/common/v2/features/SendAssets/index.ts similarity index 100% rename from common/v2/features/Dashboard/SendAssets/index.ts rename to common/v2/features/SendAssets/index.ts diff --git a/common/v2/features/index.ts b/common/v2/features/index.ts index fea396430..2522f3017 100644 --- a/common/v2/features/index.ts +++ b/common/v2/features/index.ts @@ -10,3 +10,4 @@ export * from './ImportWallet'; export * from './Layout'; export * from './constants'; export * from './ScreenLock'; +export * from './SendAssets'; From 1685a930838ba6c7a2341ccca59c7e9b94d8f5b5 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Tue, 7 May 2019 19:16:21 -0400 Subject: [PATCH 0460/1466] basic send assets routing to /send --- common/v2/features/Dashboard/routes.ts | 7 ------- common/v2/features/SendAssets/SendAssets.tsx | 2 +- common/v2/features/SendAssets/index.ts | 3 ++- common/v2/features/SendAssets/routes.ts | 10 ++++++++++ common/v2/features/registry.json | 4 ++++ 5 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 common/v2/features/SendAssets/routes.ts diff --git a/common/v2/features/Dashboard/routes.ts b/common/v2/features/Dashboard/routes.ts index 1eabc3ae7..44b5a79a8 100644 --- a/common/v2/features/Dashboard/routes.ts +++ b/common/v2/features/Dashboard/routes.ts @@ -1,6 +1,5 @@ import Dashboard from './Dashboard'; import { RequestAssets } from './RequestAssets'; -import { SendAssets } from 'v2/features/SendAssets'; import { Settings } from './Settings'; export default [ @@ -16,12 +15,6 @@ export default [ exact: true, component: RequestAssets }, - { - name: 'Send Assets', - path: '/dashboard/send', - exact: true, - component: SendAssets - }, { name: 'Settings', path: '/dashboard/settings', diff --git a/common/v2/features/SendAssets/SendAssets.tsx b/common/v2/features/SendAssets/SendAssets.tsx index 5e6aa3c57..79dca8efe 100644 --- a/common/v2/features/SendAssets/SendAssets.tsx +++ b/common/v2/features/SendAssets/SendAssets.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { RouteComponentProps, withRouter } from 'react-router-dom'; import { ContentPanel } from 'v2/components'; import { Layout } from 'v2/features'; diff --git a/common/v2/features/SendAssets/index.ts b/common/v2/features/SendAssets/index.ts index 3bcdae3ef..60c245986 100644 --- a/common/v2/features/SendAssets/index.ts +++ b/common/v2/features/SendAssets/index.ts @@ -1 +1,2 @@ -export { default as SendAssets } from './SendAssets'; +export { default } from './SendAssets'; +export { default as sendAssetsRoutes } from './routes'; diff --git a/common/v2/features/SendAssets/routes.ts b/common/v2/features/SendAssets/routes.ts new file mode 100644 index 000000000..18f8e9003 --- /dev/null +++ b/common/v2/features/SendAssets/routes.ts @@ -0,0 +1,10 @@ +import SendAssets from './SendAssets'; + +export default [ + { + name: 'Send Assets', + path: '/send', + exact: true, + component: SendAssets + } +]; diff --git a/common/v2/features/registry.json b/common/v2/features/registry.json index ce852be6c..7f6627541 100644 --- a/common/v2/features/registry.json +++ b/common/v2/features/registry.json @@ -26,5 +26,9 @@ { "name": "Sceen Lock", "key": "screenLock" + }, + { + "name": "Send Assets", + "key": "sendAssets" } ] From f9f1753a8fcb5e750c7e0d06edd85fea0d3ffdb4 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 8 May 2019 00:14:01 -0400 Subject: [PATCH 0461/1466] Add pointer cursor for mouse interaction --- .../features/AddAccount/components/DeterministicWallets.scss | 4 ++++ .../features/AddAccount/components/DeterministicWallets.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index c7d96c779..f4743ede0 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -95,3 +95,7 @@ } } } + +.radio-image { + cursor: pointer; +} diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index f110d15fe..4b10c2335 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -27,7 +27,7 @@ function Radio({ checked: boolean; onClick(event: MouseEvent): void; }) { - return ; + return ; } const WALLETS_PER_PAGE = 5; From 98a6726fa1f91ccb6dc6408eccf3ce1d4fb06c72 Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Wed, 8 May 2019 13:03:53 +0200 Subject: [PATCH 0462/1466] Notifications config system & conditions check --- common/v2/features/Dashboard/Dashboard.tsx | 7 +- .../NotificationsPanel/NotificationsPanel.tsx | 111 +++--------------- .../components/WalletAddedNotification.tsx | 8 +- .../components/WalletCreatedNotification.tsx | 8 +- .../NotificationsProvider.tsx | 99 ++++++++-------- .../NotificationsProvider/constants.ts | 55 +++++++++ .../NotificationsProvider/helpers.ts | 14 +++ .../providers/NotificationsProvider/index.ts | 2 + .../providers/NotificationsProvider/types.ts | 12 ++ common/v2/providers/index.ts | 6 +- common/v2/services/Notifications/types.ts | 17 +-- 11 files changed, 174 insertions(+), 165 deletions(-) create mode 100644 common/v2/providers/NotificationsProvider/constants.ts create mode 100644 common/v2/providers/NotificationsProvider/helpers.ts create mode 100644 common/v2/providers/NotificationsProvider/types.ts diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index bbbb1b9f2..8f6e373fe 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -16,12 +16,13 @@ import { AccountContext, TransactionHistoryContext, TransactionContext, - AddressMetadataContext + AddressMetadataContext, + NotificationsProvider } from 'v2/providers'; export default function Dashboard() { return ( - <> + {/* MOBILE */} {({ accounts, deleteAccount }) => ( @@ -125,6 +126,6 @@ export default function Dashboard() { )} - + ); } diff --git a/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx index 7957dc2fa..22dac5509 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx @@ -2,16 +2,9 @@ import React, { Component } from 'react'; import { Panel, Button } from '@mycrypto/ui'; import styled from 'styled-components'; -import { - WalletCreatedNotification, - WalletAddedNotification, - SaveDashboardNotification, - PrintPaperWalletNotification, - GetHardwareWalletNotification -} from './components'; import { BREAK_POINTS } from 'v2/features/constants'; -import { NotificationsContext, NotificationsProvider } from 'v2/providers'; -import { Notification, NotificationTemplates } from 'v2/services/Notifications'; +import { NotificationsContext, notificationsConfigs } from 'v2/providers/NotificationsProvider'; +import { Notification } from 'v2/services/Notifications'; // Legacy import closeIcon from 'common/assets/images/icn-close.svg'; @@ -41,94 +34,28 @@ const CloseButton = styled(Button)` class NotificationsPanel extends Component { public render() { return ( - - - {({ createNotification, currentNotification, dismissCurrentNotification }) => ( - -
              - {' '} - {' '} - {' '} - {' '} - -
              - {currentNotification && ( - - - Close - - {this.getNotification(currentNotification)} - - )} -
              - )} -
              -
              + + {({ currentNotification, dismissCurrentNotification }) => ( + + {currentNotification && ( + + + Close + + {this.getNotification(currentNotification)} + + )} + + )} + ); } private getNotification(currentNotification: Notification) { const template = currentNotification.template; - const templateData = currentNotification.options.templateData; - - switch (template) { - case NotificationTemplates.walletCreated: - return ; - case NotificationTemplates.walletAdded: - return ; - case NotificationTemplates.saveSettings: - return ; - case NotificationTemplates.printPaperWallet: - return ( - - ); - case NotificationTemplates.getHardwareWallet: - return ; - default: - return ; - } + const templateData = currentNotification.templateData; + const NotificationComponent = notificationsConfigs[template].layout; + return ; } } diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx index eb389f96d..429056706 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx @@ -83,14 +83,18 @@ const getResources = () => { ); }; -export default function WalletCreatedNotification() { +interface NotificationProps { + address: string; +} + +export default function WalletCreatedNotification({ address }: NotificationProps) { return ( } title={translate('NOTIFICATIONS_WALLET_ADDED_TITLE')} description={translate('NOTIFICATIONS_WALLET_ADDED_DESCRIPTION', { - $address: '0x06A85356DCb5b307096726FB86A78c59D38e08ee' + $address: address })} additionalDescription={translate('NOTIFICATIONS_WALLET_DESCRIPTION_ADD')} resources={getResources()} diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx index ba61e7a8a..a8344bd6d 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx @@ -83,14 +83,18 @@ const getResources = () => { ); }; -export default function WalletCreatedNotification() { +interface NotificationProps { + address: string; +} + +export default function WalletCreatedNotification({ address }: NotificationProps) { return ( } title={translate('NOTIFICATIONS_WALLET_CREATED_TITLE')} description={translate('NOTIFICATIONS_WALLET_CREATED_DESCRIPTION', { - $address: '0x06A85356DCb5b307096726FB86A78c59D38e08ee' + $address: address })} additionalDescription={translate('NOTIFICATIONS_WALLET_DESCRIPTION_ADD')} resources={getResources()} diff --git a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx index ea4cf47b3..b7a66f16a 100644 --- a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx +++ b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx @@ -1,38 +1,15 @@ import React, { Component, createContext } from 'react'; +import moment from 'moment'; import * as service from 'v2/services/Notifications/Notifications'; -import { - ExtendedNotification, - Notification, - NotificationOptions, - NotificationTemplates -} from 'v2/services/Notifications'; +import { ExtendedNotification, Notification } from 'v2/services/Notifications'; import { AnalyticsService, ANALYTICS_CATEGORIES } from 'v2/services'; - -const { - walletCreated, - walletAdded, - saveSettings, - printPaperWallet, - getHardwareWallet -} = NotificationTemplates; - -interface NotificationsStringsProps { - [key: string]: string; -} - -const notificationsStrings: NotificationsStringsProps = { - [walletCreated]: 'New Account (Wallet) Created', - [walletAdded]: 'New Account (Wallet) Added', - [saveSettings]: 'Save Your Dashboard Settings', - [printPaperWallet]: 'Print Your Paper Wallet', - [getHardwareWallet]: 'Get a Hardware Wallet' -}; +import { notificationsConfigs } from './constants'; export interface ProviderState { currentNotification: ExtendedNotification | undefined; notifications: ExtendedNotification[]; - createNotification(templateName: string, options?: NotificationOptions): void; + displayNotification(templateName: string, templateData?: object): void; dismissCurrentNotification(): void; } @@ -42,42 +19,35 @@ export class NotificationsProvider extends Component { public state: ProviderState = { currentNotification: undefined, notifications: service.readAllNotifications() || [], - createNotification: (templateName: NotificationTemplates, options?: NotificationOptions) => - this.createNotification(templateName, options), + displayNotification: (templateName: string, templateData?: object) => + this.displayNotification(templateName, templateData), dismissCurrentNotification: () => this.dismissCurrentNotification() }; - public createNotification = ( - templateName: NotificationTemplates, - options?: NotificationOptions - ) => { - // Dismiss old notifications that need to be dismissed + public componentDidMount() { + this.refreshNotifications(); + this.getNotifications(); + } + + public displayNotification = (templateName: string, templateData?: object) => { + // Dismiss previous notifications that need to be dismissed const notificationsToDismiss = this.state.notifications.filter( - x => x.options.dismissOnOverwrite === true && x.dismissed === false + x => notificationsConfigs[x.template].dismissOnOverwrite && !x.dismissed ); notificationsToDismiss.forEach(dismissableNotification => { this.dismissNotification(dismissableNotification); }); - // Apply notification options - const defaultNotificationOptions: NotificationOptions = { - showOneTime: false, - dismissOnOverwrite: true, - repeating: false, - templateData: {} - }; - const notificationOptions = Object.assign(defaultNotificationOptions, options); - // Create the notification object const notification: Notification = { template: templateName, - options: notificationOptions, + templateData, dateDisplayed: new Date(), dismissed: false, dateDismissed: undefined }; - // If notification already exists update it, otherwise create a new one + // If notification with this template already exists update it, otherwise create a new one const existingNotification = this.state.notifications.find( x => x.template === notification.template ); @@ -88,9 +58,8 @@ export class NotificationsProvider extends Component { service.createNotification(notification); } - // track notification displayed event - this.trackNotificationDisplayed(notificationsStrings[templateName]); - + // Track notification displayed event + this.trackNotificationDisplayed(notificationsConfigs[templateName].analyticsEvent); this.getNotifications(); }; @@ -102,6 +71,38 @@ export class NotificationsProvider extends Component { } }; + public refreshNotifications = () => { + this.state.notifications.forEach(notification => { + const notificationConfig = notificationsConfigs[notification.template]; + + // Dismiss one-time notifications + if (notificationConfig.showOneTime) { + this.dismissNotification(notification); + return; + } + + // Check conditions for repeating and non-repeating notifications, show notification if needed + const shouldShowRepeatingNotification = + notificationConfig.repeatInterval && + notification.dismissed && + notificationConfig.repeatInterval <= + moment.duration(moment(new Date()).diff(moment(notification.dateDismissed))).asSeconds(); + + const isNonrepeatingNotification = + !notificationConfig.repeatInterval && !notification.dismissed; + + // Return if there is a condition and it is not met + if (shouldShowRepeatingNotification || isNonrepeatingNotification) { + if (notificationConfig.condition !== undefined && !notificationConfig.condition()) { + return; + } + notification.dismissed = false; + notification.dateDisplayed = new Date(); + service.updateNotification(notification.uuid, notification); + } + }); + }; + public dismissNotification = (notification: ExtendedNotification) => { notification.dismissed = true; notification.dateDismissed = new Date(); diff --git a/common/v2/providers/NotificationsProvider/constants.ts b/common/v2/providers/NotificationsProvider/constants.ts new file mode 100644 index 000000000..261ae1910 --- /dev/null +++ b/common/v2/providers/NotificationsProvider/constants.ts @@ -0,0 +1,55 @@ +import { saveSettingsCheck, printPaperWalletCheck, getHardwareWalletCheck } from './helpers'; +import { NotificationsConfigsProps } from './types'; +import { + WalletCreatedNotification, + WalletAddedNotification, + SaveDashboardNotification, + PrintPaperWalletNotification, + GetHardwareWalletNotification +} from 'v2/features/Dashboard/NotificationsPanel/components'; + +export const NotificationTemplates = { + walletCreated: 'wallet-created', + walletAdded: 'wallet-added', + saveSettings: 'save-settings', + printPaperWallet: 'print-paper-wallet', + getHardwareWallet: 'get-hardware-wallet' +}; + +export const notificationsConfigs: NotificationsConfigsProps = { + [NotificationTemplates.walletCreated]: { + analyticsEvent: 'New Account (Wallet) Created', + layout: WalletCreatedNotification, + showOneTime: true, + dismissOnOverwrite: true + }, + [NotificationTemplates.walletAdded]: { + analyticsEvent: 'New Account (Wallet) Added', + layout: WalletAddedNotification, + showOneTime: true, + dismissOnOverwrite: true + }, + [NotificationTemplates.saveSettings]: { + analyticsEvent: 'Save Your Dashboard Settings', + layout: SaveDashboardNotification, + showOneTime: false, + dismissOnOverwrite: false, + condition: saveSettingsCheck + }, + [NotificationTemplates.printPaperWallet]: { + analyticsEvent: 'Print Your Paper Wallet', + layout: PrintPaperWalletNotification, + showOneTime: false, + dismissOnOverwrite: false, + repeatInterval: 60, + condition: printPaperWalletCheck + }, + [NotificationTemplates.getHardwareWallet]: { + analyticsEvent: 'Get a Hardware Wallet', + layout: GetHardwareWalletNotification, + showOneTime: false, + dismissOnOverwrite: false, + repeatInterval: 60, + condition: getHardwareWalletCheck + } +}; diff --git a/common/v2/providers/NotificationsProvider/helpers.ts b/common/v2/providers/NotificationsProvider/helpers.ts new file mode 100644 index 000000000..6c085415c --- /dev/null +++ b/common/v2/providers/NotificationsProvider/helpers.ts @@ -0,0 +1,14 @@ +export const saveSettingsCheck = (): boolean => { + // TODO: Check if all additional conditions are met for displaying the "save settings" notification + return true; +}; + +export const printPaperWalletCheck = (): boolean => { + // TODO: Check if all additional conditions are met for displaying the "print paper wallet" notification + return true; +}; + +export const getHardwareWalletCheck = (): boolean => { + // TODO: Check if all additional conditions are met for displaying the "get hardware wallet" notification + return true; +}; diff --git a/common/v2/providers/NotificationsProvider/index.ts b/common/v2/providers/NotificationsProvider/index.ts index 3ef5b3b0e..c643f0ba3 100644 --- a/common/v2/providers/NotificationsProvider/index.ts +++ b/common/v2/providers/NotificationsProvider/index.ts @@ -1 +1,3 @@ +export * from './types'; +export * from './constants'; export * from './NotificationsProvider'; diff --git a/common/v2/providers/NotificationsProvider/types.ts b/common/v2/providers/NotificationsProvider/types.ts new file mode 100644 index 000000000..6b565c3e8 --- /dev/null +++ b/common/v2/providers/NotificationsProvider/types.ts @@ -0,0 +1,12 @@ +export interface NotificationConfig { + analyticsEvent: string; + showOneTime: boolean; + dismissOnOverwrite: boolean; + layout: any; + repeatInterval?: number; + condition?(): boolean; +} + +export interface NotificationsConfigsProps { + [key: string]: NotificationConfig; +} diff --git a/common/v2/providers/index.ts b/common/v2/providers/index.ts index 769d30c69..dc06f0353 100644 --- a/common/v2/providers/index.ts +++ b/common/v2/providers/index.ts @@ -13,7 +13,11 @@ export { CurrentsContext, CurrentsProvider } from './CurrentsProvider'; export { FiatCurrencyContext, FiatCurrencyProvider } from './FiatCurrencyProvider'; export { TransactionContext, TransactionProvider } from './TransactionProvider'; export { AssetOptionsContext, AssetOptionsProvider } from './AssetOptionsProvider'; -export { NotificationsContext, NotificationsProvider } from './NotificationsProvider'; +export { + NotificationsContext, + NotificationsProvider, + NotificationTemplates +} from './NotificationsProvider'; export { AddressMetadataContext, AddressMetadataProvider } from './AddressMetadataProvider'; export { NetworkOptionsContext, NetworkOptionsProvider } from './NetworkOptionsProvider'; export { NodeOptionsContext, NodeOptionsProvider } from './NodeOptionsProvider'; diff --git a/common/v2/services/Notifications/types.ts b/common/v2/services/Notifications/types.ts index 7f69ee54c..e8e919382 100644 --- a/common/v2/services/Notifications/types.ts +++ b/common/v2/services/Notifications/types.ts @@ -1,6 +1,6 @@ export interface Notification { template: string; - options: NotificationOptions; + templateData?: { [key: string]: any }; dateDisplayed: Date; dismissed: boolean; dateDismissed: Date | undefined; @@ -9,18 +9,3 @@ export interface Notification { export interface ExtendedNotification extends Notification { uuid: string; } - -export interface NotificationOptions { - showOneTime?: boolean; - dismissOnOverwrite?: boolean; - repeating?: boolean; - templateData?: { [key: string]: any }; -} - -export enum NotificationTemplates { - walletCreated = 'wallet-created', - walletAdded = 'wallet-added', - saveSettings = 'save-settings', - printPaperWallet = 'print-paper-wallet', - getHardwareWallet = 'get-hardware-wallet' -} From 584f81fd0b5417bf4ebb7a5b2392c9a0f2efc584 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Wed, 8 May 2019 11:11:45 -0400 Subject: [PATCH 0463/1466] update dashboard / header links --- common/v2/features/Dashboard/constants.ts | 2 +- common/v2/features/Layout/Header/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/v2/features/Dashboard/constants.ts b/common/v2/features/Dashboard/constants.ts index d2caf48db..db3ff70a5 100644 --- a/common/v2/features/Dashboard/constants.ts +++ b/common/v2/features/Dashboard/constants.ts @@ -23,7 +23,7 @@ export const actions: Action[] = [ { icon: sendIcon, title: 'Send Assets', - link: '/dashboard/send', + link: '/send', description: 'Transfer Assets to Another Wallet' }, { diff --git a/common/v2/features/Layout/Header/constants.ts b/common/v2/features/Layout/Header/constants.ts index 40faf80c6..11badf3b2 100644 --- a/common/v2/features/Layout/Header/constants.ts +++ b/common/v2/features/Layout/Header/constants.ts @@ -10,7 +10,7 @@ export const links = [ title: 'Manage Assets', subItems: [ { - to: '/dashboard/send', + to: '/send', title: 'Send Assets' }, { From 4b31f5dfe59d9596a69c41d26d2178c0f53fe298 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Wed, 8 May 2019 12:55:12 -0400 Subject: [PATCH 0464/1466] prefill transaction implementation --- common/v2/features/SendAssets/SendAssets.tsx | 132 +++++++++++++------ common/v2/libs/helpers.ts | 102 ++++++++++++++ common/v2/libs/index.ts | 2 + common/v2/libs/preFillTx/constants.ts | 13 ++ common/v2/libs/preFillTx/helpers.ts | 33 +++++ common/v2/libs/preFillTx/index.ts | 3 + common/v2/libs/preFillTx/types.ts | 17 +++ 7 files changed, 263 insertions(+), 39 deletions(-) create mode 100644 common/v2/libs/helpers.ts create mode 100644 common/v2/libs/preFillTx/constants.ts create mode 100644 common/v2/libs/preFillTx/helpers.ts create mode 100644 common/v2/libs/preFillTx/index.ts create mode 100644 common/v2/libs/preFillTx/types.ts diff --git a/common/v2/features/SendAssets/SendAssets.tsx b/common/v2/features/SendAssets/SendAssets.tsx index 79dca8efe..6dd667e36 100644 --- a/common/v2/features/SendAssets/SendAssets.tsx +++ b/common/v2/features/SendAssets/SendAssets.tsx @@ -7,8 +7,14 @@ import { headings, steps } from './constants'; // Legacy import sendIcon from 'common/assets/images/icn-send.svg'; -import { isAdvancedQueryTransaction } from 'utils/helpers'; import { AssetOption, assetType } from 'v2/services/AssetOption/types'; +import { + isQueryTransaction, + getQueryParamWithKey, + getQueryTransactionData, + isAdvancedQueryTransaction +} from 'v2/libs/preFillTx'; +import { queryObject } from 'v2/libs/preFillTx/types'; export interface TransactionFields { asset: string; @@ -55,44 +61,92 @@ export interface SendState { } const getInitialState = (): SendState => { - return { - step: 0, - transactionFields: { - senderAddress: '', - recipientAddress: '', - amount: '0.00', - asset: 'ETH', - gasPriceSlider: '20', - gasPriceField: '20', - gasLimitField: '21000', - gasLimitEstimated: '21000', - nonceEstimated: '0', - nonceField: '0', - data: '', - isAdvancedTransaction: isAdvancedQueryTransaction(location.search) || false // Used to indicate whether transaction fee slider should be displayed and if Advanced Tab fields should be displayed. - }, - rawTransactionValues: { - from: '', - to: '', - value: '', - data: '', - gasLimit: '', - gasPrice: '', - nonce: '' - }, - isFetchingAccountValue: false, // Used to indicate looking up user's balance of currently-selected asset. - isResolvingNSName: false, // Used to indicate recipient-address is ENS name that is currently attempting to be resolved. - isAddressLabelValid: false, // Used to indicate if recipient-address is found in the address book. - isFetchingAssetPricing: false, // Used to indicate fetching CC rates for currently-selected asset. - isEstimatingGasLimit: false, // Used to indicate that gas limit is being estimated using `eth_estimateGas` jsonrpc call. - isGasLimitManual: false, // Used to indicate that user has un-clicked the user-input gas-limit checkbox. - - resolvedNSAddress: '', // Address returned when attempting to resolve an ENS/RNS address. - recipientAddressLabel: '', // Recipient-address label found in address book. - asset: undefined, - network: 'ETH', - assetType: 'base' // Type of asset selected. Directs how rawTransactionValues field are handled when formatting transaction. - }; + if (isQueryTransaction(location.search)) { + const params: queryObject = getQueryTransactionData(location.search); + return { + step: 0, + transactionFields: { + senderAddress: '', + recipientAddress: getQueryParamWithKey(params, 'to') || '', + amount: getQueryParamWithKey(params, 'value') || '0.00', + asset: + getQueryParamWithKey(params, 'sendmode') === 'token' + ? getQueryParamWithKey(params, 'tokensymbol') || 'ETH' + : 'ETH', + gasPriceSlider: '20', + gasPriceField: getQueryParamWithKey(params, 'gasprice') || '20', + gasLimitField: + getQueryParamWithKey(params, 'gaslimit') || + getQueryParamWithKey(params, 'gas') || + '21000', + gasLimitEstimated: '21000', + nonceEstimated: '0', + nonceField: '0', + data: getQueryParamWithKey(params, 'data') || '', + isAdvancedTransaction: isAdvancedQueryTransaction(location.search) || false // Used to indicate whether transaction fee slider should be displayed and if Advanced Tab fields should be displayed. + }, + rawTransactionValues: { + from: '', + to: '', + value: '', + data: '', + gasLimit: '', + gasPrice: '', + nonce: '' + }, + isFetchingAccountValue: false, // Used to indicate looking up user's balance of currently-selected asset. + isResolvingNSName: false, // Used to indicate recipient-address is ENS name that is currently attempting to be resolved. + isAddressLabelValid: false, // Used to indicate if recipient-address is found in the address book. + isFetchingAssetPricing: false, // Used to indicate fetching CC rates for currently-selected asset. + isEstimatingGasLimit: false, // Used to indicate that gas limit is being estimated using `eth_estimateGas` jsonrpc call. + isGasLimitManual: false, // Used to indicate that user has un-clicked the user-input gas-limit checkbox. + + resolvedNSAddress: '', // Address returned when attempting to resolve an ENS/RNS address. + recipientAddressLabel: '', // Recipient-address label found in address book. + asset: undefined, + network: 'ETH', + assetType: getQueryParamWithKey(params, 'sendmode') === 'token' ? 'erc20' : 'base' // Type of asset selected. Directs how rawTransactionValues field are handled when formatting transaction. + }; + } else { + return { + step: 0, + transactionFields: { + senderAddress: '', + recipientAddress: '', + amount: '0.00', + asset: 'ETH', + gasPriceSlider: '20', + gasPriceField: '20', + gasLimitField: '21000', + gasLimitEstimated: '21000', + nonceEstimated: '0', + nonceField: '0', + data: '', + isAdvancedTransaction: false // Used to indicate whether transaction fee slider should be displayed and if Advanced Tab fields should be displayed. + }, + rawTransactionValues: { + from: '', + to: '', + value: '', + data: '', + gasLimit: '', + gasPrice: '', + nonce: '' + }, + isFetchingAccountValue: false, // Used to indicate looking up user's balance of currently-selected asset. + isResolvingNSName: false, // Used to indicate recipient-address is ENS name that is currently attempting to be resolved. + isAddressLabelValid: false, // Used to indicate if recipient-address is found in the address book. + isFetchingAssetPricing: false, // Used to indicate fetching CC rates for currently-selected asset. + isEstimatingGasLimit: false, // Used to indicate that gas limit is being estimated using `eth_estimateGas` jsonrpc call. + isGasLimitManual: false, // Used to indicate that user has un-clicked the user-input gas-limit checkbox. + + resolvedNSAddress: '', // Address returned when attempting to resolve an ENS/RNS address. + recipientAddressLabel: '', // Recipient-address label found in address book. + asset: undefined, + network: 'ETH', + assetType: 'base' // Type of asset selected. Directs how rawTransactionValues field are handled when formatting transaction. + }; + } }; export class SendAssets extends Component> { diff --git a/common/v2/libs/helpers.ts b/common/v2/libs/helpers.ts new file mode 100644 index 000000000..64bdb5776 --- /dev/null +++ b/common/v2/libs/helpers.ts @@ -0,0 +1,102 @@ +import qs from 'query-string'; +import has from 'lodash/has'; +import EthTx from 'ethereumjs-tx'; +import { BlockExplorerConfig } from 'types/network'; + +interface IObjectValue { + [key: string]: any; +} + +export function objectContainsObjectKeys( + checkingObject: IObjectValue, + containingObject: IObjectValue +) { + const checkingObjectKeys = Object.keys(checkingObject); + const containsAll = checkingObjectKeys.map(key => has(containingObject, key)); + return containsAll.every(isTrue => isTrue); +} + +export function getKeyByValue(object: IObjectValue, value: any) { + return Object.keys(object).find(key => object[key] === value); +} + +export function getParam(query: { [key: string]: string }, key: string) { + const keys = Object.keys(query); + const index = keys.findIndex(k => k.toLowerCase() === key.toLowerCase()); + if (index === -1) { + return null; + } + return query[keys[index]]; +} + +export function getParamFromURL(url: string, param: string): string | undefined { + return qs.parse(qs.extract(url))[param]; +} + +export function isPositiveInteger(n: number) { + return Number.isInteger(n) && n > 0; +} + +export const getValues = (...args: any[]) => + args.reduce((acc, currArg) => [...acc, ...Object.values(currArg)], []); + +export function transactionToRLP(tx: EthTx): string { + const { v, r, s } = tx; + + // Poor man's serialize without signature. + tx.v = Buffer.from([tx._chainId]); + tx.r = Buffer.from([0]); + tx.s = Buffer.from([0]); + + const rlp = '0x' + tx.serialize().toString('hex'); + + // Restore previous values + tx.v = v; + tx.r = r; + tx.s = s; + + return rlp; +} + +export function signTransactionWithSignature(tx: EthTx, signature: string): Buffer { + const sigBuf = Buffer.from(signature.substr(2), 'hex'); + + // Mimicking the way tx.sign() works + let v = sigBuf[64] + 27; + + if (tx._chainId > 0) { + v += tx._chainId * 2 + 8; + } + + tx.r = sigBuf.slice(0, 32); + tx.s = sigBuf.slice(32, 64); + tx.v = Buffer.from([v]); + + return tx.serialize(); +} + +interface ExplorerConfig { + name: string; + origin: string; + txPath?: string; + addressPath?: string; + blockPath?: string; +} + +export function makeExplorer(expConfig: ExplorerConfig): BlockExplorerConfig { + const config: ExplorerConfig = { + // Defaults + txPath: 'tx', + addressPath: 'address', + blockPath: 'block', + ...expConfig + }; + + return { + name: config.name, + origin: config.origin, + txUrl: hash => `${config.origin}/${config.txPath}/${hash}`, + addressUrl: address => `${config.origin}/${config.addressPath}/${address}`, + blockUrl: blockNum => `${config.origin}/${config.blockPath}/${blockNum}` + }; +} diff --git a/common/v2/libs/index.ts b/common/v2/libs/index.ts index b836d6cbd..8eaa300fe 100644 --- a/common/v2/libs/index.ts +++ b/common/v2/libs/index.ts @@ -1,3 +1,5 @@ export * from './cache'; export * from './address'; export * from './assetOptions'; +export * from './helpers'; +export * from './preFillTx'; diff --git a/common/v2/libs/preFillTx/constants.ts b/common/v2/libs/preFillTx/constants.ts new file mode 100644 index 000000000..8973b8ed8 --- /dev/null +++ b/common/v2/libs/preFillTx/constants.ts @@ -0,0 +1,13 @@ +import { Param } from './types'; + +export const queryParams: Param[] = [ + 'to', + 'data', + 'tokenSymbol', + 'value', + 'gasLimit', + 'gasPrice', + 'sendMode', + 'gas', + 'readOnly' +]; diff --git a/common/v2/libs/preFillTx/helpers.ts b/common/v2/libs/preFillTx/helpers.ts new file mode 100644 index 000000000..0c7b0da23 --- /dev/null +++ b/common/v2/libs/preFillTx/helpers.ts @@ -0,0 +1,33 @@ +import * as qs from 'query-string'; +import { queryParams } from './constants'; +import { Param, queryObject } from './types'; + +export function isQueryTransaction(query: string): boolean { + const params = getQueryTransactionData(query); + const detectedQueryParams = queryParams.filter(param => { + return !(param.toLowerCase() in params); + }); + return detectedQueryParams.length > 0; +} + +export function getQueryParamWithKey(queryObj: queryObject, key: Param): string | undefined { + return queryObj[key]; +} + +export function getQueryParams(query: string): queryObject { + const params: queryObject = getQueryTransactionData(query); + return params; +} + +export function getQueryTransactionData(query: string): queryObject { + return qs.parse(query.toLowerCase()); +} + +export function isAdvancedQueryTransaction(query: string): boolean { + const params = qs.parse(query.toLowerCase()); + if ('data' in params || 'gaslimit' in params || 'gasPrice' in params) { + return true; + } else { + return false; + } +} diff --git a/common/v2/libs/preFillTx/index.ts b/common/v2/libs/preFillTx/index.ts new file mode 100644 index 000000000..87dac7a39 --- /dev/null +++ b/common/v2/libs/preFillTx/index.ts @@ -0,0 +1,3 @@ +export * from './helpers'; +export * from './constants'; +export * from './types'; diff --git a/common/v2/libs/preFillTx/types.ts b/common/v2/libs/preFillTx/types.ts new file mode 100644 index 000000000..e809d2297 --- /dev/null +++ b/common/v2/libs/preFillTx/types.ts @@ -0,0 +1,17 @@ +export type Param = + | 'to' + | 'data' + | 'readOnly' + | 'readonly' + | 'tokenSymbol' + | 'tokensymbol' + | 'value' + | 'gasLimit' + | 'gaslimit' + | 'gasPrice' + | 'gasprice' + | 'gas' + | 'sendMode' + | 'sendmode'; + +export type queryObject = { [key in Param]: string }; From 191da28d70d26a67826b9e84380c3f03c39f1b9c Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 8 May 2019 18:26:13 -0400 Subject: [PATCH 0465/1466] Make table cells clickable --- .../components/DeterministicWallets.scss | 2 +- .../components/DeterministicWallets.tsx | 33 ++++++++++--------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index f4743ede0..5f63415b6 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -96,6 +96,6 @@ } } -.radio-image { +.clickable { cursor: pointer; } diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 4b10c2335..16227675d 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -1,4 +1,4 @@ -import React, { MouseEvent } from 'react'; +import React from 'react'; import Select, { Option } from 'react-select'; import { connect } from 'react-redux'; import { Table, Address, IconLink, Typography, Button } from '@mycrypto/ui'; @@ -20,14 +20,8 @@ import prevIcon from 'assets/images/previous-page-button.svg'; import radio from 'assets/images/radio.svg'; import radioChecked from 'assets/images/radio-checked.svg'; -function Radio({ - checked, - onClick -}: { - checked: boolean; - onClick(event: MouseEvent): void; -}) { - return ; +function Radio({ checked }: { checked: boolean }) { + return ; } const WALLETS_PER_PAGE = 5; @@ -261,10 +255,7 @@ class DeterministicWalletsClass extends React.PureComponent { return [
              {wallet.index + 1} - +
              ,
              , { displayShortBalance={true} checkOffline={true} />, - + event.stopPropagation()} + > - ]; + ].map(element => ( +
              + {element} +
              + )); // tslint:enable:jsx-key } } From 3502e8fcd0fc9dd7f96672cbee2608ef8083328c Mon Sep 17 00:00:00 2001 From: Azarielle Date: Wed, 8 May 2019 20:30:29 -0400 Subject: [PATCH 0466/1466] style review changes --- common/assets/images/icn-question.svg | 3 + common/translations/lang/en.json | 7 +- common/v2/features/AddAccount/AddAccount.tsx | 257 +++++++++--------- .../features/AddAccount/AddAccountStyles.scss | 38 ++- .../AddAccount/components/Keystore.scss | 7 +- .../AddAccount/components/Keystore.tsx | 2 - .../AddAccount/components/LedgerNano.scss | 5 +- .../AddAccount/components/Mnemonic.scss | 12 +- .../AddAccount/components/Mnemonic.tsx | 12 +- .../AddAccount/components/ParitySigner.scss | 7 +- .../AddAccount/components/ParitySigner.tsx | 6 +- .../AddAccount/components/PrivateKey.scss | 5 +- .../AddAccount/components/PrivateKey.tsx | 4 +- .../AddAccount/components/Trezor.scss | 2 +- .../AddAccount/components/ViewOnly.scss | 13 + .../AddAccount/components/ViewOnly.tsx | 1 + .../AddAccount/components/WalletButton.scss | 2 +- .../AddAccount/components/WalletButton.tsx | 2 +- 18 files changed, 211 insertions(+), 174 deletions(-) create mode 100644 common/assets/images/icn-question.svg diff --git a/common/assets/images/icn-question.svg b/common/assets/images/icn-question.svg new file mode 100644 index 000000000..7deb98ce7 --- /dev/null +++ b/common/assets/images/icn-question.svg @@ -0,0 +1,3 @@ + + + diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index e0fc0bf53..77219f95b 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -81,7 +81,7 @@ "ORDER_TREZOR": "Don’t have a TREZOR? [Get one now!](https://shop.trezor.io/?offer_id=10&aff_id=1735)", "HOWTO_TREZOR": "[Learn how TREZOR works with MyCrypto](https://support.mycrypto.com/how-to/migrating/moving-from-mycrypto-to-trezor)", "X_KEEPKEY": "KeepKey", - "UNLOCK_WALLET": "Connect and Unlock Your $wallet", + "UNLOCK_WALLET": "Connect and Unlock", "SIGNER_SELECT_WALLET": "Connect and Unlock with Parity Signer", "SIGNER_SELECT_WALLET_QR": "Open your Parity Signer app on your phone and scan the QR code.", "SIGNER_SELECT_WALLET_LIST": "Use a recent account", @@ -110,7 +110,7 @@ "ADD_LABEL_6": "Unlock your Wallet ", "ADD_LABEL_6_SHORT": "Unlock ", "ADD_LABEL_7": "Add Account ", - "ADD_LABEL_8": "Your Password (optional): ", + "ADD_LABEL_8": "Your Password (optional) ", "ADD_LABEL_9": "add label", "ADD_WEB3DESC": "Connect & sign via your browser or extension", "ADD_HARDWAREDESC": "Connect & sign via your hardware wallet", @@ -836,6 +836,7 @@ "SCREEN_LOCK_TAB_TITLE_LOCKED": "MyCrypto (Locked)", "SCREEN_LOCK_TAB_TITLE_LOCKING": "Locking Screen in", "KEYSTORE_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-keystore-file)", - "MNEMONIC_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-mnemonic-phrase)" + "MNEMONIC_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-mnemonic-phrase)", + "MNEMONIC_TOOL_TIP": "If you created a Mnemonic Phrase on another website, you may have a password for this account" } } diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 673b21a96..34e10e549 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -42,9 +42,8 @@ import { ViewOnlyDecrypt } from './components'; import './AddAccountStyles.scss'; -import { Button, Typography, ComboBox } from '@mycrypto/ui'; +import { Button, ComboBox } from '@mycrypto/ui'; import { Layout } from 'v2/features'; -import backArrow from 'common/assets/images/icn-back-arrow.svg'; import * as WalletActions from 'v2/features/Wallets'; import { NetworkOptionsContext, AccountContext } from 'v2/providers'; @@ -52,6 +51,7 @@ import { Account } from 'v2/services/Account/types'; import { Web3Decrypt } from 'components/WalletDecrypt/components/Web3'; import { getNetworkByName } from 'v2/libs'; import { NetworkOptions } from 'v2/services/NetworkOptions/types'; +import { ContentPanel } from 'v2/components'; interface OwnProps { hidden?: boolean; @@ -332,56 +332,49 @@ const WalletDecrypt = withRouter( return (
              -
              - -
              -
              -
              - {!(selectedWallet.isReadOnly || selectedWallet.lid === 'X_PARITYSIGNER') && - translate('UNLOCK_WALLET', { - $wallet: translateRaw(selectedWallet.lid) - })} -
              -
              - - { - if (selectedWallet.redirect) { - this.props.history.push(selectedWallet.redirect); + +
              +
              +
              + {!selectedWallet.isReadOnly && translate('UNLOCK_WALLET')} +
              + {!selectedWallet.isReadOnly && `Your ${translateRaw(selectedWallet.lid)}`} +
              +
              + + { + if (selectedWallet.redirect) { + this.props.history.push(selectedWallet.redirect); + } + this.onUnlock(value); + }} + showNotification={this.props.showNotification} + isWalletPending={ + this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE + ? this.props.isWalletPending + : undefined } - this.onUnlock(value); - }} - showNotification={this.props.showNotification} - isWalletPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isWalletPending - : undefined - } - isPasswordPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isPasswordPending - : undefined - } - seed={this.state.seed} - onSeed={this.handleSeed} - /> - + isPasswordPending={ + this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE + ? this.props.isPasswordPending + : undefined + } + seed={this.state.seed} + onSeed={this.handleSeed} + /> + +
              -
              +
              ); } @@ -401,80 +394,83 @@ const WalletDecrypt = withRouter( {accessMessage}
              )} -
              - {HARDWARE_WALLETS.map((walletType: SecureWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} -
              -
              - {SECURE_WALLETS.map((walletType: SecureWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} - {MISC_WALLETS.map((walletType: MiscWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} -
              +
              +
              + {HARDWARE_WALLETS.map((walletType: SecureWalletName) => { + const wallet = this.WALLETS[walletType]; + return ( + + ); + })} +
              +
              + {SECURE_WALLETS.map((walletType: SecureWalletName) => { + const wallet = this.WALLETS[walletType]; + return ( + + ); + })} + {MISC_WALLETS.map((walletType: MiscWalletName) => { + const wallet = this.WALLETS[walletType]; + return ( + + ); + })} +
              -
              - {INSECURE_WALLETS.map((walletType: InsecureWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} +
              + {INSECURE_WALLETS.map((walletType: InsecureWalletName) => { + const wallet = this.WALLETS[walletType]; + return ( + + ); + })} +
              +
              {translate('ADD_ACCOUNT_FOOTER_LINK')}
              ); @@ -482,21 +478,10 @@ const WalletDecrypt = withRouter( public selectNetworkComponent() { return ( -
              -
              - -
              -
              + +
              Select Network
              -
              {translate('ADD_ACCOUNT_NETWORK_SELCT')}
              - {({ networkOptions = [] }) => { @@ -521,7 +506,7 @@ const WalletDecrypt = withRouter( Next
              -
              + ); } diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index 23fd26ae4..d7c1c2985 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -3,6 +3,9 @@ $speed: 500ms; +.Title-Wallets { + position: relative; +} @keyframes decrypt-enter { 0% { opacity: 0; @@ -25,23 +28,24 @@ $speed: 500ms; } .Panel { - width: 562px; - min-height: 790px; + min-height: 629px; // display: flex; // flex-direction: column; position: relative; + padding: 2.5em; &-top { display: flex; } + &-content { - min-height: 629px; - border-radius: 3px; - box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 1px 4px 0 rgba(0, 0, 0, 0.12); - background-color: #ffffff; - padding-top: 40px; - padding-left: 70px; - padding-right: 70px; - position: relative; + margin: 2em; + } + &-back { + width: 150px; + height: 29px; + font-family: Lato; + font-size: 20px; + font-weight: bold; } &-title { height: 39px; @@ -79,8 +83,8 @@ $speed: 500ms; text-align: center; &-button { position: absolute; - bottom: 2em; - width: calc(100% - 140px); + bottom: 1em; + width: 420px; } } &-networkLabel { @@ -109,6 +113,16 @@ $speed: 500ms; height: 769px; } + &-container { + // display: flex; + + @media (max-width: 700px) { + width: 375px; + height: 769px; + // flex-wrap: wrap; + } + } + &-connectWallet { width: 562px; height: 629px; diff --git a/common/v2/features/AddAccount/components/Keystore.scss b/common/v2/features/AddAccount/components/Keystore.scss index 3cf4febe3..6546eb26e 100644 --- a/common/v2/features/AddAccount/components/Keystore.scss +++ b/common/v2/features/AddAccount/components/Keystore.scss @@ -1,14 +1,17 @@ .Keystore { position: relative; + justify-content: center; &-img { display: flex; justify-content: center; margin: 4em; } &-help { - display: flex; justify-content: center; + text-align: center; margin-top: 2rem; - padding-bottom: 2em; + } + &-password { + padding-top: 1em; } } diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 39cb21f69..7ebecbcf6 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -52,7 +52,6 @@ export class KeystoreDecrypt extends PureComponent {
              -
              - diff --git a/common/v2/features/AddAccount/components/LedgerNano.scss b/common/v2/features/AddAccount/components/LedgerNano.scss index 816eed43f..a3b3c481e 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.scss +++ b/common/v2/features/AddAccount/components/LedgerNano.scss @@ -13,9 +13,6 @@ &-loading { padding-bottom: 2em; } - &-footer { - padding-bottom: 2em; - } &-description { font-family: Lato; @@ -38,7 +35,7 @@ } &-button { position: relative; - bottom: 3em; + bottom: 2em; width: 420px; } } diff --git a/common/v2/features/AddAccount/components/Mnemonic.scss b/common/v2/features/AddAccount/components/Mnemonic.scss index 917d19d44..cbf2e0d8f 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.scss +++ b/common/v2/features/AddAccount/components/Mnemonic.scss @@ -7,9 +7,17 @@ margin: 3em; } &-help { - display: flex; justify-content: center; + text-align: center; margin-top: 2rem; - padding-bottom: 2em; + } + + &-label { + display: flex; + height: 22px; + } + + &-toolTip { + float: right; } } diff --git a/common/v2/features/AddAccount/components/Mnemonic.tsx b/common/v2/features/AddAccount/components/Mnemonic.tsx index 6a664d2ca..5bd0ced4d 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.tsx +++ b/common/v2/features/AddAccount/components/Mnemonic.tsx @@ -11,6 +11,8 @@ import { TogglablePassword } from 'components'; import { Input } from 'components/ui'; import DeterministicWallets from './DeterministicWallets'; import PrivateKeyicon from 'common/assets/images/icn-privatekey-new.svg'; +import { Tooltip } from '@mycrypto/ui'; +import questionToolTip from 'common/assets/images/icn-question.svg'; import './Mnemonic.scss'; interface OwnProps { @@ -84,7 +86,15 @@ class MnemonicDecryptClass extends PureComponent { />
              - + { public render() { return (
              -
              {translate('SIGNER_SELECT_WALLET')}
              + {/*
              {translate('SIGNER_SELECT_WALLET')}
              */}
              {translate('SIGNER_SELECT_WALLET_QR')} @@ -46,14 +46,14 @@ class ParitySignerDecryptClass extends PureComponent {

              {translate('ADD_PARITY_4', { $wiki_link: wikiLink })}

              {translate('ADD_PARITY_2')}

              -

              +

              App Store Google Play -

              +
              ); } diff --git a/common/v2/features/AddAccount/components/PrivateKey.scss b/common/v2/features/AddAccount/components/PrivateKey.scss index f96b009ff..9197bec6b 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.scss +++ b/common/v2/features/AddAccount/components/PrivateKey.scss @@ -6,14 +6,13 @@ margin: 4em; } &-label { - width: 110px; height: 18px; font-family: Lato; font-size: 15px; + margin-bottom: 10px; } &-help { - display: flex; - justify-content: center; + text-align: center; margin-top: 2rem; } } diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index 9917dcc64..15de18c56 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -95,7 +95,9 @@ export class PrivateKeyDecrypt extends PureComponent { {translate('ADD_LABEL_6_SHORT')} -
              {translate('PRIVATE_KEY_HELP')}
              +
              +
              {translate('PRIVATE_KEY_HELP')}
              +
              ); } diff --git a/common/v2/features/AddAccount/components/Trezor.scss b/common/v2/features/AddAccount/components/Trezor.scss index 44e5d25fa..36fcde7f8 100644 --- a/common/v2/features/AddAccount/components/Trezor.scss +++ b/common/v2/features/AddAccount/components/Trezor.scss @@ -60,7 +60,7 @@ } &-button { position: relative; - bottom: 3em; + bottom: 2em; width: 420px; } } diff --git a/common/v2/features/AddAccount/components/ViewOnly.scss b/common/v2/features/AddAccount/components/ViewOnly.scss index a90091694..8ea7013a5 100644 --- a/common/v2/features/AddAccount/components/ViewOnly.scss +++ b/common/v2/features/AddAccount/components/ViewOnly.scss @@ -2,9 +2,22 @@ @import 'common/sass/mixins'; .ViewOnly { + width: 425px; + height: 600px; + + &-title { + font-size: 32px; + font-weight: bold; + } + &-submit { + position: relative; + bottom: -4em; + width: 420px; + } &-fields { display: flex; flex-direction: column; + padding-top: 2em; &-field { display: flex; diff --git a/common/v2/features/AddAccount/components/ViewOnly.tsx b/common/v2/features/AddAccount/components/ViewOnly.tsx index bc9d1a0ff..649f03764 100644 --- a/common/v2/features/AddAccount/components/ViewOnly.tsx +++ b/common/v2/features/AddAccount/components/ViewOnly.tsx @@ -40,6 +40,7 @@ class ViewOnlyDecryptClass extends PureComponent { return (
              +
              Select or Input Your Address
              diff --git a/common/v2/features/AddAccount/components/WalletButton.scss b/common/v2/features/AddAccount/components/WalletButton.scss index d9c1454f1..8625f52a9 100644 --- a/common/v2/features/AddAccount/components/WalletButton.scss +++ b/common/v2/features/AddAccount/components/WalletButton.scss @@ -31,7 +31,7 @@ animation: wallet-button-enter 400ms ease 1; animation-fill-mode: backwards; - @media screen and (max-width: 700px) { + @media only screen and (max-width: 700px) { height: 159.7px; max-width: 159.7px; min-width: 159.7px; diff --git a/common/v2/features/AddAccount/components/WalletButton.tsx b/common/v2/features/AddAccount/components/WalletButton.tsx index 8275c0707..e02883300 100644 --- a/common/v2/features/AddAccount/components/WalletButton.tsx +++ b/common/v2/features/AddAccount/components/WalletButton.tsx @@ -45,7 +45,7 @@ export class WalletButton extends React.PureComponent { >
              {icon && {name} -
              {name}
              +
              {name}
              ); From b08bf3dfa4ef53a23d7d52e605f8e47ee6cbb0ff Mon Sep 17 00:00:00 2001 From: Azarielle Date: Thu, 9 May 2019 00:41:05 -0400 Subject: [PATCH 0467/1466] styles fixes --- common/translations/lang/en.json | 2 +- .../AddAccount/components/DeterministicWallets.scss | 5 +++++ .../AddAccount/components/DeterministicWallets.tsx | 2 +- common/v2/features/AddAccount/components/Mnemonic.scss | 7 ++++++- common/v2/features/AddAccount/components/Mnemonic.tsx | 4 ++-- common/v2/features/AddAccount/components/PrivateKey.scss | 1 - common/v2/features/AddAccount/components/PrivateKey.tsx | 4 +--- 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 77219f95b..e623ea7c1 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -795,7 +795,7 @@ "DOWNLOAD_APP_FOOTER_INFO": "Not sure what this is?", "NO_ACCOUNTS_HEADER":"You don't have any accounts in your wallet.", "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now.", - "PRIVATE_KEY_HELP":"Not working?[Here's some troubleshooting tips to try.](https://support.mycrypto.com/troubleshooting/accessing-wallet/private-key-not-working)", + "PRIVATE_KEY_HELP":"Not working? [Here's some troubleshooting tips to try.](https://support.mycrypto.com/troubleshooting/accessing-wallet/private-key-not-working)", "ADD_ACCOUNT_FOOTER_LINK": "Don't have an account? [ Create a new account now.](https://MyCrypto.com/download-desktop-app)", "ADD_ACCOUNT_DESCRIPTION": "Select from the options below to unlock your account and manage your assets.", "ADD_ACCOUNT_NETWORK_SELCT":"Select the blockchain that you want to operate with and the network it connects through. Not sure what to choose? Stick with the default choices below and click next.", diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index 0084a24ea..4de82ca4d 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -115,3 +115,8 @@ } } } + +.Identicon-img { + width: 30px; + height: 30.6px; +} diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index c375dedd5..31af4fae0 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -138,7 +138,7 @@ class DeterministicWalletsClass extends React.PureComponent {
              PAGE {page + 1} OF ∞ - + -
              -
              {translate('PRIVATE_KEY_HELP')}
              -
              +
              {translate('PRIVATE_KEY_HELP')}
              ); } From 1c37e5db26751742f90a5d4e445ac021869fcc90 Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Thu, 9 May 2019 14:22:19 +0200 Subject: [PATCH 0468/1466] Handle displaying of repeating notifications --- .../NotificationsPanel/NotificationsPanel.tsx | 4 +- .../NotificationsProvider.tsx | 54 ++++++++++++------- .../NotificationsProvider/constants.ts | 3 +- .../providers/NotificationsProvider/types.ts | 1 + 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx index 22dac5509..aef207738 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/NotificationsPanel.tsx @@ -42,7 +42,7 @@ class NotificationsPanel extends Component { Close - {this.getNotification(currentNotification)} + {this.getNotificationBody(currentNotification)} )} @@ -51,7 +51,7 @@ class NotificationsPanel extends Component { ); } - private getNotification(currentNotification: Notification) { + private getNotificationBody(currentNotification: Notification) { const template = currentNotification.template; const templateData = currentNotification.templateData; const NotificationComponent = notificationsConfigs[template].layout; diff --git a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx index b7a66f16a..4b3261bae 100644 --- a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx +++ b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx @@ -25,11 +25,18 @@ export class NotificationsProvider extends Component { }; public componentDidMount() { - this.refreshNotifications(); + this.checkConditions(); this.getNotifications(); } - public displayNotification = (templateName: string, templateData?: object) => { + public render() { + const { children } = this.props; + return ( + {children} + ); + } + + private displayNotification = (templateName: string, templateData?: object) => { // Dismiss previous notifications that need to be dismissed const notificationsToDismiss = this.state.notifications.filter( x => notificationsConfigs[x.template].dismissOnOverwrite && !x.dismissed @@ -53,6 +60,16 @@ export class NotificationsProvider extends Component { ); if (existingNotification) { + /* Prevent displaying notifications that have been dismissed forever and repeating notifications + before their waiting period is over.*/ + if ( + notificationsConfigs[templateName].repeatInterval || + notificationsConfigs[templateName].dismissForever + ) { + notification.dismissed = existingNotification.dismissed; + notification.dateDismissed = existingNotification.dateDismissed; + } + service.updateNotification(existingNotification.uuid, notification); } else { service.createNotification(notification); @@ -63,7 +80,7 @@ export class NotificationsProvider extends Component { this.getNotifications(); }; - public dismissCurrentNotification = () => { + private dismissCurrentNotification = () => { const notification = this.state.currentNotification; if (notification) { this.dismissNotification(notification); @@ -71,7 +88,13 @@ export class NotificationsProvider extends Component { } }; - public refreshNotifications = () => { + private dismissNotification = (notification: ExtendedNotification) => { + notification.dismissed = true; + notification.dateDismissed = new Date(); + service.updateNotification(notification.uuid, notification); + }; + + private checkConditions = () => { this.state.notifications.forEach(notification => { const notificationConfig = notificationsConfigs[notification.template]; @@ -93,7 +116,7 @@ export class NotificationsProvider extends Component { // Return if there is a condition and it is not met if (shouldShowRepeatingNotification || isNonrepeatingNotification) { - if (notificationConfig.condition !== undefined && !notificationConfig.condition()) { + if (notificationConfig.condition && !notificationConfig.condition()) { return; } notification.dismissed = false; @@ -103,19 +126,6 @@ export class NotificationsProvider extends Component { }); }; - public dismissNotification = (notification: ExtendedNotification) => { - notification.dismissed = true; - notification.dateDismissed = new Date(); - service.updateNotification(notification.uuid, notification); - }; - - public render() { - const { children } = this.props; - return ( - {children} - ); - } - private getNotifications = () => { const notifications: ExtendedNotification[] = service.readAllNotifications() || []; @@ -123,7 +133,13 @@ export class NotificationsProvider extends Component { const sortedNotifications = notifications.sort((a, b) => { return new Date(a.dateDisplayed).getTime() - new Date(b.dateDisplayed).getTime(); }); - const visibleNotifications = sortedNotifications.filter(x => !x.dismissed); + const visibleNotifications = sortedNotifications.filter( + x => + !x.dismissed && + (notificationsConfigs[x.template].condition + ? notificationsConfigs[x.template].condition!() + : true) + ); this.setState({ currentNotification: visibleNotifications[visibleNotifications.length - 1] }); }; diff --git a/common/v2/providers/NotificationsProvider/constants.ts b/common/v2/providers/NotificationsProvider/constants.ts index 261ae1910..7ce12a3ae 100644 --- a/common/v2/providers/NotificationsProvider/constants.ts +++ b/common/v2/providers/NotificationsProvider/constants.ts @@ -34,6 +34,7 @@ export const notificationsConfigs: NotificationsConfigsProps = { layout: SaveDashboardNotification, showOneTime: false, dismissOnOverwrite: false, + repeatInterval: 60, condition: saveSettingsCheck }, [NotificationTemplates.printPaperWallet]: { @@ -49,7 +50,7 @@ export const notificationsConfigs: NotificationsConfigsProps = { layout: GetHardwareWalletNotification, showOneTime: false, dismissOnOverwrite: false, - repeatInterval: 60, + dismissForever: true, condition: getHardwareWalletCheck } }; diff --git a/common/v2/providers/NotificationsProvider/types.ts b/common/v2/providers/NotificationsProvider/types.ts index 6b565c3e8..d41a50fe9 100644 --- a/common/v2/providers/NotificationsProvider/types.ts +++ b/common/v2/providers/NotificationsProvider/types.ts @@ -3,6 +3,7 @@ export interface NotificationConfig { showOneTime: boolean; dismissOnOverwrite: boolean; layout: any; + dismissForever?: boolean; repeatInterval?: number; condition?(): boolean; } From db7012b08409bfe80afbfb61c3e8d56512f034e1 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Thu, 9 May 2019 14:27:10 -0400 Subject: [PATCH 0469/1466] more styling changes --- common/v2/features/AddAccount/AddAccount.tsx | 79 +++++++++---------- .../features/AddAccount/AddAccountStyles.scss | 2 +- .../components/DeterministicWallets.scss | 4 +- .../components/DeterministicWallets.tsx | 2 +- 4 files changed, 42 insertions(+), 45 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 8b7d042a7..9dd37e69e 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -332,49 +332,48 @@ const WalletDecrypt = withRouter( return (
              - -
              -
              -
              - {!selectedWallet.isReadOnly && translate('UNLOCK_WALLET')} -
              - {!selectedWallet.isReadOnly && `Your ${translateRaw(selectedWallet.lid)}`} + {/* Possibily use a ternary operator to determine which panels to render? */} +
              +
              +
              + {!selectedWallet.isReadOnly && translate('UNLOCK_WALLET')}
              -
              - - { - if (selectedWallet.redirect) { - this.props.history.push(selectedWallet.redirect); - } - this.onUnlock(value); - }} - showNotification={this.props.showNotification} - isWalletPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isWalletPending - : undefined - } - isPasswordPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isPasswordPending - : undefined + {!selectedWallet.isReadOnly && `Your ${translateRaw(selectedWallet.lid)}`} +
              +
              + + { + if (selectedWallet.redirect) { + this.props.history.push(selectedWallet.redirect); } - seed={this.state.seed} - onSeed={this.handleSeed} - /> - -
              + this.onUnlock(value); + }} + showNotification={this.props.showNotification} + isWalletPending={ + this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE + ? this.props.isWalletPending + : undefined + } + isPasswordPending={ + this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE + ? this.props.isPasswordPending + : undefined + } + seed={this.state.seed} + onSeed={this.handleSeed} + /> +
              - +
              ); } diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccountStyles.scss index d7c1c2985..e34984a25 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccountStyles.scss @@ -109,7 +109,7 @@ $speed: 500ms; background-color: #ffffff; @media (max-width: $screen-md) { - width: 375px; + width: 760px; height: 769px; } diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index aa4b266c0..5e0a0f2c5 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -9,9 +9,7 @@ padding: 1rem 0.5rem; top: 50%; left: 50%; - height: 800px; - margin-top: -130px; - margin-left: -425px; + height: 1000px; position: relative; z-index: 1; diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 12a878866..110ffe9d4 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -24,7 +24,7 @@ function Radio({ checked }: { checked: boolean }) { return ; } -const WALLETS_PER_PAGE = 5; +const WALLETS_PER_PAGE = 8; interface OwnProps { dPath: DPath; From 1528af4f2689a8e57dab2be7104bcc5ed15b15d0 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Thu, 9 May 2019 14:28:38 -0400 Subject: [PATCH 0470/1466] re-add content panel component --- common/v2/features/AddAccount/AddAccount.tsx | 78 ++++++++++---------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index 9dd37e69e..d4727962e 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -333,47 +333,49 @@ const WalletDecrypt = withRouter( return (
              {/* Possibily use a ternary operator to determine which panels to render? */} -
              -
              -
              - {!selectedWallet.isReadOnly && translate('UNLOCK_WALLET')} + +
              +
              +
              + {!selectedWallet.isReadOnly && translate('UNLOCK_WALLET')} +
              + {!selectedWallet.isReadOnly && `Your ${translateRaw(selectedWallet.lid)}`}
              - {!selectedWallet.isReadOnly && `Your ${translateRaw(selectedWallet.lid)}`} -
              -
              - - { - if (selectedWallet.redirect) { - this.props.history.push(selectedWallet.redirect); +
              + + { + if (selectedWallet.redirect) { + this.props.history.push(selectedWallet.redirect); + } + this.onUnlock(value); + }} + showNotification={this.props.showNotification} + isWalletPending={ + this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE + ? this.props.isWalletPending + : undefined } - this.onUnlock(value); - }} - showNotification={this.props.showNotification} - isWalletPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isWalletPending - : undefined - } - isPasswordPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isPasswordPending - : undefined - } - seed={this.state.seed} - onSeed={this.handleSeed} - /> - + isPasswordPending={ + this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE + ? this.props.isPasswordPending + : undefined + } + seed={this.state.seed} + onSeed={this.handleSeed} + /> + +
              -
              +
              ); } From 1fbd71586dfdfadf6aa18ac827015840c2e45ae3 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Thu, 9 May 2019 15:31:48 -0400 Subject: [PATCH 0471/1466] copy common/api folder over to common/v2 folder --- common/v2/api/bity.ts | 109 +++++++++++++++++++++++++++++++++++++ common/v2/api/emails.ts | 13 +++++ common/v2/api/gas.ts | 89 +++++++++++++++++++++++++++++++ common/v2/api/index.ts | 5 ++ common/v2/api/rates.ts | 115 ++++++++++++++++++++++++++++++++++++++++ common/v2/api/utils.ts | 27 ++++++++++ 6 files changed, 358 insertions(+) create mode 100644 common/v2/api/bity.ts create mode 100644 common/v2/api/emails.ts create mode 100644 common/v2/api/gas.ts create mode 100644 common/v2/api/index.ts create mode 100644 common/v2/api/rates.ts create mode 100644 common/v2/api/utils.ts diff --git a/common/v2/api/bity.ts b/common/v2/api/bity.ts new file mode 100644 index 000000000..e3b35b3b1 --- /dev/null +++ b/common/v2/api/bity.ts @@ -0,0 +1,109 @@ +import { WhitelistedCoins, bityConfig } from 'config'; +import { checkHttpStatus, parseJSON, filter } from './utils'; +import bitcoinIcon from 'assets/images/bitcoin.png'; +import repIcon from 'assets/images/augur.png'; +import etherIcon from 'assets/images/ether.png'; + +const isCryptoPair = (from: string, to: string, arr: WhitelistedCoins[]) => { + return filter(from, arr) && filter(to, arr); +}; + +const btcOptions = { + id: 'BTC', + status: 'available', + image: bitcoinIcon, + name: 'Bitcoin' +}; + +const ethOptions = { + id: 'ETH', + status: 'available', + image: etherIcon, + name: 'Ether' +}; + +const repOptions = { + id: 'REP', + status: 'available', + image: repIcon, + name: 'Augur' +}; + +export interface MappedRates { + [key: string]: any; +} + +export function getAllRates() { + const mappedRates: MappedRates = {}; + return _getAllRates().then(bityRates => { + bityRates.objects.forEach((each: any) => { + const pairName = each.pair; + const from = { id: pairName.substring(0, 3) }; + const to = { id: pairName.substring(3, 6) }; + // Check if rate exists= && check if the pair only crypto to crypto, not crypto to fiat, or any other combination + if (parseFloat(each.rate_we_sell) && isCryptoPair(from.id, to.id, ['BTC', 'ETH'])) { + let fromOptions; + let toOptions; + switch (from.id) { + case 'BTC': + fromOptions = btcOptions; + break; + case 'ETH': + fromOptions = ethOptions; + break; + case 'REP': + fromOptions = repOptions; + } + switch (to.id) { + case 'BTC': + toOptions = btcOptions; + break; + case 'ETH': + toOptions = ethOptions; + break; + case 'REP': + toOptions = repOptions; + } + mappedRates[pairName] = { + id: pairName, + options: [fromOptions, toOptions], + rate: parseFloat(each.rate_we_sell) + }; + } + }); + return mappedRates; + }); +} + +export function postOrder(amount: number, destAddress: string, mode: number, pair: string) { + return fetch(`${bityConfig.serverURL}/order`, { + method: 'post', + body: JSON.stringify({ + amount, + destAddress, + mode, + pair + }), + headers: new Headers(bityConfig.postConfig.headers) + }) + .then(checkHttpStatus) + .then(parseJSON); +} + +export function getOrderStatus(orderId: string) { + return fetch(`${bityConfig.serverURL}/status`, { + method: 'POST', + body: JSON.stringify({ + orderid: orderId + }), + headers: new Headers(bityConfig.postConfig.headers) + }) + .then(checkHttpStatus) + .then(parseJSON); +} + +function _getAllRates() { + return fetch(`${bityConfig.bityURL}/v1/rate2/`) + .then(checkHttpStatus) + .then(parseJSON); +} diff --git a/common/v2/api/emails.ts b/common/v2/api/emails.ts new file mode 100644 index 000000000..c2b46dc20 --- /dev/null +++ b/common/v2/api/emails.ts @@ -0,0 +1,13 @@ +import axios from 'axios'; + +const URL: string = 'https://proxy.mycryptoapi.com/mc'; +const LIST_ID: string = '7dd574156f'; + +export default function subscribeToMailingList(email: string) { + const url = `${URL}/${LIST_ID}`; + + return axios.post(url, { + email_address: email, + status: 'subscribed' + }); +} diff --git a/common/v2/api/gas.ts b/common/v2/api/gas.ts new file mode 100644 index 000000000..3550eb521 --- /dev/null +++ b/common/v2/api/gas.ts @@ -0,0 +1,89 @@ +import { Omit } from 'react-redux'; + +import { checkHttpStatus, parseJSON } from './utils'; + +const MAX_GAS_FAST = 250; + +interface RawGasEstimates { + safeLow: number; + standard: number; + fast: number; + fastest: number; + block_time: number; + blockNum: number; +} + +export interface GasEstimates { + safeLow: number; + standard: number; + fast: number; + fastest: number; + time: number; + chainId: number; + isDefault: boolean; +} + +interface GasExpressResponse { + block_time: number; + blockNum: number; + fast: number; + fastest: number; + safeLow: number; + standard: number; +} + +export function fetchGasEstimates(): Promise { + return fetch('https://gas.mycryptoapi.com', { + mode: 'cors' + }) + .then(checkHttpStatus) + .then(parseJSON) + .then((res: GasExpressResponse) => { + // Make sure it looks like a raw gas estimate, and it has valid values + const keys: (keyof Omit)[] = [ + 'safeLow', + 'standard', + 'fast', + 'fastest' + ]; + keys.forEach(key => { + if (typeof res[key] !== 'number') { + throw new Error( + `Gas estimate API has invalid shape: Expected numeric key '${key}' in response, got '${ + res[key] + }' instead` + ); + } + }); + + // Make sure the estimate isn't totally crazy + const estimateRes = res as RawGasEstimates; + if (estimateRes.fast > MAX_GAS_FAST) { + throw new Error( + `Gas estimate response estimate too high: Max fast is ${MAX_GAS_FAST}, was given ${ + estimateRes.fast + }` + ); + } + + if ( + estimateRes.safeLow > estimateRes.standard || + estimateRes.standard > estimateRes.fast || + estimateRes.fast > estimateRes.fastest + ) { + throw new Error( + `Gas esimates are in illogical order: should be safeLow < standard < fast < fastest, received ${ + estimateRes.safeLow + } < ${estimateRes.standard} < ${estimateRes.fast} < ${estimateRes.fastest}` + ); + } + + return estimateRes; + }) + .then((res: RawGasEstimates) => ({ + ...res, + time: Date.now(), + chainId: 1, + isDefault: false + })); +} diff --git a/common/v2/api/index.ts b/common/v2/api/index.ts new file mode 100644 index 000000000..d6806d049 --- /dev/null +++ b/common/v2/api/index.ts @@ -0,0 +1,5 @@ +export * from './bity'; +export * from './emails'; +export * from './gas'; +export * from './rates'; +export * from './utils'; diff --git a/common/v2/api/rates.ts b/common/v2/api/rates.ts new file mode 100644 index 000000000..8539f7882 --- /dev/null +++ b/common/v2/api/rates.ts @@ -0,0 +1,115 @@ +import { handleJSONResponse } from 'v2/api/utils'; + +interface IRateSymbols { + symbols: { + all: TAllSymbols; + fiat: TFiatSymbols; + coinAndToken: TCoinAndTokenSymbols; + }; + isFiat: isFiat; +} + +type isFiat = (rate: string) => boolean; + +export type TAllSymbols = (keyof ISymbol)[]; +export type TFiatSymbols = (keyof IFiatSymbols)[]; +export type TCoinAndTokenSymbols = (keyof ICoinAndTokenSymbols)[]; +interface ISymbol { + USD: number; + EUR: number; + GBP: number; + CHF: number; + BTC: number; + ETH: number; +} +interface IFiatSymbols { + USD: number; + EUR: number; + GBP: number; + CHF: number; +} +interface ICoinAndTokenSymbols { + BTC: number; + ETH: number; +} + +const fiat: TFiatSymbols = ['USD', 'EUR', 'GBP', 'CHF']; +const coinAndToken: TCoinAndTokenSymbols = ['BTC', 'ETH']; +export const rateSymbols: IRateSymbols = { + symbols: { + all: [...fiat, ...coinAndToken], + fiat, + coinAndToken + }, + isFiat: (rate: string) => (fiat as string[]).includes(rate) +}; + +// TODO - internationalize +const ERROR_MESSAGE = 'Could not fetch rate data.'; +const CCApi = 'https://proxy.mycryptoapi.com/cc'; + +const CCRates = (symbols: string[]) => { + const tsyms = rateSymbols.symbols.all.concat(symbols as any).join(','); + return `${CCApi}?fsym=ETH&tsyms=${tsyms}`; +}; + +export interface CCResponse { + [symbol: string]: ISymbol; +} + +interface IRatesResponse { + [key: string]: number; +} +interface IRatesError { + Response: 'Error'; +} + +export const fetchRates = (symbols: string[] = []): Promise => + fetch(CCRates(symbols)) + .then(response => handleJSONResponse(response, ERROR_MESSAGE)) + .then((rates: IRatesResponse | IRatesError) => { + // API errors come as 200s, so check the json for error + if ((rates as IRatesError).Response === 'Error') { + throw new Error('Failed to fetch rates'); + } + return rates; + }) + .then((rates: IRatesResponse) => { + // Sometimes the API erroneously gives tokens an extremely high value, + // like 10000000 ETH to 1 token. Filter those out. If that ever turns + // out to be true, we should all go home. + return Object.keys(rates).reduce((filteredRates: IRatesResponse, key) => { + if (rates[key] > 0.000001) { + filteredRates[key] = rates[key]; + } + return filteredRates; + }, {}); + }) + .then((rates: IRatesResponse) => { + // All currencies are in ETH right now. We'll do token -> eth -> value to + // do it all in one request to their respective rates via ETH. + return symbols.reduce( + (eqRates, sym) => { + if (rates[sym]) { + eqRates[sym] = rateSymbols.symbols.all.reduce( + (symRates, rateSym) => { + symRates[rateSym] = 1 / rates[sym] * rates[rateSym]; + return symRates; + }, + {} as ISymbol + ); + } + return eqRates; + }, + { + ETH: { + USD: rates.USD, + EUR: rates.EUR, + GBP: rates.GBP, + CHF: rates.CHF, + BTC: rates.BTC, + ETH: 1 + } + } as CCResponse + ); + }); diff --git a/common/v2/api/utils.ts b/common/v2/api/utils.ts new file mode 100644 index 000000000..8ff1e985d --- /dev/null +++ b/common/v2/api/utils.ts @@ -0,0 +1,27 @@ +import indexOf from 'lodash/indexOf'; + +export const filter = (i: any, arr: any[]) => { + return -1 !== indexOf(arr, i) ? true : false; +}; + +export function checkHttpStatus(response: Response) { + if (response.status >= 200 && response.status < 300) { + return response; + } else { + return new Error(response.statusText); + } +} + +export function parseJSON(response: Response) { + return response.json(); +} + +export async function handleJSONResponse(response: Response, errorMessage: string) { + if (response.ok) { + return await response.json(); + } + if (errorMessage) { + throw new Error(errorMessage); + } + return false; +} From e37444c333afe31b7931ac85407b722d4a74c4e4 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Thu, 9 May 2019 15:32:34 -0400 Subject: [PATCH 0472/1466] gas price handler --- common/v2/features/Gas/gasPriceFunctions.ts | 68 +++++++++++++++++++++ common/v2/features/Gas/index.ts | 2 + common/v2/libs/accounts/accounts.ts | 11 ++++ common/v2/libs/accounts/index.ts | 1 + common/v2/libs/networks/index.ts | 1 + common/v2/libs/networks/networks.ts | 18 ++++++ 6 files changed, 101 insertions(+) create mode 100644 common/v2/features/Gas/gasPriceFunctions.ts create mode 100644 common/v2/features/Gas/index.ts create mode 100644 common/v2/libs/accounts/accounts.ts create mode 100644 common/v2/libs/accounts/index.ts create mode 100644 common/v2/libs/networks/index.ts create mode 100644 common/v2/libs/networks/networks.ts diff --git a/common/v2/features/Gas/gasPriceFunctions.ts b/common/v2/features/Gas/gasPriceFunctions.ts new file mode 100644 index 000000000..009631a47 --- /dev/null +++ b/common/v2/features/Gas/gasPriceFunctions.ts @@ -0,0 +1,68 @@ +import { RawTransactionValues } from '../SendAssets/SendAssets'; +import { getNetworkByAddress } from 'v2/libs/networks/networks'; +import { NetworkOptions } from 'v2/services/NetworkOptions/types'; +import { gasPriceDefaults } from 'config/data'; +import { GasEstimates, fetchGasEstimates } from 'v2/api/gas'; + +export function getDefaultEstimates(network: NetworkOptions | undefined) { + // Must yield time for testability + const time = Date.now(); + if (!network) { + const gasSettings = gasPriceDefaults; + return { + safeLow: gasSettings.min, + standard: gasSettings.initial, + fast: gasSettings.initial, + fastest: gasSettings.max, + isDefault: true, + chainId: 60, + time + }; + } else { + const gasSettings = network.isCustom ? gasPriceDefaults : network.gasPriceSettings; + + return { + safeLow: gasSettings.min, + standard: gasSettings.initial, + fast: gasSettings.initial, + fastest: gasSettings.max, + isDefault: true, + chainId: network.chainId, + time + }; + } +} + +export async function fetchGasPriceEstimates( + transaction: RawTransactionValues +): Promise { + // Don't try on non-estimating network + const transactionSender = transaction.from; + const network = getNetworkByAddress(transactionSender); + console.log('1'); + if (!network || network.isCustom || !network.shouldEstimateGasPrice) { + console.log('2'); + const defaultEstimates: GasEstimates = getDefaultEstimates(network); + return defaultEstimates; + } + console.log('3'); + // Don't try while offline + /*const isOffline: boolean = yield select(configMetaSelectors.getOffline); + if (isOffline) { + yield call(setDefaultEstimates, network); + return; + }*/ + + // Try to fetch new estimates + try { + console.log('4'); + const estimates: GasEstimates = await fetchGasEstimates(); + console.log('5'); + console.log(estimates); + return estimates; + } catch (err) { + console.warn('Failed to fetch gas estimates:', err); + const defaultEstimates: GasEstimates = getDefaultEstimates(network); + return defaultEstimates; + } +} diff --git a/common/v2/features/Gas/index.ts b/common/v2/features/Gas/index.ts new file mode 100644 index 000000000..30fd75f7a --- /dev/null +++ b/common/v2/features/Gas/index.ts @@ -0,0 +1,2 @@ +export * from './gasPriceFunctions'; +//export * from './gasLimitFunctions'; diff --git a/common/v2/libs/accounts/accounts.ts b/common/v2/libs/accounts/accounts.ts new file mode 100644 index 000000000..3ee2e3df2 --- /dev/null +++ b/common/v2/libs/accounts/accounts.ts @@ -0,0 +1,11 @@ +import { getCache } from 'v2/services/LocalCache'; +import { Account } from 'v2/services/Account/types'; + +export const getAllAccounts = () => { + return Object.values(getCache().accounts); +}; + +export const getAccountByAddress = (address: string): Account | undefined => { + const accounts: Account[] = getAllAccounts(); + return accounts.find(account => account.address.toLowerCase() === address.toLowerCase()); +}; diff --git a/common/v2/libs/accounts/index.ts b/common/v2/libs/accounts/index.ts new file mode 100644 index 000000000..9a925f31c --- /dev/null +++ b/common/v2/libs/accounts/index.ts @@ -0,0 +1 @@ +export * from './accounts'; diff --git a/common/v2/libs/networks/index.ts b/common/v2/libs/networks/index.ts new file mode 100644 index 000000000..55d023a32 --- /dev/null +++ b/common/v2/libs/networks/index.ts @@ -0,0 +1 @@ +export * from './networks'; diff --git a/common/v2/libs/networks/networks.ts b/common/v2/libs/networks/networks.ts new file mode 100644 index 000000000..9c9189ba2 --- /dev/null +++ b/common/v2/libs/networks/networks.ts @@ -0,0 +1,18 @@ +import { getCache } from 'v2/services/LocalCache'; +import { NetworkOptions } from 'v2/services/NetworkOptions/types'; +import { getAccountByAddress } from 'v2/libs/accounts'; +import { Account } from 'v2/services/Account/types'; + +export const getAllNetworks = () => { + return Object.values(getCache().networkOptions); +}; + +export const getNetworkByAddress = (address: string): NetworkOptions | undefined => { + const account: Account | undefined = getAccountByAddress(address); + if (!account) { + return undefined; + } else { + const networks = getAllNetworks(); + return networks.find(network => account.network === network.name); + } +}; From 4776b2f22da7e059c2ef588f5f677c4e29d0a59d Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Thu, 9 May 2019 22:21:05 -0400 Subject: [PATCH 0473/1466] Fix radio button stretching --- .../features/AddAccount/components/DeterministicWallets.scss | 4 ++++ .../features/AddAccount/components/DeterministicWallets.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index 5f63415b6..78a192a0f 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -99,3 +99,7 @@ .clickable { cursor: pointer; } + +.radio-image { + align-self: center; +} diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index 16227675d..275f0b9e3 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -21,7 +21,7 @@ import radio from 'assets/images/radio.svg'; import radioChecked from 'assets/images/radio-checked.svg'; function Radio({ checked }: { checked: boolean }) { - return ; + return ; } const WALLETS_PER_PAGE = 5; From bbd9a26dc7a61f74a0d601edd625e727e72eadaf Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Fri, 10 May 2019 10:58:50 +0200 Subject: [PATCH 0474/1466] Created dev tool for notifications --- common/Root.tsx | 31 ++-- common/v2/features/Dashboard/Dashboard.tsx | 7 +- common/v2/features/DevTools/DevTools.tsx | 158 +++++++++--------- .../features/DevTools/ToolsNotifications.tsx | 69 ++++++++ 4 files changed, 171 insertions(+), 94 deletions(-) create mode 100644 common/v2/features/DevTools/ToolsNotifications.tsx diff --git a/common/Root.tsx b/common/Root.tsx index 5542a5a07..26e1f66e3 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -39,6 +39,7 @@ import { TransactionProvider } from 'v2/providers/TransactionProvider'; import { TransactionHistoryProvider } from 'v2/providers/TransactionHistoryProvider'; import LockScreenProvider from 'v2/providers/LockScreenProvider/LockScreenProvider'; import { NewAppReleaseModal } from 'v2/components'; +import { NotificationsProvider } from 'v2/providers'; interface OwnProps { store: Store; @@ -125,20 +126,22 @@ class RootClass extends Component { - - - - {onboardingActive && } - {routes} - - - - {process.env.BUILD_ELECTRON && } - - - - {developmentMode && } -
              + + + + + {onboardingActive && } + {routes} + + + + {process.env.BUILD_ELECTRON && } + + + + {developmentMode && } +
              + diff --git a/common/v2/features/Dashboard/Dashboard.tsx b/common/v2/features/Dashboard/Dashboard.tsx index 8f6e373fe..bbbb1b9f2 100644 --- a/common/v2/features/Dashboard/Dashboard.tsx +++ b/common/v2/features/Dashboard/Dashboard.tsx @@ -16,13 +16,12 @@ import { AccountContext, TransactionHistoryContext, TransactionContext, - AddressMetadataContext, - NotificationsProvider + AddressMetadataContext } from 'v2/providers'; export default function Dashboard() { return ( - + <> {/* MOBILE */} {({ accounts, deleteAccount }) => ( @@ -126,6 +125,6 @@ export default function Dashboard() { )} - + ); } diff --git a/common/v2/features/DevTools/DevTools.tsx b/common/v2/features/DevTools/DevTools.tsx index 2334d75e8..681c74b93 100644 --- a/common/v2/features/DevTools/DevTools.tsx +++ b/common/v2/features/DevTools/DevTools.tsx @@ -7,6 +7,7 @@ import { Account, ExtendedAccount } from 'v2/services/Account'; import { AccountContext } from 'v2/providers/AccountProvider'; import ToolsAccountList from './ToolsAccountList'; +import ToolsNotifications from './ToolsNotifications'; const DevToolsContainer = styled.div` position: absolute; @@ -24,88 +25,93 @@ const DevTools = () => { return ( {({ accounts, createAccount, deleteAccount }) => ( - - - -
              Enter a new Account
              - { - createAccount(values); - setSubmitting(false); - }} - > - {({ values, handleChange, handleBlur, isSubmitting }) => ( -
              -
              - Address:{' '} - ) => ( - - )} - /> -
              + + + + + + + +
              Enter a new Account
              + { + createAccount(values); + setSubmitting(false); + }} + > + {({ values, handleChange, handleBlur, isSubmitting }) => ( + +
              + Address:{' '} + ) => ( + + )} + /> +
              -
              +
              -
              - Label:{' '} - ) => ( - - )} - /> -
              +
              + Label:{' '} + ) => ( + + )} + /> +
              -
              +
              -
              - Network:{' '} - ) => ( - - )} - /> -
              +
              + Network:{' '} + ) => ( + + )} + /> +
              -
              +
              - - - )} -
              -
              -
              + + + )} +
              +
              +
              + )}
              ); diff --git a/common/v2/features/DevTools/ToolsNotifications.tsx b/common/v2/features/DevTools/ToolsNotifications.tsx new file mode 100644 index 000000000..efee18af6 --- /dev/null +++ b/common/v2/features/DevTools/ToolsNotifications.tsx @@ -0,0 +1,69 @@ +import React from 'react'; +import styled from 'styled-components'; + +import { NotificationsContext, NotificationTemplates } from 'v2/providers/NotificationsProvider'; + +const ToolWrapper = styled.div` + display: flex; + flex-direction: column; + font-size: 14px; + width: 200px; +`; + +const ToolsNotifications = () => { + return ( + + {({ displayNotification }) => ( + +

              + Dashboard notifications +

              + {' '} + {' '} + {' '} + {' '} + +
              + )} +
              + ); +}; + +export default ToolsNotifications; From c53a55ac4c28ec43e3b06347595ad43024f8d75a Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Fri, 10 May 2019 11:21:33 +0200 Subject: [PATCH 0475/1466] Updated dev tools --- common/v2/features/DevTools/DevTools.tsx | 2 -- common/v2/features/DevTools/ToolsNotifications.tsx | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/v2/features/DevTools/DevTools.tsx b/common/v2/features/DevTools/DevTools.tsx index 681c74b93..9f6ed3e41 100644 --- a/common/v2/features/DevTools/DevTools.tsx +++ b/common/v2/features/DevTools/DevTools.tsx @@ -29,8 +29,6 @@ const DevTools = () => { - -
              Enter a new Account
              { From 32a6b6a4506b4cff6eaa5b195859abbc1eda1fcc Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Fri, 10 May 2019 11:23:01 +0200 Subject: [PATCH 0476/1466] Updated types in notification configs --- common/v2/providers/NotificationsProvider/constants.ts | 6 ------ common/v2/providers/NotificationsProvider/types.ts | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/v2/providers/NotificationsProvider/constants.ts b/common/v2/providers/NotificationsProvider/constants.ts index 7ce12a3ae..375502d5b 100644 --- a/common/v2/providers/NotificationsProvider/constants.ts +++ b/common/v2/providers/NotificationsProvider/constants.ts @@ -32,24 +32,18 @@ export const notificationsConfigs: NotificationsConfigsProps = { [NotificationTemplates.saveSettings]: { analyticsEvent: 'Save Your Dashboard Settings', layout: SaveDashboardNotification, - showOneTime: false, - dismissOnOverwrite: false, repeatInterval: 60, condition: saveSettingsCheck }, [NotificationTemplates.printPaperWallet]: { analyticsEvent: 'Print Your Paper Wallet', layout: PrintPaperWalletNotification, - showOneTime: false, - dismissOnOverwrite: false, repeatInterval: 60, condition: printPaperWalletCheck }, [NotificationTemplates.getHardwareWallet]: { analyticsEvent: 'Get a Hardware Wallet', layout: GetHardwareWalletNotification, - showOneTime: false, - dismissOnOverwrite: false, dismissForever: true, condition: getHardwareWalletCheck } diff --git a/common/v2/providers/NotificationsProvider/types.ts b/common/v2/providers/NotificationsProvider/types.ts index d41a50fe9..dd531fecc 100644 --- a/common/v2/providers/NotificationsProvider/types.ts +++ b/common/v2/providers/NotificationsProvider/types.ts @@ -1,8 +1,8 @@ export interface NotificationConfig { analyticsEvent: string; - showOneTime: boolean; - dismissOnOverwrite: boolean; layout: any; + showOneTime?: boolean; + dismissOnOverwrite?: boolean; dismissForever?: boolean; repeatInterval?: number; condition?(): boolean; From b0d4c1a6e8a0fb40968beafd891d93c18150e2df Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Fri, 10 May 2019 11:28:39 +0200 Subject: [PATCH 0477/1466] Updated repeating intervals (6 months) --- common/v2/providers/NotificationsProvider/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/v2/providers/NotificationsProvider/constants.ts b/common/v2/providers/NotificationsProvider/constants.ts index 375502d5b..31810c721 100644 --- a/common/v2/providers/NotificationsProvider/constants.ts +++ b/common/v2/providers/NotificationsProvider/constants.ts @@ -32,13 +32,13 @@ export const notificationsConfigs: NotificationsConfigsProps = { [NotificationTemplates.saveSettings]: { analyticsEvent: 'Save Your Dashboard Settings', layout: SaveDashboardNotification, - repeatInterval: 60, + repeatInterval: 15778463, condition: saveSettingsCheck }, [NotificationTemplates.printPaperWallet]: { analyticsEvent: 'Print Your Paper Wallet', layout: PrintPaperWalletNotification, - repeatInterval: 60, + repeatInterval: 15778463, condition: printPaperWalletCheck }, [NotificationTemplates.getHardwareWallet]: { From 54096053122349698d40bc2c9ac32c7215a8c0a7 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Fri, 10 May 2019 20:35:17 -0400 Subject: [PATCH 0478/1466] initial setup of additional sign transaction with wallets flow --- common/v2/features/SendAssets/SendAssets.tsx | 45 ++++++++++++------- .../components/ConfirmTransaction.tsx | 8 +++- .../SendAssets/components/SignTransaction.tsx | 14 ++++++ .../SignTransactionWallets/Keystore.tsx | 5 +++ .../SignTransactionWallets/Ledger.tsx | 7 +++ .../SignTransactionWallets/Metamask.tsx | 5 +++ .../SignTransactionWallets/Mnemonic.tsx | 5 +++ .../SignTransactionWallets/Parity.tsx | 5 +++ .../SignTransactionWallets/PrivateKey.tsx | 5 +++ .../SignTransactionWallets/SafeTmini.tsx | 5 +++ .../SignTransactionWallets/Trezor.tsx | 5 +++ .../SignTransactionWallets/index.ts | 8 ++++ .../components/TransactionComplete.tsx | 8 +++- .../components/TransactionFormData.tsx | 20 ++++++++- .../features/SendAssets/components/index.ts | 8 ++-- common/v2/features/SendAssets/constants.js | 5 --- common/v2/features/SendAssets/constants.ts | 20 +++++++++ 17 files changed, 150 insertions(+), 28 deletions(-) create mode 100644 common/v2/features/SendAssets/components/SignTransaction.tsx create mode 100644 common/v2/features/SendAssets/components/SignTransactionWallets/Keystore.tsx create mode 100644 common/v2/features/SendAssets/components/SignTransactionWallets/Ledger.tsx create mode 100644 common/v2/features/SendAssets/components/SignTransactionWallets/Metamask.tsx create mode 100644 common/v2/features/SendAssets/components/SignTransactionWallets/Mnemonic.tsx create mode 100644 common/v2/features/SendAssets/components/SignTransactionWallets/Parity.tsx create mode 100644 common/v2/features/SendAssets/components/SignTransactionWallets/PrivateKey.tsx create mode 100644 common/v2/features/SendAssets/components/SignTransactionWallets/SafeTmini.tsx create mode 100644 common/v2/features/SendAssets/components/SignTransactionWallets/Trezor.tsx create mode 100644 common/v2/features/SendAssets/components/SignTransactionWallets/index.ts delete mode 100644 common/v2/features/SendAssets/constants.js create mode 100644 common/v2/features/SendAssets/constants.ts diff --git a/common/v2/features/SendAssets/SendAssets.tsx b/common/v2/features/SendAssets/SendAssets.tsx index 79dca8efe..2328afa15 100644 --- a/common/v2/features/SendAssets/SendAssets.tsx +++ b/common/v2/features/SendAssets/SendAssets.tsx @@ -1,14 +1,18 @@ +// Legacy +import sendIcon from 'common/assets/images/icn-send.svg'; import React, { Component } from 'react'; import { RouteComponentProps, withRouter } from 'react-router-dom'; - +import { isAdvancedQueryTransaction } from 'utils/helpers'; import { ContentPanel } from 'v2/components'; import { Layout } from 'v2/features'; -import { headings, steps } from './constants'; - -// Legacy -import sendIcon from 'common/assets/images/icn-send.svg'; -import { isAdvancedQueryTransaction } from 'utils/helpers'; import { AssetOption, assetType } from 'v2/services/AssetOption/types'; +import { + createConfirmTransactionComponent, + createSendAssetsForm, + createTransactionReceipt, + SignTransaction +} from './components'; +import { headings, steps } from './constants'; export interface TransactionFields { asset: string; @@ -104,8 +108,26 @@ export class SendAssets extends Component> { const backOptions = [history.goBack, this.regressStep]; // Step 3, ConfirmTransaction, cannot go back (as backOptions[2] is undefined) const onBack = backOptions[step]; - const Step = steps[step]; + const SendAssetsForm = createSendAssetsForm({ + transactionFields: this.state.transactionFields, + onNext: this.advanceStep, + updateState: this.updateState, + onSubmit: this.updateTransactionFields + }); + const ConfirmTransaction = createConfirmTransactionComponent({ onNext: this.advanceStep }); + const TransactionReceipt = createTransactionReceipt({ onReset: this.handleReset }); + + const sendAssetsSteps = [ + SendAssetsForm, + ConfirmTransaction, + SignTransaction, + TransactionReceipt + ]; + const Step = sendAssetsSteps[step]; + + // const onBack = backOptions[step]; + // const Step = steps[step]; return ( > { total: steps.length }} > - + ); diff --git a/common/v2/features/SendAssets/components/ConfirmTransaction.tsx b/common/v2/features/SendAssets/components/ConfirmTransaction.tsx index 2257c6814..af0657186 100644 --- a/common/v2/features/SendAssets/components/ConfirmTransaction.tsx +++ b/common/v2/features/SendAssets/components/ConfirmTransaction.tsx @@ -23,7 +23,13 @@ const truncate = (children: string) => { return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); }; -export default class ConfirmTransaction extends Component { +export default function createConfirmTransactionComponent(outterProps: Pick) { + return (props: Pick) => { + return ; + }; +} + +export class ConfirmTransaction extends Component { public state: State = { showingDetails: false }; diff --git a/common/v2/features/SendAssets/components/SignTransaction.tsx b/common/v2/features/SendAssets/components/SignTransaction.tsx new file mode 100644 index 000000000..9e939abf8 --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransaction.tsx @@ -0,0 +1,14 @@ +import React, { Component } from 'react'; +// import { SignTransactionLedger } from './SignTransactionWallets'; +import { SendState } from '../SendAssets'; +// import { SignTransactionTrezor } from './SignTransactionWallets'; + +interface Props { + stateValues: SendState; +} + +export default class SignTransaction extends Component { + public render() { + return
              This gets renders when signing Transaction
              ; + } +} diff --git a/common/v2/features/SendAssets/components/SignTransactionWallets/Keystore.tsx b/common/v2/features/SendAssets/components/SignTransactionWallets/Keystore.tsx new file mode 100644 index 000000000..5ee8a1af3 --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransactionWallets/Keystore.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SignTransactionKeystore() { + return
              Sign Transaction with Keystore File
              ; +} diff --git a/common/v2/features/SendAssets/components/SignTransactionWallets/Ledger.tsx b/common/v2/features/SendAssets/components/SignTransactionWallets/Ledger.tsx new file mode 100644 index 000000000..ab9682b1c --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransactionWallets/Ledger.tsx @@ -0,0 +1,7 @@ +import React, { Component } from 'react'; + +export default class SignTransactionLedger extends Component { + public render() { + return
              Sign Transaction with Legder
              ; + } +} diff --git a/common/v2/features/SendAssets/components/SignTransactionWallets/Metamask.tsx b/common/v2/features/SendAssets/components/SignTransactionWallets/Metamask.tsx new file mode 100644 index 000000000..eca174116 --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransactionWallets/Metamask.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SignTransactionMetaMask() { + return
              Sign Transaction with MetaMask
              ; +} diff --git a/common/v2/features/SendAssets/components/SignTransactionWallets/Mnemonic.tsx b/common/v2/features/SendAssets/components/SignTransactionWallets/Mnemonic.tsx new file mode 100644 index 000000000..a7fde1b9f --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransactionWallets/Mnemonic.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SignTransactionMnemonic() { + return
              Sign Transaction with Mnemonic
              ; +} diff --git a/common/v2/features/SendAssets/components/SignTransactionWallets/Parity.tsx b/common/v2/features/SendAssets/components/SignTransactionWallets/Parity.tsx new file mode 100644 index 000000000..b7e99a84d --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransactionWallets/Parity.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SignTransactionParity() { + return
              Sign Transaction with Parity
              ; +} diff --git a/common/v2/features/SendAssets/components/SignTransactionWallets/PrivateKey.tsx b/common/v2/features/SendAssets/components/SignTransactionWallets/PrivateKey.tsx new file mode 100644 index 000000000..0bafaaf94 --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransactionWallets/PrivateKey.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SignTransactionPrivateKey() { + return
              Sign Transaction with PrivateKey
              ; +} diff --git a/common/v2/features/SendAssets/components/SignTransactionWallets/SafeTmini.tsx b/common/v2/features/SendAssets/components/SignTransactionWallets/SafeTmini.tsx new file mode 100644 index 000000000..350c4da7d --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransactionWallets/SafeTmini.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SignTransactionSafeT() { + return
              Sign Transaction with SafeT mini
              ; +} diff --git a/common/v2/features/SendAssets/components/SignTransactionWallets/Trezor.tsx b/common/v2/features/SendAssets/components/SignTransactionWallets/Trezor.tsx new file mode 100644 index 000000000..3a5f6c197 --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransactionWallets/Trezor.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function SignTransactionTrezor() { + return
              Sign Transaction with Trezor
              ; +} diff --git a/common/v2/features/SendAssets/components/SignTransactionWallets/index.ts b/common/v2/features/SendAssets/components/SignTransactionWallets/index.ts new file mode 100644 index 000000000..b9ac7e350 --- /dev/null +++ b/common/v2/features/SendAssets/components/SignTransactionWallets/index.ts @@ -0,0 +1,8 @@ +export { default as SignTransactionLedger } from './Ledger'; +export { default as SignTransactionTrezor } from './Trezor'; +export { default as SignTransactionSafeT } from './SafeTmini'; +export { default as SignTransactionPrivateKey } from './PrivateKey'; +export { default as SignTransactionKeystore } from './Keystore'; +export { default as SignTransactionParity } from './Parity'; +export { default as SignTransactionMetamask } from './Metamask'; +export { default as SignTransactionMnemonic } from './Mnemonic'; diff --git a/common/v2/features/SendAssets/components/TransactionComplete.tsx b/common/v2/features/SendAssets/components/TransactionComplete.tsx index a633c91f6..2eff3a78e 100644 --- a/common/v2/features/SendAssets/components/TransactionComplete.tsx +++ b/common/v2/features/SendAssets/components/TransactionComplete.tsx @@ -18,7 +18,13 @@ const truncate = (children: string) => { return [children.substring(0, 6), '…', children.substring(children.length - 4)].join(''); }; -export default function TransactionComplete({ +export default function createTransactionReceipt(outterProps: Pick) { + return (props: Pick) => { + return ; + }; +} + +export function TransactionComplete({ stateValues: { transactionFields: { recipientAddress, senderAddress } }, onReset }: Props) { diff --git a/common/v2/features/SendAssets/components/TransactionFormData.tsx b/common/v2/features/SendAssets/components/TransactionFormData.tsx index 6b0453e70..b659e9e1d 100644 --- a/common/v2/features/SendAssets/components/TransactionFormData.tsx +++ b/common/v2/features/SendAssets/components/TransactionFormData.tsx @@ -39,7 +39,23 @@ const QueryWarning: React.SFC<{}> = () => ( /> ); -export default function SendAssetsForm({ +export default function createSendAssetsForm( + outerProps: Pick +) { + return (props: Pick) => { + return ( + + ); + }; +} + +export function SendAssetsForm({ stateValues, transactionFields, onNext, @@ -209,7 +225,7 @@ export default function SendAssetsForm({
              )}
              - diff --git a/common/v2/features/SendAssets/components/index.ts b/common/v2/features/SendAssets/components/index.ts index 75673f723..eef9b129c 100644 --- a/common/v2/features/SendAssets/components/index.ts +++ b/common/v2/features/SendAssets/components/index.ts @@ -1,6 +1,6 @@ -export { default as ConfirmTransaction } from './ConfirmTransaction'; -export { default as TransactionFormData } from './TransactionFormData'; -export { default as TransactionComplete } from './TransactionComplete'; -//export { default as RecipientAddressField } from './fields/RecipientAddressField'; +export { default as createConfirmTransactionComponent } from './ConfirmTransaction'; +export { default as createSendAssetsForm } from './TransactionFormData'; +export { default as createTransactionReceipt } from './TransactionComplete'; +export { default as SignTransaction } from './SignTransaction'; export * from './fields'; diff --git a/common/v2/features/SendAssets/constants.js b/common/v2/features/SendAssets/constants.js deleted file mode 100644 index 106bf1885..000000000 --- a/common/v2/features/SendAssets/constants.js +++ /dev/null @@ -1,5 +0,0 @@ -import { TransactionFormData, ConfirmTransaction, TransactionComplete } from './components'; - -export const steps = [TransactionFormData, ConfirmTransaction, TransactionComplete]; - -export const headings = ['Send Assets', 'Confirm Transaction', 'Transaction Complete']; diff --git a/common/v2/features/SendAssets/constants.ts b/common/v2/features/SendAssets/constants.ts new file mode 100644 index 000000000..5877c2285 --- /dev/null +++ b/common/v2/features/SendAssets/constants.ts @@ -0,0 +1,20 @@ +import { + createSendAssetsForm, + createConfirmTransactionComponent, + SignTransaction, + createTransactionReceipt +} from './components'; + +export const steps = [ + createSendAssetsForm, + createConfirmTransactionComponent, + SignTransaction, + createTransactionReceipt +]; + +export const headings = [ + 'Send Assets', + 'Confirm Transaction', + 'Sign Transaction', + 'Transaction Complete' +]; From ba09c1d03d48407272da4484deb071aed8396494 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Sat, 11 May 2019 12:02:47 -0400 Subject: [PATCH 0479/1466] fix merge conflicts --- common/v2/features/Wallets/web3/web3.ts | 2 +- common/v2/libs/nodes/configs.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/common/v2/features/Wallets/web3/web3.ts b/common/v2/features/Wallets/web3/web3.ts index 4a1d0ee74..87395812b 100644 --- a/common/v2/features/Wallets/web3/web3.ts +++ b/common/v2/features/Wallets/web3/web3.ts @@ -46,7 +46,7 @@ export const initWeb3Node = async () => { } web3Added = true; createNodeOptionsWithID(config, id); - updateCurrents({ node: 'web3' }); + updateCurrents({ ...readCurrents(), node: 'web3' }); return lib; }; diff --git a/common/v2/libs/nodes/configs.ts b/common/v2/libs/nodes/configs.ts index e94cc78b9..6d15959cf 100644 --- a/common/v2/libs/nodes/configs.ts +++ b/common/v2/libs/nodes/configs.ts @@ -180,6 +180,15 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = { } ], + DEXON: [ + { + name: makeNodeName('DEXON', 'dexon'), + type: 'rpc', + service: 'dexon.org', + url: 'https://mainnet-rpc.dexon.org' + } + ], + RSK: [ { name: makeNodeName('RSK', 'rsk_mainnet'), @@ -327,6 +336,15 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = { } ], + SOLIDUM: [ + { + name: makeNodeName('SOLIDUM', 'rpc.solidum.network'), + type: 'rpc', + service: 'rpc.solidum.network', + url: 'https://rpc.solidum.network' + } + ], + THUNDERCORE: [ { name: makeNodeName('THUNDERCORE', 'thundercore'), From a1c8c85f1d159ff4f99815640a765528be78aa5d Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Thu, 9 May 2019 21:51:28 +0200 Subject: [PATCH 0480/1466] remove honomyn component --- common/v2/features/Dashboard/Settings/Settings.tsx | 4 ++-- .../v2/features/Dashboard/Settings/components/AddAccount.tsx | 5 ----- common/v2/features/Dashboard/Settings/components/index.ts | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 common/v2/features/Dashboard/Settings/components/AddAccount.tsx diff --git a/common/v2/features/Dashboard/Settings/Settings.tsx b/common/v2/features/Dashboard/Settings/Settings.tsx index 0e6760861..5590b1854 100644 --- a/common/v2/features/Dashboard/Settings/Settings.tsx +++ b/common/v2/features/Dashboard/Settings/Settings.tsx @@ -3,7 +3,7 @@ import { Heading } from '@mycrypto/ui'; import { FlippablePanel } from 'v2/components'; import { Layout } from 'v2/features'; -import { AddAccount, AddressBook, AddToAddressBook, GeneralSettings } from './components'; +import { AddressBook, AddToAddressBook, GeneralSettings } from './components'; import './Settings.scss'; // Legacy @@ -23,7 +23,7 @@ export default function Settings() { {({ flipped }) => flipped ? ( - +

              Add Account

              ) : ( ) diff --git a/common/v2/features/Dashboard/Settings/components/AddAccount.tsx b/common/v2/features/Dashboard/Settings/components/AddAccount.tsx deleted file mode 100644 index 48830daaa..000000000 --- a/common/v2/features/Dashboard/Settings/components/AddAccount.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -export default function AddAccount() { - return

              Add Account

              ; -} diff --git a/common/v2/features/Dashboard/Settings/components/index.ts b/common/v2/features/Dashboard/Settings/components/index.ts index 0d669eadd..f2bd4cd78 100644 --- a/common/v2/features/Dashboard/Settings/components/index.ts +++ b/common/v2/features/Dashboard/Settings/components/index.ts @@ -1,4 +1,3 @@ -export { default as AddAccount } from './AddAccount'; export { default as AddressBook } from './AddressBook'; export { default as AddToAddressBook } from './AddToAddressBook'; export { default as GeneralSettings } from './GeneralSettings'; From 43ad8774b4bfea89fab0d3fdcac14fd4b0c0f3c9 Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Thu, 9 May 2019 21:54:49 +0200 Subject: [PATCH 0481/1466] fix link to /add-account --- common/v2/features/Dashboard/components/AccountList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/features/Dashboard/components/AccountList.tsx b/common/v2/features/Dashboard/components/AccountList.tsx index 0f37429d8..b5865cd09 100644 --- a/common/v2/features/Dashboard/components/AccountList.tsx +++ b/common/v2/features/Dashboard/components/AccountList.tsx @@ -33,7 +33,7 @@ export default function AccountList(props: AccountListProps) { From 9a725f3378d555a78003938f10386eec8716ba4d Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Mon, 13 May 2019 11:28:07 +0200 Subject: [PATCH 0482/1466] Move left image component to notification wrapper --- .../GetHardwareWalletNotification.tsx | 8 +----- .../components/NotificationWrapper.tsx | 27 +++++++++++++++++-- .../PrintPaperWalletNotification.tsx | 8 +----- .../components/SaveDashboardNotification.tsx | 10 ++----- .../components/WalletAddedNotification.tsx | 21 ++++++--------- .../components/WalletCreatedNotification.tsx | 21 ++++++--------- 6 files changed, 45 insertions(+), 50 deletions(-) diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/GetHardwareWalletNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/GetHardwareWalletNotification.tsx index f39996d60..54f5170a3 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/GetHardwareWalletNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/GetHardwareWalletNotification.tsx @@ -12,12 +12,6 @@ import walletIcon from 'common/assets/images/icn-new-wallet.svg'; const { SCREEN_XS } = BREAK_POINTS; -const WalletImage = styled.img` - width: 73px; - height: 80px; - margin-right: 30px; -`; - const ResourceItem = styled(Button)` width: 200px; font-weight: normal; @@ -69,7 +63,7 @@ const getResources = () => { export default function GetHardwareWalletNotification() { return ( } + leftImg={{ src: walletIcon, width: '73px', height: '80px' }} title={translate('NOTIFICATIONS_GET_WALLET_TITLE')} description={translate('NOTIFICATIONS_GET_WALLET_DESCRIPTION')} resources={getResources()} diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/NotificationWrapper.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/NotificationWrapper.tsx index 91941ec23..b08b964b1 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/NotificationWrapper.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/NotificationWrapper.tsx @@ -30,6 +30,29 @@ const Info = styled.div` max-width: 700px; `; +interface LeftImageProps { + width: string; + height: string; + transform?: string; + hideOnMobile?: boolean; + marginRight?: string; +} + +const LeftImage = + styled.img < + LeftImageProps > + ` +${props => `width: ${props.width};`}; +${props => `height: ${props.height};`}; +${props => props.transform && `transform: ${props.transform};`}; +${props => + props.hideOnMobile && + `@media (max-width: ${SCREEN_MD}) { + display: none; + }`}; + ${props => (props.marginRight ? `margin-right: ${props.marginRight};` : 'margin-right: 30px;')}; +`; + const Content = styled.div` display: flex; flex-direction: column; @@ -69,7 +92,7 @@ const Resources = styled.div` `; interface NotificationWrapperProps { - leftImg: React.ReactElement; + leftImg: LeftImageProps; title: React.ReactElement; description: React.ReactElement; additionalDescription?: React.ReactElement; @@ -90,7 +113,7 @@ export default function NotificationWrapper({ return ( - {leftImg} + {title} {description} diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/PrintPaperWalletNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/PrintPaperWalletNotification.tsx index cd44638ab..35033f61c 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/PrintPaperWalletNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/PrintPaperWalletNotification.tsx @@ -13,12 +13,6 @@ import printerIcon from 'common/assets/images/icn-printer.svg'; const { SCREEN_XS } = BREAK_POINTS; -const WalletImage = styled.img` - width: 100px; - height: 81px; - margin-right: 18px; -`; - const PrinterImage = styled.embed` width: 20px; height: 20px; @@ -85,7 +79,7 @@ export default class PrintPaperWalletNotification extends React.Component} + leftImg={{ src: walletIcon, width: '100px', height: '81px', marginRight: '18px' }} title={translate('NOTIFICATIONS_PRINT_WALLET_TITLE')} description={translate('NOTIFICATIONS_PRINT_WALLET_DESCRIPTION')} resources={ diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/SaveDashboardNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/SaveDashboardNotification.tsx index b7bf4e8f2..aa9957c40 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/SaveDashboardNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/SaveDashboardNotification.tsx @@ -11,12 +11,6 @@ import saveIcon from 'common/assets/images/icn-save-dash-board-settings.svg'; const { SCREEN_XS } = BREAK_POINTS; -const SaveImage = styled.img` - width: 68px; - height: 77px; - margin-right: 30px; -`; - const ResourceItem = styled(Button)` width: 200px; padding-left: 0px; @@ -29,10 +23,10 @@ const ResourceItem = styled(Button)` } `; -export default function WalletCreatedNotification() { +export default function SaveDashboardNotification() { return ( } + leftImg={{ src: saveIcon, width: '68px', height: '77px' }} title={translate('NOTIFICATIONS_SAVE_DASHBOARD_TITLE')} description={translate('NOTIFICATIONS_SAVE_DASHBOARD_DESCRIPTION')} resources={ diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx index 429056706..866da567e 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/WalletAddedNotification.tsx @@ -11,18 +11,7 @@ import howBuyIcon from 'common/assets/images/icn-how-do-i-buy-crypto.svg'; import dontLoseCryptoIcon from 'common/assets/images/icn-don-t-lose-crypto.svg'; import questionsIcon from 'common/assets/images/icn-questions.svg'; -const { SCREEN_XS, SCREEN_MD } = BREAK_POINTS; - -const ChampagneImage = styled.img` - width: 71px; - height: 70px; - transform: rotateY(180deg); - margin-right: 30px; - - @media (max-width: ${SCREEN_MD}) { - display: none; - } -`; +const { SCREEN_XS } = BREAK_POINTS; const ResourceItemWrapper = styled.a` display: flex; @@ -91,7 +80,13 @@ export default function WalletCreatedNotification({ address }: NotificationProps return ( } + leftImg={{ + src: champagneIcon, + width: '71px', + height: '70px', + transform: 'rotateY(180deg)', + hideOnMobile: true + }} title={translate('NOTIFICATIONS_WALLET_ADDED_TITLE')} description={translate('NOTIFICATIONS_WALLET_ADDED_DESCRIPTION', { $address: address diff --git a/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx index a8344bd6d..94f9e82f4 100644 --- a/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx +++ b/common/v2/features/Dashboard/NotificationsPanel/components/WalletCreatedNotification.tsx @@ -11,18 +11,7 @@ import howBuyIcon from 'common/assets/images/icn-how-do-i-buy-crypto.svg'; import dontLoseCryptoIcon from 'common/assets/images/icn-don-t-lose-crypto.svg'; import questionsIcon from 'common/assets/images/icn-questions.svg'; -const { SCREEN_XS, SCREEN_MD } = BREAK_POINTS; - -const ChampagneImage = styled.img` - width: 71px; - height: 70px; - transform: rotateY(180deg); - margin-right: 30px; - - @media (max-width: ${SCREEN_MD}) { - display: none; - } -`; +const { SCREEN_XS } = BREAK_POINTS; const ResourceItemWrapper = styled.a` display: flex; @@ -91,7 +80,13 @@ export default function WalletCreatedNotification({ address }: NotificationProps return ( } + leftImg={{ + src: champagneIcon, + width: '71px', + height: '70px', + transform: 'rotateY(180deg)', + hideOnMobile: true + }} title={translate('NOTIFICATIONS_WALLET_CREATED_TITLE')} description={translate('NOTIFICATIONS_WALLET_CREATED_DESCRIPTION', { $address: address From 1d37491e9ddb351129827e10718abbd7744963bc Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Mon, 13 May 2019 12:02:21 +0200 Subject: [PATCH 0483/1466] Track notification displayed event only when notification is shown --- .../NotificationsProvider.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx index 4b3261bae..b0df67549 100644 --- a/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx +++ b/common/v2/providers/NotificationsProvider/NotificationsProvider.tsx @@ -60,7 +60,7 @@ export class NotificationsProvider extends Component { ); if (existingNotification) { - /* Prevent displaying notifications that have been dismissed forever and repeating notifications + /* Prevent displaying notifications that have been dismissed forever and repeating notifications before their waiting period is over.*/ if ( notificationsConfigs[templateName].repeatInterval || @@ -75,8 +75,6 @@ export class NotificationsProvider extends Component { service.createNotification(notification); } - // Track notification displayed event - this.trackNotificationDisplayed(notificationsConfigs[templateName].analyticsEvent); this.getNotifications(); }; @@ -141,7 +139,15 @@ export class NotificationsProvider extends Component { : true) ); - this.setState({ currentNotification: visibleNotifications[visibleNotifications.length - 1] }); + const currentNotification = visibleNotifications[visibleNotifications.length - 1]; + this.setState({ currentNotification }); + + // Track notification displayed event if there is current notification + if (currentNotification) { + this.trackNotificationDisplayed( + notificationsConfigs[currentNotification.template].analyticsEvent + ); + } }; private trackNotificationDisplayed = (notification: string) => { From eff4aedbed575256a6dfc9339fd345dc464fcf76 Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Mon, 13 May 2019 12:07:04 +0200 Subject: [PATCH 0484/1466] Change the order of create new wallet flow steps --- common/v2/features/CreateWallet/Keystore/Keystore.tsx | 2 +- .../Keystore/components/GenerateKeystoreFilePanel.tsx | 2 +- common/v2/features/CreateWallet/Keystore/constants.ts | 2 +- .../v2/features/CreateWallet/components/SelectNetworkPanel.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/v2/features/CreateWallet/Keystore/Keystore.tsx b/common/v2/features/CreateWallet/Keystore/Keystore.tsx index 2476f761f..6b92c1e21 100644 --- a/common/v2/features/CreateWallet/Keystore/Keystore.tsx +++ b/common/v2/features/CreateWallet/Keystore/Keystore.tsx @@ -7,7 +7,7 @@ import { KeystoreStages, keystoreStageToComponentHash, keystoreFlow } from './co export default class CreateWallet extends Component> { public state = { - stage: KeystoreStages.SelectNetwork + stage: KeystoreStages.GenerateKeystore }; public render() { diff --git a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx index 0544f92dc..3b759facc 100644 --- a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx @@ -16,7 +16,7 @@ export default function GenerateKeystoreFilePanel({ onBack, onNext }: PanelProps Date: Mon, 13 May 2019 16:39:01 +0200 Subject: [PATCH 0485/1466] Added strings --- common/translations/lang/en.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 0d7ee355f..62a101ba5 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -823,6 +823,21 @@ "SCREEN_LOCK_LOCKING_TURN_ON_LOCK": "Turn on Screen Lock", "SCREEN_LOCK_TAB_TITLE": "MyCrypto", "SCREEN_LOCK_TAB_TITLE_LOCKED": "MyCrypto (Locked)", - "SCREEN_LOCK_TAB_TITLE_LOCKING": "Locking Screen in" + "SCREEN_LOCK_TAB_TITLE_LOCKING": "Locking Screen in", + "NEW_WALLET_KEYSTORE_TITLE":"Create Keystore File", + "NEW_WALLET_KEYSTORE_BUTTON":"Create Keystore File", + "NEW_WALLET_KEYSTORE_DESCRIPTION_1":"A **private key** + a **password** = a **keystore file.**", + "NEW_WALLET_KEYSTORE_DESCRIPTION_2": "Enter a strong, easy-to-remember **password** to create your **keystore file.** This password will encrypt your **private key.** It is not used as a seed.", + "NEW_WALLET_KEYSTORE_DESCRIPTION_3": "**Don’t forget your password.** You will need the password and your keystore file to access your account in the future.", + "SELECT_NETWORK_TITLE":"Select Network", + "SELECT_NETWORK_DESCRIPTION":"Select the blockchain that you want to operate with. Not sure what to choose? Stick with the default choice below and click next.", + "SELECT_NETWORK_LABEL":"Network", + "SAVE_KEYSTORE_TITLE":"Save Your Keystore File", + "SAVE_KEYSTORE_DESCRIPTION_1":"**Don't lose it.** It can't be recovered if you lose it.", + "SAVE_KEYSTORE_DESCRIPTION_2":"**Don't share it.** Your funds will be stolen if you use this on a malicious site.", + "SAVE_KEYSTORE_DESCRIPTION_3":"**Keep it offline.** Your funds are safest offline (on a USB drive or something similar). We don't recommend keeping your file on any cloud services like Dropbox, Google Drive, etc.", + "SAVE_KEYSTORE_BUTTON":"Download Keystore File" + + } } From 073059f75f8ddc83a6cae12934fdcb2d2430f979 Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Mon, 13 May 2019 16:40:58 +0200 Subject: [PATCH 0486/1466] Updated layouts in existing create keystore flowyarn --- common/assets/images/icn-keystore.svg | 26 ++++++ common/v2/components/ExtendedContentPanel.tsx | 28 +++--- .../components/GenerateKeystoreFilePanel.scss | 21 ----- .../components/GenerateKeystoreFilePanel.tsx | 85 +++++++++++-------- .../components/SaveKeystoreFilePanel.scss | 6 -- .../components/SaveKeystoreFilePanel.tsx | 77 ++++++++++------- .../components/SelectNetworkPanel.tsx | 37 +++++--- 7 files changed, 162 insertions(+), 118 deletions(-) create mode 100644 common/assets/images/icn-keystore.svg delete mode 100644 common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.scss delete mode 100644 common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.scss diff --git a/common/assets/images/icn-keystore.svg b/common/assets/images/icn-keystore.svg new file mode 100644 index 000000000..76a823658 --- /dev/null +++ b/common/assets/images/icn-keystore.svg @@ -0,0 +1,26 @@ + + + + 0EAEF11C-05BE-4E50-AF1D-32B5CD0EE171 + Created with sketchtool. + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/v2/components/ExtendedContentPanel.tsx b/common/v2/components/ExtendedContentPanel.tsx index bb0ee1561..db386986e 100644 --- a/common/v2/components/ExtendedContentPanel.tsx +++ b/common/v2/components/ExtendedContentPanel.tsx @@ -39,7 +39,6 @@ const ContentPanelHeading = font-size: 36px; width: 100%; display: flex; - padding: ${props => (props.centered ? '0 40px' : '0')}; justify-content: ${props => (props.centered ? 'center' : 'space-between')}; font-weight: bold; line-height: normal; @@ -57,18 +56,19 @@ const ContentPanelHeadingIcon = styled.img` height: 45px; `; -interface ContentPanelDescriptionProps { - centered: boolean | undefined; -} - const ContentPanelDescription = styled.p` font-size: 18px; - font-weight: normal; line-height: 1.5; - padding: ${(props: ContentPanelDescriptionProps) => (props.centered ? '0 43px' : '0')}; + font-weight: normal; + color: ${props => props.theme.text}; + white-space: pre-line; - @media (max-width: 700px) { + strong { + font-weight: 900; + } + @media (max-w + idth: 700px) { padding: 0 8px; } `; @@ -76,7 +76,7 @@ const ContentPanelDescription = styled.p` const ImgIcon = styled.img` width: 125px; height: auto; - margin: 21px 0 28px 0; + margin-bottom: 28px; `; interface ContentPanelTopProps { @@ -99,6 +99,8 @@ const ContentPanelTop = `; const StyledPanel = styled(Panel)` + padding: 42px 70px 42px 70px; + @media (max-width: 700px) { padding-left: 15px; padding-right: 15px; @@ -107,12 +109,12 @@ const StyledPanel = styled(Panel)` interface Props { children: any; - className: string; + className?: string; heading?: string; icon?: string; image?: string; showImageOnTop?: boolean; - description?: string; + description?: string | JSX.Element; stepper?: { current: number; total: number; @@ -154,9 +156,7 @@ export default function ExtendedContentPanel({ {icon && } )} - {description && ( - {description} - )} + {description && {description}} {image && !showImageOnTop && } {children} diff --git a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.scss b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.scss deleted file mode 100644 index 5979fca4d..000000000 --- a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.scss +++ /dev/null @@ -1,21 +0,0 @@ -.GenerateKeystoreFilePanel { - &-fieldset { - margin-bottom: 15px; - - &-label { - margin-bottom: 18px; - } - } - &-button { - width: 100%; - margin-top: 80px; - margin-bottom: 15px; - } - &-bottom { - text-align: center; - - a { - color: #1eb8e7; - } - } -} diff --git a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx index 3b759facc..04832e2ab 100644 --- a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx @@ -1,36 +1,68 @@ import React from 'react'; import { Formik, Form, Field, FieldProps } from 'formik'; -import { Button, Input, Typography } from '@mycrypto/ui'; +import styled from 'styled-components'; +import { Button, Input } from '@mycrypto/ui'; -import { ContentPanel } from 'v2/components'; +import { ExtendedContentPanel } from 'v2/components'; import { PanelProps } from '../../CreateWallet'; -import './GenerateKeystoreFilePanel.scss'; +import translate, { translateRaw } from 'translations'; const initialValues = { password: '', confirmPassword: '' }; +const DescriptionItem = styled.div` + margin-top: 18px; + font-weight: normal; + font-size: 18px; + + strong { + font-weight: 900; + } +`; + +const PasswordForm = styled(Form)` + margin-top: 22px; +`; + +const FormItem = styled.fieldset` + margin-top: 15px; +`; + +const SubmitButton = styled(Button)` + width: 100%; + margin-top: 30px; + font-size: 18px; +`; + +const Description = () => { + return ( + + {translate('NEW_WALLET_KEYSTORE_DESCRIPTION_1')} + {translate('NEW_WALLET_KEYSTORE_DESCRIPTION_2')} + + ); +}; + export default function GenerateKeystoreFilePanel({ onBack, onNext }: PanelProps) { return ( - } > ( -
              -
              - + + + ) => ( @@ -42,11 +74,9 @@ export default function GenerateKeystoreFilePanel({ onBack, onNext }: PanelProps /> )} /> -
              -
              - + + + ) => ( @@ -58,25 +88,12 @@ export default function GenerateKeystoreFilePanel({ onBack, onNext }: PanelProps /> )} /> -
              - - This password encrypts your private key. This does not act as a seed to generate your - keys. - - - - You will need this password + your keystore file to unlock your wallet. - - - - - Don’t know what a keystore file is? Learn more. - - + + {translate('NEW_WALLET_KEYSTORE_DESCRIPTION_3')} + {translate('NEW_WALLET_KEYSTORE_BUTTON')} + )} /> -
              + ); } diff --git a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.scss b/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.scss deleted file mode 100644 index 03f710bb6..000000000 --- a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.scss +++ /dev/null @@ -1,6 +0,0 @@ -.SaveKeystoreFilePanel { - &-button { - width: 100%; - margin-bottom: 15px; - } -} diff --git a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx index 904d5cc5c..f0e1c727e 100644 --- a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx @@ -1,13 +1,43 @@ import React from 'react'; import { Button, Typography } from '@mycrypto/ui'; +import styled from 'styled-components'; -import { ContentPanel } from 'v2/components'; +import { ExtendedContentPanel } from 'v2/components'; import { PanelProps } from '../../CreateWallet'; -import './SaveKeystoreFilePanel.scss'; +import translate from 'translations'; +import keystoreIcon from 'common/assets/images/icn-keystore.svg'; + +const DescriptionItem = styled(Typography)` + margin-top: 18px; + font-weight: normal; + font-size: 18px !important; + + strong { + font-weight: 900; + } +`; + +const ButtonsWrapper = styled.div` + margin-top: 48px; + display: flex; + flex-direction: column; +`; +const StyledButton = styled(Button)` + font-size: 18px; + margin-bottom: 16px; + width: 100%; +`; + +const ImageWrapper = styled.div` + display: flex; + justify-content: center; + margin-top: 33px; + margin-bottom: 25px; +`; export default function SaveKeystoreFilePanel({ onBack, onNext }: PanelProps) { return ( - - - - Don't lose it. It can't be recovered if you lose it. - - - Don't share it. Your funds will be stolen if you use this on a malicious - site. - - - Keep it offline. Your funds are safest offline (on a USB drive or something - similar). We don't recommend keeping your file on any cloud services like Dropbox, Google - Drive, etc. - - - Make a backup. Secure it like it's the millions of dollars it may one day - be worth. - - - - - + + + + + {translate('SAVE_KEYSTORE_DESCRIPTION_1')} + {translate('SAVE_KEYSTORE_DESCRIPTION_2')} + {translate('SAVE_KEYSTORE_DESCRIPTION_3')} + + + {translate('SAVE_KEYSTORE_BUTTON')} + + {translate('ACTION_6')} + + ); } diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx index d481fc15e..030e2a9ad 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -1,33 +1,44 @@ import React from 'react'; import { Button, ComboBox } from '@mycrypto/ui'; +import styled from 'styled-components'; -import { ContentPanel } from 'v2/components'; +import { ExtendedContentPanel } from 'v2/components'; import { PanelProps } from '../CreateWallet'; -import './SelectNetworkPanel.scss'; +import translate, { translateRaw } from 'translations'; interface Props extends PanelProps { totalSteps: number; } +const NetworkForm = styled.div` + margin-top: 22px; +`; + +const SubmitButton = styled(Button)` + width: 100%; + margin-top: 30px; + font-size: 18px; +`; + export default function SelectNetworkPanel({ totalSteps, onBack, onNext }: Props) { return ( - - - - - - - + + + + + + {translateRaw('ACTION_6')} + + ); } From 57d90d3f3c5f883a005104c0b77c7c43afe3d101 Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Thu, 9 May 2019 15:42:37 +0200 Subject: [PATCH 0487/1466] add web3 default icon --- common/assets/images/wallets/web3-default.svg | 13 ++ .../config/__snapshots__/sagas.spec.ts.snap | 4 +- common/translations/lang/en.json | 39 +++-- common/translations/lang/fr.json | 2 +- common/translations/lang/ja.json | 2 +- common/translations/lang/ko.json | 2 +- common/utils/web3.ts | 22 +-- common/v2/components/ContentPanel.tsx | 2 +- ...{AddAccountStyles.scss => AddAccount.scss} | 1 - common/v2/features/AddAccount/AddAccount.tsx | 2 +- .../features/AddAccount/AddAccountFlow.scss | 8 ++ .../v2/features/AddAccount/AddAccountFlow.tsx | 103 ++++++++++++++ .../AddAccount/AddAccountForm.reducer.tsx | 30 ++++ .../components/InsecureWalletWarning.tsx | 22 ++- .../components/NetworkSelectPanel.tsx | 46 ++++++ .../AddAccount/components/SaveAndRedirect.tsx | 33 +++++ .../AddAccount/components/WalletList.tsx | 74 ++++++++++ .../features/AddAccount/components/Web3.scss | 21 --- .../features/AddAccount/components/Web3.tsx | 45 ------ .../AddAccount/components/Web3Provider.tsx | 45 ++++++ .../components/Web3ProviderInstall.tsx | 81 +++++++++++ .../features/AddAccount/components/index.ts | 8 +- common/v2/features/AddAccount/flags.tsx | 6 + common/v2/features/AddAccount/index.ts | 1 - common/v2/features/AddAccount/routes.ts | 5 +- common/v2/features/AddAccount/stories.tsx | 133 ++++++++++++++++++ common/v2/features/AddAccount/types.tsx | 42 ++++++ common/v2/features/index.ts | 2 +- 28 files changed, 689 insertions(+), 105 deletions(-) create mode 100644 common/assets/images/wallets/web3-default.svg rename common/v2/features/AddAccount/{AddAccountStyles.scss => AddAccount.scss} (99%) create mode 100644 common/v2/features/AddAccount/AddAccountFlow.scss create mode 100644 common/v2/features/AddAccount/AddAccountFlow.tsx create mode 100644 common/v2/features/AddAccount/AddAccountForm.reducer.tsx create mode 100644 common/v2/features/AddAccount/components/NetworkSelectPanel.tsx create mode 100644 common/v2/features/AddAccount/components/SaveAndRedirect.tsx create mode 100644 common/v2/features/AddAccount/components/WalletList.tsx delete mode 100644 common/v2/features/AddAccount/components/Web3.scss delete mode 100644 common/v2/features/AddAccount/components/Web3.tsx create mode 100644 common/v2/features/AddAccount/components/Web3Provider.tsx create mode 100644 common/v2/features/AddAccount/components/Web3ProviderInstall.tsx create mode 100644 common/v2/features/AddAccount/flags.tsx create mode 100644 common/v2/features/AddAccount/stories.tsx create mode 100644 common/v2/features/AddAccount/types.tsx diff --git a/common/assets/images/wallets/web3-default.svg b/common/assets/images/wallets/web3-default.svg new file mode 100644 index 000000000..7f1d3b74e --- /dev/null +++ b/common/assets/images/wallets/web3-default.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/common/features/config/__snapshots__/sagas.spec.ts.snap b/common/features/config/__snapshots__/sagas.spec.ts.snap index dd8b54ec3..4d8c9274a 100644 --- a/common/features/config/__snapshots__/sagas.spec.ts.snap +++ b/common/features/config/__snapshots__/sagas.spec.ts.snap @@ -12,7 +12,9 @@ Object { } `; -exports[`handleChangeNodeRequested* should select getCustomNodeConfig and match race snapshot 1`] = ` +exports[ + `handleChangeNodeRequested* should select getCustomNodeConfig and match race snapshot 1` +] = ` Object { "@@redux-saga/IO": true, "SELECT": Object { diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index dcdcd9009..f19b5972e 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -55,7 +55,7 @@ "X_METAMASK": "MetaMask", "X_MIST": "Mist", "X_TRUST": "Trust Wallet", - "X_WEB3": "Web3", + "X_WEB3_DEFAULT": "Web3", "X_MNEMONIC": "Mnemonic Phrase ", "X_SAVE_PAPER": "Save Paper Wallet ", "X_PRINT": "Print Paper Wallet ", @@ -799,16 +799,29 @@ "DOWNLOAD_APP_DOWNLOAD_BUTTON": "Download for", "DOWNLOAD_APP_FOOTER_INFO": "Not sure what this is?", "NO_ACCOUNTS_HEADER":"You don't have any accounts in your wallet.", - "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now.", - "PRIVATE_KEY_HELP":"Not working? [Here's some troubleshooting tips to try.](https://support.mycrypto.com/troubleshooting/accessing-wallet/private-key-not-working)", - "ADD_ACCOUNT_FOOTER_LINK": "Don't have an account? [ Create a new account now.](https://MyCrypto.com/download-desktop-app)", - "ADD_ACCOUNT_DESCRIPTION": "Select from the options below to unlock your account and manage your assets.", + "NO_ACCOUNTS_DESCRIPTION":"To access your funds add one of your existing \n accounts or create a new account now.", + "PRIVATE_KEY_HELP":"Not working? [Here's some troubleshooting tips to try.](https://support.mycrypto.com/troubleshooting/accessing-wallet/private-key-not-working)", + "ADD_ACCOUNT_FOOTER_LINK": "Don't have an account? [ Create a new account now.](https://MyCrypto.com/download-desktop-app)", + "ADD_ACCOUNT_DESCRIPTION": "Select from the options below to unlock your account and manage your assets.", + "ADD_ACCOUNT_NETWORK_TITLE": "Select Network", "ADD_ACCOUNT_NETWORK_SELCT":"Select the blockchain that you want to operate with and the network it connects through. Not sure what to choose? Stick with the default choices below and click next.", - "ACCOUNT_LIST_TABLE_ADD_ACCOUNT": "Add Account", - "ACCOUNT_LIST_FAVOURITE": "Favorite", - "ACCOUNT_LIST_ADDRESS": "Address", - "ACCOUNT_LIST_NETWORK":"Network", - "ACCOUNT_LIST_VALUE": "Value", + "ADD_ACCOUNT_NETWORK_ACTION": "Next", + "ADD_ACCOUNT_METAMASK_TITLE": "Connect and Unlock with MetaMask", + "ADD_ACCOUNT_METAMASK_DESC": "After you've connected, follow the instructions on the screen to access your account", + "ADD_ACCOUNT_METAMASK_FOOTER": "Dont' have Metamask?", + "ADD_ACCOUNT_METAMASK_FOOTER_LINK": "Get it now", + "ADD_ACCOUNT_METAMASK_HELP": "Learn how Metamask works with MyCrypto", + "ADD_ACCOUNT_WEB3_INSTALL_TITLE": "Install a Web3Provider to continue", + "ADD_ACCOUNT_WEB3_INSTALL_DESC": "Our recommended desktop Web3Provider is the Metamask.io browser extension. Download now to get started!", + "ADD_ACCOUNT_WEB3_INSTALL_ACTION": "Install Metamask", + "ADD_ACCOUNT_WEB3_INSTALL_FOOTER": "Using a Keystore File or a Mnemonic Phrase?", + "ADD_ACCOUNT_WEB3_INSTALL_FOOTER_LINK": "Download the Desktop App to unlock your wallet", + "ADD_ACCOUNT_WEB3_INSTALL_MOBILE_DESC": "Download our recommended Web3Provider apps to get started now!", + "ACCOUNT_LIST_TABLE_ADD_ACCOUNT": "Add Account", + "ACCOUNT_LIST_FAVOURITE": "Favorite", + "ACCOUNT_LIST_ADDRESS": "Address", + "ACCOUNT_LIST_NETWORK":"Network", + "ACCOUNT_LIST_VALUE": "Value", "ACCOUNT_LIST_DELETE": "Delete", "DOWNLOAD_APP_FOOTER_INFO_LINK": "Learn more about our desktop app.", "SCREEN_LOCK_NEW_HEADING":"Create Password to Lock Your Wallet", @@ -839,9 +852,9 @@ "SCREEN_LOCK_LOCKING_TURN_ON_LOCK": "Turn on Screen Lock", "SCREEN_LOCK_TAB_TITLE": "MyCrypto", "SCREEN_LOCK_TAB_TITLE_LOCKED": "MyCrypto (Locked)", - "SCREEN_LOCK_TAB_TITLE_LOCKING": "Locking Screen in", - "KEYSTORE_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-keystore-file)", - "MNEMONIC_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-mnemonic-phrase)", + "SCREEN_LOCK_TAB_TITLE_LOCKING": "Locking Screen in", + "KEYSTORE_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-keystore-file)", + "MNEMONIC_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-mnemonic-phrase)", "MNEMONIC_TOOL_TIP": "If you created a Mnemonic Phrase on another website, you may have a password for this account" } } diff --git a/common/translations/lang/fr.json b/common/translations/lang/fr.json index 1a085db5c..5b6b99d53 100644 --- a/common/translations/lang/fr.json +++ b/common/translations/lang/fr.json @@ -49,7 +49,7 @@ "X_KEYSTOREDESC": "Ce fichier Keystore utilise le même format que celui que Mist, vous pouvez donc facilement l'importer plus tard dans ces logiciels. C'est le fichier que nous vous recommandons de télécharger et sauvegarder. ", "X_METAMASK": "MetaMask / Web3 ", "X_MIST": "Mist", - "X_WEB3": "Web3", + "X_WEB3_DEFAULT": "Web3", "X_MNEMONIC": "Phrase mnémonique ", "X_SAVE_PAPER": "Enregistrer le portefeuille papier ", "X_PRINT": "Imprimer un portefeuille papier ", diff --git a/common/translations/lang/ja.json b/common/translations/lang/ja.json index 0120123ca..143a93418 100644 --- a/common/translations/lang/ja.json +++ b/common/translations/lang/ja.json @@ -35,7 +35,7 @@ "X_KEYSTOREDESC": "この Keystore / JSON ファイルは、後で容易にインポートするため、Mistで使われているフォーマットと一致させる必要があります。ダウンロードしてバックアップを取ることをおすすめします。 ", "X_METAMASK": "MetaMask / Web3 ", "X_MIST": "Mist", - "X_WEB3": "Web3", + "X_WEB3_DEFAULT": "Web3", "X_MNEMONIC": "ニーモニック文節 ", "X_PRINT": "お財布紙情報を印刷 ", "X_PRINTDESC": "プロの助言 プリンターが接続されていなくても、「印刷」をクリックしてPDFで保存できます。 ", diff --git a/common/translations/lang/ko.json b/common/translations/lang/ko.json index e924a621c..208a150ce 100644 --- a/common/translations/lang/ko.json +++ b/common/translations/lang/ko.json @@ -49,7 +49,7 @@ "X_KEYSTOREDESC": "키스토어 / JSON 파일은 Mist에서 사용하는 형식과 일치하므로 나중에 쉽게 가져올 수 있습니다. 다운로드하고 백업할 것을 권장합니다. ", "X_METAMASK": "MetaMask ", "X_MIST": "Mist", - "X_WEB3": "Web3", + "X_WEB3_DEFAULT": "Web3", "X_MNEMONIC": "니모닉 문구 ", "X_SAVE_PAPER": "종이 지갑 저장 ", "X_PRINT": "종이 지갑 인쇄 ", diff --git a/common/utils/web3.ts b/common/utils/web3.ts index e63654ab6..cb4d47cb1 100644 --- a/common/utils/web3.ts +++ b/common/utils/web3.ts @@ -2,6 +2,7 @@ import MetamaskIcon from 'common/assets/images/wallets/metamask-2.svg'; import MistIcon from 'assets/images/wallets/mist.svg'; import CipherIcon from 'assets/images/wallets/cipher.svg'; import TrustIcon from 'assets/images/wallets/trust.svg'; +import Web3DefaultIcon from 'assets/images/wallets/web3-default.svg'; interface Web3ProviderInfo { lid: string; @@ -26,23 +27,22 @@ const WEB3_CONFIGS: { TrustWeb3Provider: { lid: 'X_TRUST', icon: TrustIcon + }, + UnIndentifiedWeb3Provider: { + lid: 'X_WEB3_DEFAULT', + icon: Web3DefaultIcon } }; -const DEFAULT_WEB3_CONFIG: Web3ProviderInfo = { - lid: 'X_WEB3', - icon: '' -}; - export function getWeb3ProviderInfo(): Web3ProviderInfo { if (typeof window === 'undefined') { - return DEFAULT_WEB3_CONFIG; + return WEB3_CONFIGS.UnIndentifiedWeb3Provider; } - const className = (window as any).web3 && (window as any).web3.currentProvider.constructor.name; - if (className && WEB3_CONFIGS[className]) { - return WEB3_CONFIGS[className]; - } + const className = + ((window as any).web3 && (window as any).web3.currentProvider.constructor.name) || undefined; - return DEFAULT_WEB3_CONFIG; + return className && WEB3_CONFIGS[className] + ? WEB3_CONFIGS[className] + : WEB3_CONFIGS.UnIndentifiedWeb3Provider; } diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index e0756b362..f745d1efe 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -71,7 +71,7 @@ interface Props { current: number; total: number; }; - onBack(): void; + onBack?(): void | null; } export default function ContentPanel({ diff --git a/common/v2/features/AddAccount/AddAccountStyles.scss b/common/v2/features/AddAccount/AddAccount.scss similarity index 99% rename from common/v2/features/AddAccount/AddAccountStyles.scss rename to common/v2/features/AddAccount/AddAccount.scss index e34984a25..dc25150be 100644 --- a/common/v2/features/AddAccount/AddAccountStyles.scss +++ b/common/v2/features/AddAccount/AddAccount.scss @@ -48,7 +48,6 @@ $speed: 500ms; font-weight: bold; } &-title { - height: 39px; font-family: Lato; font-size: 32px; font-weight: bold; diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index d4727962e..edec4e6d7 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -41,7 +41,7 @@ import { InsecureWalletWarning, ViewOnlyDecrypt } from './components'; -import './AddAccountStyles.scss'; +import './AddAccount.scss'; import { Button, ComboBox } from '@mycrypto/ui'; import { Layout } from 'v2/features'; import * as WalletActions from 'v2/features/Wallets'; diff --git a/common/v2/features/AddAccount/AddAccountFlow.scss b/common/v2/features/AddAccount/AddAccountFlow.scss new file mode 100644 index 000000000..a5c4197a8 --- /dev/null +++ b/common/v2/features/AddAccount/AddAccountFlow.scss @@ -0,0 +1,8 @@ +.fullHeight { + flex: 1; +} + +.Panel-content-img { + margin: 2em; + padding-top: 2em; +} diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx new file mode 100644 index 000000000..394554940 --- /dev/null +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -0,0 +1,103 @@ +import React, { useState, useReducer } from 'react'; +import { TransitionGroup, CSSTransition } from 'react-transition-group'; + +import { Layout } from 'v2/features'; +import { ContentPanel } from 'v2/components'; +import { WalletName, FormData, FormDataAction, FormDataActionType as ActionType } from './types'; +import { STORIES } from './stories'; +import { WalletList } from './components'; +import { formReducer, initialState } from './AddAccountForm.reducer'; +import './AddAccount.scss'; +import './AddAccountFlow.scss'; + +interface State { + story: WalletName; + step: number; + formData: FormData; +} + +const getStorySteps = (storyName: WalletName) => { + const story = STORIES.filter(selected => selected.name === storyName)[0]; + return story.steps; +}; + +/* + Flow to add an account to localStorage. The default view of the component + displays a list of wallets (e.g. stories) that each posses their own number + of steps. + - AddAccountFlow handles the stepper + - AddAccountFormProvider handles the form state and is accessed by each + story. +*/ +function AddAccountFlow() { + const [story, setStory] = useState(WalletName.DEFAULT); // The Wallet Story that we are tracking. + const [step, setStep] = useState(0); // The current Step inside the Wallet Story. + const [formData, updateFormState] = useReducer(formReducer, initialState); // The data that we want to save at the end. + + const isDefaultView = story === WalletName.DEFAULT; + + const goToStart = () => { + setStep(0); + setStory(WalletName.DEFAULT); + updateFormState({ type: ActionType.RESET_FORM }); + }; + + const goToNextStep = () => { + const nextStep = Math.min(step + 1, getStorySteps(story).length - 1); + setStep(nextStep); + }; + + const goToPreviousStep = () => { + if (step === 0) { + return goToStart(); + } + setStep(step - 1); + }; + + const onWalletSelection = (name: WalletName) => { + setStory(name); + // @ADD_ACCOUNT_TODO: This is equivalent to formDispatch call. + // Maybe we can merge story and accountType to use only one? + updateFormState({ type: ActionType.SELECT_ACCOUNT_TYPE, payload: { accountType: name } }); + }; + + const renderDefault = () => ( + + + + + + + + ); + + const renderStep = () => { + const steps = getStorySteps(story); + const Step = steps[step]; + + return ( + + + + console.log('UNLOCK CALLED')} + formData={formData} + formDispatch={updateFormState} + /> + + + + ); + }; + + return {isDefaultView ? renderDefault() : renderStep()}; +} + +export default AddAccountFlow; diff --git a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx new file mode 100644 index 000000000..c5dfaee30 --- /dev/null +++ b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx @@ -0,0 +1,30 @@ +import { FormDataAction, FormDataActionType as ActionType } from './types'; + +export const initialState: FormData = { + network: 'Ethereum' // @ADD_ACCOUNT_TODO this should have the same type as networkOptions in NetworkOptionsContext +}; + +export const formReducer = (formData: FromData, action: FormDataAction) => { + console.debug('REDUCER', action); + switch (action.type) { + case ActionType.SELECT_NETWORK: + const { network } = action.payload; + return { ...formData, network }; + case ActionType.SELECT_ACCOUNT: + const { account } = action.payload; + return { ...formData, account }; + case ActionType.SELECT_ACCOUNT_TYPE: + const { accountType } = action.payload; + return { ...formData, accountType }; + case ActionType.SET_LABEL: + const { label } = action.payload; + return { ...formData, label }; + case ActionType.SET_DERIVATION_PATH: + const { derivationPath } = action.payload; + return { ...formData, derivationPath }; + case ActionType.RESET_FORM: + return initialState; + default: + throw new Error(`[AddAccountReducer]: Type ${action.type} is not recognized by this reducer`); + } +}; diff --git a/common/v2/features/AddAccount/components/InsecureWalletWarning.tsx b/common/v2/features/AddAccount/components/InsecureWalletWarning.tsx index f24abef65..38b9409f1 100644 --- a/common/v2/features/AddAccount/components/InsecureWalletWarning.tsx +++ b/common/v2/features/AddAccount/components/InsecureWalletWarning.tsx @@ -1,6 +1,8 @@ import React from 'react'; -import translate from 'translations'; + +import translate, { translateRaw } from 'translations'; import { NewTabLink } from 'components/ui'; +import { IS_DEV } from '../flags'; import './InsecureWalletWarning.scss'; interface Props { @@ -8,7 +10,7 @@ interface Props { onCancel(): void; } -export class InsecureWalletWarning extends React.Component { +class InsecureWalletWarning extends React.Component { constructor(props: Props) { super(props); } @@ -41,3 +43,19 @@ export class InsecureWalletWarning extends React.Component { ); } } + +const InsecureWarning = ({ wallet, formData, goToStart }) => ( +
              + + {IS_DEV && ( + + )} +
              +); + +export default InsecureWarning; diff --git a/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx new file mode 100644 index 000000000..49e2fbec5 --- /dev/null +++ b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx @@ -0,0 +1,46 @@ +import React, { useState, useContext } from 'react'; +import { Button, ComboBox } from '@mycrypto/ui'; + +import { translate } from 'translations'; +import { NetworkOptionsContext } from 'v2/providers'; +import { isWalletFormatSupportedOnNetwork } from 'v2/libs'; +import { FormDataActionType as ActionType } from '../types'; + +function NetworkSelectPanel({ formData, formDispatch, goToNextStep }) { + const [network, setNetwork] = useState(formData.network); + const { networkOptions } = useContext(NetworkOptionsContext); + + // @ADD_ACCOUNT_TODO: The difference in accountType is likely causing + // the absence of list. + const validNetworks = networkOptions + .filter(options => isWalletFormatSupportedOnNetwork(options, formData.accountType)) + .map(n => n.name); + + const onSubmit = () => { + formDispatch({ + type: ActionType.SELECT_NETWORK, + payload: { network } + }); + goToNextStep(); + }; + + return ( +
              +
              {translate('ADD_ACCOUNT_NETWORK_TITLE')}
              +
              {translate('ADD_ACCOUNT_NETWORK_SELCT')}
              + + setNetwork(value)} + /> + +
              + ); +} + +export default NetworkSelectPanel; diff --git a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx new file mode 100644 index 000000000..c85c95eb8 --- /dev/null +++ b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx @@ -0,0 +1,33 @@ +import React, { useContext, useEffect } from 'react'; +import { Route, Redirect } from 'react-router'; + +import { AccountContext } from 'v2/providers'; +import { getNetworkByName } from 'v2/libs'; + +/* + Create a new account in localStorage and redirect to dashboard. +*/ +function SaveAndRedirect(formData) { + const { createAccount } = useContext(AccountContext); + + useEffect(() => { + const network: NetworkOptions | undefined = getNetworkByName(formData.network); + const account = { + ...formData, + assets: network ? network.unit : 'DefaultAsset', + value: 0, + label: 'New Account', // @TODO: we really should have the correct label before! + localSettings: 'default', + transactionHistory: '' + }; + createAccount(account); + }); + + return ( + + + + ); +} + +export default SaveAndRedirect; diff --git a/common/v2/features/AddAccount/components/WalletList.tsx b/common/v2/features/AddAccount/components/WalletList.tsx new file mode 100644 index 000000000..c03154829 --- /dev/null +++ b/common/v2/features/AddAccount/components/WalletList.tsx @@ -0,0 +1,74 @@ +import React, { PureComponent } from 'react'; +import { connect } from 'react-redux'; + +import translate, { translateRaw } from 'translations'; +import { getDisabledWallets } from 'features/selectors'; +import { walletSelectors } from 'features/wallet'; +import { WalletButton } from '../components'; +import { WalletName } from '../types'; + +interface Props { + wallets: any[]; + onSelect(name: WalletName): void; +} + +class WalletList extends PureComponent { + public render() { + const { wallets, onSelect, formDataDispatch } = this.props; + const validWallets = wallets; // @TODO Filter here according to electronOnly + + return ( +
              +

              {translate('DECRYPT_ACCESS')}

              +
              + {translate('ADD_ACCOUNT_DESCRIPTION')} +
              +
              +
              + {validWallets.map(wallet => { + return ( + onSelect(wallet.name)} + /> + ); + })} +
              +
              +
              {translate('ADD_ACCOUNT_FOOTER_LINK')}
              +
              + ); + } +} + +// @TODO: From the moment we have flags on the wallets, this logic appears +// convulated and should be removed. +function mapStateToProps(state, ownProps) { + // const { disabledWallets } = ownProps; + // let computedDisabledWallets = getDisabledWallets(state); + // + // if (disabledWallets) { + // computedDisabledWallets = { + // wallets: [...computedDisabledWallets.wallets, ...disabledWallets.wallets], + // reasons: { + // ...computedDisabledWallets.reasons, + // ...disabledWallets.reasons + // } + // }; + // } + + return { + // computedDisabledWallets, + // accessMessage: walletSelectors.getWalletAccessMessage(state) + }; +} + +export default connect(mapStateToProps, null)(WalletList); diff --git a/common/v2/features/AddAccount/components/Web3.scss b/common/v2/features/AddAccount/components/Web3.scss deleted file mode 100644 index 7130fd9ac..000000000 --- a/common/v2/features/AddAccount/components/Web3.scss +++ /dev/null @@ -1,21 +0,0 @@ -.Web3Decrypt { - text-align: center; - - &-help { - margin-top: 10px; - font-size: 13px; - } - - &-error { - opacity: 0; - transition: none; - - &.is-showing { - opacity: 1; - } - } - - &-install { - margin-top: 10px; - } -} diff --git a/common/v2/features/AddAccount/components/Web3.tsx b/common/v2/features/AddAccount/components/Web3.tsx deleted file mode 100644 index 47996848d..000000000 --- a/common/v2/features/AddAccount/components/Web3.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import React, { PureComponent } from 'react'; - -import translate from 'translations'; -import { NewTabLink } from 'components/ui'; -import './Web3.scss'; - -interface Props { - onUnlock(): void; -} -interface State { - address: string; -} - -export class Web3DecryptClass extends PureComponent { - public state: State = { - address: '' - }; - - public render() { - return ( -
              -
              - -
              - -
              - -
              - -

              - In order to use MetaMask with MyCrypto, your ad blocker must be disabled. -

              -
              - ); - } -} diff --git a/common/v2/features/AddAccount/components/Web3Provider.tsx b/common/v2/features/AddAccount/components/Web3Provider.tsx new file mode 100644 index 000000000..6f1ae20f9 --- /dev/null +++ b/common/v2/features/AddAccount/components/Web3Provider.tsx @@ -0,0 +1,45 @@ +import React, { PureComponent } from 'react'; +import styled from 'styled-components'; + +import { Typography } from '@mycrypto/ui'; +import translate from 'translations'; +import MetamaskSVG from 'common/assets/images/wallets/metamask-2.svg'; +import { NewTabLink, HelpLink } from 'components/ui'; + +interface Props { + wallet: object; + onUnlock(): void; +} + +function Web3ProviderDecrypt({ wallet, onUnlock }: Props) { + return ( +
              +
              {translate('ADD_ACCOUNT_METAMASK_TITLE')}
              +
              {translate('ADD_ACCOUNT_METAMASK_DESC')}
              +
              +
              +
              + +
              + +
              +
              +
              +
              + {translate('ADD_ACCOUNT_METAMASK_FOOTER')}{' '} + +
              +
              + +
              +
              +
              + ); +} + +export default Web3ProviderDecrypt; diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx new file mode 100644 index 000000000..5dbaa01a8 --- /dev/null +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx @@ -0,0 +1,81 @@ +import React, { PureComponent } from 'react'; +import styled from 'styled-components'; + +import { Typography } from '@mycrypto/ui'; +import translate from 'translations'; +import MetamaskSVG from 'common/assets/images/wallets/metamask-2.svg'; +import { NewTabLink, HelpLink } from 'components/ui'; +import { IS_MOBILE } from '../flags'; + +interface Props { + wallet: object; + onUnlock(): void; +} + +function InstallTrunk({ wallet, onUnlock }: Props) { + return ( +
              +
              {translate('ADD_ACCOUNT_WEB3_INSTALL_TITLE')}
              +
              {translate('ADD_ACCOUNT_WEB3_INSTALL_MOBILE_DESC')}
              +
              +
              +
              + +
              + +
              +
              +
              +
              + {translate('ADD_ACCOUNT_WEB3_INSTALL_FOOTER')}{' '} + +
              +
              + +
              +
              +
              + ); +} + +function InstallMetaMask({ wallet, onUnlock }: Props) { + return ( +
              +
              {translate('ADD_ACCOUNT_WEB3_INSTALL_TITLE')}
              +
              {translate('ADD_ACCOUNT_WEB3_INSTALL_DESC')}
              +
              +
              +
              + +
              + +
              +
              +
              +
              + {translate('ADD_ACCOUNT_WEB3_INSTALL_FOOTER')}{' '} + +
              +
              + +
              +
              +
              + ); +} + +function Web3ProviderInstall(props: Props) { + return <>{IS_MOBILE ? : }; +} + +export default Web3ProviderInstall; diff --git a/common/v2/features/AddAccount/components/index.ts b/common/v2/features/AddAccount/components/index.ts index a817f496a..dbb06278d 100644 --- a/common/v2/features/AddAccount/components/index.ts +++ b/common/v2/features/AddAccount/components/index.ts @@ -1,5 +1,4 @@ export * from './DeterministicWallets'; -export * from './InsecureWalletWarning'; export * from './Keystore'; export * from './LedgerNano'; export * from './Mnemonic'; @@ -9,5 +8,10 @@ export * from './Trezor'; export * from './SafeT'; export * from './ViewOnly'; export * from './WalletButton'; -export * from './Web3'; export * from './disables'; +export { default as Web3ProviderDecrypt } from './Web3Provider'; +export { default as Web3ProviderInstall } from './Web3ProviderInstall'; +export { default as InsecureWalletWarning } from './InsecureWalletWarning'; +export { default as WalletList } from './WalletList'; +export { default as NetworkSelectPanel } from './NetworkSelectPanel'; +export { default as SaveAndRedirect } from './SaveAndRedirect'; diff --git a/common/v2/features/AddAccount/flags.tsx b/common/v2/features/AddAccount/flags.tsx new file mode 100644 index 000000000..1e887691c --- /dev/null +++ b/common/v2/features/AddAccount/flags.tsx @@ -0,0 +1,6 @@ +export const IS_DEV = process.env.NODE_ENV !== 'production'; + +export const IS_ELECTRON = process.env.BUILD_DOWNLOADABLE; + +export const IS_MOBILE = + window && window.navigator ? /iPhone|iPad|iPod|Android/i.test(window.navigator.userAgent) : false; diff --git a/common/v2/features/AddAccount/index.ts b/common/v2/features/AddAccount/index.ts index db7ac5222..46d7655f7 100644 --- a/common/v2/features/AddAccount/index.ts +++ b/common/v2/features/AddAccount/index.ts @@ -1,2 +1 @@ -export { default } from './AddAccount'; export { default as addAccountRoutes } from './routes'; diff --git a/common/v2/features/AddAccount/routes.ts b/common/v2/features/AddAccount/routes.ts index 7b9e99262..d1a58b997 100644 --- a/common/v2/features/AddAccount/routes.ts +++ b/common/v2/features/AddAccount/routes.ts @@ -1,10 +1,11 @@ -import AddAccount from './AddAccount'; +// import AddAccount from './AddAccount'; +import AddAccountFlow from './AddAccountFlow'; export default [ { name: 'Add Account', path: '/add-account', exact: true, - component: AddAccount + component: AddAccountFlow } ]; diff --git a/common/v2/features/AddAccount/stories.tsx b/common/v2/features/AddAccount/stories.tsx new file mode 100644 index 000000000..60c848351 --- /dev/null +++ b/common/v2/features/AddAccount/stories.tsx @@ -0,0 +1,133 @@ +import { knowledgeBaseURL as KB_URL } from 'config'; +import { IS_DEV, IS_ELECTRON } from './flags'; +import { WalletName, WalletType } from './types'; +import { + InsecureWalletWarning, + LedgerNanoSDecrypt, + KeystoreDecrypt, + MnemonicDecrypt, + NetworkSelectPanel, + ParitySignerDecrypt, + PrivateKeyDecrypt, + SafeTminiDecrypt, + SaveAndRedirect, + TrezorDecrypt, + ViewOnlyDecrypt, + WalletList, + Web3ProviderDecrypt, + Web3ProviderInstall +} from './components'; + +// @ADD_ACCOUNT_TODO: Icons really belongs to the WalletButton or a WalletIcon +// component. +import LedgerSVG from 'common/assets/images/wallets/ledger.svg'; +import TrezorSVG from 'common/assets/images/wallets/trezor.svg'; +import SafeTSVG from 'common/assets/images/wallets/safe-t.png'; +import ParitySignerSVG from 'common/assets/images/wallets/parity-signer.svg'; + +// STORIES serve the double purpose of generating the wallet options and +// providing a declarative way to determine the flow for each wallet. + +// @TODO: +// 1. Account list is displayed with DeterministicWallets component. +// We should abstract it and add to story in order to include it in the +// step length. +// 2. Merge enums and names with the ones in common/v2/config/accountTypes.ts + +export const STORIES = [ + { + name: WalletName.DEFAULT, + steps: [WalletList] + }, + { + name: WalletName.WEB3PROVIDER, + type: WalletType.SECURE, + lid: '', + icon: '', + description: 'ADD_WEB3DESC', + helpLink: `${KB_URL}/how-to/migrating/moving-from-mycrypto-to-metamask`, + // steps: [NetworkSelectPanel, Web3ProviderDecrypt, SaveAndRedirect], + steps: true ? [Web3ProviderInstall, SaveAndRedirect] : [Web3ProviderDecrypt] + }, + { + name: WalletName.LEDGER, + type: WalletType.SECURE, + lid: 'X_LEDGER', + icon: LedgerSVG, + description: 'ADD_HARDWAREDESC', + helpLink: 'https://support.ledger.com/hc/en-us/articles/360008268594', + steps: [NetworkSelectPanel, LedgerNanoSDecrypt, SaveAndRedirect] + }, + { + name: WalletName.TREZOR, + type: WalletType.SECURE, + lid: 'X_TREZOR', + icon: TrezorSVG, + description: 'ADD_HARDWAREDESC', + helpLink: `${KB_URL}/how-to/migrating/moving-from-mycrypto-to-trezor`, + steps: [NetworkSelectPanel, TrezorDecrypt, SaveAndRedirect] + }, + { + name: WalletName.SAFE_T, + type: WalletType.SECURE, + lid: 'X_SAFE_T', + icon: SafeTSVG, + description: 'ADD_HARDWAREDESC', + helpLink: 'https://www.archos.com/fr/products/crypto/faq.html', + steps: [NetworkSelectPanel, SafeTminiDecrypt, SaveAndRedirect] + }, + { + name: WalletName.PARITY_SIGNER, + type: WalletType.SECURE, + lid: 'X_PARITYSIGNER', + icon: ParitySignerSVG, + description: 'ADD_PARITY_DESC', + steps: [NetworkSelectPanel, ParitySignerDecrypt, SaveAndRedirect] + }, + { + name: WalletName.KEYSTORE_FILE, + type: WalletType.INSECURE, + lid: 'X_KEYSTORE2', + description: 'UTC--2017-12-15T17-35-22.547Z--6be6e49e82425a5aa56396db03512f2cc10e95e8', + steps: [ + NetworkSelectPanel, + IS_ELECTRON ? KeystoreDecrypt : InsecureWalletWarning, + SaveAndRedirect + ], + helpLink: `${KB_URL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types`, + elctronOnly: true + }, + { + name: WalletName.MNEMONIC_PHRASE, + type: WalletType.INSECURE, + lid: 'X_MNEMONIC', + description: 'brain surround have swap horror cheese file distinct', + helpLink: `${KB_URL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types`, + steps: [ + NetworkSelectPanel, + IS_ELECTRON ? MnemonicDecrypt : InsecureWalletWarning, + SaveAndRedirect + ], + elctronOnly: true + }, + { + name: WalletName.PRIVATE_KEY, + type: WalletType.INSECURE, + lid: 'X_PRIVKEY2', + description: 'f1d0e0789c6d40f399ca90cc674b7858de4c719e0d5752a60d5d2f6baa45d4c9', + helpLink: `${KB_URL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types`, + steps: [ + NetworkSelectPanel, + IS_ELECTRON ? PrivateKeyDecrypt : InsecureWalletWarning, + SaveAndRedirect + ], + elctronOnly: true + }, + { + name: WalletName.VIEW_ONLY, + type: WalletType.MISC, + lid: 'VIEW_ADDR', + description: 'ADD_VIEW_ADDRESS_DESC', + steps: [NetworkSelectPanel, ViewOnlyDecrypt, SaveAndRedirect] + } +]; diff --git a/common/v2/features/AddAccount/types.tsx b/common/v2/features/AddAccount/types.tsx new file mode 100644 index 000000000..e9310c48b --- /dev/null +++ b/common/v2/features/AddAccount/types.tsx @@ -0,0 +1,42 @@ +export enum WalletType { + SECURE, + INSECURE, + MISC +} + +// @ADD_ACCOUNT_TODO: move to named enum or other Set +export enum WalletName { + DEFAULT, + WEB3PROVIDER, + LEDGER, + TREZOR, + SAFE_T, + PARITY_SIGNER, + KEYSTORE_FILE, + MNEMONIC_PHRASE, + PRIVATE_KEY, + VIEW_ONLY +} + +// @ADD_ACCOUNT_TODO: move to named enum or other Set +export enum FormDataActionType { + SELECT_NETWORK, + SELECT_ACCOUNT, + SELECT_ACCOUNT_TYPE, + SET_LABEL, + SET_DERIVATION_PATH, + RESET_FORM +} + +export interface FormDataAction { + type: FormDataActionType; + payload: any; +} + +export interface FormData { + network: string; + account: string; + accountType: string; + label: string; + derivationPath: string; +} diff --git a/common/v2/features/index.ts b/common/v2/features/index.ts index c3a1cc369..a95fbd24d 100644 --- a/common/v2/features/index.ts +++ b/common/v2/features/index.ts @@ -2,7 +2,7 @@ export * from './BuyAndExchange'; export * from './CreateWallet'; export * from './Dashboard'; export * from './Home'; -export * from './AddAccount'; +export { addAccountRoutes } from './AddAccount'; export * from './DownloadApp'; export * from './NoAccounts'; export * from './constants'; From 536d2b9b434151a2f4246cb8cc43fffe0a3261e6 Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 13 May 2019 19:08:49 +0200 Subject: [PATCH 0488/1466] add title and panel to decrypt components --- common/assets/images/wallets/coinbase.jpg | Bin 0 -> 10606 bytes common/assets/images/wallets/trust-3.webp | Bin 0 -> 10384 bytes .../v2/features/AddAccount/AddAccountFlow.tsx | 23 ++-- .../AddAccount/components/Keystore.tsx | 83 +++++++------- .../AddAccount/components/LedgerNano.tsx | 56 +++++----- .../AddAccount/components/Mnemonic.tsx | 101 ++++++++++-------- .../AddAccount/components/ParitySigner.tsx | 45 ++++---- .../AddAccount/components/PrivateKey.tsx | 89 ++++++++------- .../features/AddAccount/components/SafeT.tsx | 51 +++++---- .../features/AddAccount/components/Trezor.tsx | 53 +++++---- .../AddAccount/components/WalletList.tsx | 3 +- .../components/Web3ProviderInstall.tsx | 53 +++++---- common/v2/features/AddAccount/stories.tsx | 15 +-- 13 files changed, 319 insertions(+), 253 deletions(-) create mode 100644 common/assets/images/wallets/coinbase.jpg create mode 100644 common/assets/images/wallets/trust-3.webp diff --git a/common/assets/images/wallets/coinbase.jpg b/common/assets/images/wallets/coinbase.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6496c98e1a0717bccb63d36753e7e8e83cca1bf7 GIT binary patch literal 10606 zcmeHtcU)8ZvhSh^h=}x}5EYOPA|fCq0@7q7A|Rar(iEj5ppYn4Y6KNTnlu3cBhp(! zN4iKyA#{+MNDHLB=y|8Sb3b<<_Pgia{m-3bvVJS8%=-Rj<~JoFkCCT=6W6r$v;itA z0MMnp0P+lQPb=V#GXNME0O9}uFaT7McK}+-h;j&``Ei zKaanm{_B}kJ#T3KKBgQ8)QvUu^eEf=_AXARWu?zc%gO=dbwKfktB0?LkE@60X*uch zfTD(;0qsv|6#6w5{xv)?#2-5j2R_n%f6Vx54W|JmHv+5-R6SHZG*o8+YE~*5Rw{BU z0HQnx9n~-Tbs6P@ikgO&?g%{t<54Ec2^A**YAPBUYFZjPx}RdGf+@!VT2?x?GqUPO z*p2Mz&w6oOc#@FCAgEE=#CdZ7BP8eG9m05&i<^g+PxzdOsF?Ug`AZ6lN|!aSYH91} z>RmH7F}-DGZee-b(aG7x_0C-%U%v+GD|ytnxU zh3`I=l~+_&RoB!ux3spkcYNyX`Z72)JTf{qJ~1;pH@~pBwETSq`(tZ+XLk>`fAA9* zWsd&>i}LvwWdDSVm4b_!mX?N={wFRfYX6_WS!wCc$R1%+H=?)qVn2J~2?K{lLRM)L zqoCYP45x$lz)>!ti!;L5pU{3GI~=f(|1V^J1NL`ZUja>k`WMkqQ?x`wL(vp1h3M$% zeiA(c{V!tpzjX8$G5sXwzY&>o6DrC*C>I~0yqOv48UJ?d&;#-$#Z>vp6TmSVDvB}D zumWIUUm#i(vGa^%d{i|1@&6=)$)Ep3*#m!~>@RJVq=6(=@LM^iN5NO3nh; zlZ@1dVZAaBzz;StYIteP61$O@!(z^S1#BM5iPPT|#*NP=@V@T7_?QfA9UProjow>l zA~CkiQqvQJ9?k=McvklA8=XtU8PhQ1H|z8eC2gBZCckkTq`X^A`JsayJ`Opex3v?dkT?snK3rQJf}L zq6v8$2XEP{G}0Q;6I6CPxL-V}sq@9pwZ}3qjobBM@jy{183?9<1U?TIDtpJQBb#-! zsK|DeAdRAFZV&JYdF{cXz`d8VZ?jY_xFV|sQ_o}t-`)&`o#5SA8l;OG?=-7av!sTN zTOTDX;L7j}L7Ets33(8M;;5ux_skU?t<_jRMZ`CpRmbs@eL@98sX0d588Hh|NIZ!3 zwWs#&(Cc2-*o`WD6`?=WwS?L5+EBS${>S0_dF3gLbix{u@ZX+T?BHodc(txcf6qKU zc)dq7J35Pw!|2MtVi0-s57>1cPcM#by=ghHDD;!+7DkjM5H#ua+9EWU4K zl3G0bv6aVz)84_W`+KdZQ|D_Wk|56~-kx!t!ba|+q>_y{aULP!b8M}*RVRYE%}BcY zk<*AZFU;zU?~S{bxlF~YOcnL3k9n@n;WLJJskIYCb%(^`pJ>ymMUxcz6(eQ)WMw#0 zOnp)}c7NzQHn5C&T0lYchU4~cvg<=Ak&|QXKg3K8DjvbJNznktBL-BK*#e14dM`hz zrYMu*S@q#GyUaGC0~JpOK7!#;RvWdP{KkXIu(oJx4W{~Q;HCG9oOryc$Gzg6lP+bb zaOu-8?B^0RC0INI5JNcbw&K-@740;aby2^tjLhBDNvKYbOPW|nkHh?^BpFD7HuNvt ziY9sx^I;A#Zu3a&XbVr68R+8R_vP~?-`4o)zo5<`iamV0YwpSO*iOxIi3xd&-JAm6ZCE}~Evs}d) z%GmTWX12~ytJXPzpwMT5E68lr-4ZFO;``ZUWpNH6oQ!;@o8KV-s_&2<0r`MBN%jo& z#J=H6h4Q+V=G(& zd=aHESJ(uo1w|XABm_Te?PkWHl~-{3Sx3(K?OrGY4&N~)h)bAN&Sb+SEo?|jpZZwD zrXi*RC_A8X>*=OdMk>{m@M(oN;2!&d3nYQf4Y1N&@gCDr7OJj11u~Ghe~@NMdFlzB zxii0`o1c24Cm%BP*+Y+yPWR)YBNt71zN4`vE24<4 zz7mV!)Iy^vgGuCi=4aXHXrt%>ie4;Ua2RO;95>m3PDN^@8xDoP86=0(=NK8SDhz(t zeq7Sd4g$7)x#Gktt$eXnQW~N+l)C(qMC$HM8>@FZCa++|D$KK=c`Xs>T$Xq`3Khb! zw7B+`tX5tMhehZOTdBS3g^CB65i3a|xZOKazP#~K`QCyj*q%?5fxst=$g9Hy_4jT+ zc>U_|F-s!K`Q9DiIM`KB^gtEpX-H9;1E&P>)q9t%hk{$*I$G~?e2qVzsgODVOTo_} zpyM!_ZAL!jxSRSR>Fb|$Sq6_(M^fTl2m#O*cOL3fm0}?SoRIK0RQixSds4i$EW3~YCfv;*0?eXWrDE@iIU_<$8{GoO4yP)A?Y-<*^C4w@!T4psSj3U~weIE7M3b0TQ8QY9&W^HEZ9_9Yjkts_FRY&aj)M+*A>khYI}DflN%&moV(QQr|Hv}F_(u3G9XOR zj({3=?}XNocbJBJn93kuTqV9#`$C^a!Jeup&AP`}ki!=e;a~)t`c?q9_k7@uO^oI$HD%b#_L;efvi-k>;~; z`pTuv1^k`zXU?cQE7BwyK(9l`(G>>M_0>50Y5h!Tc{-Vm9F?W4D_X%YT8y)Dl#l2F zPTu`vvTjEmk=wYluPmC^op)9uDEWacu>f}ej?`iuMx=%Dh_*w`5XbhK#xB^BP%Q za1TnA=3<`KURGpl>1%VsNQ-l)ME_v9s2ML%b8^0Zk9 zXX}APZsx8S^trExa~N6u9nDWf{|Up$hp6~=z#&NH)D9H8FPOP8uct~(0+9RBstNj1 z{}FYC3`}PrS#4Zqoi-^=9$)i_icC~ux>IZQO7e4NT|8)qbBh_4mBE5BQG}g+yP~tV zbMpm$wH&ICtsxNG_6IxWa4-&cOX0e zbs@NniwqbJ;TCLj7&=g7b;w)ka)>k+MJ<{+FNlg(M zhI_IN4}ZXQbc`?k>lK~%9DD~G)Lpkzytr8CnMQ+frgCTT~tPlZ|VdbNVRpP9Yk;vh}+K$i59tJ;QJbEI|T%r=_Ui= zVz6+M>j8-}S2HcUpMT9&j|Wc7BsNHR#=PuDocdP*yu|h*>Jn@^_n~8z8Z~BeTO#2| zHpzb5=H&q_)HpVvn|guJPX_c{dc8tCL=f)XTRL-bl!R-!kbpTX(BC@`Mm|K7fLKG( zVvw80>I}PUT@#*T|NGf`O2~Qrn;yyjy@py*dVbt3kbHI}fi>z$>E2 zxijoDCGq*bior~;rbdGeX6g#|V?x@z*THB_i&9y)+&wir)WWw}lHMxrltmKvs-op9 z*rEZb+x!zC!1B;?jdTWQY=kk4^Mf(pP1rZ%N|yQYP*7Ilz>F8N!gZ4M=ys0n^LoeU zhMg-g+2MR~AJ4>LSIR8iyF#%m;J?6Bhbc`D5W5Q4H<-xwUWs+K{Rhc)voBnL#Pc-- zw}orNpDXlyZSHp53h$E7YxQxrt=6U`1L9a*qA~$kKAPsIS@p+X{-)?``zNnws)Y9la z*krB$dzbv}o2-S*uTfJJ;68jmwE;>1Rgr-vD@YvTl=UjXeisGv@W?U6C|0y z{$p#99!POzN8dX9jfxVrw0Ft7> zD*vId{eunSLp69=R49Q9ii9<(AjRHhWvzgY%j<{iJ?L{O(^iqHjXeS8BPt>mJ*Jmh zCD0Mz6TS#e%TJvg>~CtA2%bxemZWDv!n5}k+6DMau>vo}^*tUPy>^tpNgueD=>=&f zfjxac_H5#B#=`s{5MlY+{SD|`V_?DaXz-7)b zd~u-S=}Q?_y^0!|r8sPds+aA!mcLU?l88)e3vXy@oNnFQSXsrpe&1{5U(W97Y{_G- zW^|&VYylZ_Ey%N#ekQl)`^(o7lutlkE^-p(3Hmr=O0^LEnqvYKeJ>})5hPi6C4pgC z({FB29@meZqZlHpMWS%WgIV)jX?BwEG5uN-fz%@gFi)JC%UT&|WP_?YY;rYP@f< zqs1Qo@+KWm<&4k~WC%_Ze~F-tYbcPsd_T7GmI|-*21k2Vu$gCzS^8_|F_kJ7$y=AR z!?@P#_<5{_?-^)a3$xC}3&_v(Gp|A=hu62kEE9Txf!;HM@v@0}ho)zE zdVT1O-ulLg+=S|`j~|*43-RX;v`ypPt}Dr3#C(SCUD~pRbk+H7Ky#7;0=dJVx9ji4 z-MODba`}Pyq^QCtu`RJ%K}S%yI+*VX!9WvXl zV!~?EfEzW>cP|ArjG7}0-!Bu;7rR!cCF<4ASRiWlDf1+;3|Bl%_&;n7P1GTVkks+6@!KFKSok84Z1ZfyoZOGhe zVPIXxI%JhKKz9`) z?sSz}x9c*Wqo1Prg8YEkdZhXZ8>oHxtxY^!N>>@YWowv4F<0e{1zF>}X^u3vEU?*@Gm`yMp;afhqv9$2Mct|MsU=hiSMG)AZ z+l0?2H%<)698J`)WwS<1%f2QCW}~jopg9#&&qe2lwN}yXI&I3d?h{(Ve|)>WSY#kF z=}HD@_Hm=I+u-=i7h|8f{3MV`Ph=hO{Jp{;8gC1pNfDJ8C>1G0Y5w?tW|JibN0GJa(0Ojx||#5>h+NH*$p zA1?V~pE&+rSN%J%LVo8xcuA8}wY5;-`OikSl+@NN!k^=B7H+Q};}#|+jie~w#itXx-%Qs&N}<-N29O)rB~m>S*~T&u7WD<^7jWK8+~x+vEUfTPtzEk8*W5~8K`KZ3y#5=H)xZ)c9nZreiHQ9ImIT3&OfqM zLLT>inc@fsf_?ug3V;t)wEpF%MP)Q)N?GgmFsL@JDKSiMi>Askg*S>8#!8}7?Wi{_ zlwS+@RVZDH=Fck+eY*wnj*8Zo3wh{lTp@i|mDq1aXyDwia&2HH6&?Dg^)kK~y^}OT zfyzQgL+6*>en2>aWLmtgb59JE%igeEt0MysY;7_%R}~>qD^7laA|)cV>x=O3UD5m9 z(=zM4)0=UZIau60lO}px>4sB390L*4cKR!VPeK~^kw&rIvc^rf3#(0H$_x*NAGmDt z{AP2?K-e-2!9|G`f%(6ep-}x*f9u*D)s@v6iQ04GT@OPfu#jC8F^Q$cDy2Sn=EU(x z&xN;<^~X8}2SuWZ-nay;Tr--9pzJjZVz=oysu7-ewk0Uc7w|(gXHJ~lO~UH56P;#R zgp54e{~;B)3_2E&Z;Np+JyJK*-6@GUZFftz@3Pq{ zVr>WSwLB%N4?9M<=2tpoYRZMdo{D^Hp0SAHyJPawu1nX>n_-1H2+W5Ieu2FN8oxbr z2NB^m3t6mB*>J2^kLecoxdGiY*>%}5b_%{zXxZ_|{(>QGj<;^4c;f+I1*9L|gqj$f zg*4xaZ?#T0)TQ;P%v=gO{;3CQNwmbN_#@k;)lZEi$fgQE->^D`lm34-fModyzu-Z+Li{cLn zac|R8cB0UBlyLh0CZ`7exn$=D}#T+8N_gRDt``cR25M{U_R${#mm8~J;KUSdagD=?sDH?cKe z{Hq-UPchc7&6<+;$$-K607Sn>9Jop+uKvOEW#qBg_rC+|lh(s$hY;eMaqGf(usoi#xE{U{&rZs9Odulp$Y7+6>l12ChDY zv>C?Q%HtZ|>lNePtxtLfrFwRBNBJ}tY$GHn$>4{^X;0i`))sraEQTVXmx*98gl*oP z+6t#YwPMODv3lWOFA|5Si~qrTOlDL{nGQY_R>$vvP) zG7vohuO;oEdgZ3Naj6%YzH1j%xx6D7E*m$)DmI%8x#)iQdD&Tku=`I-GYb)S2a!TJ z`db~lE>ADw)4##R{qB*pQOQ5vJ&YZxh^Q(49zg0vW{mQy z+I-BAmoX30@(>lNqQHt{iW#T`cIgYj9GB&l32u8>o-(~r>(jAhy^fBqHz=U4nkboU zRK1#*MDiOBKae#=;jb%M;Y(pf7m8-BrSP?&N8l_tJ9H3sr2c&DsKA+uI?)TaMzo$0 z73F_a#e=7_kxZp=a~SE=OIeraVR?m7i~`e?UKjN{JqIOKgUiS*kppGS2y5Z&!sTB7 zprQ@PVt{%7i88)-Ly3`Z5m>bkxNy7^!5NEAr{#+pSX=t^$nEw^@kfqZ5Xs4@Daf_K zseYl2`O*tY?uH}p1|X&L1aQ)VNkhDi#>F|}Q1a9sOl}UF5+TAV9dz|uW-7%_8bT=@ zq{B6B4%2A(XCwSK?Sl_f-~XFr{j)QI4^s{Qx5@tBKl%K#KK{G+!GAD-|2v-tOdkI~ D%?7}9 literal 0 HcmV?d00001 diff --git a/common/assets/images/wallets/trust-3.webp b/common/assets/images/wallets/trust-3.webp new file mode 100644 index 0000000000000000000000000000000000000000..de9754676c61903b1f8ecd559d3ddb6b251efd8d GIT binary patch literal 10384 zcmV;BC~wzNNk&G9C;$LgMM6+kP&iC{C;$L2XTezzRfi+DZ6rzh|FctzlkT3mM#Kd0 zPdn@P_s-KRlf>QAY!bIKl=vI?B)h<);|Q2C6whceL4-v%(-?DCbS-&bC`TtZ~lCzvyfSAE$W+<-r?l~vVIhpyt z_dcP?o-A2fg5)dY$z*90+C@j)ci+9|{PUlAo;8zk#6F|{Wa7Yc%N!m{xB#rUMujY9 zW;9iy9k5ikf|<2}iHc(knQh5pOBQPjWi^=!4OtCa=s03#X~-0=fqk^G<9Z$Pn91Y? zFmtV8e94okIN}A!mpizC+JPdT-_|RCtd`sqFF>I(wE$UUy%t$~Bid|B%vQzl%n>d@ zOJMXSY5~G$wLM^t*X=510kULLZ9)FHLc1*)ek9vgZQHi3;4W=xsI34jiFt{WdaJeM zlxy#kdTW(BEoKxM_l^T4*|r=>s?1si%?L&sW}1qOFFeEFd*9t7OQN-=MqAr4H|vLA zw(Z)nt=hJ2Gq#hujcsG%)yB3pitWi9T99p9X`tTshU0|`^BzHyX!2(_|Nr%}lrGoh zxSyHxKQedb%D7*5cXxMpcXt`T3|AujL!31sfTbg3eh?oqV?UAvOTalQUN_c=tS<&1F=IBWL^LrSf*8w zJE8qTV$c3q>{5eH0b2zQ*%p9H%K9#DEf8wFIhzu@uGK+I$c@ohq5uF&TD{Njv~yu6 zxSriLyIW@?7=#BLCDFF+q_s5`cdNHhcXv%lphyyWeZ1$kwrwS<2X`xgjEtI?cDxXu z=|OX%4GEIuwoM<;2N0m-Y>>`hJ8jM}{CD(B2xJtoj&RLG{~j|A$E;n`Ppjier4egy zl*&Acau?DwiTtDyC(T?ingDdRAQKY9;Y5f|+7ewk?_`F<8;k-BA%G?T`O-|_u3&+l z#VU_54|^}>k;ZNsPvb<4V_b5OVyT3c0P4VK2cs7ZSe zPoKV?hG5H74OOlZ#2q?pOH@rj;mD*YhHZ<4D*4V(D41ti96e8fl%A;5E=Y2Q5V21b_kA6nS-C00R;PvQ)QLmGif(7mJD< zMggb=Fg_?9`4odS7Z+lNSo)R>w|ZIYxrXI;uc?QH(;{`A1DusbBNDnb(%hZRc*s^D z0hpt0iM)0irEUV+5@5^-Ge1^6$y~Sk?q}}{^EChwm@_TJl=)f>RPPU)Rgj44-xfzGMGkW1LeRo)qBbxZ@Uassoj z%4?^4@(PS;VZQOx*pqPt43mYzs&qz3(Ut&XP{0H)PL=GkGM@@U-E~*jRT-ivURRi* ztK(5GoA`+fg%G~AEztxxqoi(293hPOac&zjNK9FQAV`JpW4!Au}P zv@{1QXS`HkObRG4zc6_G4vNwlFh#zb5bexvg&s9TVPZ9OhDD=_!gWMT4MO#9et!5sKGaiA_H*m&H1z;?;e9TLN{0^c}@cs!# z&3H^{Hu}rlZdhTAo6_iNOVrNHsm{$M7o!r=D*&^lGj_`Nm++lAHS#nDdikIUa0XA^ zLdZf?`$OdHh~8vTlOzJ7WuX z{6Ow9GR2zMbk*7}&)$6~O=;mWGv%&Pl!?Z?g-ZYoRxU$Rf-x7OliFIA*9uUtDqN-} z2hi8hsi!MxWOeF{ZNIE3DMYnJT;^sdjq>Yy^y6|J$)NW!>+I!<12n|Nn@x+tWpO4{ ze5!W*G>%JSpmdq6UK2wr&8*bpN}zYOATFa*J{8O3m|j3A9=Oa-b&p!%RDA9-Je4$y zG!jQW_}nHS%ekCeG5UCd(q+2hY2&~_O0Q?E3s0@ZG5@-Mis$ zq19+5fl~+tktGTGEQib%!W1BI|Ar0$6RG=Kz3;KFG~6=cn}0@b10NNvB3I$fBg?2i zZ+g|+nRs7dIYX#%i8fJGq4&~^=5*>04O)9KoKB#LG(pm7G3EU4%^0BY-X$$@BTXI3 zM9}eRYn^8~8w=E*!hlWRPX*e@lQ~n)HD%q2O=gt9dXr{4Wv{FA*!wru>mMu!2ElG5 zK}CnjoY_oJcNErl6)&}(E@5T15MZFKXMQs%1xz5Ca%G-?60^yQTJUPGrT z!yRM%&9s>=L@@?|K_sz?p4$;OTgF*cSc&b0EHAIkGzs|Pyqa!7-BL31uR7(k#f&3c zk-Ia~UUFlG~c1f5+%y^pm0L7(7jDG5yuKHY~;noN&kjN?o&LSO3CLJ2u zuV%`)Qs1PU)R`C+fD=)!Ys3zr%krQ30};JjXf>Z677#*4;lBH22qJ;g$d^mPS<}=@ zP3`=JR`W%z`|=|Eu6R*hRs%hs7Fj6Q;t*yuN7<=wS`0*R<*C_ZZPYgKQ-K$eB?_iv zH60c+m0MSC?#zu076y-N0q2cETPWdF#DMz0KIUM~kd?)HxkA@$8^C(XO zs}gt=sZh3%a!sP@ns>K+LzvR=<3MLi!RVn1i+TPbc?d!cA&uqKyBoU8l@~Djs13(m z$zmtUgcDw6q-A?;&|)AQn9?Lsmc$cy7ugaoT@uAW&8StNb!R1@0=Oq5F5cYNH~r%M z7vS&I`g`MmGaW*V8fxt`4Y=U)zoM*Hc&0}uSGmzWZho8ZG1=Q>ISx1!n- z1Ww!oi$K5Sz~D`nRSa79Ox`!mIMmHJ)XczYX5&?{j4p=OrSP)+FC`eqKGC${{|kt+ zZ{Oi*xAX5?-0~mqa`CPV+jLazp1q$3YxljV0ArNEa%V14p0_9?AHqMfG1#k!{;!hijTM6zWZzmPie9bfGE@)h0 zy=e@q0Zd1#%}T)ms&^JqZmLNTQ8^ldGe9h>0Ze<+Cwa%TrH2*%-@o3&pIlLVE(%7a z`sbx)p10QBjLA}nm38a<+lJ!u2BQdDnPQ$)h^sLNm^di&A8je}kge`K?@KEy zO8`Q301P()StuGRyt;eJ0%VW(@x~d%qXSi~mgelOe7JqA3eUXx{w@neLzP!=&%ReY zgR-lJg@CcD2$+!*;%3T#s?$`htR$>dWa*=a#Q>TJF+UKWTgqA>HQD%+12tsgV=>Ktp{8Z< zx(hDz1>H{06k))--7|~7vw;YP;``zj#7zUtc()6|Y3GS+@{gKHGmjW&b)nN}4lWA> z9W%4D!RZ2aE6#n@*S~+qc12(Q{X3W=1uX_U)2MO)m#M5{7yApE3r^8#;?Tjq=k6^_ z8(SRQI3eMPX;RsNOJAZz^cZ1k_PG4<7339CbigK{)qt8N)jhcMBbr1{5oWq_P>s4m zSY_BukNLR;Acpc#wQ?75=}$DVfz2IxxPrRkiLgDXAm&g{Qw%O$_5n#4A%wBud|~d1 zYeer8W$EM6Bk%U9_joOc%HHq|(1 zqEd9i#HIUf34+2%3s|mEgYGSHEU;-jRgE$c)Wc98Vt4fX=i;*qEZ3Y1R13k`K-pOi zpb3*K$f)S?-dIf7v_K_Elw8}6;98h_DvS-moX2$OCV-%E+cu~yyBe%X7i+c8Rg)v%7OU_4x9eN2K38m7f! z2`XbwHOYNca-Ej;v%y*bZk6KUD5xgLU@SCTZa}3y)^ilT$%w~|lrD=$ij^%0L6n)P z|G5K|j#$^SqoGF16Qx|DYCKY`7!qW3QI(rFshk8TO|gOH)lehl&T?rruPQGK(ST5u zQ~b6oFH7NNK&g$7tZX||oUH%TMp7EhZ%R>?V78B^sfuNnXYSqyqk*DA-()C~F#x5; ze&XI#8L<%@mg1qwfAnG<#Io%0!_p@!2`cf5M8aqbOp>6)f4a8%yphWKR7PQQl9$D~ ze-q1UE$zc8dS;nmViE0vNeUDN&Q=r}vFXS|CvnT8G#s$7-8gngLGeo-TmBK3gh>di zE7dq#SHzuB@|_K$BzG)c%p+SVTIu}nZ8}{6lTcRY+B{oVM7T4Wf8si!FTuj1?tX6V z2u7p*H2GQuli93IlY+j$snPsXCB&`gSVEOYTf$NF&EY2>OlAU`Dgvp?03&BhZxnXt zpgIxmdX6Q^O?G0)8f{&QlqM!uTVS(?KLv7UVF%krYL+ zqboxa+lFlZXP|UybJ)~pG6In>PPKzO!w+5UiOu2kPJ=m!Od`v6wZ&-IzwDh7I~fVg z|BT!pC?Mbqq9_~Hpm6|^p8J6K6(i{`tKgcCHs>IGT=FK$=%E7Y07ROtMr@YtB&=P# z_Aqo|3^$^V_RM1$f(Rg0W=rx+h?%pYyW{gr0U%!M>nbn*UYSTDn$`iN%w$iQgIKhH zVeQ85tA+y!Ut)=p+=(hK70lcY9;r~|(mhiZ06ytzFN1rXFv{gLB>Jr+H;yNo;IR~# zoGK6M;uEveegCqN!YGmMcGx5VUtsYy&%aL-K(ie;{Op6rbjqPl0qPQf=zwGQu?LJEqNsbSVP_{z zkbt8n)gTUG)+4lR3|n$oTOx{b$Ff3?Yh*!N6GD^GPnAys2~YuzESc8=>yyS2UfLMd zK<c?Rh8!&dUC!Wlv_oomJBf*ED zMm`?4Kh@u#>f)PYcWtl;xf(u6XpZcESw*dl{+7FFyiWKzGXDSufM$j_=llNer zZUU%!{6n%N9vt$N65qzbZ4hP>!MDWQt~W6)UzYaaCDnG+;)@FoSu$r=TjI%lCAP-u z^?C)<&3*pghX6{4RBh@#AA!S6+O@MIL1?}PD&dyvRoTvZO0MtNO)X|VqN3_rH3ld9 zf}!=UPZ~w&zH~C_OjY6<1S3l=s{3(Nm3Ss15wr;kj|=)-QDmWlnaqydsY+avptW4& z@30JDoa)9auQdML0EKzL;*@_-7oQMD?A{idW9)YPtwmVe02m@W*;!X;J6`xD5QfoJ zVg$3fsG`POrm%5;)^cLJ#wla~L}VwP`MG#O0fTf&P+_!I&}U#qrR`yhAqC$uoN64C z4oxtK5)`}LztG;Q0;B$)u0iKW)DGLxG1X;qn?Rfas@OwLj?Q%Zn&MP8EwC3F7E3C>K+$dX>z}@OM%hyh|EJX!}WLdbb@ki+y}) zSfj?GizT0&@JkL~#5nL5BPvSOE{-HcjAx!rk+>$TW*k12#{R8M0NG}6GBvVS`0InW z?2bfiE2AS7iE7Z;t}iWqq}h=>via9lv7fCE1M3*oJ~OxA`I#&Vr#edcJtq|3 zeEO*hUs0UOrFEgo1N7sGXPyn$d=K6lwpLA~RZ$UMT(N59Dp{1_Do5e8+V$*@SZPNR zJ&1#Kx_@xkTzCWPVW!BdIm+48eL8`wsgz3^!p@~1$Fc=WTphMWiMqF)P*Z-%zy~h4 zc<_`6C92oZk#=f|vm-Ua<}$Ckg^^yP_yLbi5hOUuk$G+QJ<>Qr=*JV;rqIT)`kYmU zyB?mG_E3}7&g(JM|I&2ETBfzf*^!drqgeB7byjPwf1iT%OY(P&#ar+*|7tno3${rT zFCQl18l=lAVoS!?cHXLsG;=E2@8ig9pk`7PxC!Gl?!5y=4kDxot)ksdX?s|`{W_0* ztwM3gdB2+W3vGA(np;dc@RBIXt}jg>_7Vf)<*Uirev3q_GFuBrI*$&>K=D9@lT1-i zcQbKIt6M;-3HFM)X1A#h4x5jUuW?=}ZpBoNcD{OWIAg*`q9CcZoD(4tf?idw8U4&u z2ZYsHtx`f*bAwSh;<%({<_t$Eq1ju0br zM?NM0>a!il6h-{@`tg)U=||+*5PdSK57TcArk^>0HLtYlqr-b^TDj?s3A~EWvSnUR z+^32`N75&QI`#HW)HUJQnc^s~#ccur2r3<#llJZ2^Dmy)^VV`+VM*NW=8k-UStgpD zTB6gVs5z{e#1e2)J>G9`p<5u;dpWWXPmLz4+}dZ)vTo5QdhItGmDmEm#dAv`pkACi z9dhV#6+iAmXbT_339<&O3CRK?Bl37>98=+1J(EPRCo@eu70IX%HiPapLG@@$BhnP*PLGsasdnom1X%bbUXZoe z4amcYG6xVs2u&+VM;bpHvT!()qGp8M#v7l0@&gfEbxE7I^S1IS=j*o|N`^B2$dCl% z=!)I$6OssWu2qY*^so1%UNX5YUIV|ok0s*jFF*bSps8}Y3GkAcbaeL?Dd=M)r+F?DvmL)?g_A+eQ z&Av;_56|Ft54Ln7&Cc98eF`V_o0~N=0t@_s^KTQFdUd$Bj>IpKCtJ5z%!iq>#I`uu z!)}91n(Go0Yn;>TZBdsP{xUuZZ1$<*_MD#HM?j75U{4+kDe@4px=r>n)pCpdih$R^ z>mFb!MH zqoH%!6^6fsUxko1w#DIx)V}n^!Rn}@ z;jr#amMAYR)6R?h)HQF>d>7o}FYoa>WViJHxB2?z)lgM+^<;a%yS*69m>O^Gwxya_ zxZIX-+UC>#&?6k1d~CP{(szh2U@d;5t)+HOpYT2;PJftQb;2d%e%u}J6fu@=9&Pds zJnK8D)p#We=n$6bJc1$d_c`&K^AJJ^8?Dr%-t7WLPd0luHhp%y z*+EM^vC2*s%4(-~C>Q0TBS!24Ckay-mwWq2{D#>(DtVQ@?@ZoPFaN`zo@D7qib-t= zr+MBkdbPOOPrl^lzyFk#>S#G-3k z!Wp1lLec0<@68nUIsX(HR+qe&2^tjel-O1O(b-fzwP+Y@npC47T#z*COQ(P8umz2e zH>O_P#yd!geIobW*tCfiJ&#&_5-r*-%}FEt09G#1`1ETOj^cGBi@SNlG&Y=d==W}B`d9d! z4I5b6Qpsu;X$mV7fYRCiFugBTDX0|m*S8ub$hGa+b0d`Vm=^?R&ZextWv{)Do!s2& zm@p56rZ7<&p-n9n9K^ru^soALq`Jta$-EJsR?kGp7R;H#2ra6~I;7E^skgxBqd9-> z(N@<8@%0)bw0gI72oKfFte?g1$;OWBPZL;uBY;n3gvEKbC#<%ms?zsl%eV*rj3TRZ zq>x)VBjge%OL^LfUm@m(V0w+!I|4c|hVvchmoW7prd$PTsh*9Y)pwk!HCWN_XVRrjDk%52>ur zv1x5f)PqwuUK=VHAJLUkei|0-tQvH*;G`C>*sqP zYm7)S*AVyLqh|De44uyCXak!j>Ni9CgVrW!j~H!1kGtwBsuVq#mT%1xVWpYj)c<)N z>`}WPsUcL2;t>QVud${H7hmpI8sVUzRAIE>x=xu;w6Bv!cs7&F7}AMBqH zMo~K(Hus~}M2WL5gE?9mVQ0~n5UNJU4ZF?x-2$zda=XvH`B<8LW+(H3T=dYmZ?iqdj{tO)@sxX=|`ZGaZb15bkl~6Jn1hdj|XBVlb`4 znk^i8f36X>ijT=ooGsFg?snW@c=9!V^5xgoa0xZeJdqLFgQ=O-yWfd7!`7NF-rb>e zv562yDAn9m?{)6UrnRpgaoid)5~Sv(0e1H2{`Eq-D(&b7Huv)Du1(V#GR)&57`-io z0iKr~ufc+L}^QWy54YYE2s!W7`07tUuSOe!ll3%u*je-DDn9@J8wq2iIjjHRcWgnf zj=LKhd){?VDq16lX&jSQ^HBT2cumq?-R?We<}Mr`W@SyCWrydb0*1Lt_k;4M$ri-X zIX0|d*|8Z~lV@*PC@*zCQNkKs9I;`2jk;~IhEHs{ZygkxpZeoebKx|+>3-LCx-PcH z&r%*1KNP?T%_l`$V+X>l?+m7ut?IGKW~ zspZIpRMm0AvCnwZov!J0uC`f{b4yEH75V~q;$tJt2@#t%;17?tS(EYQG~t#nzzLmy zls8f$sPW>~J@ugit?3cxTJ@}Z_J+LGS0)_=e$jn-gV-1YUY zZnG|2cqProW40iguI%+q$JW0_mkPJid|KEH%nj_%g>lv`Fe+P!ywq|fn>*ciAPp%@ zpFwYJDq2LbWZY{{GX#1IP<*Le!-MiCjprI2ce6f&|N1n(sWQ>D*Pd#4yJ5g3@3RhC zh$f)ctX)bxy~2C4E$HsIqUTYYy@9B|g%STmV9w}t(o|ILBSFXy9yLRo)!`urY36O6 z2%*P7owp?bOh}_3MgceUVEt^fJS!gD3^;Z7uRr(H!;<=MC*qi|D~&o~*{s|>Y_QXS z#K>8Kf`=_y2(kl3HI$}Q!ZI$tx`o%j{Mt?zGPWDKVXnv04E~tT?{KYb0*Gx}=2ctb z?k{uijosR2ryGeq?(Kc}A%iNX^P4Xl9RFh^s1pHaJ6(y-I?SVjB}_VNRSfbbK;=En zx+wA%qAhWQA!Je48*?foOuQPTT4kpnKEoNnkUi}&!N3hW z$$MtlNfY3X`Ls`ahBc>_MfG503fCJMG(YKhx}8{_ZkpG&{`Q-l?gi9WhO7;oGUt-# uK~g9dsNyV_-TTpcWN%?so#iY-EEi(rpK+CS#M&0JjO?^I$ME0Lxn=>Rq$$k+ literal 0 HcmV?d00001 diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index 394554940..4936cda22 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -11,14 +11,17 @@ import './AddAccount.scss'; import './AddAccountFlow.scss'; interface State { - story: WalletName; + storyName: WalletName; step: number; formData: FormData; } +const getStory = (storyName: WalletName) => { + return STORIES.filter(selected => selected.name === storyName)[0]; +} + const getStorySteps = (storyName: WalletName) => { - const story = STORIES.filter(selected => selected.name === storyName)[0]; - return story.steps; + return getStory(storyName).steps; }; /* @@ -30,20 +33,20 @@ const getStorySteps = (storyName: WalletName) => { story. */ function AddAccountFlow() { - const [story, setStory] = useState(WalletName.DEFAULT); // The Wallet Story that we are tracking. + const [storyName, setStoryName] = useState(WalletName.DEFAULT); // The Wallet Story that we are tracking. const [step, setStep] = useState(0); // The current Step inside the Wallet Story. const [formData, updateFormState] = useReducer(formReducer, initialState); // The data that we want to save at the end. - const isDefaultView = story === WalletName.DEFAULT; + const isDefaultView = storyName === WalletName.DEFAULT; const goToStart = () => { setStep(0); - setStory(WalletName.DEFAULT); + setStoryName(WalletName.DEFAULT); updateFormState({ type: ActionType.RESET_FORM }); }; const goToNextStep = () => { - const nextStep = Math.min(step + 1, getStorySteps(story).length - 1); + const nextStep = Math.min(step + 1, getStorySteps(storyName).length - 1); setStep(nextStep); }; @@ -55,7 +58,7 @@ function AddAccountFlow() { }; const onWalletSelection = (name: WalletName) => { - setStory(name); + setStoryName(name); // @ADD_ACCOUNT_TODO: This is equivalent to formDispatch call. // Maybe we can merge story and accountType to use only one? updateFormState({ type: ActionType.SELECT_ACCOUNT_TYPE, payload: { accountType: name } }); @@ -72,7 +75,7 @@ function AddAccountFlow() { ); const renderStep = () => { - const steps = getStorySteps(story); + const steps = getStorySteps(storyName); const Step = steps[step]; return ( @@ -84,7 +87,7 @@ function AddAccountFlow() { console.log('UNLOCK CALLED')} diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 7ebecbcf6..2d64f687d 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -46,46 +46,53 @@ export class KeystoreDecrypt extends PureComponent { const unlockDisabled = !file || (passReq && !password); return ( -
              -
              -
              -
              - -
              - - -
              ); } diff --git a/common/v2/features/AddAccount/components/LedgerNano.tsx b/common/v2/features/AddAccount/components/LedgerNano.tsx index c3179bf3a..4b249ff71 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.tsx +++ b/common/v2/features/AddAccount/components/LedgerNano.tsx @@ -15,6 +15,7 @@ import { Button } from '@mycrypto/ui'; import ledgerIcon from 'common/assets/images/icn-ledger-nano-large.svg'; interface OwnProps { + wallet: object, onUnlock(param: any): void; } @@ -82,32 +83,39 @@ class LedgerNanoSDecryptClass extends PureComponent { ); } else { return ( -
              -
              - {translate('LEDGER_TIP')} -
              - +
              +
              + {translate('UNLOCK_WALLET')} + {' '} + {`Your ${translateRaw(this.props.wallet.lid)}`} +
              +
              +
              + {translate('LEDGER_TIP')} +
              + +
              +
              + {error || '-'} +
              + {isLoading ? ( +
              + {translate('WALLET_UNLOCKING')} +
              + ) : ( + + )}
              -
              - {error || '-'} +
              + {translate('LEDGER_REFERRAL_2')}
              + {translate('LEDGER_HELP_LINK')}
              - {isLoading ? ( -
              - {translate('WALLET_UNLOCKING')} -
              - ) : ( - - )} -
              -
              - {translate('LEDGER_REFERRAL_2')}
              - {translate('LEDGER_HELP_LINK')}
              ); diff --git a/common/v2/features/AddAccount/components/Mnemonic.tsx b/common/v2/features/AddAccount/components/Mnemonic.tsx index 646c80147..3ebd4bc21 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.tsx +++ b/common/v2/features/AddAccount/components/Mnemonic.tsx @@ -67,54 +67,61 @@ class MnemonicDecryptClass extends PureComponent { ); } else { return ( -
              -
              -
              - -
              - -
              - - -
              -
              - - -
              -
              - +
              +
              + {translate('UNLOCK_WALLET')} + {' '} + {`Your ${translateRaw(this.props.wallet.lid)}`} +
              +
              +
              +
              + +
              + +
              + + +
              +
              + + +
              +
              + +
              +
              {translate('KEYSTORE_HELP')}
              -
              {translate('KEYSTORE_HELP')}
              ); diff --git a/common/v2/features/AddAccount/components/ParitySigner.tsx b/common/v2/features/AddAccount/components/ParitySigner.tsx index 70d6010a5..7f2bc1158 100644 --- a/common/v2/features/AddAccount/components/ParitySigner.tsx +++ b/common/v2/features/AddAccount/components/ParitySigner.tsx @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react'; import { connect } from 'react-redux'; -import { translate } from 'translations'; +import { translate, translateRaw } from 'translations'; import { AppState } from 'features/reducers'; import { configSelectors } from 'features/config'; import { ParitySignerWallet } from 'libs/wallet'; @@ -34,25 +34,32 @@ type SignerQrContent = SignerAddress | string; class ParitySignerDecryptClass extends PureComponent { public render() { return ( -
              - {/*
              {translate('SIGNER_SELECT_WALLET')}
              */} -
              -
              - {translate('SIGNER_SELECT_WALLET_QR')} -
              -
              - +
              +
              + {translate('UNLOCK_WALLET')} + {' '} + {`Your ${translateRaw(this.props.wallet.lid)}`} +
              +
              + {/*
              {translate('SIGNER_SELECT_WALLET')}
              */} +
              +
              + {translate('SIGNER_SELECT_WALLET_QR')} +
              +
              + +
              -
              -

              {translate('ADD_PARITY_4', { $wiki_link: wikiLink })}

              -

              {translate('ADD_PARITY_2')}

              -
              - - App Store - - - Google Play - +

              {translate('ADD_PARITY_4', { $wiki_link: wikiLink })}

              +

              {translate('ADD_PARITY_2')}

              +
              + + App Store + + + Google Play + +
              ); diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index 9917dcc64..071af218d 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -55,47 +55,54 @@ export class PrivateKeyDecrypt extends PureComponent { const unlockDisabled = !isValidPkey || (isPassRequired && !password.length); return ( -
              -
              -
              - -
              - -
              - -
              - {isValidPkey && - isPassRequired && ( -
              - -
              - )} - - -
              {translate('PRIVATE_KEY_HELP')}
              +
              +
              + {translate('UNLOCK_WALLET')} + {' '} + {`Your ${translateRaw(this.props.wallet.lid)}`} +
              +
              +
              +
              + +
              + +
              + +
              + {isValidPkey && + isPassRequired && ( +
              + +
              + )} + + +
              {translate('PRIVATE_KEY_HELP')}
              +
              ); } diff --git a/common/v2/features/AddAccount/components/SafeT.tsx b/common/v2/features/AddAccount/components/SafeT.tsx index 0e85c648b..1ac1809ee 100644 --- a/common/v2/features/AddAccount/components/SafeT.tsx +++ b/common/v2/features/AddAccount/components/SafeT.tsx @@ -71,32 +71,39 @@ class SafeTminiDecryptClass extends PureComponent { } else { // todo: update help link return ( -
              -
              {translate('SAFET_MINI_DESCRIPTION')}
              -
              - +
              +
              + {translate('UNLOCK_WALLET')} + {' '} + {`Your ${translateRaw(this.props.wallet.lid)}`}
              -
              - {isLoading ? ( -
              - - {translate('WALLET_UNLOCKING')} +
              +
              {translate('SAFET_MINI_DESCRIPTION')}
              +
              + +
              +
              + {isLoading ? ( +
              + + {translate('WALLET_UNLOCKING')} +
              + ) : ( + + )} +
              + {error || '-'}
              - ) : ( - - )} -
              - {error || '-'}
              -
              -
              {translate('SAFET_MINI_HELP')}
              +
              {translate('SAFET_MINI_HELP')}
              +
              ); } diff --git a/common/v2/features/AddAccount/components/Trezor.tsx b/common/v2/features/AddAccount/components/Trezor.tsx index 7e6c514fc..4d1e4a9d5 100644 --- a/common/v2/features/AddAccount/components/Trezor.tsx +++ b/common/v2/features/AddAccount/components/Trezor.tsx @@ -72,31 +72,38 @@ class TrezorDecryptClass extends PureComponent { ); } else { return ( -
              -
              - {translate('TREZOR_TIP')} -
              - -
              +
              +
              + {translate('UNLOCK_WALLET')} + {' '} + {`Your ${translateRaw(this.props.wallet.lid)}`}
              -
              {error || '-'}
              - - {isLoading ? ( -
              - {translate('WALLET_UNLOCKING')} +
              +
              + {translate('TREZOR_TIP')} +
              + +
              +
              +
              {error || '-'}
              + + {isLoading ? ( +
              + {translate('WALLET_UNLOCKING')} +
              + ) : ( + + )} +
              + {translate('ORDER_TREZOR')}
              + {translate('HOWTO_TREZOR')}
              - ) : ( - - )} -
              - {translate('ORDER_TREZOR')}
              - {translate('HOWTO_TREZOR')}
              ); diff --git a/common/v2/features/AddAccount/components/WalletList.tsx b/common/v2/features/AddAccount/components/WalletList.tsx index c03154829..d0864c722 100644 --- a/common/v2/features/AddAccount/components/WalletList.tsx +++ b/common/v2/features/AddAccount/components/WalletList.tsx @@ -15,8 +15,7 @@ interface Props { class WalletList extends PureComponent { public render() { const { wallets, onSelect, formDataDispatch } = this.props; - const validWallets = wallets; // @TODO Filter here according to electronOnly - + const validWallets = wallets.filter(w => !w.hideFromWalletList); // @TODO Filter here according to electronOnly return (

              {translate('DECRYPT_ACCESS')}

              diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx index 5dbaa01a8..f59263143 100644 --- a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx @@ -3,7 +3,11 @@ import styled from 'styled-components'; import { Typography } from '@mycrypto/ui'; import translate from 'translations'; +import TrustWalletWEBP from 'common/assets/images/wallets/trust-3.webp'; +import CoinbaseWalletJPG from 'common/assets/images/wallets/coinbase.jpg'; import MetamaskSVG from 'common/assets/images/wallets/metamask-2.svg'; +import AppStoreBadgeIMG from 'assets/images/mobile/app-store-badge.png'; +import GooglePlayBadgeIMG from 'assets/images/mobile/google-play-badge.png'; import { NewTabLink, HelpLink } from 'components/ui'; import { IS_MOBILE } from '../flags'; @@ -18,25 +22,35 @@ function InstallTrunk({ wallet, onUnlock }: Props) {
              {translate('ADD_ACCOUNT_WEB3_INSTALL_TITLE')}
              {translate('ADD_ACCOUNT_WEB3_INSTALL_MOBILE_DESC')}
              -
              -
              - -
              - -
              -
              -
              -
              - {translate('ADD_ACCOUNT_WEB3_INSTALL_FOOTER')}{' '} +
              + href="https://trustwallet.com/dapp"> + + + TrustWallet App + + + + + +
              -
              - +
              + + + + Coinbase App + + + + + +
              @@ -66,16 +80,13 @@ function InstallMetaMask({ wallet, onUnlock }: Props) { href="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en" />
              -
              - -
              ); } function Web3ProviderInstall(props: Props) { - return <>{IS_MOBILE ? : }; + return <>{IS_MOBILE ? : }; } export default Web3ProviderInstall; diff --git a/common/v2/features/AddAccount/stories.tsx b/common/v2/features/AddAccount/stories.tsx index 60c848351..53cdd37a9 100644 --- a/common/v2/features/AddAccount/stories.tsx +++ b/common/v2/features/AddAccount/stories.tsx @@ -1,4 +1,5 @@ import { knowledgeBaseURL as KB_URL } from 'config'; +import { getWeb3ProviderInfo } from 'utils/web3'; import { IS_DEV, IS_ELECTRON } from './flags'; import { WalletName, WalletType } from './types'; import { @@ -34,16 +35,18 @@ import ParitySignerSVG from 'common/assets/images/wallets/parity-signer.svg'; // step length. // 2. Merge enums and names with the ones in common/v2/config/accountTypes.ts +const web3ProviderInfo = getWeb3ProviderInfo(); export const STORIES = [ { name: WalletName.DEFAULT, - steps: [WalletList] + steps: [WalletList], + hideFromWalletList: true, }, { name: WalletName.WEB3PROVIDER, type: WalletType.SECURE, - lid: '', - icon: '', + lid: web3ProviderInfo.lid, + icon: web3ProviderInfo.icon, description: 'ADD_WEB3DESC', helpLink: `${KB_URL}/how-to/migrating/moving-from-mycrypto-to-metamask`, // steps: [NetworkSelectPanel, Web3ProviderDecrypt, SaveAndRedirect], @@ -95,7 +98,7 @@ export const STORIES = [ SaveAndRedirect ], helpLink: `${KB_URL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types`, - elctronOnly: true + hideFromWalletList: !IS_ELECTRON }, { name: WalletName.MNEMONIC_PHRASE, @@ -108,7 +111,7 @@ export const STORIES = [ IS_ELECTRON ? MnemonicDecrypt : InsecureWalletWarning, SaveAndRedirect ], - elctronOnly: true + hideFromWalletList: !IS_ELECTRON }, { name: WalletName.PRIVATE_KEY, @@ -121,7 +124,7 @@ export const STORIES = [ IS_ELECTRON ? PrivateKeyDecrypt : InsecureWalletWarning, SaveAndRedirect ], - elctronOnly: true + hideFromWalletList: !IS_ELECTRON }, { name: WalletName.VIEW_ONLY, From b813cc8e54e32302ca4f1045a314a3e6107f2d91 Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 13 May 2019 19:10:44 +0200 Subject: [PATCH 0489/1466] mend --- .../v2/features/AddAccount/AddAccountFlow.tsx | 2 +- .../AddAccount/components/Keystore.tsx | 4 +--- .../AddAccount/components/LedgerNano.tsx | 6 ++---- .../AddAccount/components/Mnemonic.tsx | 4 +--- .../AddAccount/components/ParitySigner.tsx | 4 +--- .../AddAccount/components/PrivateKey.tsx | 4 +--- .../features/AddAccount/components/SafeT.tsx | 12 +++++++----- .../features/AddAccount/components/Trezor.tsx | 8 ++++---- .../components/Web3ProviderInstall.tsx | 18 ++++++------------ common/v2/features/AddAccount/stories.tsx | 2 +- 10 files changed, 25 insertions(+), 39 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index 4936cda22..b79b18897 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -18,7 +18,7 @@ interface State { const getStory = (storyName: WalletName) => { return STORIES.filter(selected => selected.name === storyName)[0]; -} +}; const getStorySteps = (storyName: WalletName) => { return getStory(storyName).steps; diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 2d64f687d..b02146ae9 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -48,9 +48,7 @@ export class KeystoreDecrypt extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} - {' '} - {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`}
              diff --git a/common/v2/features/AddAccount/components/LedgerNano.tsx b/common/v2/features/AddAccount/components/LedgerNano.tsx index 4b249ff71..6a83d99f3 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.tsx +++ b/common/v2/features/AddAccount/components/LedgerNano.tsx @@ -15,7 +15,7 @@ import { Button } from '@mycrypto/ui'; import ledgerIcon from 'common/assets/images/icn-ledger-nano-large.svg'; interface OwnProps { - wallet: object, + wallet: object; onUnlock(param: any): void; } @@ -85,9 +85,7 @@ class LedgerNanoSDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} - {' '} - {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`}
              diff --git a/common/v2/features/AddAccount/components/Mnemonic.tsx b/common/v2/features/AddAccount/components/Mnemonic.tsx index 3ebd4bc21..a8771e590 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.tsx +++ b/common/v2/features/AddAccount/components/Mnemonic.tsx @@ -69,9 +69,7 @@ class MnemonicDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} - {' '} - {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`}
              diff --git a/common/v2/features/AddAccount/components/ParitySigner.tsx b/common/v2/features/AddAccount/components/ParitySigner.tsx index 7f2bc1158..64843e3d5 100644 --- a/common/v2/features/AddAccount/components/ParitySigner.tsx +++ b/common/v2/features/AddAccount/components/ParitySigner.tsx @@ -36,9 +36,7 @@ class ParitySignerDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} - {' '} - {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`}
              {/*
              {translate('SIGNER_SELECT_WALLET')}
              */} diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index 071af218d..895b1f312 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -57,9 +57,7 @@ export class PrivateKeyDecrypt extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} - {' '} - {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`}
              diff --git a/common/v2/features/AddAccount/components/SafeT.tsx b/common/v2/features/AddAccount/components/SafeT.tsx index 1ac1809ee..db6504016 100644 --- a/common/v2/features/AddAccount/components/SafeT.tsx +++ b/common/v2/features/AddAccount/components/SafeT.tsx @@ -73,12 +73,12 @@ class SafeTminiDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} - {' '} - {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`}
              -
              {translate('SAFET_MINI_DESCRIPTION')}
              +
              + {translate('SAFET_MINI_DESCRIPTION')} +
              @@ -102,7 +102,9 @@ class SafeTminiDecryptClass extends PureComponent {
              -
              {translate('SAFET_MINI_HELP')}
              +
              + {translate('SAFET_MINI_HELP')} +
              ); diff --git a/common/v2/features/AddAccount/components/Trezor.tsx b/common/v2/features/AddAccount/components/Trezor.tsx index 4d1e4a9d5..c7f3571a5 100644 --- a/common/v2/features/AddAccount/components/Trezor.tsx +++ b/common/v2/features/AddAccount/components/Trezor.tsx @@ -74,9 +74,7 @@ class TrezorDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} - {' '} - {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`}
              @@ -85,7 +83,9 @@ class TrezorDecryptClass extends PureComponent {
              -
              {error || '-'}
              +
              + {error || '-'} +
              {isLoading ? (
              diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx index f59263143..885945bf1 100644 --- a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx @@ -23,32 +23,26 @@ function InstallTrunk({ wallet, onUnlock }: Props) {
              {translate('ADD_ACCOUNT_WEB3_INSTALL_MOBILE_DESC')}
              - + TrustWallet App - + - +
              - + Coinbase App - + - +
              diff --git a/common/v2/features/AddAccount/stories.tsx b/common/v2/features/AddAccount/stories.tsx index 53cdd37a9..328fc5a86 100644 --- a/common/v2/features/AddAccount/stories.tsx +++ b/common/v2/features/AddAccount/stories.tsx @@ -40,7 +40,7 @@ export const STORIES = [ { name: WalletName.DEFAULT, steps: [WalletList], - hideFromWalletList: true, + hideFromWalletList: true }, { name: WalletName.WEB3PROVIDER, From a63697d60b114968fdbfeaf85f345cdbef1f676e Mon Sep 17 00:00:00 2001 From: blurpesec Date: Mon, 13 May 2019 15:57:24 -0400 Subject: [PATCH 0490/1466] start onUnlock --- .../v2/features/AddAccount/AddAccountFlow.tsx | 41 ++++++++++++++++++- .../AddAccount/AddAccountForm.reducer.tsx | 7 +++- .../AddAccount/components/SaveAndRedirect.tsx | 6 +-- common/v2/features/AddAccount/stories.tsx | 1 + common/v2/features/AddAccount/types.tsx | 1 + 5 files changed, 49 insertions(+), 7 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index b79b18897..c656607ee 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -10,6 +10,7 @@ import { formReducer, initialState } from './AddAccountForm.reducer'; import './AddAccount.scss'; import './AddAccountFlow.scss'; + interface State { storyName: WalletName; step: number; @@ -42,7 +43,7 @@ function AddAccountFlow() { const goToStart = () => { setStep(0); setStoryName(WalletName.DEFAULT); - updateFormState({ type: ActionType.RESET_FORM }); + updateFormState({ type: ActionType.RESET_FORM, payload: '' }); }; const goToNextStep = () => { @@ -57,6 +58,42 @@ function AddAccountFlow() { setStep(step - 1); }; + const onUnlock = async (payload: any) => { + console.log('UNLOCK CALLED') + // some components (TrezorDecrypt) don't take an onChange prop, and thus + // this.state.value will remain unpopulated. in this case, we can expect + // the payload to contain the unlocked wallet info. + const unlockValue = payload; + console.log(unlockValue) + + console.log(payload); + console.log(formData) + if (formData.accountType === 9) { + updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.getAddressString() }}) + updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) + } else if ( + formData.accountType === 6 || + formData.accountType === 8 || + formData.accountType === 1 + ) { + console.log('got here??') + const wallet = await STORIES[formData.accountType].unlock(unlockValue); + updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: wallet.getAddressString() }}) + updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) + } else if (formData.accountType === 5) { + updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.address }}) + updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) + } else if (formData.accountType === 7 || formData.accountType === 2 || formData.accountType === 3 || formData.accountType === 4) { + updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.address }}) + updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: unlockValue.path || unlockValue.dPath + '/' + unlockValue.index.toString() }}) + } + console.log('got here?') + //updateFormState({ type: ActionType.ON_UNLOCK, payload: '' }) + + console.log(formData); + goToNextStep(); + } + const onWalletSelection = (name: WalletName) => { setStoryName(name); // @ADD_ACCOUNT_TODO: This is equivalent to formDispatch call. @@ -90,7 +127,7 @@ function AddAccountFlow() { wallet={getStory(storyName)} goToStart={goToStart} goToNextStep={goToNextStep} - onUnlock={() => console.log('UNLOCK CALLED')} + onUnlock={onUnlock} formData={formData} formDispatch={updateFormState} /> diff --git a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx index c5dfaee30..3ecba3da5 100644 --- a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx +++ b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx @@ -1,10 +1,11 @@ -import { FormDataAction, FormDataActionType as ActionType } from './types'; +import { FormDataAction, FormData, FormDataActionType as ActionType } from './types'; + export const initialState: FormData = { network: 'Ethereum' // @ADD_ACCOUNT_TODO this should have the same type as networkOptions in NetworkOptionsContext }; -export const formReducer = (formData: FromData, action: FormDataAction) => { +export const formReducer = (formData: FormData, action: FormDataAction) => { console.debug('REDUCER', action); switch (action.type) { case ActionType.SELECT_NETWORK: @@ -16,6 +17,8 @@ export const formReducer = (formData: FromData, action: FormDataAction) => { case ActionType.SELECT_ACCOUNT_TYPE: const { accountType } = action.payload; return { ...formData, accountType }; + case ActionType.ON_UNLOCK: + return { ...formData }; case ActionType.SET_LABEL: const { label } = action.payload; return { ...formData, label }; diff --git a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx index c85c95eb8..f13da3df8 100644 --- a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx +++ b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx @@ -1,15 +1,15 @@ import React, { useContext, useEffect } from 'react'; import { Route, Redirect } from 'react-router'; - +import { FormData } from 'v2/features/AddAccount/types' import { AccountContext } from 'v2/providers'; import { getNetworkByName } from 'v2/libs'; /* Create a new account in localStorage and redirect to dashboard. */ -function SaveAndRedirect(formData) { +function SaveAndRedirect(formData: FormData) { const { createAccount } = useContext(AccountContext); - + console.log('gotTo SaveAndRedirect') useEffect(() => { const network: NetworkOptions | undefined = getNetworkByName(formData.network); const account = { diff --git a/common/v2/features/AddAccount/stories.tsx b/common/v2/features/AddAccount/stories.tsx index 328fc5a86..03703ad49 100644 --- a/common/v2/features/AddAccount/stories.tsx +++ b/common/v2/features/AddAccount/stories.tsx @@ -25,6 +25,7 @@ import LedgerSVG from 'common/assets/images/wallets/ledger.svg'; import TrezorSVG from 'common/assets/images/wallets/trezor.svg'; import SafeTSVG from 'common/assets/images/wallets/safe-t.png'; import ParitySignerSVG from 'common/assets/images/wallets/parity-signer.svg'; +import { WalletActions } from 'features/wallet/types'; // STORIES serve the double purpose of generating the wallet options and // providing a declarative way to determine the flow for each wallet. diff --git a/common/v2/features/AddAccount/types.tsx b/common/v2/features/AddAccount/types.tsx index e9310c48b..a6b8b257a 100644 --- a/common/v2/features/AddAccount/types.tsx +++ b/common/v2/features/AddAccount/types.tsx @@ -25,6 +25,7 @@ export enum FormDataActionType { SELECT_ACCOUNT_TYPE, SET_LABEL, SET_DERIVATION_PATH, + ON_UNLOCK, RESET_FORM } From 70f19e60a68da8d07cc010b1a9c160ada1356cf9 Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 13 May 2019 22:44:45 +0200 Subject: [PATCH 0491/1466] use enum string --- common/v2/features/AddAccount/types.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/common/v2/features/AddAccount/types.tsx b/common/v2/features/AddAccount/types.tsx index e9310c48b..1ffae05b4 100644 --- a/common/v2/features/AddAccount/types.tsx +++ b/common/v2/features/AddAccount/types.tsx @@ -6,16 +6,16 @@ export enum WalletType { // @ADD_ACCOUNT_TODO: move to named enum or other Set export enum WalletName { - DEFAULT, - WEB3PROVIDER, - LEDGER, - TREZOR, - SAFE_T, - PARITY_SIGNER, - KEYSTORE_FILE, - MNEMONIC_PHRASE, - PRIVATE_KEY, - VIEW_ONLY + DEFAULT = 'WALLETLIST', + WEB3PROVIDER = 'WEB3_PROVIDER', + LEDGER = 'LEDGER', + TREZOR = 'TREZOR', + SAFE_T = 'SAFE_T', + PARITY_SIGNER = 'PARITY_SIGNER', + KEYSTORE_FILE = 'KEYSTORE_FILE', + MNEMONIC_PHRASE = 'MNEMONIC_PHRASE', + PRIVATE_KEY = 'PRIVATE_KEY', + VIEW_ONLY = 'VIEW_ONLY' } // @ADD_ACCOUNT_TODO: move to named enum or other Set From 7f1f2a5d3f0476210a68d4c412f3a7f35095219d Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Mon, 13 May 2019 23:27:48 +0200 Subject: [PATCH 0492/1466] handle unlock in reducer --- .../v2/features/AddAccount/AddAccountFlow.tsx | 76 +++++++++++-------- .../AddAccount/AddAccountForm.reducer.tsx | 42 +++++++++- 2 files changed, 82 insertions(+), 36 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index c656607ee..e31d0b3cd 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -59,39 +59,51 @@ function AddAccountFlow() { }; const onUnlock = async (payload: any) => { - console.log('UNLOCK CALLED') - // some components (TrezorDecrypt) don't take an onChange prop, and thus - // this.state.value will remain unpopulated. in this case, we can expect - // the payload to contain the unlocked wallet info. - const unlockValue = payload; - console.log(unlockValue) - - console.log(payload); - console.log(formData) - if (formData.accountType === 9) { - updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.getAddressString() }}) - updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) - } else if ( - formData.accountType === 6 || - formData.accountType === 8 || - formData.accountType === 1 - ) { - console.log('got here??') - const wallet = await STORIES[formData.accountType].unlock(unlockValue); - updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: wallet.getAddressString() }}) - updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) - } else if (formData.accountType === 5) { - updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.address }}) - updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) - } else if (formData.accountType === 7 || formData.accountType === 2 || formData.accountType === 3 || formData.accountType === 4) { - updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.address }}) - updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: unlockValue.path || unlockValue.dPath + '/' + unlockValue.index.toString() }}) - } - console.log('got here?') - //updateFormState({ type: ActionType.ON_UNLOCK, payload: '' }) - - console.log(formData); + // 1. Let reducer handle the differences. Infact this updateFormState could + // be simplified by having each component call `updateFormState` themselves. + await updateFormState({ type: ActionType.ON_UNLOCK, payload }); + // 2. continue once it's done. goToNextStep(); + + + + // console.log('UNLOCK CALLED') + // // some components (TrezorDecrypt) don't take an onChange prop, and thus + // // this.state.value will remain unpopulated. in this case, we can expect + // // the payload to contain the unlocked wallet info. + // const unlockValue = payload; + // console.log(unlockValue) + // + // console.log(payload); + // console.log(formData) + // if (formData.accountType === WalletName.VIEW_ONLY) { + // updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.getAddressString() }}) + // updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) + // } else if ( + // formData.accountType === WalletName.KEYSTORE_FILE || + // formData.accountType === WalletName.PRIVATE_KEY || + // formData.accountType === WalletName.WEB3PROVIDER + // ) { + // console.log('got here??') + // const wallet = await STORIES[formData.accountType].unlock(unlockValue); + // updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: wallet.getAddressString() }}) + // updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) + // } else if (formData.accountType === WalletName.PARITY_SIGNER) { + // updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.address }}) + // updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) + // } else if (formData.accountType === MNEMONIC_PHRASE + // || formData.accountType === LEDGER + // || formData.accountType === TREZOR + // || formData.accountType === SAFE_T + // ) { + // updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.address }}) + // updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: unlockValue.path || unlockValue.dPath + '/' + unlockValue.index.toString() }}) + // } + // console.log('got here?') + // //updateFormState({ type: ActionType.ON_UNLOCK, payload: '' }) + // + // console.log(formData); + // goToNextStep(); } const onWalletSelection = (name: WalletName) => { diff --git a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx index 3ecba3da5..60ff087ef 100644 --- a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx +++ b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx @@ -1,12 +1,10 @@ import { FormDataAction, FormData, FormDataActionType as ActionType } from './types'; - export const initialState: FormData = { network: 'Ethereum' // @ADD_ACCOUNT_TODO this should have the same type as networkOptions in NetworkOptionsContext }; export const formReducer = (formData: FormData, action: FormDataAction) => { - console.debug('REDUCER', action); switch (action.type) { case ActionType.SELECT_NETWORK: const { network } = action.payload; @@ -18,7 +16,8 @@ export const formReducer = (formData: FormData, action: FormDataAction) => { const { accountType } = action.payload; return { ...formData, accountType }; case ActionType.ON_UNLOCK: - return { ...formData }; + const accountAndDerivationPath = handleUnlock(formData.accountType, action.payload); + return { ...formData, ...accountAndDerivationPath }; case ActionType.SET_LABEL: const { label } = action.payload; return { ...formData, label }; @@ -28,6 +27,41 @@ export const formReducer = (formData: FormData, action: FormDataAction) => { case ActionType.RESET_FORM: return initialState; default: - throw new Error(`[AddAccountReducer]: Type ${action.type} is not recognized by this reducer`); + return formData; } }; + +const handleUnlock = (walletType, payload) => { + switch(walletType) { + case WalletName.VIEW_ONLY: + return { + account: payload.getAddressString(), + derivationPath: '' + } + case WalletName.PARITY_SIGNER: + return { + account: payload.address, + derivationPath: '' + } + case WalletName.KEYSTORE_FILE: + case WalletName.PRIVATE_KEY: + case WalletName.WEB3PROVIDER: + // Here it would be for each component to call unlock itself and to have + // an identical payload format as view_only + const wallet = await STORIES[walletType].unlock(payload); + return { + account: wallet.getAddressString(), + derivationPath: '' + } + case WalletName.MNEMONIC_PHRASE: + case WalletName.LEDGER: + case WalletName.TREZOR: + case WalletName.SAFE_T: + return { + account: payload.address, + derivationPath: payload.path || payload.dPath + '/' + payload.index.toString() + } + default: + throw new Error(`[AddAccountReducer]: UNLOCK with wallet ${walletType} and payload ${payload} is invalid`); + } +} From 4fbe973f2ecbe93aab4438c0136877d128eddb33 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 13 May 2019 18:14:03 -0400 Subject: [PATCH 0493/1466] web views complete --- common/components/ParityQrSigner.scss | 10 ++- .../WalletDecrypt/WalletDecrypt.scss | 4 ++ .../WalletDecrypt/components/ViewOnly.scss | 1 + common/v2/components/ContentPanel.tsx | 2 +- common/v2/features/AddAccount/AddAccount.scss | 13 +++- common/v2/features/AddAccount/AddAccount.tsx | 62 +++++++++---------- .../v2/features/AddAccount/AddAccountFlow.tsx | 14 +++-- .../AddAccount/AddAccountForm.reducer.tsx | 3 +- .../components/DeterministicWallets.scss | 10 +-- .../components/DeterministicWallets.tsx | 2 +- .../AddAccount/components/Keystore.tsx | 2 +- .../AddAccount/components/LedgerNano.tsx | 20 +++--- .../AddAccount/components/Mnemonic.tsx | 18 +++--- .../components/NetworkSelectPanel.scss | 12 ++++ .../components/NetworkSelectPanel.tsx | 9 ++- .../AddAccount/components/ParitySigner.scss | 4 ++ .../AddAccount/components/ParitySigner.tsx | 6 +- .../features/AddAccount/components/SafeT.scss | 6 ++ .../features/AddAccount/components/SafeT.tsx | 54 ++++++++-------- .../AddAccount/components/Trezor.scss | 7 +-- .../AddAccount/components/WalletList.tsx | 2 +- .../AddAccount/components/Web3Provider.scss | 15 +++++ .../AddAccount/components/Web3Provider.tsx | 13 ++-- webpack_config/plugins/serverLog.js | 2 +- 24 files changed, 175 insertions(+), 116 deletions(-) create mode 100644 common/v2/features/AddAccount/components/NetworkSelectPanel.scss create mode 100644 common/v2/features/AddAccount/components/Web3Provider.scss diff --git a/common/components/ParityQrSigner.scss b/common/components/ParityQrSigner.scss index 9e68f250e..b3afff504 100644 --- a/common/components/ParityQrSigner.scss +++ b/common/components/ParityQrSigner.scss @@ -5,8 +5,8 @@ z-index: 0; align-items: center; justify-content: center; - width: 300px; - height: 300px; + width: 230px; + height: 230px; text-align: center; margin: 0 auto 1.5em; border-radius: 4px; @@ -29,3 +29,9 @@ } } } + +.Panel-description{ + &-parity { + height: 25px; + } +} \ No newline at end of file diff --git a/common/components/WalletDecrypt/WalletDecrypt.scss b/common/components/WalletDecrypt/WalletDecrypt.scss index 8076c849d..02b71fcdc 100644 --- a/common/components/WalletDecrypt/WalletDecrypt.scss +++ b/common/components/WalletDecrypt/WalletDecrypt.scss @@ -153,3 +153,7 @@ $speed: 500ms; } } } + +.MainPanel { + width: 700px; +} diff --git a/common/components/WalletDecrypt/components/ViewOnly.scss b/common/components/WalletDecrypt/components/ViewOnly.scss index a90091694..886b4d0b8 100644 --- a/common/components/WalletDecrypt/components/ViewOnly.scss +++ b/common/components/WalletDecrypt/components/ViewOnly.scss @@ -2,6 +2,7 @@ @import 'common/sass/mixins'; .ViewOnly { + margin: 3em; &-fields { display: flex; flex-direction: column; diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index f745d1efe..ae0390e02 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -8,7 +8,7 @@ import Stepper from './Stepper'; import backArrowIcon from 'common/assets/images/icn-back-arrow.svg'; const ContentPanelWrapper = styled.div` - @media (min-width: 700px) { + @media (max-width: 700px) { max-width: 560px; } `; diff --git a/common/v2/features/AddAccount/AddAccount.scss b/common/v2/features/AddAccount/AddAccount.scss index dc25150be..48c157085 100644 --- a/common/v2/features/AddAccount/AddAccount.scss +++ b/common/v2/features/AddAccount/AddAccount.scss @@ -28,7 +28,9 @@ $speed: 500ms; } .Panel { - min-height: 629px; + width: 562px; +height: 629px; +justify-content: center; // display: flex; // flex-direction: column; position: relative; @@ -415,3 +417,12 @@ $speed: 500ms; .no-padding { padding: 0; } + +.SelectNetwork-panel { + width: 420px; +} + +.Mnemoinc-dpath{ + width: 935px; + height: 757px; +} diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx index edec4e6d7..cbfddc172 100644 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ b/common/v2/features/AddAccount/AddAccount.tsx @@ -479,38 +479,36 @@ const WalletDecrypt = withRouter( public selectNetworkComponent() { return ( - -
              -
              Select Network
              -
              {translate('ADD_ACCOUNT_NETWORK_SELCT')}
              - - - {({ networkOptions = [] }) => { - const networkNames: any[] = []; - networkOptions.map(en => { - if (isWalletFormatSupportedOnNetwork(en, this.state.accountData.accountType)) { - networkNames.push(en.name); - } - }); - console.log(networkNames); - return ( - { - this.setState({ accountData: { ...this.state.accountData, network: value } }); - }} - placeholder="Ethereum" - /> - ); - }} - - -
              -
              +
              +
              Select Network
              +
              {translate('ADD_ACCOUNT_NETWORK_SELCT')}
              + + + {({ networkOptions = [] }) => { + const networkNames: any[] = []; + networkOptions.map(en => { + if (isWalletFormatSupportedOnNetwork(en, this.state.accountData.accountType)) { + networkNames.push(en.name); + } + }); + console.log(networkNames); + return ( + { + this.setState({ accountData: { ...this.state.accountData, network: value } }); + }} + placeholder="Ethereum" + /> + ); + }} + + +
              ); } diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index 1d278d3db..5dc7239db 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -111,12 +111,14 @@ function AddAccountFlow() { }; const renderDefault = () => ( - - - - - - + +
              + + + + + +
              ); diff --git a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx index 247943a09..6d505617c 100644 --- a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx +++ b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx @@ -1,4 +1,5 @@ import { FormDataAction, FormData, FormDataActionType as ActionType, WalletName } from './types'; +import { STORIES } from './stories'; export const initialState: FormData = { network: 'Ethereum' // @ADD_ACCOUNT_TODO this should have the same type as networkOptions in NetworkOptionsContext @@ -31,7 +32,7 @@ export const formReducer = (formData: FormData, action: FormDataAction) => { } }; -const handleUnlock = (walletType, payload) => { +const handleUnlock = async (walletType, payload) => { switch (walletType) { case WalletName.VIEW_ONLY: case WalletName.KEYSTORE_FILE: diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.scss b/common/v2/features/AddAccount/components/DeterministicWallets.scss index 2fab9814a..d19c789a8 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.scss +++ b/common/v2/features/AddAccount/components/DeterministicWallets.scss @@ -2,20 +2,12 @@ @import 'common/sass/mixins'; .DW { - width: 935px; - border-radius: 3px; - box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 1px 4px 0 rgba(0, 0, 0, 0.12); - background-color: #ffffff; - padding: 1rem 0.5rem; - top: 50%; - left: 50%; - height: 1000px; position: relative; z-index: 1; &-header { display: flex; - justify-content: space-around; + justify-content: space-between; align-content: center; position: relative; z-index: 2; diff --git a/common/v2/features/AddAccount/components/DeterministicWallets.tsx b/common/v2/features/AddAccount/components/DeterministicWallets.tsx index fd751d3f4..4c4b0539a 100644 --- a/common/v2/features/AddAccount/components/DeterministicWallets.tsx +++ b/common/v2/features/AddAccount/components/DeterministicWallets.tsx @@ -24,7 +24,7 @@ function Radio({ checked }: { checked: boolean }) { return ; } -const WALLETS_PER_PAGE = 8; +const WALLETS_PER_PAGE = 5; interface OwnProps { dPath: DPath; diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 35a67725b..cbc0476af 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -6,7 +6,7 @@ import { notificationsActions } from 'features/notifications'; import Spinner from 'components/ui/Spinner'; import { Input } from 'components/ui'; import PrivateKeyicon from 'common/assets/images/icn-privatekey-new.svg'; -import { unlockKeystore } from 'v2/features/wallets'; +import { unlockKeystore } from '/home/sharon/Documents/MyCrypto/common/v2/features/Wallets/keystore/keystore'; import './Keystore.scss'; export interface KeystoreValue { diff --git a/common/v2/features/AddAccount/components/LedgerNano.tsx b/common/v2/features/AddAccount/components/LedgerNano.tsx index 6a83d99f3..6fc4e7d8d 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.tsx +++ b/common/v2/features/AddAccount/components/LedgerNano.tsx @@ -71,15 +71,17 @@ class LedgerNanoSDecryptClass extends PureComponent { if (publicKey && chainCode) { return ( - +
              + +
              ); } else { return ( diff --git a/common/v2/features/AddAccount/components/Mnemonic.tsx b/common/v2/features/AddAccount/components/Mnemonic.tsx index a8771e590..49fbf2ab8 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.tsx +++ b/common/v2/features/AddAccount/components/Mnemonic.tsx @@ -56,14 +56,16 @@ class MnemonicDecryptClass extends PureComponent { if (seed) { return ( - +
              + +
              ); } else { return ( diff --git a/common/v2/features/AddAccount/components/NetworkSelectPanel.scss b/common/v2/features/AddAccount/components/NetworkSelectPanel.scss new file mode 100644 index 000000000..70b32cc95 --- /dev/null +++ b/common/v2/features/AddAccount/components/NetworkSelectPanel.scss @@ -0,0 +1,12 @@ +.SelectNetworkPanel-button { + width: 420px; + height: 50px; + position: absolute; + bottom: 2em ; +} + +.SelectNetworkPanel-button-container{ + display: flex; + justify-content: center; + align-content: center; +} \ No newline at end of file diff --git a/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx index 49e2fbec5..11c83d05a 100644 --- a/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx +++ b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx @@ -1,5 +1,6 @@ import React, { useState, useContext } from 'react'; import { Button, ComboBox } from '@mycrypto/ui'; +import './NetworkSelectPanel.scss'; import { translate } from 'translations'; import { NetworkOptionsContext } from 'v2/providers'; @@ -36,9 +37,11 @@ function NetworkSelectPanel({ formData, formDispatch, goToNextStep }) { placeholder="Ethereum" onChange={({ target: { value } }) => setNetwork(value)} /> - +
              + +
              ); } diff --git a/common/v2/features/AddAccount/components/ParitySigner.scss b/common/v2/features/AddAccount/components/ParitySigner.scss index e5e1c2e92..59103c472 100644 --- a/common/v2/features/AddAccount/components/ParitySigner.scss +++ b/common/v2/features/AddAccount/components/ParitySigner.scss @@ -1,5 +1,9 @@ @import 'common/sass/variables'; +.ParityPanel { + margin: 1em; +} + .ParitySigner { position: relative; justify-content: center; diff --git a/common/v2/features/AddAccount/components/ParitySigner.tsx b/common/v2/features/AddAccount/components/ParitySigner.tsx index 64843e3d5..72ad2f16d 100644 --- a/common/v2/features/AddAccount/components/ParitySigner.tsx +++ b/common/v2/features/AddAccount/components/ParitySigner.tsx @@ -34,16 +34,14 @@ type SignerQrContent = SignerAddress | string; class ParitySignerDecryptClass extends PureComponent { public render() { return ( -
              +
              {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`}
              {/*
              {translate('SIGNER_SELECT_WALLET')}
              */}
              -
              - {translate('SIGNER_SELECT_WALLET_QR')} -
              +
              {translate('SIGNER_SELECT_WALLET_QR')}
              diff --git a/common/v2/features/AddAccount/components/SafeT.scss b/common/v2/features/AddAccount/components/SafeT.scss index d9b85ce5c..87d0591d6 100644 --- a/common/v2/features/AddAccount/components/SafeT.scss +++ b/common/v2/features/AddAccount/components/SafeT.scss @@ -23,6 +23,7 @@ } &-unlockButton { + justify-content: center; position: relative; width: 420px; bottom: -25px; @@ -56,3 +57,8 @@ } } } + +.SafeTMini-button-container { + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/common/v2/features/AddAccount/components/SafeT.tsx b/common/v2/features/AddAccount/components/SafeT.tsx index db6504016..6d52e8ab7 100644 --- a/common/v2/features/AddAccount/components/SafeT.tsx +++ b/common/v2/features/AddAccount/components/SafeT.tsx @@ -58,15 +58,17 @@ class SafeTminiDecryptClass extends PureComponent { if (publicKey && chainCode) { return ( - +
              + +
              ); } else { // todo: update help link @@ -82,23 +84,25 @@ class SafeTminiDecryptClass extends PureComponent {
              -
              - {isLoading ? ( -
              - - {translate('WALLET_UNLOCKING')} +
              +
              + {isLoading ? ( +
              + + {translate('WALLET_UNLOCKING')} +
              + ) : ( + + )} +
              + {error || '-'}
              - ) : ( - - )} -
              - {error || '-'}
              diff --git a/common/v2/features/AddAccount/components/Trezor.scss b/common/v2/features/AddAccount/components/Trezor.scss index 36fcde7f8..ed365ac9f 100644 --- a/common/v2/features/AddAccount/components/Trezor.scss +++ b/common/v2/features/AddAccount/components/Trezor.scss @@ -18,13 +18,9 @@ align-content: center; } - &-footer { - padding-bottom: 2em; - } - &-img { margin: 2em; - padding-top: 2em; + padding-top: 1em; } &-loading { @@ -64,3 +60,4 @@ width: 420px; } } + diff --git a/common/v2/features/AddAccount/components/WalletList.tsx b/common/v2/features/AddAccount/components/WalletList.tsx index d0864c722..a1b251e33 100644 --- a/common/v2/features/AddAccount/components/WalletList.tsx +++ b/common/v2/features/AddAccount/components/WalletList.tsx @@ -17,7 +17,7 @@ class WalletList extends PureComponent { const { wallets, onSelect, formDataDispatch } = this.props; const validWallets = wallets.filter(w => !w.hideFromWalletList); // @TODO Filter here according to electronOnly return ( -
              +

              {translate('DECRYPT_ACCESS')}

              {translate('ADD_ACCOUNT_DESCRIPTION')} diff --git a/common/v2/features/AddAccount/components/Web3Provider.scss b/common/v2/features/AddAccount/components/Web3Provider.scss new file mode 100644 index 000000000..ac6c7b424 --- /dev/null +++ b/common/v2/features/AddAccount/components/Web3Provider.scss @@ -0,0 +1,15 @@ +.MetaMask-img { + width: 150px; + height: 150px; +} + +.MetaMask-img-container { + padding-bottom: 3em; + display: flex; + justify-content: center; + align-content: center; +} + +.MetaMask-footer { + text-align: center; +} \ No newline at end of file diff --git a/common/v2/features/AddAccount/components/Web3Provider.tsx b/common/v2/features/AddAccount/components/Web3Provider.tsx index aabf3238b..e0484529d 100644 --- a/common/v2/features/AddAccount/components/Web3Provider.tsx +++ b/common/v2/features/AddAccount/components/Web3Provider.tsx @@ -6,6 +6,7 @@ import translate from 'translations'; import MetamaskSVG from 'common/assets/images/wallets/metamask-2.svg'; import { NewTabLink, HelpLink } from 'components/ui'; import { unlockWeb3 } from 'v2/features/Wallets'; +import './Web3Provider.scss'; interface Props { wallet: object; @@ -23,16 +24,16 @@ function Web3ProviderDecrypt({ wallet, onUnlock }: Props) {
              {translate('ADD_ACCOUNT_METAMASK_TITLE')}
              {translate('ADD_ACCOUNT_METAMASK_DESC')}
              -
              -
              +
              +
              -
              +
              -
              +
              {translate('ADD_ACCOUNT_METAMASK_FOOTER')}{' '} Date: Tue, 14 May 2019 02:16:24 +0200 Subject: [PATCH 0494/1466] create flag and toggle story for no web3 --- common/v2/features/AddAccount/AddAccountFlow.tsx | 5 +---- .../v2/features/AddAccount/components/SaveAndRedirect.tsx | 4 ++-- common/v2/features/AddAccount/components/Web3Provider.tsx | 8 +++++++- common/v2/features/AddAccount/flags.tsx | 2 ++ common/v2/features/AddAccount/stories.tsx | 6 ++++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index e31d0b3cd..1d278d3db 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -10,7 +10,6 @@ import { formReducer, initialState } from './AddAccountForm.reducer'; import './AddAccount.scss'; import './AddAccountFlow.scss'; - interface State { storyName: WalletName; step: number; @@ -65,8 +64,6 @@ function AddAccountFlow() { // 2. continue once it's done. goToNextStep(); - - // console.log('UNLOCK CALLED') // // some components (TrezorDecrypt) don't take an onChange prop, and thus // // this.state.value will remain unpopulated. in this case, we can expect @@ -104,7 +101,7 @@ function AddAccountFlow() { // // console.log(formData); // goToNextStep(); - } + }; const onWalletSelection = (name: WalletName) => { setStoryName(name); diff --git a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx index f13da3df8..846cda062 100644 --- a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx +++ b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx @@ -1,6 +1,6 @@ import React, { useContext, useEffect } from 'react'; import { Route, Redirect } from 'react-router'; -import { FormData } from 'v2/features/AddAccount/types' +import { FormData } from 'v2/features/AddAccount/types'; import { AccountContext } from 'v2/providers'; import { getNetworkByName } from 'v2/libs'; @@ -9,7 +9,7 @@ import { getNetworkByName } from 'v2/libs'; */ function SaveAndRedirect(formData: FormData) { const { createAccount } = useContext(AccountContext); - console.log('gotTo SaveAndRedirect') + console.log('gotTo SaveAndRedirect'); useEffect(() => { const network: NetworkOptions | undefined = getNetworkByName(formData.network); const account = { diff --git a/common/v2/features/AddAccount/components/Web3Provider.tsx b/common/v2/features/AddAccount/components/Web3Provider.tsx index 6f1ae20f9..aabf3238b 100644 --- a/common/v2/features/AddAccount/components/Web3Provider.tsx +++ b/common/v2/features/AddAccount/components/Web3Provider.tsx @@ -5,6 +5,7 @@ import { Typography } from '@mycrypto/ui'; import translate from 'translations'; import MetamaskSVG from 'common/assets/images/wallets/metamask-2.svg'; import { NewTabLink, HelpLink } from 'components/ui'; +import { unlockWeb3 } from 'v2/features/Wallets'; interface Props { wallet: object; @@ -12,6 +13,11 @@ interface Props { } function Web3ProviderDecrypt({ wallet, onUnlock }: Props) { + const unlockWallet = async () => { + const walletPayload = await unlockWeb3(); + onUnlock(walletPayload); + }; + return (
              {translate('ADD_ACCOUNT_METAMASK_TITLE')}
              @@ -21,7 +27,7 @@ function Web3ProviderDecrypt({ wallet, onUnlock }: Props) {
              -
              diff --git a/common/v2/features/AddAccount/flags.tsx b/common/v2/features/AddAccount/flags.tsx index 1e887691c..f7b810c49 100644 --- a/common/v2/features/AddAccount/flags.tsx +++ b/common/v2/features/AddAccount/flags.tsx @@ -4,3 +4,5 @@ export const IS_ELECTRON = process.env.BUILD_DOWNLOADABLE; export const IS_MOBILE = window && window.navigator ? /iPhone|iPad|iPod|Android/i.test(window.navigator.userAgent) : false; + +export const HAS_WEB3_PROVIDER = window && typeof window.web3 !== 'undefined'; diff --git a/common/v2/features/AddAccount/stories.tsx b/common/v2/features/AddAccount/stories.tsx index 03703ad49..4ee1a1dd9 100644 --- a/common/v2/features/AddAccount/stories.tsx +++ b/common/v2/features/AddAccount/stories.tsx @@ -1,6 +1,6 @@ import { knowledgeBaseURL as KB_URL } from 'config'; import { getWeb3ProviderInfo } from 'utils/web3'; -import { IS_DEV, IS_ELECTRON } from './flags'; +import { IS_DEV, IS_ELECTRON, HAS_WEB3_PROVIDER } from './flags'; import { WalletName, WalletType } from './types'; import { InsecureWalletWarning, @@ -51,7 +51,9 @@ export const STORIES = [ description: 'ADD_WEB3DESC', helpLink: `${KB_URL}/how-to/migrating/moving-from-mycrypto-to-metamask`, // steps: [NetworkSelectPanel, Web3ProviderDecrypt, SaveAndRedirect], - steps: true ? [Web3ProviderInstall, SaveAndRedirect] : [Web3ProviderDecrypt] + steps: HAS_WEB3_PROVIDER + ? [NetworkSelectPanel, Web3ProviderDecrypt, SaveAndRedirect] + : [Web3ProviderInstall] }, { name: WalletName.LEDGER, From 646f8e925e3aa3d3fbc4624629639b7a3366b9fc Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Tue, 14 May 2019 02:20:21 +0200 Subject: [PATCH 0495/1466] handle unlock for web3, keystore and privatekey --- .../AddAccount/AddAccountForm.reducer.tsx | 29 +++++++---------- .../AddAccount/components/Keystore.tsx | 32 ++++++++++++------- .../AddAccount/components/PrivateKey.tsx | 31 ++++++++++++------ 3 files changed, 54 insertions(+), 38 deletions(-) diff --git a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx index 60ff087ef..247943a09 100644 --- a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx +++ b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx @@ -1,4 +1,4 @@ -import { FormDataAction, FormData, FormDataActionType as ActionType } from './types'; +import { FormDataAction, FormData, FormDataActionType as ActionType, WalletName } from './types'; export const initialState: FormData = { network: 'Ethereum' // @ADD_ACCOUNT_TODO this should have the same type as networkOptions in NetworkOptionsContext @@ -32,27 +32,20 @@ export const formReducer = (formData: FormData, action: FormDataAction) => { }; const handleUnlock = (walletType, payload) => { - switch(walletType) { + switch (walletType) { case WalletName.VIEW_ONLY: + case WalletName.KEYSTORE_FILE: + case WalletName.PRIVATE_KEY: + case WalletName.WEB3PROVIDER: return { account: payload.getAddressString(), derivationPath: '' - } + }; case WalletName.PARITY_SIGNER: return { account: payload.address, derivationPath: '' - } - case WalletName.KEYSTORE_FILE: - case WalletName.PRIVATE_KEY: - case WalletName.WEB3PROVIDER: - // Here it would be for each component to call unlock itself and to have - // an identical payload format as view_only - const wallet = await STORIES[walletType].unlock(payload); - return { - account: wallet.getAddressString(), - derivationPath: '' - } + }; case WalletName.MNEMONIC_PHRASE: case WalletName.LEDGER: case WalletName.TREZOR: @@ -60,8 +53,10 @@ const handleUnlock = (walletType, payload) => { return { account: payload.address, derivationPath: payload.path || payload.dPath + '/' + payload.index.toString() - } + }; default: - throw new Error(`[AddAccountReducer]: UNLOCK with wallet ${walletType} and payload ${payload} is invalid`); + throw new Error( + `[AddAccountReducer]: UNLOCK with wallet ${walletType} and payload ${payload} is invalid` + ); } -} +}; diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index b02146ae9..35a67725b 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -6,6 +6,7 @@ import { notificationsActions } from 'features/notifications'; import Spinner from 'components/ui/Spinner'; import { Input } from 'components/ui'; import PrivateKeyicon from 'common/assets/images/icn-privatekey-new.svg'; +import { unlockKeystore } from 'v2/features/wallets'; import './Keystore.scss'; export interface KeystoreValue { @@ -32,7 +33,6 @@ function isValidFile(rawFile: File): boolean { export class KeystoreDecrypt extends PureComponent { public props: { - value: KeystoreValue; isWalletPending: boolean; isPasswordPending: boolean; onChange(value: KeystoreValue): void; @@ -40,15 +40,23 @@ export class KeystoreDecrypt extends PureComponent { showNotification(level: string, message: string): notificationsActions.TShowNotification; }; + public state: KeystoreValue = { + file: undefined, + password: undefined, + filename: undefined, + valid: undefined + }; + public render() { - const { isWalletPending, value: { file, password, filename } } = this.props; + const { isWalletPending, wallet } = this.props; + const { file, password, filename } = this.state; const passReq = isPassRequired(file); const unlockDisabled = !file || (passReq && !password); return (
              - {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw(wallet.lid)}`}
              @@ -101,18 +109,20 @@ export class KeystoreDecrypt extends PureComponent { } }; - private unlock = (e: React.SyntheticEvent) => { + private unlock = async (e: React.SyntheticEvent) => { e.preventDefault(); e.stopPropagation(); - this.props.onUnlock(); + const wallet = await unlockKeystore({ + file: this.state.file, + password: this.state.password + }); + this.props.onUnlock(wallet); }; private onPasswordChange = (e: any) => { - const valid = this.props.value.file.length && e.target.value.length; - this.props.onChange({ - ...this.props.value, + this.setState({ password: e.target.value, - valid + valid: this.state.file.length && e.target.value.length }); }; @@ -126,14 +136,14 @@ export class KeystoreDecrypt extends PureComponent { const keystore = fileReader.result; const passReq = isPassRequired(keystore as any); - this.props.onChange({ - ...this.props.value, + this.setState({ file: keystore, valid: (keystore as any).length && !passReq, password: '', filename: fileName } as any); }; + if (isValidFile(inputFile)) { fileReader.readAsText(inputFile, 'utf-8'); } else { diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index 895b1f312..7126f6216 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -6,7 +6,9 @@ import { stripHexPrefix } from 'libs/formatters'; import { TogglablePassword } from 'components'; import { Input } from 'components/ui'; import PrivateKeyicon from 'common/assets/images/icn-privatekey-new.svg'; +import { unlockPrivateKey } from 'v2/features/Wallets'; import './PrivateKey.scss'; + export interface PrivateKeyValue { key: string; password: string; @@ -43,21 +45,27 @@ function validatePkeyAndPass(pkey: string, pass: string): Validated { } interface Props { - value: PrivateKeyValue; onChange(value: PrivateKeyValue): void; onUnlock(): void; } export class PrivateKeyDecrypt extends PureComponent { + public state: PrivateKeyValue = { + key: undefined, + password: undefined, + valid: false + }; + public render() { - const { key, password } = this.props.value; + const { wallet } = this.props; + const { key, password } = this.state; const { isValidPkey, isPassRequired } = validatePkeyAndPass(key, password); const unlockDisabled = !isValidPkey || (isPassRequired && !password.length); return (
              - {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw(wallet.lid)}`}
              @@ -74,7 +82,7 @@ export class PrivateKeyDecrypt extends PureComponent { placeholder={translateRaw('X_PRIVKEY2')} isValid={isValidPkey} onChange={this.onPkeyChange} - onEnter={this.props.onUnlock} + onEnter={this.unlock} />
              @@ -107,21 +115,23 @@ export class PrivateKeyDecrypt extends PureComponent { private onPkeyChange = (e: React.FormEvent) => { const pkey = e.currentTarget.value; - const pass = this.props.value.password; + const pass = this.state.password; const { fixedPkey, valid } = validatePkeyAndPass(pkey, pass); - this.props.onChange({ ...this.props.value, key: fixedPkey, valid }); + this.setState({ + key: fixedPkey, + valid + }); }; private onPasswordChange = (e: React.FormEvent) => { // NOTE: Textareas don't support password type, so we replace the value // with an equal length number of dots. On change, we replace - const pkey = this.props.value.key; + const pkey = this.state.key; const pass = e.currentTarget.value; const { valid } = validatePkeyAndPass(pkey, pass); - this.props.onChange({ - ...this.props.value, + this.setState({ password: pass, valid }); @@ -136,6 +146,7 @@ export class PrivateKeyDecrypt extends PureComponent { private unlock = (e: React.SyntheticEvent) => { e.preventDefault(); e.stopPropagation(); - this.props.onUnlock(); + const wallet = unlockPrivateKey({ key: this.state.key, password: this.state.password }); + this.props.onUnlock(wallet); }; } From 1b8bdf44dcf83b2bb85bb9d1e82cc6a92687bf18 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Mon, 13 May 2019 22:22:34 -0400 Subject: [PATCH 0496/1466] it working...? --- common/v2/config/data.tsx | 4 + common/v2/features/AddAccount/AddAccount.tsx | 751 ------------------ .../v2/features/AddAccount/AddAccountFlow.tsx | 21 +- .../AddAccount/AddAccountForm.reducer.tsx | 41 +- .../components/InsecureWalletWarning.tsx | 7 +- .../AddAccount/components/Keystore.tsx | 17 +- .../AddAccount/components/LedgerNano.tsx | 2 + .../components/NetworkSelectPanel.tsx | 9 +- .../AddAccount/components/PrivateKey.tsx | 7 +- .../AddAccount/components/SaveAndRedirect.tsx | 20 +- .../AddAccount/components/WalletButton.tsx | 4 +- .../AddAccount/components/WalletList.tsx | 38 +- .../AddAccount/components/Web3Provider.tsx | 8 +- .../components/Web3ProviderInstall.tsx | 11 +- common/v2/features/AddAccount/index.ts | 1 + common/v2/features/AddAccount/stories.tsx | 34 +- common/v2/features/AddAccount/types.tsx | 8 +- common/v2/services/Account/types.ts | 2 +- 18 files changed, 132 insertions(+), 853 deletions(-) delete mode 100644 common/v2/features/AddAccount/AddAccount.tsx diff --git a/common/v2/config/data.tsx b/common/v2/config/data.tsx index 7156fffc1..e5bab5944 100644 --- a/common/v2/config/data.tsx +++ b/common/v2/config/data.tsx @@ -91,6 +91,10 @@ export enum MiscWalletName { VIEW_ONLY = 'viewOnly' } +export enum DefaultWalletName { + DEFAULT = 'walletsList' +} + export const walletNames = getValues( SecureWalletName, HardwareWalletName, diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx deleted file mode 100644 index edec4e6d7..000000000 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ /dev/null @@ -1,751 +0,0 @@ -import React, { Component } from 'react'; -import { TransitionGroup, CSSTransition } from 'react-transition-group'; -import { withRouter, RouteComponentProps, Redirect, Route } from 'react-router'; -import { connect } from 'react-redux'; -import isEmpty from 'lodash/isEmpty'; - -import { - HardwareWalletName, - SecureWalletName, - InsecureWalletName, - WalletName, - knowledgeBaseURL, - MiscWalletName -} from 'config'; -import translate, { translateRaw } from 'translations'; -import { isWeb3NodeAvailable } from 'libs/nodes/web3'; -import { wikiLink as paritySignerHelpLink } from 'libs/wallet/non-deterministic/parity'; -import { AppState } from 'features/reducers'; -import * as derivedSelectors from 'features/selectors'; -import { walletActions, walletSelectors } from 'features/wallet'; -import { transactionFieldsActions } from 'features/transaction'; -import { notificationsActions } from 'features/notifications'; -import LedgerIcon from 'common/assets/images/wallets/ledger.svg'; -import TrezorIcon from 'common/assets/images/wallets/trezor.svg'; -import SafeTIcon from 'common/assets/images/wallets/safe-t.png'; -import ParitySignerIcon from 'common/assets/images/wallets/parity-signer.svg'; -import { Errorable } from 'components'; -import { Warning } from 'components/ui'; -import { DisabledWallets } from './components/disables'; -import { getWeb3ProviderInfo } from 'utils/web3'; -import { - KeystoreDecrypt, - LedgerNanoSDecrypt, - MnemonicDecrypt, - PrivateKeyDecrypt, - PrivateKeyValue, - TrezorDecrypt, - SafeTminiDecrypt, - WalletButton, - ParitySignerDecrypt, - InsecureWalletWarning, - ViewOnlyDecrypt -} from './components'; -import './AddAccount.scss'; -import { Button, ComboBox } from '@mycrypto/ui'; -import { Layout } from 'v2/features'; -import * as WalletActions from 'v2/features/Wallets'; - -import { NetworkOptionsContext, AccountContext } from 'v2/providers'; -import { Account } from 'v2/services/Account/types'; -import { Web3Decrypt } from 'components/WalletDecrypt/components/Web3'; -import { getNetworkByName, isWalletFormatSupportedOnNetwork } from 'v2/libs'; -import { NetworkOptions } from 'v2/services/NetworkOptions/types'; -import { ContentPanel } from 'v2/components'; - -interface OwnProps { - hidden?: boolean; - disabledWallets?: DisabledWallets; - showGenerateLink?: boolean; -} - -interface DispatchProps { - unlockKeystore: WalletActions.TUnlockKeystore; - unlockMnemonic: WalletActions.TUnlockMnemonic; - unlockPrivateKey: WalletActions.TUnlockPrivateKey; - unlockWeb3: WalletActions.TUnlockWeb3; - setWallet: walletActions.TSetWallet; - resetTransactionRequested: transactionFieldsActions.TResetTransactionRequested; - showNotification: notificationsActions.TShowNotification; -} - -interface StateProps { - computedDisabledWallets: DisabledWallets; - isWalletPending: AppState['wallet']['isWalletPending']; - isPasswordPending: AppState['wallet']['isPasswordPending']; - accessMessage: ReturnType; -} - -type Props = OwnProps & StateProps & DispatchProps & RouteComponentProps<{}>; - -type UnlockParams = {} | PrivateKeyValue; - -interface AddAccountData { - address: string; - accountType: WalletName; - label: string | null; - network: string; - derivationPath: string; -} - -interface State { - selectedWalletKey: WalletName | null; - isInsecureOverridden: boolean; - value: UnlockParams | null; - hasSelectedNetwork: boolean; - seed: string; - hasSelectedAddress: boolean; - accountData: AddAccountData; -} - -interface BaseWalletInfo { - lid: string; - component: any; - initialParams: object; - unlock: any; - attemptUnlock?: boolean; - redirect?: string; - helpLink: string; - isReadOnly?: boolean; - accountType?: WalletName; -} - -export interface SecureWalletInfo extends BaseWalletInfo { - icon?: string; - description: string; -} - -export interface InsecureWalletInfo extends BaseWalletInfo { - example: string; -} - -export interface MiscWalletInfo extends BaseWalletInfo { - description: string; -} - -type HardwareWallets = { [key in HardwareWalletName]: SecureWalletInfo }; -type SecureWallets = { [key in SecureWalletName]: SecureWalletInfo }; -type InsecureWallets = { [key in InsecureWalletName]: InsecureWalletInfo }; -type MiscWallet = { [key in MiscWalletName]: MiscWalletInfo }; -type Wallets = HardwareWallets & SecureWallets & InsecureWallets & MiscWallet; - -const HARDWARE_WALLETS = Object.values(HardwareWalletName); -/** @desc Hardware wallets are secure too, but we want to avoid duplication. */ -const SECURE_WALLETS = Object.values(SecureWalletName).filter( - value => !HARDWARE_WALLETS.includes(value) -); -const INSECURE_WALLETS = Object.values(InsecureWalletName); -const MISC_WALLETS = Object.values(MiscWalletName); - -const web3info = getWeb3ProviderInfo(); - -const WalletDecrypt = withRouter( - class WalletDecryptClass extends Component & Props, State> { - // https://github.com/Microsoft/TypeScript/issues/13042 - // index signature should become [key: Wallets] (from config) once typescript bug is fixed - public WALLETS: Wallets = { - [SecureWalletName.WEB3]: { - lid: web3info.lid, - icon: web3info.icon, - description: 'ADD_WEB3DESC', - component: Web3Decrypt, - initialParams: {}, - unlock: WalletActions.unlockWeb3, - attemptUnlock: true, - helpLink: `${knowledgeBaseURL}/how-to/migrating/moving-from-mycrypto-to-metamask` - }, - [SecureWalletName.LEDGER_NANO_S]: { - lid: 'X_LEDGER', - icon: LedgerIcon, - description: 'ADD_HARDWAREDESC', - component: LedgerNanoSDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - helpLink: 'https://support.ledger.com/hc/en-us/articles/360008268594' - }, - [SecureWalletName.TREZOR]: { - lid: 'X_TREZOR', - icon: TrezorIcon, - description: 'ADD_HARDWAREDESC', - component: TrezorDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - helpLink: `${knowledgeBaseURL}/how-to/migrating/moving-from-mycrypto-to-trezor` - }, - [SecureWalletName.SAFE_T]: { - lid: 'X_SAFE_T', - icon: SafeTIcon, - description: 'ADD_HARDWAREDESC', - component: SafeTminiDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - // TODO - Update with the right id once available - helpLink: 'https://www.archos.com/fr/products/crypto/faq.html' - }, - [SecureWalletName.PARITY_SIGNER]: { - lid: 'X_PARITYSIGNER', - icon: ParitySignerIcon, - description: 'ADD_PARITY_DESC', - component: ParitySignerDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - helpLink: paritySignerHelpLink - }, - [InsecureWalletName.KEYSTORE_FILE]: { - lid: 'X_KEYSTORE2', - example: 'UTC--2017-12-15T17-35-22.547Z--6be6e49e82425a5aa56396db03512f2cc10e95e8', - component: KeystoreDecrypt, - initialParams: { - file: '', - password: '' - }, - unlock: WalletActions.unlockKeystore, - helpLink: `${knowledgeBaseURL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types` - }, - [InsecureWalletName.MNEMONIC_PHRASE]: { - lid: 'X_MNEMONIC', - example: 'brain surround have swap horror cheese file distinct', - component: MnemonicDecrypt, - initialParams: {}, - unlock: this.props.unlockMnemonic, - helpLink: `${knowledgeBaseURL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types` - }, - [InsecureWalletName.PRIVATE_KEY]: { - lid: 'X_PRIVKEY2', - example: 'f1d0e0789c6d40f399ca90cc674b7858de4c719e0d5752a60d5d2f6baa45d4c9', - component: PrivateKeyDecrypt, - initialParams: { - key: '', - password: '' - }, - unlock: WalletActions.unlockPrivateKey, - helpLink: `${knowledgeBaseURL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types` - }, - [MiscWalletName.VIEW_ONLY]: { - lid: 'VIEW_ADDR', - description: 'ADD_VIEW_ADDRESS_DESC', - component: ViewOnlyDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - helpLink: '', - isReadOnly: true - } - }; - - public state: State = { - selectedWalletKey: null, - isInsecureOverridden: false, - value: null, - hasSelectedNetwork: false, - seed: '', - hasSelectedAddress: false, - accountData: { - address: '', - network: 'Ethereum', - label: 'New Account', - accountType: InsecureWalletName.PRIVATE_KEY, - derivationPath: '' - } - }; - - public exists: boolean = true; - - public UNSAFE_componentWillReceiveProps(nextProps: Props) { - // Reset state when unlock is hidden / revealed - if (nextProps.hidden !== this.props.hidden) { - this.setState({ - value: 0, - selectedWalletKey: null - }); - } - } - - public componentWillUnmount() { - this.exists = false; - } - - public getSelectedWallet() { - const { selectedWalletKey } = this.state; - if (!selectedWalletKey) { - return null; - } - - return this.WALLETS[selectedWalletKey]; - } - - public handleCreateAccount = (createAccount: ((newAccount: Account) => void)) => { - const { accountData } = this.state; - const network: NetworkOptions | undefined = getNetworkByName(accountData.network); - const newAccount: Account = { - ...accountData, - assets: network ? network.unit : 'DefaultAsset', - value: 0, - label: 'New Account', - localSettings: 'default', - transactionHistory: '' - }; - createAccount(newAccount); - }; - - public handleCompleteFlow() { - return ( - - {({ createAccount }) => { - this.handleCreateAccount(createAccount); - return ( - - - - ); - }} - - ); - } - - public getDecryptionComponent() { - const { selectedWalletKey, isInsecureOverridden } = this.state; - const selectedWallet = this.getSelectedWallet(); - - if (!selectedWalletKey || !selectedWallet) { - return null; - } - - const isInsecure = INSECURE_WALLETS.includes(selectedWalletKey); - if (isInsecure && !isInsecureOverridden && !process.env.BUILD_DOWNLOADABLE) { - return ( -
              - - {process.env.NODE_ENV !== 'production' && ( - - )} -
              - ); - } - - return ( -
              - {/* Possibily use a ternary operator to determine which panels to render? */} - -
              -
              -
              - {!selectedWallet.isReadOnly && translate('UNLOCK_WALLET')} -
              - {!selectedWallet.isReadOnly && `Your ${translateRaw(selectedWallet.lid)}`} -
              -
              - - { - if (selectedWallet.redirect) { - this.props.history.push(selectedWallet.redirect); - } - this.onUnlock(value); - }} - showNotification={this.props.showNotification} - isWalletPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isWalletPending - : undefined - } - isPasswordPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isPasswordPending - : undefined - } - seed={this.state.seed} - onSeed={this.handleSeed} - /> - -
              -
              -
              -
              - ); - } - - public buildWalletOptions() { - const { computedDisabledWallets, accessMessage } = this.props; - const { reasons } = computedDisabledWallets; - - return ( -
              -

              {translate('DECRYPT_ACCESS')}

              -
              - {translate('ADD_ACCOUNT_DESCRIPTION')} -
              - {accessMessage && ( -
              - {accessMessage} -
              - )} -
              -
              - {HARDWARE_WALLETS.map((walletType: SecureWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} -
              -
              - {SECURE_WALLETS.map((walletType: SecureWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} - {MISC_WALLETS.map((walletType: MiscWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} -
              - -
              - {INSECURE_WALLETS.map((walletType: InsecureWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} -
              -
              - -
              {translate('ADD_ACCOUNT_FOOTER_LINK')}
              -
              - ); - } - - public selectNetworkComponent() { - return ( - -
              -
              Select Network
              -
              {translate('ADD_ACCOUNT_NETWORK_SELCT')}
              - - - {({ networkOptions = [] }) => { - const networkNames: any[] = []; - networkOptions.map(en => { - if (isWalletFormatSupportedOnNetwork(en, this.state.accountData.accountType)) { - networkNames.push(en.name); - } - }); - console.log(networkNames); - return ( - { - this.setState({ accountData: { ...this.state.accountData, network: value } }); - }} - placeholder="Ethereum" - /> - ); - }} - - -
              -
              - ); - } - - public handleNetworkSelect = () => { - this.setState({ hasSelectedNetwork: true }); - }; - - public handleWalletChoice = async (walletType: WalletName) => { - const { showNotification } = this.props; - const wallet = this.WALLETS[walletType]; - this.setState({ accountData: { ...this.state.accountData, accountType: walletType } }); - if (!wallet) { - return; - } - - let timeout = 0; - if (wallet.attemptUnlock) { - try { - const web3Available = await isWeb3NodeAvailable(); - if (web3Available) { - // timeout is only the maximum wait time before secondary view is shown - // send view will be shown immediately on web3 resolve - timeout = 1000; - wallet.unlock(); - } - } catch (e) { - // The permissions request for MetaMask was displayed, but permission was denied. - showNotification('danger', translateRaw('METAMASK_PERMISSION_DENIED')); - } - } - - window.setTimeout(() => { - if (this.exists) { - this.setState({ - selectedWalletKey: walletType, - value: wallet.initialParams - }); - } - }, timeout); - }; - - public returnToSender = () => { - this.setState({ - selectedWalletKey: null, - isInsecureOverridden: false, - value: null, - hasSelectedNetwork: false, - hasSelectedAddress: false, - accountData: { - address: '', - network: 'Ethereum', - label: 'New Account', - accountType: MiscWalletName.VIEW_ONLY, - derivationPath: '' - } - }); - }; - /* - public clearWalletChoice = () => { - this.setState({ - selectedWalletKey: null, - value: 0, - hasSelectedNetwork: false, - accountData: { - ...this.state.accountData, - network: '' - } - }); - }; - - public clearAddressChoice = () => { - this.setState({ - hasSelectedAddress: false, - accountData: { - ...this.state.accountData, - address: '', - derivationPath: '' - } - }); - };*/ - - public render() { - const { hidden } = this.props; - const selectedWallet = this.getSelectedWallet(); - const decryptionComponent = this.getDecryptionComponent(); - const selectNetworkComponent = this.selectNetworkComponent(); - const confirmComponent = this.handleCompleteFlow(); - let componentToRender: JSX.Element; - - if (!hidden && decryptionComponent && selectedWallet && !this.state.hasSelectedNetwork) { - componentToRender = ( - <> - - - - {selectNetworkComponent} - - - - - ); - } else if (this.state.hasSelectedNetwork && this.state.hasSelectedAddress) { - componentToRender = ( - -
              - - - {confirmComponent} - - -
              -
              - ); - } else if (!hidden && decryptionComponent && selectedWallet) { - componentToRender = ( - -
              - - - {decryptionComponent} - - -
              -
              - ); - } else { - componentToRender = ( - -
              - - - {this.buildWalletOptions()} - - -
              -
              - ); - } - return componentToRender; - } - - public onChange = (value: UnlockParams) => { - this.setState({ value }); - }; - - public onUnlock = async (payload: any) => { - const { value, selectedWalletKey } = this.state; - if (!selectedWalletKey) { - return; - } - // some components (TrezorDecrypt) don't take an onChange prop, and thus - // this.state.value will remain unpopulated. in this case, we can expect - // the payload to contain the unlocked wallet info. - const unlockValue = value && !isEmpty(value) ? value : payload; - if (this.state.accountData.accountType === 'viewOnly') { - this.setState({ - hasSelectedAddress: true, - accountData: { - ...this.state.accountData, - address: unlockValue.getAddressString() - } - }); - } else if ( - this.state.accountData.accountType === 'keystoreFile' || - this.state.accountData.accountType === 'privateKey' || - this.state.accountData.accountType === 'web3' - ) { - const wallet = await this.WALLETS[selectedWalletKey].unlock(unlockValue); - this.setState({ - hasSelectedAddress: true, - accountData: { - ...this.state.accountData, - address: wallet.getAddressString() - } - }); - } else if (this.state.accountData.accountType === 'paritySigner') { - this.setState({ - hasSelectedAddress: true, - accountData: { - ...this.state.accountData, - derivationPath: '', - address: unlockValue.address - } - }); - } else { - this.setState({ - hasSelectedAddress: true, - accountData: { - ...this.state.accountData, - derivationPath: - unlockValue.path || unlockValue.dPath + '/' + unlockValue.index.toString(), - address: unlockValue.address - } - }); - } - }; - - private isWalletDisabled = (walletKey: WalletName) => { - return this.props.computedDisabledWallets.wallets.indexOf(walletKey) !== -1; - }; - - private overrideInsecureWarning = () => { - if (process.env.NODE_ENV !== 'production') { - this.setState({ isInsecureOverridden: true }); - } - }; - - private handleSeed = (seed: string) => this.setState({ seed }); - } -); - -function mapStateToProps(state: AppState, ownProps: Props) { - const { disabledWallets } = ownProps; - let computedDisabledWallets = derivedSelectors.getDisabledWallets(state); - - if (disabledWallets) { - computedDisabledWallets = { - wallets: [...computedDisabledWallets.wallets, ...disabledWallets.wallets], - reasons: { - ...computedDisabledWallets.reasons, - ...disabledWallets.reasons - } - }; - } - - return { - computedDisabledWallets, - isWalletPending: state.wallet.isWalletPending, - isPasswordPending: state.wallet.isPasswordPending, - accessMessage: walletSelectors.getWalletAccessMessage(state) - }; -} - -export default connect(mapStateToProps, { - unlockMnemonic: WalletActions.unlockMnemonic, - resetTransactionRequested: transactionFieldsActions.resetTransactionRequested, - showNotification: notificationsActions.showNotification -})(WalletDecrypt) as React.ComponentClass; diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index 1d278d3db..f10df7800 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -3,24 +3,19 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group'; import { Layout } from 'v2/features'; import { ContentPanel } from 'v2/components'; -import { WalletName, FormData, FormDataAction, FormDataActionType as ActionType } from './types'; +import { FormDataActionType as ActionType } from './types'; +import { WalletName, walletNames } from 'v2/config/data'; import { STORIES } from './stories'; import { WalletList } from './components'; import { formReducer, initialState } from './AddAccountForm.reducer'; import './AddAccount.scss'; import './AddAccountFlow.scss'; -interface State { - storyName: WalletName; - step: number; - formData: FormData; -} - -const getStory = (storyName: WalletName) => { +export const getStory = (storyName: WalletName) => { return STORIES.filter(selected => selected.name === storyName)[0]; }; -const getStorySteps = (storyName: WalletName) => { +export const getStorySteps = (storyName: WalletName) => { return getStory(storyName).steps; }; @@ -33,15 +28,15 @@ const getStorySteps = (storyName: WalletName) => { story. */ function AddAccountFlow() { - const [storyName, setStoryName] = useState(WalletName.DEFAULT); // The Wallet Story that we are tracking. + const [storyName, setStoryName] = useState(walletNames.DEFAULT); // The Wallet Story that we are tracking. const [step, setStep] = useState(0); // The current Step inside the Wallet Story. const [formData, updateFormState] = useReducer(formReducer, initialState); // The data that we want to save at the end. - const isDefaultView = storyName === WalletName.DEFAULT; + const isDefaultView = storyName === walletNames.DEFAULT; const goToStart = () => { setStep(0); - setStoryName(WalletName.DEFAULT); + setStoryName(walletNames.DEFAULT); updateFormState({ type: ActionType.RESET_FORM, payload: '' }); }; @@ -58,6 +53,8 @@ function AddAccountFlow() { }; const onUnlock = async (payload: any) => { + console.log('onUnlock'); + console.log(payload); // 1. Let reducer handle the differences. Infact this updateFormState could // be simplified by having each component call `updateFormState` themselves. await updateFormState({ type: ActionType.ON_UNLOCK, payload }); diff --git a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx index 247943a09..096256205 100644 --- a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx +++ b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx @@ -1,7 +1,18 @@ -import { FormDataAction, FormData, FormDataActionType as ActionType, WalletName } from './types'; +import { FormDataAction, FormData, FormDataActionType as ActionType } from './types'; +import { + WalletName, + walletNames, + InsecureWalletName, + MiscWalletName, + SecureWalletName +} from 'v2/config/data'; export const initialState: FormData = { - network: 'Ethereum' // @ADD_ACCOUNT_TODO this should have the same type as networkOptions in NetworkOptionsContext + network: 'Ethereum', // @ADD_ACCOUNT_TODO this should have the same type as networkOptions in NetworkOptionsContext + accountType: walletNames.DEFAULT, + account: '', + label: 'New Account', + derivationPath: '' }; export const formReducer = (formData: FormData, action: FormDataAction) => { @@ -14,9 +25,15 @@ export const formReducer = (formData: FormData, action: FormDataAction) => { return { ...formData, account }; case ActionType.SELECT_ACCOUNT_TYPE: const { accountType } = action.payload; + console.log('got heree???'); + console.log(action.payload); return { ...formData, accountType }; case ActionType.ON_UNLOCK: + console.log('payload1'); + console.log(action.payload); const accountAndDerivationPath = handleUnlock(formData.accountType, action.payload); + console.log('accountAndDerivationPath'); + console.log(accountAndDerivationPath); return { ...formData, ...accountAndDerivationPath }; case ActionType.SET_LABEL: const { label } = action.payload; @@ -31,25 +48,25 @@ export const formReducer = (formData: FormData, action: FormDataAction) => { } }; -const handleUnlock = (walletType, payload) => { +const handleUnlock = (walletType: WalletName, payload: any) => { switch (walletType) { - case WalletName.VIEW_ONLY: - case WalletName.KEYSTORE_FILE: - case WalletName.PRIVATE_KEY: - case WalletName.WEB3PROVIDER: + case MiscWalletName.VIEW_ONLY: + case InsecureWalletName.KEYSTORE_FILE: + case InsecureWalletName.PRIVATE_KEY: + case SecureWalletName.WEB3: return { account: payload.getAddressString(), derivationPath: '' }; - case WalletName.PARITY_SIGNER: + case SecureWalletName.PARITY_SIGNER: return { account: payload.address, derivationPath: '' }; - case WalletName.MNEMONIC_PHRASE: - case WalletName.LEDGER: - case WalletName.TREZOR: - case WalletName.SAFE_T: + case InsecureWalletName.MNEMONIC_PHRASE: + case SecureWalletName.LEDGER_NANO_S: + case SecureWalletName.TREZOR: + case SecureWalletName.SAFE_T: return { account: payload.address, derivationPath: payload.path || payload.dPath + '/' + payload.index.toString() diff --git a/common/v2/features/AddAccount/components/InsecureWalletWarning.tsx b/common/v2/features/AddAccount/components/InsecureWalletWarning.tsx index 38b9409f1..96b30f029 100644 --- a/common/v2/features/AddAccount/components/InsecureWalletWarning.tsx +++ b/common/v2/features/AddAccount/components/InsecureWalletWarning.tsx @@ -10,6 +10,11 @@ interface Props { onCancel(): void; } +interface InsecureWarningType { + wallet: any; + goToStart: any; +} + class InsecureWalletWarning extends React.Component { constructor(props: Props) { super(props); @@ -44,7 +49,7 @@ class InsecureWalletWarning extends React.Component { } } -const InsecureWarning = ({ wallet, formData, goToStart }) => ( +const InsecureWarning = ({ wallet, goToStart }: InsecureWarningType) => (
              {IS_DEV && ( diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 35a67725b..49029623c 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -6,14 +6,14 @@ import { notificationsActions } from 'features/notifications'; import Spinner from 'components/ui/Spinner'; import { Input } from 'components/ui'; import PrivateKeyicon from 'common/assets/images/icn-privatekey-new.svg'; -import { unlockKeystore } from 'v2/features/wallets'; +import { unlockKeystore } from 'v2/features/Wallets'; import './Keystore.scss'; export interface KeystoreValue { file: string; password: string; - filename: string; - valid: boolean; + filename: string | undefined; + valid: boolean | undefined; } function isPassRequired(file: string): boolean { @@ -33,16 +33,17 @@ function isValidFile(rawFile: File): boolean { export class KeystoreDecrypt extends PureComponent { public props: { + wallet: any; isWalletPending: boolean; isPasswordPending: boolean; onChange(value: KeystoreValue): void; - onUnlock(): void; + onUnlock(param: any): void; showNotification(level: string, message: string): notificationsActions.TShowNotification; }; public state: KeystoreValue = { - file: undefined, - password: undefined, + file: '', + password: '', filename: undefined, valid: undefined }; @@ -50,7 +51,7 @@ export class KeystoreDecrypt extends PureComponent { public render() { const { isWalletPending, wallet } = this.props; const { file, password, filename } = this.state; - const passReq = isPassRequired(file); + const passReq = file ? isPassRequired(file) : true; const unlockDisabled = !file || (passReq && !password); return ( @@ -83,7 +84,7 @@ export class KeystoreDecrypt extends PureComponent { {isWalletPending ? : ''} 0} + isValid={password ? password.length > 0 : false} className={`${file.length && isWalletPending ? 'hidden' : ''}`} disabled={!file} value={password} diff --git a/common/v2/features/AddAccount/components/LedgerNano.tsx b/common/v2/features/AddAccount/components/LedgerNano.tsx index 6a83d99f3..86171c8df 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.tsx +++ b/common/v2/features/AddAccount/components/LedgerNano.tsx @@ -154,6 +154,8 @@ class LedgerNanoSDecryptClass extends PureComponent { }; private handleUnlock = (address: string, index: number) => { + console.log('ledgerUnlock'); + console.log(new LedgerWallet(address, this.state.dPath.value, index)); this.props.onUnlock(new LedgerWallet(address, this.state.dPath.value, index)); this.reset(); }; diff --git a/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx index 49e2fbec5..21167de03 100644 --- a/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx +++ b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx @@ -5,8 +5,15 @@ import { translate } from 'translations'; import { NetworkOptionsContext } from 'v2/providers'; import { isWalletFormatSupportedOnNetwork } from 'v2/libs'; import { FormDataActionType as ActionType } from '../types'; +import { FormData } from 'v2/features/AddAccount/types'; -function NetworkSelectPanel({ formData, formDispatch, goToNextStep }) { +interface Props { + formData: FormData; + formDispatch: any; + goToNextStep(): void; +} + +function NetworkSelectPanel({ formData, formDispatch, goToNextStep }: Props) { const [network, setNetwork] = useState(formData.network); const { networkOptions } = useContext(NetworkOptionsContext); diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index 7126f6216..96b7d18e9 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -45,14 +45,15 @@ function validatePkeyAndPass(pkey: string, pass: string): Validated { } interface Props { + wallet: any; onChange(value: PrivateKeyValue): void; - onUnlock(): void; + onUnlock(param: any): void; } export class PrivateKeyDecrypt extends PureComponent { public state: PrivateKeyValue = { - key: undefined, - password: undefined, + key: '', + password: '', valid: false }; diff --git a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx index 846cda062..cde5862f9 100644 --- a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx +++ b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx @@ -3,23 +3,35 @@ import { Route, Redirect } from 'react-router'; import { FormData } from 'v2/features/AddAccount/types'; import { AccountContext } from 'v2/providers'; import { getNetworkByName } from 'v2/libs'; +import { NetworkOptions } from 'v2/services/NetworkOptions/types'; +import { Account } from 'v2/services/Account/types'; /* Create a new account in localStorage and redirect to dashboard. */ -function SaveAndRedirect(formData: FormData) { +function SaveAndRedirect(payload: { formData: FormData }) { const { createAccount } = useContext(AccountContext); console.log('gotTo SaveAndRedirect'); + useEffect(() => { - const network: NetworkOptions | undefined = getNetworkByName(formData.network); - const account = { - ...formData, + const network: NetworkOptions | undefined = getNetworkByName(payload.formData.network); + console.log('payload'); + console.log(payload); + console.log('network'); + console.log(network); + const account: Account = { + address: payload.formData.account, + network: payload.formData.network, + accountType: payload.formData.accountType, + derivationPath: payload.formData.derivationPath, assets: network ? network.unit : 'DefaultAsset', value: 0, label: 'New Account', // @TODO: we really should have the correct label before! localSettings: 'default', transactionHistory: '' }; + console.log('Account to add'); + console.log(account); createAccount(account); }); diff --git a/common/v2/features/AddAccount/components/WalletButton.tsx b/common/v2/features/AddAccount/components/WalletButton.tsx index e02883300..8ad2168fd 100644 --- a/common/v2/features/AddAccount/components/WalletButton.tsx +++ b/common/v2/features/AddAccount/components/WalletButton.tsx @@ -8,11 +8,11 @@ interface OwnProps { name: string; description?: string; example?: string; - walletType: WalletName; + walletType?: WalletName; isSecure?: boolean; isDisabled?: boolean; disableReason?: string; - onClick(walletType: string): void; + onClick(walletType: any): void; } interface StateProps { diff --git a/common/v2/features/AddAccount/components/WalletList.tsx b/common/v2/features/AddAccount/components/WalletList.tsx index d0864c722..c3793de7e 100644 --- a/common/v2/features/AddAccount/components/WalletList.tsx +++ b/common/v2/features/AddAccount/components/WalletList.tsx @@ -1,21 +1,21 @@ import React, { PureComponent } from 'react'; -import { connect } from 'react-redux'; import translate, { translateRaw } from 'translations'; -import { getDisabledWallets } from 'features/selectors'; -import { walletSelectors } from 'features/wallet'; import { WalletButton } from '../components'; -import { WalletName } from '../types'; +import { WalletName } from 'v2/config/data'; interface Props { wallets: any[]; onSelect(name: WalletName): void; } -class WalletList extends PureComponent { +export default class WalletList extends PureComponent { public render() { - const { wallets, onSelect, formDataDispatch } = this.props; + const { wallets, onSelect } = this.props; const validWallets = wallets.filter(w => !w.hideFromWalletList); // @TODO Filter here according to electronOnly + console.log('wallets'); + console.log(wallets); + console.log(validWallets); return (

              {translate('DECRYPT_ACCESS')}

              @@ -25,13 +25,13 @@ class WalletList extends PureComponent {
              {validWallets.map(wallet => { + console.log(wallet.name); return ( { ); } } - -// @TODO: From the moment we have flags on the wallets, this logic appears -// convulated and should be removed. -function mapStateToProps(state, ownProps) { - // const { disabledWallets } = ownProps; - // let computedDisabledWallets = getDisabledWallets(state); - // - // if (disabledWallets) { - // computedDisabledWallets = { - // wallets: [...computedDisabledWallets.wallets, ...disabledWallets.wallets], - // reasons: { - // ...computedDisabledWallets.reasons, - // ...disabledWallets.reasons - // } - // }; - // } - - return { - // computedDisabledWallets, - // accessMessage: walletSelectors.getWalletAccessMessage(state) - }; -} - -export default connect(mapStateToProps, null)(WalletList); diff --git a/common/v2/features/AddAccount/components/Web3Provider.tsx b/common/v2/features/AddAccount/components/Web3Provider.tsx index aabf3238b..654c7bcff 100644 --- a/common/v2/features/AddAccount/components/Web3Provider.tsx +++ b/common/v2/features/AddAccount/components/Web3Provider.tsx @@ -1,15 +1,13 @@ -import React, { PureComponent } from 'react'; -import styled from 'styled-components'; +import React from 'react'; -import { Typography } from '@mycrypto/ui'; import translate from 'translations'; import MetamaskSVG from 'common/assets/images/wallets/metamask-2.svg'; -import { NewTabLink, HelpLink } from 'components/ui'; +import { NewTabLink } from 'components/ui'; import { unlockWeb3 } from 'v2/features/Wallets'; interface Props { wallet: object; - onUnlock(): void; + onUnlock(param: any): void; } function Web3ProviderDecrypt({ wallet, onUnlock }: Props) { diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx index 885945bf1..30d6b5dca 100644 --- a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx @@ -1,5 +1,4 @@ -import React, { PureComponent } from 'react'; -import styled from 'styled-components'; +import React from 'react'; import { Typography } from '@mycrypto/ui'; import translate from 'translations'; @@ -8,7 +7,7 @@ import CoinbaseWalletJPG from 'common/assets/images/wallets/coinbase.jpg'; import MetamaskSVG from 'common/assets/images/wallets/metamask-2.svg'; import AppStoreBadgeIMG from 'assets/images/mobile/app-store-badge.png'; import GooglePlayBadgeIMG from 'assets/images/mobile/google-play-badge.png'; -import { NewTabLink, HelpLink } from 'components/ui'; +import { NewTabLink } from 'components/ui'; import { IS_MOBILE } from '../flags'; interface Props { @@ -16,7 +15,7 @@ interface Props { onUnlock(): void; } -function InstallTrunk({ wallet, onUnlock }: Props) { +function InstallTrunk() { return (
              {translate('ADD_ACCOUNT_WEB3_INSTALL_TITLE')}
              @@ -35,7 +34,7 @@ function InstallTrunk({ wallet, onUnlock }: Props) {
              - + Coinbase App @@ -51,7 +50,7 @@ function InstallTrunk({ wallet, onUnlock }: Props) { ); } -function InstallMetaMask({ wallet, onUnlock }: Props) { +function InstallMetaMask({ onUnlock }: Props) { return (
              {translate('ADD_ACCOUNT_WEB3_INSTALL_TITLE')}
              diff --git a/common/v2/features/AddAccount/index.ts b/common/v2/features/AddAccount/index.ts index 46d7655f7..be946a5fb 100644 --- a/common/v2/features/AddAccount/index.ts +++ b/common/v2/features/AddAccount/index.ts @@ -1 +1,2 @@ export { default as addAccountRoutes } from './routes'; +export * from './components'; diff --git a/common/v2/features/AddAccount/stories.tsx b/common/v2/features/AddAccount/stories.tsx index 4ee1a1dd9..8b73555b6 100644 --- a/common/v2/features/AddAccount/stories.tsx +++ b/common/v2/features/AddAccount/stories.tsx @@ -1,7 +1,14 @@ import { knowledgeBaseURL as KB_URL } from 'config'; +import { + walletNames, + DefaultWalletName, + SecureWalletName, + InsecureWalletName, + MiscWalletName +} from 'v2/config/data'; import { getWeb3ProviderInfo } from 'utils/web3'; -import { IS_DEV, IS_ELECTRON, HAS_WEB3_PROVIDER } from './flags'; -import { WalletName, WalletType } from './types'; +import { IS_ELECTRON, HAS_WEB3_PROVIDER } from './flags'; +import { WalletType } from './types'; import { InsecureWalletWarning, LedgerNanoSDecrypt, @@ -25,7 +32,6 @@ import LedgerSVG from 'common/assets/images/wallets/ledger.svg'; import TrezorSVG from 'common/assets/images/wallets/trezor.svg'; import SafeTSVG from 'common/assets/images/wallets/safe-t.png'; import ParitySignerSVG from 'common/assets/images/wallets/parity-signer.svg'; -import { WalletActions } from 'features/wallet/types'; // STORIES serve the double purpose of generating the wallet options and // providing a declarative way to determine the flow for each wallet. @@ -37,14 +43,16 @@ import { WalletActions } from 'features/wallet/types'; // 2. Merge enums and names with the ones in common/v2/config/accountTypes.ts const web3ProviderInfo = getWeb3ProviderInfo(); +console.log('walletNames'); +console.log(walletNames); export const STORIES = [ { - name: WalletName.DEFAULT, + name: DefaultWalletName.DEFAULT, steps: [WalletList], hideFromWalletList: true }, { - name: WalletName.WEB3PROVIDER, + name: SecureWalletName.WEB3, type: WalletType.SECURE, lid: web3ProviderInfo.lid, icon: web3ProviderInfo.icon, @@ -56,7 +64,7 @@ export const STORIES = [ : [Web3ProviderInstall] }, { - name: WalletName.LEDGER, + name: SecureWalletName.LEDGER_NANO_S, type: WalletType.SECURE, lid: 'X_LEDGER', icon: LedgerSVG, @@ -65,7 +73,7 @@ export const STORIES = [ steps: [NetworkSelectPanel, LedgerNanoSDecrypt, SaveAndRedirect] }, { - name: WalletName.TREZOR, + name: SecureWalletName.TREZOR, type: WalletType.SECURE, lid: 'X_TREZOR', icon: TrezorSVG, @@ -74,7 +82,7 @@ export const STORIES = [ steps: [NetworkSelectPanel, TrezorDecrypt, SaveAndRedirect] }, { - name: WalletName.SAFE_T, + name: SecureWalletName.SAFE_T, type: WalletType.SECURE, lid: 'X_SAFE_T', icon: SafeTSVG, @@ -83,7 +91,7 @@ export const STORIES = [ steps: [NetworkSelectPanel, SafeTminiDecrypt, SaveAndRedirect] }, { - name: WalletName.PARITY_SIGNER, + name: SecureWalletName.PARITY_SIGNER, type: WalletType.SECURE, lid: 'X_PARITYSIGNER', icon: ParitySignerSVG, @@ -91,7 +99,7 @@ export const STORIES = [ steps: [NetworkSelectPanel, ParitySignerDecrypt, SaveAndRedirect] }, { - name: WalletName.KEYSTORE_FILE, + name: InsecureWalletName.KEYSTORE_FILE, type: WalletType.INSECURE, lid: 'X_KEYSTORE2', description: 'UTC--2017-12-15T17-35-22.547Z--6be6e49e82425a5aa56396db03512f2cc10e95e8', @@ -104,7 +112,7 @@ export const STORIES = [ hideFromWalletList: !IS_ELECTRON }, { - name: WalletName.MNEMONIC_PHRASE, + name: InsecureWalletName.MNEMONIC_PHRASE, type: WalletType.INSECURE, lid: 'X_MNEMONIC', description: 'brain surround have swap horror cheese file distinct', @@ -117,7 +125,7 @@ export const STORIES = [ hideFromWalletList: !IS_ELECTRON }, { - name: WalletName.PRIVATE_KEY, + name: InsecureWalletName.PRIVATE_KEY, type: WalletType.INSECURE, lid: 'X_PRIVKEY2', description: 'f1d0e0789c6d40f399ca90cc674b7858de4c719e0d5752a60d5d2f6baa45d4c9', @@ -130,7 +138,7 @@ export const STORIES = [ hideFromWalletList: !IS_ELECTRON }, { - name: WalletName.VIEW_ONLY, + name: MiscWalletName.VIEW_ONLY, type: WalletType.MISC, lid: 'VIEW_ADDR', description: 'ADD_VIEW_ADDRESS_DESC', diff --git a/common/v2/features/AddAccount/types.tsx b/common/v2/features/AddAccount/types.tsx index 8895a27b9..c3a935daf 100644 --- a/common/v2/features/AddAccount/types.tsx +++ b/common/v2/features/AddAccount/types.tsx @@ -1,3 +1,5 @@ +import { WalletName } from 'v2/config/data'; + export enum WalletType { SECURE, INSECURE, @@ -5,7 +7,7 @@ export enum WalletType { } // @ADD_ACCOUNT_TODO: move to named enum or other Set -export enum WalletName { +/*export enum WalletName { DEFAULT = 'WALLETLIST', WEB3PROVIDER = 'WEB3_PROVIDER', LEDGER = 'LEDGER', @@ -16,7 +18,7 @@ export enum WalletName { MNEMONIC_PHRASE = 'MNEMONIC_PHRASE', PRIVATE_KEY = 'PRIVATE_KEY', VIEW_ONLY = 'VIEW_ONLY' -} +}*/ // @ADD_ACCOUNT_TODO: move to named enum or other Set export enum FormDataActionType { @@ -37,7 +39,7 @@ export interface FormDataAction { export interface FormData { network: string; account: string; - accountType: string; + accountType: WalletName; label: string; derivationPath: string; } diff --git a/common/v2/services/Account/types.ts b/common/v2/services/Account/types.ts index 8f78838aa..d1139dd65 100644 --- a/common/v2/services/Account/types.ts +++ b/common/v2/services/Account/types.ts @@ -1,4 +1,4 @@ -import { WalletName } from 'config/data'; +import { WalletName } from 'v2/config/data'; export interface Account { label: string; From 8ecc5b3373f8a9e378b81f1e88d7a956c0db2e72 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Mon, 13 May 2019 19:36:52 -0400 Subject: [PATCH 0497/1466] initial styles for mobile complete --- .../WalletDecrypt/WalletDecrypt.scss | 6 ++++ common/v2/components/ContentPanel.tsx | 1 + common/v2/features/AddAccount/AddAccount.scss | 25 ++++++++++++++-- .../features/AddAccount/AddAccountFlow.scss | 1 + .../AddAccount/components/LedgerNano.scss | 29 ++++++++++++++++++- .../AddAccount/components/LedgerNano.tsx | 4 +-- .../components/NetworkSelectPanel.scss | 13 +++++++++ .../components/NetworkSelectPanel.tsx | 4 ++- .../features/AddAccount/components/SafeT.scss | 5 ++++ .../AddAccount/components/Trezor.scss | 23 ++++++++++++++- .../features/AddAccount/components/Trezor.tsx | 4 +-- .../AddAccount/components/ViewOnly.scss | 14 +++++++++ .../AddAccount/components/Web3Provider.scss | 5 ++++ 13 files changed, 124 insertions(+), 10 deletions(-) diff --git a/common/components/WalletDecrypt/WalletDecrypt.scss b/common/components/WalletDecrypt/WalletDecrypt.scss index 02b71fcdc..923979fa2 100644 --- a/common/components/WalletDecrypt/WalletDecrypt.scss +++ b/common/components/WalletDecrypt/WalletDecrypt.scss @@ -156,4 +156,10 @@ $speed: 500ms; .MainPanel { width: 700px; + + @media (max-width: $screen-md) { + width: 300px; + height: 769px; + + } } diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index ae0390e02..aba4622ca 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -10,6 +10,7 @@ import backArrowIcon from 'common/assets/images/icn-back-arrow.svg'; const ContentPanelWrapper = styled.div` @media (max-width: 700px) { max-width: 560px; + padding-left: 0px; } `; diff --git a/common/v2/features/AddAccount/AddAccount.scss b/common/v2/features/AddAccount/AddAccount.scss index 48c157085..804e16d68 100644 --- a/common/v2/features/AddAccount/AddAccount.scss +++ b/common/v2/features/AddAccount/AddAccount.scss @@ -29,18 +29,29 @@ $speed: 500ms; .Panel { width: 562px; -height: 629px; -justify-content: center; + height: 629px; + justify-content: center; // display: flex; // flex-direction: column; position: relative; padding: 2.5em; + + @media only screen and (max-width: 700px) { + width: 375px; + height: 450px; + padding: 1em; + } + &-top { display: flex; } &-content { margin: 2em; + + @media (max-width: 700px) { + margin: 0px; + } } &-back { width: 150px; @@ -56,6 +67,10 @@ justify-content: center; color: var(--dark-slate-blue); text-align: center; + @media (max-width: 700px){ + font-size: 25px; + } + &-connectDevice { justify-content: center; text-align: center; @@ -82,6 +97,11 @@ justify-content: center; padding-top: 16px; position: relative; text-align: center; + + // @media (max-width: 700px) { + // height: 50px; + // } + &-button { position: absolute; bottom: 1em; @@ -119,7 +139,6 @@ justify-content: center; @media (max-width: 700px) { width: 375px; - height: 769px; // flex-wrap: wrap; } } diff --git a/common/v2/features/AddAccount/AddAccountFlow.scss b/common/v2/features/AddAccount/AddAccountFlow.scss index a5c4197a8..b75a1afa0 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.scss +++ b/common/v2/features/AddAccount/AddAccountFlow.scss @@ -5,4 +5,5 @@ .Panel-content-img { margin: 2em; padding-top: 2em; + } diff --git a/common/v2/features/AddAccount/components/LedgerNano.scss b/common/v2/features/AddAccount/components/LedgerNano.scss index a3b3c481e..1ae57cd9a 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.scss +++ b/common/v2/features/AddAccount/components/LedgerNano.scss @@ -7,11 +7,18 @@ position: relative; justify-content: center; + + &-top { display: flex; } &-loading { padding-bottom: 2em; + + @media (max-width: 700px) { + // position: absolute; + // bottom: 0em; + } } &-description { @@ -28,6 +35,10 @@ text-align: center; align-content: center; + @media (max-width: 700px) { + height: 350px; + } + &-content { justify-content: center; text-align: center; @@ -37,11 +48,27 @@ position: relative; bottom: 2em; width: 420px; + + @media (max-width: 700px) { + width:345px; + bottom: 0em; + } } } &-image { vertical-align: center; - margin: 2em; + margin: 4em; padding-top: 2em; + + @media (max-width: 700px) { + margin: 0.25em; + padding: 0.5em; + } + } + + &-footer { + @media (max-width: 700px) { + margin-bottom: 20px; + } } } diff --git a/common/v2/features/AddAccount/components/LedgerNano.tsx b/common/v2/features/AddAccount/components/LedgerNano.tsx index d55ffa22b..dffa74918 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.tsx +++ b/common/v2/features/AddAccount/components/LedgerNano.tsx @@ -95,9 +95,9 @@ class LedgerNanoSDecryptClass extends PureComponent {
              -
              + {/*
              {error || '-'} -
              +
              */} {isLoading ? (
              {translate('WALLET_UNLOCKING')} diff --git a/common/v2/features/AddAccount/components/NetworkSelectPanel.scss b/common/v2/features/AddAccount/components/NetworkSelectPanel.scss index 70b32cc95..c3bfb3f24 100644 --- a/common/v2/features/AddAccount/components/NetworkSelectPanel.scss +++ b/common/v2/features/AddAccount/components/NetworkSelectPanel.scss @@ -9,4 +9,17 @@ display: flex; justify-content: center; align-content: center; + + @media only screen and (max-width: 700px) { + width: 345px; + height: 40px; + } +} + +#NetworkPanel-description { + @media only screen and (max-width: 700px) { + width: 345px; + height: 150px; + } + } \ No newline at end of file diff --git a/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx index bfb7d422a..a297def98 100644 --- a/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx +++ b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx @@ -35,7 +35,9 @@ function NetworkSelectPanel({ formData, formDispatch, goToNextStep }: Props) { return (
              {translate('ADD_ACCOUNT_NETWORK_TITLE')}
              -
              {translate('ADD_ACCOUNT_NETWORK_SELCT')}
              +
              + {translate('ADD_ACCOUNT_NETWORK_SELCT')} +
              {
              -
              + {/*
              {error || '-'} -
              +
              */} {isLoading ? (
              diff --git a/common/v2/features/AddAccount/components/ViewOnly.scss b/common/v2/features/AddAccount/components/ViewOnly.scss index 8ea7013a5..4579926fa 100644 --- a/common/v2/features/AddAccount/components/ViewOnly.scss +++ b/common/v2/features/AddAccount/components/ViewOnly.scss @@ -5,14 +5,28 @@ width: 425px; height: 600px; + @media (max-width: 700px) { + width: 375px; + height: 450px; + padding: 1em; + } + &-title { font-size: 32px; font-weight: bold; + + @media (max-width: 700px) { + text-align: center; + } } &-submit { position: relative; bottom: -4em; width: 420px; + + @media (max-width: 700px) { + width:345px; + } } &-fields { display: flex; diff --git a/common/v2/features/AddAccount/components/Web3Provider.scss b/common/v2/features/AddAccount/components/Web3Provider.scss index ac6c7b424..3f7dd9913 100644 --- a/common/v2/features/AddAccount/components/Web3Provider.scss +++ b/common/v2/features/AddAccount/components/Web3Provider.scss @@ -8,6 +8,11 @@ display: flex; justify-content: center; align-content: center; + + @media (max-width: 700px) { + padding-bottom: 1em; + } + } .MetaMask-footer { From a4c0387b9431c1a2de57feea4f4117aa5a383998 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Mon, 13 May 2019 23:54:32 -0400 Subject: [PATCH 0498/1466] cleaned up / ts error fixes --- common/typescript/custom.d.ts | 10 + common/v2/features/AddAccount/AddAccount.tsx | 749 ------------------ .../v2/features/AddAccount/AddAccountFlow.tsx | 40 - .../AddAccount/AddAccountForm.reducer.tsx | 6 - .../AddAccount/components/Keystore.tsx | 4 +- .../AddAccount/components/LedgerNano.tsx | 7 +- .../AddAccount/components/Mnemonic.tsx | 2 +- .../AddAccount/components/ParitySigner.tsx | 2 +- .../AddAccount/components/PrivateKey.tsx | 2 +- .../features/AddAccount/components/SafeT.tsx | 2 +- .../AddAccount/components/SaveAndRedirect.tsx | 8 - .../components/SelectNetworkPanel.tsx | 43 - .../features/AddAccount/components/Trezor.tsx | 5 +- .../AddAccount/components/WalletList.tsx | 4 - .../AddAccount/components/Web3Provider.tsx | 8 +- .../components/Web3ProviderInstall.tsx | 2 +- common/v2/features/AddAccount/flags.tsx | 2 +- common/v2/features/AddAccount/stories.tsx | 5 +- 18 files changed, 29 insertions(+), 872 deletions(-) delete mode 100644 common/v2/features/AddAccount/AddAccount.tsx delete mode 100644 common/v2/features/AddAccount/components/SelectNetworkPanel.tsx diff --git a/common/typescript/custom.d.ts b/common/typescript/custom.d.ts index 897914a06..f78fa553d 100644 --- a/common/typescript/custom.d.ts +++ b/common/typescript/custom.d.ts @@ -13,6 +13,16 @@ declare module '*.png' { export default content; } +declare module '*.jpg' { + const content: any; + export default content; +} + +declare module '*.webp' { + const content: any; + export default content; +} + declare module '*.html' { const content: string; export default content; diff --git a/common/v2/features/AddAccount/AddAccount.tsx b/common/v2/features/AddAccount/AddAccount.tsx deleted file mode 100644 index cbfddc172..000000000 --- a/common/v2/features/AddAccount/AddAccount.tsx +++ /dev/null @@ -1,749 +0,0 @@ -import React, { Component } from 'react'; -import { TransitionGroup, CSSTransition } from 'react-transition-group'; -import { withRouter, RouteComponentProps, Redirect, Route } from 'react-router'; -import { connect } from 'react-redux'; -import isEmpty from 'lodash/isEmpty'; - -import { - HardwareWalletName, - SecureWalletName, - InsecureWalletName, - WalletName, - knowledgeBaseURL, - MiscWalletName -} from 'config'; -import translate, { translateRaw } from 'translations'; -import { isWeb3NodeAvailable } from 'libs/nodes/web3'; -import { wikiLink as paritySignerHelpLink } from 'libs/wallet/non-deterministic/parity'; -import { AppState } from 'features/reducers'; -import * as derivedSelectors from 'features/selectors'; -import { walletActions, walletSelectors } from 'features/wallet'; -import { transactionFieldsActions } from 'features/transaction'; -import { notificationsActions } from 'features/notifications'; -import LedgerIcon from 'common/assets/images/wallets/ledger.svg'; -import TrezorIcon from 'common/assets/images/wallets/trezor.svg'; -import SafeTIcon from 'common/assets/images/wallets/safe-t.png'; -import ParitySignerIcon from 'common/assets/images/wallets/parity-signer.svg'; -import { Errorable } from 'components'; -import { Warning } from 'components/ui'; -import { DisabledWallets } from './components/disables'; -import { getWeb3ProviderInfo } from 'utils/web3'; -import { - KeystoreDecrypt, - LedgerNanoSDecrypt, - MnemonicDecrypt, - PrivateKeyDecrypt, - PrivateKeyValue, - TrezorDecrypt, - SafeTminiDecrypt, - WalletButton, - ParitySignerDecrypt, - InsecureWalletWarning, - ViewOnlyDecrypt -} from './components'; -import './AddAccount.scss'; -import { Button, ComboBox } from '@mycrypto/ui'; -import { Layout } from 'v2/features'; -import * as WalletActions from 'v2/features/Wallets'; - -import { NetworkOptionsContext, AccountContext } from 'v2/providers'; -import { Account } from 'v2/services/Account/types'; -import { Web3Decrypt } from 'components/WalletDecrypt/components/Web3'; -import { getNetworkByName, isWalletFormatSupportedOnNetwork } from 'v2/libs'; -import { NetworkOptions } from 'v2/services/NetworkOptions/types'; -import { ContentPanel } from 'v2/components'; - -interface OwnProps { - hidden?: boolean; - disabledWallets?: DisabledWallets; - showGenerateLink?: boolean; -} - -interface DispatchProps { - unlockKeystore: WalletActions.TUnlockKeystore; - unlockMnemonic: WalletActions.TUnlockMnemonic; - unlockPrivateKey: WalletActions.TUnlockPrivateKey; - unlockWeb3: WalletActions.TUnlockWeb3; - setWallet: walletActions.TSetWallet; - resetTransactionRequested: transactionFieldsActions.TResetTransactionRequested; - showNotification: notificationsActions.TShowNotification; -} - -interface StateProps { - computedDisabledWallets: DisabledWallets; - isWalletPending: AppState['wallet']['isWalletPending']; - isPasswordPending: AppState['wallet']['isPasswordPending']; - accessMessage: ReturnType; -} - -type Props = OwnProps & StateProps & DispatchProps & RouteComponentProps<{}>; - -type UnlockParams = {} | PrivateKeyValue; - -interface AddAccountData { - address: string; - accountType: WalletName; - label: string | null; - network: string; - derivationPath: string; -} - -interface State { - selectedWalletKey: WalletName | null; - isInsecureOverridden: boolean; - value: UnlockParams | null; - hasSelectedNetwork: boolean; - seed: string; - hasSelectedAddress: boolean; - accountData: AddAccountData; -} - -interface BaseWalletInfo { - lid: string; - component: any; - initialParams: object; - unlock: any; - attemptUnlock?: boolean; - redirect?: string; - helpLink: string; - isReadOnly?: boolean; - accountType?: WalletName; -} - -export interface SecureWalletInfo extends BaseWalletInfo { - icon?: string; - description: string; -} - -export interface InsecureWalletInfo extends BaseWalletInfo { - example: string; -} - -export interface MiscWalletInfo extends BaseWalletInfo { - description: string; -} - -type HardwareWallets = { [key in HardwareWalletName]: SecureWalletInfo }; -type SecureWallets = { [key in SecureWalletName]: SecureWalletInfo }; -type InsecureWallets = { [key in InsecureWalletName]: InsecureWalletInfo }; -type MiscWallet = { [key in MiscWalletName]: MiscWalletInfo }; -type Wallets = HardwareWallets & SecureWallets & InsecureWallets & MiscWallet; - -const HARDWARE_WALLETS = Object.values(HardwareWalletName); -/** @desc Hardware wallets are secure too, but we want to avoid duplication. */ -const SECURE_WALLETS = Object.values(SecureWalletName).filter( - value => !HARDWARE_WALLETS.includes(value) -); -const INSECURE_WALLETS = Object.values(InsecureWalletName); -const MISC_WALLETS = Object.values(MiscWalletName); - -const web3info = getWeb3ProviderInfo(); - -const WalletDecrypt = withRouter( - class WalletDecryptClass extends Component & Props, State> { - // https://github.com/Microsoft/TypeScript/issues/13042 - // index signature should become [key: Wallets] (from config) once typescript bug is fixed - public WALLETS: Wallets = { - [SecureWalletName.WEB3]: { - lid: web3info.lid, - icon: web3info.icon, - description: 'ADD_WEB3DESC', - component: Web3Decrypt, - initialParams: {}, - unlock: WalletActions.unlockWeb3, - attemptUnlock: true, - helpLink: `${knowledgeBaseURL}/how-to/migrating/moving-from-mycrypto-to-metamask` - }, - [SecureWalletName.LEDGER_NANO_S]: { - lid: 'X_LEDGER', - icon: LedgerIcon, - description: 'ADD_HARDWAREDESC', - component: LedgerNanoSDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - helpLink: 'https://support.ledger.com/hc/en-us/articles/360008268594' - }, - [SecureWalletName.TREZOR]: { - lid: 'X_TREZOR', - icon: TrezorIcon, - description: 'ADD_HARDWAREDESC', - component: TrezorDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - helpLink: `${knowledgeBaseURL}/how-to/migrating/moving-from-mycrypto-to-trezor` - }, - [SecureWalletName.SAFE_T]: { - lid: 'X_SAFE_T', - icon: SafeTIcon, - description: 'ADD_HARDWAREDESC', - component: SafeTminiDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - // TODO - Update with the right id once available - helpLink: 'https://www.archos.com/fr/products/crypto/faq.html' - }, - [SecureWalletName.PARITY_SIGNER]: { - lid: 'X_PARITYSIGNER', - icon: ParitySignerIcon, - description: 'ADD_PARITY_DESC', - component: ParitySignerDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - helpLink: paritySignerHelpLink - }, - [InsecureWalletName.KEYSTORE_FILE]: { - lid: 'X_KEYSTORE2', - example: 'UTC--2017-12-15T17-35-22.547Z--6be6e49e82425a5aa56396db03512f2cc10e95e8', - component: KeystoreDecrypt, - initialParams: { - file: '', - password: '' - }, - unlock: WalletActions.unlockKeystore, - helpLink: `${knowledgeBaseURL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types` - }, - [InsecureWalletName.MNEMONIC_PHRASE]: { - lid: 'X_MNEMONIC', - example: 'brain surround have swap horror cheese file distinct', - component: MnemonicDecrypt, - initialParams: {}, - unlock: this.props.unlockMnemonic, - helpLink: `${knowledgeBaseURL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types` - }, - [InsecureWalletName.PRIVATE_KEY]: { - lid: 'X_PRIVKEY2', - example: 'f1d0e0789c6d40f399ca90cc674b7858de4c719e0d5752a60d5d2f6baa45d4c9', - component: PrivateKeyDecrypt, - initialParams: { - key: '', - password: '' - }, - unlock: WalletActions.unlockPrivateKey, - helpLink: `${knowledgeBaseURL}/general-knowledge/ethereum-blockchain/difference-between-wallet-types` - }, - [MiscWalletName.VIEW_ONLY]: { - lid: 'VIEW_ADDR', - description: 'ADD_VIEW_ADDRESS_DESC', - component: ViewOnlyDecrypt, - initialParams: {}, - unlock: this.props.setWallet, - helpLink: '', - isReadOnly: true - } - }; - - public state: State = { - selectedWalletKey: null, - isInsecureOverridden: false, - value: null, - hasSelectedNetwork: false, - seed: '', - hasSelectedAddress: false, - accountData: { - address: '', - network: 'Ethereum', - label: 'New Account', - accountType: InsecureWalletName.PRIVATE_KEY, - derivationPath: '' - } - }; - - public exists: boolean = true; - - public UNSAFE_componentWillReceiveProps(nextProps: Props) { - // Reset state when unlock is hidden / revealed - if (nextProps.hidden !== this.props.hidden) { - this.setState({ - value: 0, - selectedWalletKey: null - }); - } - } - - public componentWillUnmount() { - this.exists = false; - } - - public getSelectedWallet() { - const { selectedWalletKey } = this.state; - if (!selectedWalletKey) { - return null; - } - - return this.WALLETS[selectedWalletKey]; - } - - public handleCreateAccount = (createAccount: ((newAccount: Account) => void)) => { - const { accountData } = this.state; - const network: NetworkOptions | undefined = getNetworkByName(accountData.network); - const newAccount: Account = { - ...accountData, - assets: network ? network.unit : 'DefaultAsset', - value: 0, - label: 'New Account', - localSettings: 'default', - transactionHistory: '' - }; - createAccount(newAccount); - }; - - public handleCompleteFlow() { - return ( - - {({ createAccount }) => { - this.handleCreateAccount(createAccount); - return ( - - - - ); - }} - - ); - } - - public getDecryptionComponent() { - const { selectedWalletKey, isInsecureOverridden } = this.state; - const selectedWallet = this.getSelectedWallet(); - - if (!selectedWalletKey || !selectedWallet) { - return null; - } - - const isInsecure = INSECURE_WALLETS.includes(selectedWalletKey); - if (isInsecure && !isInsecureOverridden && !process.env.BUILD_DOWNLOADABLE) { - return ( -
              - - {process.env.NODE_ENV !== 'production' && ( - - )} -
              - ); - } - - return ( -
              - {/* Possibily use a ternary operator to determine which panels to render? */} - -
              -
              -
              - {!selectedWallet.isReadOnly && translate('UNLOCK_WALLET')} -
              - {!selectedWallet.isReadOnly && `Your ${translateRaw(selectedWallet.lid)}`} -
              -
              - - { - if (selectedWallet.redirect) { - this.props.history.push(selectedWallet.redirect); - } - this.onUnlock(value); - }} - showNotification={this.props.showNotification} - isWalletPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isWalletPending - : undefined - } - isPasswordPending={ - this.state.selectedWalletKey === InsecureWalletName.KEYSTORE_FILE - ? this.props.isPasswordPending - : undefined - } - seed={this.state.seed} - onSeed={this.handleSeed} - /> - -
              -
              -
              -
              - ); - } - - public buildWalletOptions() { - const { computedDisabledWallets, accessMessage } = this.props; - const { reasons } = computedDisabledWallets; - - return ( -
              -

              {translate('DECRYPT_ACCESS')}

              -
              - {translate('ADD_ACCOUNT_DESCRIPTION')} -
              - {accessMessage && ( -
              - {accessMessage} -
              - )} -
              -
              - {HARDWARE_WALLETS.map((walletType: SecureWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} -
              -
              - {SECURE_WALLETS.map((walletType: SecureWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} - {MISC_WALLETS.map((walletType: MiscWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} -
              - -
              - {INSECURE_WALLETS.map((walletType: InsecureWalletName) => { - const wallet = this.WALLETS[walletType]; - return ( - - ); - })} -
              -
              - -
              {translate('ADD_ACCOUNT_FOOTER_LINK')}
              -
              - ); - } - - public selectNetworkComponent() { - return ( -
              -
              Select Network
              -
              {translate('ADD_ACCOUNT_NETWORK_SELCT')}
              - - - {({ networkOptions = [] }) => { - const networkNames: any[] = []; - networkOptions.map(en => { - if (isWalletFormatSupportedOnNetwork(en, this.state.accountData.accountType)) { - networkNames.push(en.name); - } - }); - console.log(networkNames); - return ( - { - this.setState({ accountData: { ...this.state.accountData, network: value } }); - }} - placeholder="Ethereum" - /> - ); - }} - - -
              - ); - } - - public handleNetworkSelect = () => { - this.setState({ hasSelectedNetwork: true }); - }; - - public handleWalletChoice = async (walletType: WalletName) => { - const { showNotification } = this.props; - const wallet = this.WALLETS[walletType]; - this.setState({ accountData: { ...this.state.accountData, accountType: walletType } }); - if (!wallet) { - return; - } - - let timeout = 0; - if (wallet.attemptUnlock) { - try { - const web3Available = await isWeb3NodeAvailable(); - if (web3Available) { - // timeout is only the maximum wait time before secondary view is shown - // send view will be shown immediately on web3 resolve - timeout = 1000; - wallet.unlock(); - } - } catch (e) { - // The permissions request for MetaMask was displayed, but permission was denied. - showNotification('danger', translateRaw('METAMASK_PERMISSION_DENIED')); - } - } - - window.setTimeout(() => { - if (this.exists) { - this.setState({ - selectedWalletKey: walletType, - value: wallet.initialParams - }); - } - }, timeout); - }; - - public returnToSender = () => { - this.setState({ - selectedWalletKey: null, - isInsecureOverridden: false, - value: null, - hasSelectedNetwork: false, - hasSelectedAddress: false, - accountData: { - address: '', - network: 'Ethereum', - label: 'New Account', - accountType: MiscWalletName.VIEW_ONLY, - derivationPath: '' - } - }); - }; - /* - public clearWalletChoice = () => { - this.setState({ - selectedWalletKey: null, - value: 0, - hasSelectedNetwork: false, - accountData: { - ...this.state.accountData, - network: '' - } - }); - }; - - public clearAddressChoice = () => { - this.setState({ - hasSelectedAddress: false, - accountData: { - ...this.state.accountData, - address: '', - derivationPath: '' - } - }); - };*/ - - public render() { - const { hidden } = this.props; - const selectedWallet = this.getSelectedWallet(); - const decryptionComponent = this.getDecryptionComponent(); - const selectNetworkComponent = this.selectNetworkComponent(); - const confirmComponent = this.handleCompleteFlow(); - let componentToRender: JSX.Element; - - if (!hidden && decryptionComponent && selectedWallet && !this.state.hasSelectedNetwork) { - componentToRender = ( - <> - - - - {selectNetworkComponent} - - - - - ); - } else if (this.state.hasSelectedNetwork && this.state.hasSelectedAddress) { - componentToRender = ( - -
              - - - {confirmComponent} - - -
              -
              - ); - } else if (!hidden && decryptionComponent && selectedWallet) { - componentToRender = ( - -
              - - - {decryptionComponent} - - -
              -
              - ); - } else { - componentToRender = ( - -
              - - - {this.buildWalletOptions()} - - -
              -
              - ); - } - return componentToRender; - } - - public onChange = (value: UnlockParams) => { - this.setState({ value }); - }; - - public onUnlock = async (payload: any) => { - const { value, selectedWalletKey } = this.state; - if (!selectedWalletKey) { - return; - } - // some components (TrezorDecrypt) don't take an onChange prop, and thus - // this.state.value will remain unpopulated. in this case, we can expect - // the payload to contain the unlocked wallet info. - const unlockValue = value && !isEmpty(value) ? value : payload; - if (this.state.accountData.accountType === 'viewOnly') { - this.setState({ - hasSelectedAddress: true, - accountData: { - ...this.state.accountData, - address: unlockValue.getAddressString() - } - }); - } else if ( - this.state.accountData.accountType === 'keystoreFile' || - this.state.accountData.accountType === 'privateKey' || - this.state.accountData.accountType === 'web3' - ) { - const wallet = await this.WALLETS[selectedWalletKey].unlock(unlockValue); - this.setState({ - hasSelectedAddress: true, - accountData: { - ...this.state.accountData, - address: wallet.getAddressString() - } - }); - } else if (this.state.accountData.accountType === 'paritySigner') { - this.setState({ - hasSelectedAddress: true, - accountData: { - ...this.state.accountData, - derivationPath: '', - address: unlockValue.address - } - }); - } else { - this.setState({ - hasSelectedAddress: true, - accountData: { - ...this.state.accountData, - derivationPath: - unlockValue.path || unlockValue.dPath + '/' + unlockValue.index.toString(), - address: unlockValue.address - } - }); - } - }; - - private isWalletDisabled = (walletKey: WalletName) => { - return this.props.computedDisabledWallets.wallets.indexOf(walletKey) !== -1; - }; - - private overrideInsecureWarning = () => { - if (process.env.NODE_ENV !== 'production') { - this.setState({ isInsecureOverridden: true }); - } - }; - - private handleSeed = (seed: string) => this.setState({ seed }); - } -); - -function mapStateToProps(state: AppState, ownProps: Props) { - const { disabledWallets } = ownProps; - let computedDisabledWallets = derivedSelectors.getDisabledWallets(state); - - if (disabledWallets) { - computedDisabledWallets = { - wallets: [...computedDisabledWallets.wallets, ...disabledWallets.wallets], - reasons: { - ...computedDisabledWallets.reasons, - ...disabledWallets.reasons - } - }; - } - - return { - computedDisabledWallets, - isWalletPending: state.wallet.isWalletPending, - isPasswordPending: state.wallet.isPasswordPending, - accessMessage: walletSelectors.getWalletAccessMessage(state) - }; -} - -export default connect(mapStateToProps, { - unlockMnemonic: WalletActions.unlockMnemonic, - resetTransactionRequested: transactionFieldsActions.resetTransactionRequested, - showNotification: notificationsActions.showNotification -})(WalletDecrypt) as React.ComponentClass; diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index 449857c31..2af24d382 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -53,51 +53,11 @@ function AddAccountFlow() { }; const onUnlock = async (payload: any) => { - console.log('onUnlock'); - console.log(payload); // 1. Let reducer handle the differences. Infact this updateFormState could // be simplified by having each component call `updateFormState` themselves. await updateFormState({ type: ActionType.ON_UNLOCK, payload }); // 2. continue once it's done. goToNextStep(); - - // console.log('UNLOCK CALLED') - // // some components (TrezorDecrypt) don't take an onChange prop, and thus - // // this.state.value will remain unpopulated. in this case, we can expect - // // the payload to contain the unlocked wallet info. - // const unlockValue = payload; - // console.log(unlockValue) - // - // console.log(payload); - // console.log(formData) - // if (formData.accountType === WalletName.VIEW_ONLY) { - // updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.getAddressString() }}) - // updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) - // } else if ( - // formData.accountType === WalletName.KEYSTORE_FILE || - // formData.accountType === WalletName.PRIVATE_KEY || - // formData.accountType === WalletName.WEB3PROVIDER - // ) { - // console.log('got here??') - // const wallet = await STORIES[formData.accountType].unlock(unlockValue); - // updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: wallet.getAddressString() }}) - // updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) - // } else if (formData.accountType === WalletName.PARITY_SIGNER) { - // updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.address }}) - // updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: '' }}) - // } else if (formData.accountType === MNEMONIC_PHRASE - // || formData.accountType === LEDGER - // || formData.accountType === TREZOR - // || formData.accountType === SAFE_T - // ) { - // updateFormState({ type: ActionType.SELECT_ACCOUNT, payload: { account: unlockValue.address }}) - // updateFormState({ type: ActionType.SET_DERIVATION_PATH, payload: { derivationPath: unlockValue.path || unlockValue.dPath + '/' + unlockValue.index.toString() }}) - // } - // console.log('got here?') - // //updateFormState({ type: ActionType.ON_UNLOCK, payload: '' }) - // - // console.log(formData); - // goToNextStep(); }; const onWalletSelection = (name: WalletName) => { diff --git a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx index 096256205..30978ecdc 100644 --- a/common/v2/features/AddAccount/AddAccountForm.reducer.tsx +++ b/common/v2/features/AddAccount/AddAccountForm.reducer.tsx @@ -25,15 +25,9 @@ export const formReducer = (formData: FormData, action: FormDataAction) => { return { ...formData, account }; case ActionType.SELECT_ACCOUNT_TYPE: const { accountType } = action.payload; - console.log('got heree???'); - console.log(action.payload); return { ...formData, accountType }; case ActionType.ON_UNLOCK: - console.log('payload1'); - console.log(action.payload); const accountAndDerivationPath = handleUnlock(formData.accountType, action.payload); - console.log('accountAndDerivationPath'); - console.log(accountAndDerivationPath); return { ...formData, ...accountAndDerivationPath }; case ActionType.SET_LABEL: const { label } = action.payload; diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 49029623c..b84791c88 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -49,7 +49,7 @@ export class KeystoreDecrypt extends PureComponent { }; public render() { - const { isWalletPending, wallet } = this.props; + const { isWalletPending } = this.props; const { file, password, filename } = this.state; const passReq = file ? isPassRequired(file) : true; const unlockDisabled = !file || (passReq && !password); @@ -57,7 +57,7 @@ export class KeystoreDecrypt extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} {`Your ${translateRaw(wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw('X_KEYSTORE2')}`}
              diff --git a/common/v2/features/AddAccount/components/LedgerNano.tsx b/common/v2/features/AddAccount/components/LedgerNano.tsx index dffa74918..8a3632fb0 100644 --- a/common/v2/features/AddAccount/components/LedgerNano.tsx +++ b/common/v2/features/AddAccount/components/LedgerNano.tsx @@ -51,8 +51,7 @@ class LedgerNanoSDecryptClass extends PureComponent { } public render() { - const { dPath, publicKey, chainCode, error, isLoading } = this.state; - const showErr = error ? 'is-showing' : ''; + const { dPath, publicKey, chainCode, isLoading } = this.state; if (!dPath) { return ; @@ -87,7 +86,7 @@ class LedgerNanoSDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw('X_LEDGER')}`}
              @@ -156,8 +155,6 @@ class LedgerNanoSDecryptClass extends PureComponent { }; private handleUnlock = (address: string, index: number) => { - console.log('ledgerUnlock'); - console.log(new LedgerWallet(address, this.state.dPath.value, index)); this.props.onUnlock(new LedgerWallet(address, this.state.dPath.value, index)); this.reset(); }; diff --git a/common/v2/features/AddAccount/components/Mnemonic.tsx b/common/v2/features/AddAccount/components/Mnemonic.tsx index 49fbf2ab8..2a44c1356 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.tsx +++ b/common/v2/features/AddAccount/components/Mnemonic.tsx @@ -71,7 +71,7 @@ class MnemonicDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw('X_MNEMONIC')}`}
              diff --git a/common/v2/features/AddAccount/components/ParitySigner.tsx b/common/v2/features/AddAccount/components/ParitySigner.tsx index 72ad2f16d..10387daef 100644 --- a/common/v2/features/AddAccount/components/ParitySigner.tsx +++ b/common/v2/features/AddAccount/components/ParitySigner.tsx @@ -36,7 +36,7 @@ class ParitySignerDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw('X_PARITYSIGNER')}`}
              {/*
              {translate('SIGNER_SELECT_WALLET')}
              */} diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index 96b7d18e9..781eea907 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -83,7 +83,7 @@ export class PrivateKeyDecrypt extends PureComponent { placeholder={translateRaw('X_PRIVKEY2')} isValid={isValidPkey} onChange={this.onPkeyChange} - onEnter={this.unlock} + onEnter={() => this.unlock} />
              diff --git a/common/v2/features/AddAccount/components/SafeT.tsx b/common/v2/features/AddAccount/components/SafeT.tsx index 6d52e8ab7..00a289fdc 100644 --- a/common/v2/features/AddAccount/components/SafeT.tsx +++ b/common/v2/features/AddAccount/components/SafeT.tsx @@ -75,7 +75,7 @@ class SafeTminiDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw('X_SAFE_T')}`}
              diff --git a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx index cde5862f9..203b00cd1 100644 --- a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx +++ b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx @@ -11,14 +11,8 @@ import { Account } from 'v2/services/Account/types'; */ function SaveAndRedirect(payload: { formData: FormData }) { const { createAccount } = useContext(AccountContext); - console.log('gotTo SaveAndRedirect'); - useEffect(() => { const network: NetworkOptions | undefined = getNetworkByName(payload.formData.network); - console.log('payload'); - console.log(payload); - console.log('network'); - console.log(network); const account: Account = { address: payload.formData.account, network: payload.formData.network, @@ -30,8 +24,6 @@ function SaveAndRedirect(payload: { formData: FormData }) { localSettings: 'default', transactionHistory: '' }; - console.log('Account to add'); - console.log(account); createAccount(account); }); diff --git a/common/v2/features/AddAccount/components/SelectNetworkPanel.tsx b/common/v2/features/AddAccount/components/SelectNetworkPanel.tsx deleted file mode 100644 index 9b1df9f73..000000000 --- a/common/v2/features/AddAccount/components/SelectNetworkPanel.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React, { Component } from 'react'; -import { Button, ComboBox, Typography } from '@mycrypto/ui'; - -import styled from 'styled-components'; - -// const SelectNetworkStyled = styled.div` -// width: 100%; -// `; - -const TitleTypography = styled(Typography)` - width: 421px; - height: 39px; - font-family: Lato; - font-size: 32px; - font-weight: bold; - font-style: normal; - font-stretch: normal; - line-height: normal; - letter-spacing: normal; - text-align: center; - color: var(--dark-slate-blue); -`; - -export default class SelectNetworkPanel extends Component { - public render() { - return ( -
              - Select Network - - Select the blockchain that you want to operate with. Not sure what to choose? Stick with - the default choices below and click next. - - - - - - -
              - ); - } -} diff --git a/common/v2/features/AddAccount/components/Trezor.tsx b/common/v2/features/AddAccount/components/Trezor.tsx index 44a218c60..66bcb8e32 100644 --- a/common/v2/features/AddAccount/components/Trezor.tsx +++ b/common/v2/features/AddAccount/components/Trezor.tsx @@ -49,8 +49,7 @@ class TrezorDecryptClass extends PureComponent { } public render() { - const { dPath, publicKey, chainCode, error, isLoading } = this.state; - const showErr = error ? 'is-showing' : ''; + const { dPath, publicKey, chainCode, isLoading } = this.state; if (!dPath) { return ; @@ -74,7 +73,7 @@ class TrezorDecryptClass extends PureComponent { return (
              - {translate('UNLOCK_WALLET')} {`Your ${translateRaw(this.props.wallet.lid)}`} + {translate('UNLOCK_WALLET')} {`Your ${translateRaw('X_TREZOR')}`}
              diff --git a/common/v2/features/AddAccount/components/WalletList.tsx b/common/v2/features/AddAccount/components/WalletList.tsx index 0a8628850..287862b3f 100644 --- a/common/v2/features/AddAccount/components/WalletList.tsx +++ b/common/v2/features/AddAccount/components/WalletList.tsx @@ -13,9 +13,6 @@ export default class WalletList extends PureComponent { public render() { const { wallets, onSelect } = this.props; const validWallets = wallets.filter(w => !w.hideFromWalletList); // @TODO Filter here according to electronOnly - console.log('wallets'); - console.log(wallets); - console.log(validWallets); return (

              {translate('DECRYPT_ACCESS')}

              @@ -25,7 +22,6 @@ export default class WalletList extends PureComponent {
              {validWallets.map(wallet => { - console.log(wallet.name); return ( { const walletPayload = await unlockWeb3(); onUnlock(walletPayload); @@ -40,7 +41,10 @@ function Web3ProviderDecrypt({ wallet, onUnlock }: Props) { />
              - +
              diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx index 30d6b5dca..1de973bca 100644 --- a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx @@ -79,7 +79,7 @@ function InstallMetaMask({ onUnlock }: Props) { } function Web3ProviderInstall(props: Props) { - return <>{IS_MOBILE ? : }; + return <>{IS_MOBILE ? : }; } export default Web3ProviderInstall; diff --git a/common/v2/features/AddAccount/flags.tsx b/common/v2/features/AddAccount/flags.tsx index f7b810c49..dcaf4e803 100644 --- a/common/v2/features/AddAccount/flags.tsx +++ b/common/v2/features/AddAccount/flags.tsx @@ -5,4 +5,4 @@ export const IS_ELECTRON = process.env.BUILD_DOWNLOADABLE; export const IS_MOBILE = window && window.navigator ? /iPhone|iPad|iPod|Android/i.test(window.navigator.userAgent) : false; -export const HAS_WEB3_PROVIDER = window && typeof window.web3 !== 'undefined'; +export const HAS_WEB3_PROVIDER = window && 'web3' in window; diff --git a/common/v2/features/AddAccount/stories.tsx b/common/v2/features/AddAccount/stories.tsx index 8b73555b6..351311dde 100644 --- a/common/v2/features/AddAccount/stories.tsx +++ b/common/v2/features/AddAccount/stories.tsx @@ -1,6 +1,5 @@ import { knowledgeBaseURL as KB_URL } from 'config'; import { - walletNames, DefaultWalletName, SecureWalletName, InsecureWalletName, @@ -43,8 +42,7 @@ import ParitySignerSVG from 'common/assets/images/wallets/parity-signer.svg'; // 2. Merge enums and names with the ones in common/v2/config/accountTypes.ts const web3ProviderInfo = getWeb3ProviderInfo(); -console.log('walletNames'); -console.log(walletNames); + export const STORIES = [ { name: DefaultWalletName.DEFAULT, @@ -58,7 +56,6 @@ export const STORIES = [ icon: web3ProviderInfo.icon, description: 'ADD_WEB3DESC', helpLink: `${KB_URL}/how-to/migrating/moving-from-mycrypto-to-metamask`, - // steps: [NetworkSelectPanel, Web3ProviderDecrypt, SaveAndRedirect], steps: HAS_WEB3_PROVIDER ? [NetworkSelectPanel, Web3ProviderDecrypt, SaveAndRedirect] : [Web3ProviderInstall] From a5d43453b30537f9f68057496c46ff1a08bb3837 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Tue, 14 May 2019 00:36:58 -0400 Subject: [PATCH 0499/1466] fix no web3 views on web/mobile --- common/translations/lang/en.json | 3 ++- .../v2/features/AddAccount/AddAccountFlow.scss | 10 ++++++++++ .../components/Web3ProviderInstall.tsx | 16 +++++++--------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index f19b5972e..68a336557 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -855,6 +855,7 @@ "SCREEN_LOCK_TAB_TITLE_LOCKING": "Locking Screen in", "KEYSTORE_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-keystore-file)", "MNEMONIC_HELP":"Not working? [Here's some troubleshooting tips to try](https://support.mycrypto.com/how-to/accessing-wallet/how-to-access-your-wallet-with-mnemonic-phrase)", - "MNEMONIC_TOOL_TIP": "If you created a Mnemonic Phrase on another website, you may have a password for this account" + "MNEMONIC_TOOL_TIP": "If you created a Mnemonic Phrase on another website, you may have a password for this account", + "METAMASK_DOWNLOAD": "Download MetaMask" } } diff --git a/common/v2/features/AddAccount/AddAccountFlow.scss b/common/v2/features/AddAccount/AddAccountFlow.scss index b75a1afa0..7f6eba82c 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.scss +++ b/common/v2/features/AddAccount/AddAccountFlow.scss @@ -5,5 +5,15 @@ .Panel-content-img { margin: 2em; padding-top: 2em; + display: flex; + justify-content: center; + @media (max-width: 700px) { + margin: 0.5em; + padding-top: 0.5em; + } } + +.MetaMaskPanel-footer{ + text-align: center; +} \ No newline at end of file diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx index 1de973bca..20aa48560 100644 --- a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx @@ -61,18 +61,16 @@ function InstallMetaMask({ onUnlock }: Props) {
              -
              -
              - {translate('ADD_ACCOUNT_WEB3_INSTALL_FOOTER')}{' '} - -
              +
              + {translate('ADD_ACCOUNT_WEB3_INSTALL_FOOTER')}
              +
              ); From bd7ebe766e447505b8414f1b93220041dfb0a608 Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Tue, 14 May 2019 13:36:26 +0200 Subject: [PATCH 0500/1466] Create wallet with keystore all panels layouts --- common/assets/images/icn-lock-safety.svg | 20 ++++ common/translations/lang/en.json | 15 ++- .../CreateWallet/Keystore/Keystore.tsx | 13 ++- .../components/GenerateKeystoreFilePanel.tsx | 2 +- .../Keystore/components/MakeBackupPanel.tsx | 86 +++++++++++++++++ .../components/SaveKeystoreFilePanel.tsx | 7 +- .../components/VerifyKeystorePanel.tsx | 96 +++++++++++++++++++ .../CreateWallet/Keystore/components/index.ts | 2 + .../CreateWallet/Keystore/constants.ts | 19 +++- .../components/SelectNetworkPanel.scss | 5 - 10 files changed, 243 insertions(+), 22 deletions(-) create mode 100644 common/assets/images/icn-lock-safety.svg create mode 100644 common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx create mode 100644 common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx delete mode 100644 common/v2/features/CreateWallet/components/SelectNetworkPanel.scss diff --git a/common/assets/images/icn-lock-safety.svg b/common/assets/images/icn-lock-safety.svg new file mode 100644 index 000000000..20d048995 --- /dev/null +++ b/common/assets/images/icn-lock-safety.svg @@ -0,0 +1,20 @@ + + + + F0739086-BD8C-4061-9ABD-93792C7F5EB2 + Created with sketchtool. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 62a101ba5..87bc70c12 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -836,8 +836,17 @@ "SAVE_KEYSTORE_DESCRIPTION_1":"**Don't lose it.** It can't be recovered if you lose it.", "SAVE_KEYSTORE_DESCRIPTION_2":"**Don't share it.** Your funds will be stolen if you use this on a malicious site.", "SAVE_KEYSTORE_DESCRIPTION_3":"**Keep it offline.** Your funds are safest offline (on a USB drive or something similar). We don't recommend keeping your file on any cloud services like Dropbox, Google Drive, etc.", - "SAVE_KEYSTORE_BUTTON":"Download Keystore File" - - + "SAVE_KEYSTORE_BUTTON":"Download Keystore File", + "MAKE_BACKUP_TITLE": "Make a Backup", + "MAKE_BACKUP_DESCRIPTION_1": "Remember, a **private key** + a **password** = a **keystore file.**", + "MAKE_BACKUP_DESCRIPTION_2": "Make a backup of your **private key** in case you ever lose your **keystore file.**", + "MAKE_BACKUP_DESCRIPTION_3": "We recommend you print it out twice and store them in two separate, safe, and secret locations. Do not share them with others, save them online, or take a photo of them.", + "MAKE_BACKUP_PRINT_BUTTON": "Print Private Key", + "YOUR_PRIVATE_KEY_LABEL": "Your Private Key", + "VERIFY_KEYSTORE_TITLE": "Verify Keystore File or Private Key", + "VERIFY_KEYSTORE_DESCRIPTION": "Select your keystore file or enter your private key to ensure you have it backed up properly.", + "YOUR_KEYSTORE_LABEL":"Your Keystore File", + "UPLOAD_KEYSTORE_LABEL": "Upload Keystore File", + "DONE_AND_RETURN_LABEL": "Done: Return to Dashboard" } } diff --git a/common/v2/features/CreateWallet/Keystore/Keystore.tsx b/common/v2/features/CreateWallet/Keystore/Keystore.tsx index 6b92c1e21..9a8bb922e 100644 --- a/common/v2/features/CreateWallet/Keystore/Keystore.tsx +++ b/common/v2/features/CreateWallet/Keystore/Keystore.tsx @@ -17,9 +17,12 @@ export default class CreateWallet extends Component> { onBack: this.regressToPreviousStage, onNext: this.advanceToNextStage }; - const isKeystorePanel = [KeystoreStages.GenerateKeystore, KeystoreStages.SaveKeystore].includes( - stage - ); + const isKeystorePanel = [ + KeystoreStages.GenerateKeystore, + KeystoreStages.SaveKeystore, + KeystoreStages.MakeBackup, + KeystoreStages.VerifyKeystore + ].includes(stage); return ( @@ -27,10 +30,10 @@ export default class CreateWallet extends Component> {
              {isKeystorePanel ? ( - {({}) => } + {({}) => } ) : ( - + )}
              diff --git a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx index 04832e2ab..6097033b4 100644 --- a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx @@ -51,7 +51,7 @@ export default function GenerateKeystoreFilePanel({ onBack, onNext }: PanelProps onBack={onBack} stepper={{ current: 1, - total: 3 + total: 5 }} heading={translateRaw('NEW_WALLET_KEYSTORE_TITLE')} description={} diff --git a/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx b/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx new file mode 100644 index 000000000..41ec0fc07 --- /dev/null +++ b/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx @@ -0,0 +1,86 @@ +import React from 'react'; +import { Button, Typography } from '@mycrypto/ui'; +import styled from 'styled-components'; + +import { ExtendedContentPanel } from 'v2/components'; +import { PanelProps } from '../../CreateWallet'; +import translate, { translateRaw } from 'translations'; +import lockSafetyIcon from 'common/assets/images/icn-lock-safety.svg'; + +const DescriptionItem = styled(Typography)` + margin-top: 18px; + font-weight: normal; + font-size: 18px !important; + + strong { + font-weight: 900; + } +`; + +const ButtonsWrapper = styled.div` + margin-top: 48px; + display: flex; + flex-direction: column; +`; +const StyledButton = styled(Button)` + font-size: 18px; + margin-bottom: 16px; + width: 100%; +`; + +const ImageWrapper = styled.div` + display: flex; + justify-content: center; + margin-top: 33px; + margin-bottom: 25px; +`; + +const PrivateKeyWrapper = styled.div` + font-size: 20px; + margin-top: 18px; +`; + +const PrivateKeyField = styled.div` + width: 100%; + font-size: 18px; + border: solid 1px #e5ecf3; + background-color: rgba(247, 247, 247, 0.4); + word-wrap: break-word; + padding: 8px 18px; + margin-top: 8px; +`; + +export default function MakeBackupPanel({ onBack, onNext }: PanelProps) { + return ( + + + + + + {translate('MAKE_BACKUP_DESCRIPTION_1')} + {translate('MAKE_BACKUP_DESCRIPTION_2')} + {translate('MAKE_BACKUP_DESCRIPTION_3')} + + + {translate('YOUR_PRIVATE_KEY_LABEL')} + + afdfd9c3d2095ef696594f6cedcae59e72dcd697e2a7521b1578140422a4f890 + + + + + {translate('MAKE_BACKUP_PRINT_BUTTON')} + + {translate('ACTION_6')} + + + ); +} diff --git a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx index f0e1c727e..fe727cec5 100644 --- a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx @@ -4,7 +4,7 @@ import styled from 'styled-components'; import { ExtendedContentPanel } from 'v2/components'; import { PanelProps } from '../../CreateWallet'; -import translate from 'translations'; +import translate, { translateRaw } from 'translations'; import keystoreIcon from 'common/assets/images/icn-keystore.svg'; const DescriptionItem = styled(Typography)` @@ -41,10 +41,9 @@ export default function SaveKeystoreFilePanel({ onBack, onNext }: PanelProps) { onBack={onBack} stepper={{ current: 3, - total: 3 + total: 5 }} - heading="Save Your Keystore File" - className="SaveKeystoreFilePanel" + heading={translateRaw('SAVE_KEYSTORE_TITLE')} > diff --git a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx new file mode 100644 index 000000000..6c8481b4c --- /dev/null +++ b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx @@ -0,0 +1,96 @@ +import React from 'react'; +import { Button, Textarea, Input } from '@mycrypto/ui'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import styled from 'styled-components'; + +import { ExtendedContentPanel } from 'v2/components'; +import { PanelProps } from '../../CreateWallet'; +import translate, { translateRaw } from 'translations'; + +const ButtonsWrapper = styled.div` + margin-top: 48px; + display: flex; + flex-direction: column; +`; +const StyledButton = styled(Button)` + font-size: 18px; + margin-bottom: 16px; + width: 100%; +`; + +const FormItemWrapper = styled.div` + font-size: 20px; + margin-top: 28px; +`; + +const StyledTextArea = styled(Textarea)` + font-size: 18px; + resize: none; + width: 100%; + height: 75px; + margin-top: 8px; + padding: 8px 18px; +`; + +const Divider = styled.div` + margin-top: 28px; + margin-bottom: 22px; + width: 100%; + text-align: center; + font-size: 20px; + color: ${props => props.theme.headline}; +`; + +const UploadZone = styled.div` + width: 100%; + font-size: 13px; + text-transform: uppercase; + border: solid 1px #e5ecf3; + background-color: rgba(247, 247, 247, 0.4); + word-wrap: break-word; + padding: 16px 4px; + margin-top: 8px; + text-align: center; +`; + +type Props = PanelProps & RouteComponentProps<{}>; + +function VerifyKeystorePanel(props: Props) { + const { history, onBack, onNext } = props; + return ( + + + {translate('YOUR_PRIVATE_KEY_LABEL')} + + + - {translateRaw('OR')} - + + {translate('YOUR_KEYSTORE_LABEL')} + {translateRaw('UPLOAD_KEYSTORE_LABEL')} + + + {translate('INPUT_PASSWORD_LABEL')} + + + + + {translate('MAKE_BACKUP_PRINT_BUTTON')} + + history.replace('/dashboard')}> + {translate('DONE_AND_RETURN_LABEL')} + + + + ); +} + +export default withRouter(VerifyKeystorePanel); diff --git a/common/v2/features/CreateWallet/Keystore/components/index.ts b/common/v2/features/CreateWallet/Keystore/components/index.ts index 9bae6a9f9..a58a6ef0a 100644 --- a/common/v2/features/CreateWallet/Keystore/components/index.ts +++ b/common/v2/features/CreateWallet/Keystore/components/index.ts @@ -1,3 +1,5 @@ export { default as GenerateKeystoreFilePanel } from './GenerateKeystoreFilePanel'; export { KeystoreContext, default as KeystoreProvider } from './KeystoreProvider'; export { default as SaveKeystoreFilePanel } from './SaveKeystoreFilePanel'; +export { default as MakeBackupPanel } from './MakeBackupPanel'; +export { default as VerifyKeystorePanel } from './VerifyKeystorePanel'; diff --git a/common/v2/features/CreateWallet/Keystore/constants.ts b/common/v2/features/CreateWallet/Keystore/constants.ts index 5d2b17bdb..e3500225c 100644 --- a/common/v2/features/CreateWallet/Keystore/constants.ts +++ b/common/v2/features/CreateWallet/Keystore/constants.ts @@ -1,20 +1,31 @@ import { SelectNetworkPanel } from '../components'; -import { GenerateKeystoreFilePanel, SaveKeystoreFilePanel } from './components'; +import { + GenerateKeystoreFilePanel, + SaveKeystoreFilePanel, + MakeBackupPanel, + VerifyKeystorePanel +} from './components'; export enum KeystoreStages { SelectNetwork, GenerateKeystore, - SaveKeystore + SaveKeystore, + MakeBackup, + VerifyKeystore } export const keystoreStageToComponentHash = { [KeystoreStages.SelectNetwork]: SelectNetworkPanel, [KeystoreStages.GenerateKeystore]: GenerateKeystoreFilePanel, - [KeystoreStages.SaveKeystore]: SaveKeystoreFilePanel + [KeystoreStages.SaveKeystore]: SaveKeystoreFilePanel, + [KeystoreStages.MakeBackup]: MakeBackupPanel, + [KeystoreStages.VerifyKeystore]: VerifyKeystorePanel }; export const keystoreFlow = [ KeystoreStages.GenerateKeystore, KeystoreStages.SelectNetwork, - KeystoreStages.SaveKeystore + KeystoreStages.SaveKeystore, + KeystoreStages.MakeBackup, + KeystoreStages.VerifyKeystore ]; diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss b/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss deleted file mode 100644 index 2b0e022a2..000000000 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.scss +++ /dev/null @@ -1,5 +0,0 @@ -.SelectNetworkPanel { - &-next { - width: 100%; - } -} From c7c152430cbfaadf6c2963c3189a999e9ad72491 Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Tue, 14 May 2019 14:00:25 +0200 Subject: [PATCH 0501/1466] Add icons to buttons --- common/assets/images/icn-download.svg | 18 +++++++++++++++ .../Keystore/components/MakeBackupPanel.tsx | 23 ++++++++++++++++++- .../components/SaveKeystoreFilePanel.tsx | 23 ++++++++++++++++++- .../components/VerifyKeystorePanel.tsx | 5 +--- 4 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 common/assets/images/icn-download.svg diff --git a/common/assets/images/icn-download.svg b/common/assets/images/icn-download.svg new file mode 100644 index 000000000..2d62f74d0 --- /dev/null +++ b/common/assets/images/icn-download.svg @@ -0,0 +1,18 @@ + + + + E05B9B79-3F0E-4EC4-98F9-2EB3B483C3F4 + Created with sketchtool. + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx b/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx index 41ec0fc07..148dc6d83 100644 --- a/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx @@ -7,6 +7,16 @@ import { PanelProps } from '../../CreateWallet'; import translate, { translateRaw } from 'translations'; import lockSafetyIcon from 'common/assets/images/icn-lock-safety.svg'; +import printerIcon from 'common/assets/images/icn-printer.svg'; + +const PrinterImage = styled.embed` + width: 24px; + height: 24px; + margin-right: 10px; + pointer-events: none; + display: inline; +`; + const DescriptionItem = styled(Typography)` margin-top: 18px; font-weight: normal; @@ -26,6 +36,16 @@ const StyledButton = styled(Button)` font-size: 18px; margin-bottom: 16px; width: 100%; + display: flex; + justify-content: center; + align-items: center; + + &:focus, + &:hover { + embed { + filter: brightness(0) invert(1); + } + } `; const ImageWrapper = styled.div` @@ -76,7 +96,8 @@ export default function MakeBackupPanel({ onBack, onNext }: PanelProps) { - + + {translate('MAKE_BACKUP_PRINT_BUTTON')} {translate('ACTION_6')} diff --git a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx index fe727cec5..7b964dd37 100644 --- a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx @@ -7,6 +7,16 @@ import { PanelProps } from '../../CreateWallet'; import translate, { translateRaw } from 'translations'; import keystoreIcon from 'common/assets/images/icn-keystore.svg'; +import downloadIcon from 'common/assets/images/icn-download.svg'; + +const DownloadImage = styled.embed` + width: 16px; + height: 16px; + margin-right: 10px; + pointer-events: none; + display: inline; +`; + const DescriptionItem = styled(Typography)` margin-top: 18px; font-weight: normal; @@ -26,6 +36,16 @@ const StyledButton = styled(Button)` font-size: 18px; margin-bottom: 16px; width: 100%; + display: flex; + justify-content: center; + align-items: center; + + &:focus, + &:hover { + embed { + filter: brightness(0) invert(1); + } + } `; const ImageWrapper = styled.div` @@ -53,7 +73,8 @@ export default function SaveKeystoreFilePanel({ onBack, onNext }: PanelProps) { {translate('SAVE_KEYSTORE_DESCRIPTION_2')} {translate('SAVE_KEYSTORE_DESCRIPTION_3')} - + + {translate('SAVE_KEYSTORE_BUTTON')} {translate('ACTION_6')} diff --git a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx index 6c8481b4c..74b1e5b03 100644 --- a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx @@ -56,7 +56,7 @@ const UploadZone = styled.div` type Props = PanelProps & RouteComponentProps<{}>; function VerifyKeystorePanel(props: Props) { - const { history, onBack, onNext } = props; + const { history, onBack } = props; return ( - - {translate('MAKE_BACKUP_PRINT_BUTTON')} - history.replace('/dashboard')}> {translate('DONE_AND_RETURN_LABEL')} From ed57bfa371d5709bf0f17a52dca3b49008886b68 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 14 May 2019 08:58:07 -0400 Subject: [PATCH 0502/1466] fix last ts issue --- common/v2/features/AddAccount/AddAccountFlow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index 2af24d382..9470b8992 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -11,7 +11,7 @@ import { formReducer, initialState } from './AddAccountForm.reducer'; import './AddAccount.scss'; import './AddAccountFlow.scss'; -export const getStory = (storyName: WalletName) => { +export const getStory = (storyName: WalletName): any => { return STORIES.filter(selected => selected.name === storyName)[0]; }; From 0c002fd5454cd27c8b78d6dc678d8eb07546de5b Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Tue, 14 May 2019 16:13:10 +0200 Subject: [PATCH 0503/1466] fix privatekey --- common/v2/features/AddAccount/components/PrivateKey.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index 781eea907..0826e5587 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -144,10 +144,10 @@ export class PrivateKeyDecrypt extends PureComponent { } }; - private unlock = (e: React.SyntheticEvent) => { + private unlock = async (e: React.SyntheticEvent) => { e.preventDefault(); e.stopPropagation(); - const wallet = unlockPrivateKey({ key: this.state.key, password: this.state.password }); + const wallet = await unlockPrivateKey({ key: this.state.key, password: this.state.password }); this.props.onUnlock(wallet); }; } From 4dc4bd39948d69bfc6420cc00797d6ff741195ac Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Tue, 14 May 2019 17:04:19 +0200 Subject: [PATCH 0504/1466] fix keystore --- common/v2/features/AddAccount/components/Keystore.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index b84791c88..66d56820d 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -117,6 +117,7 @@ export class KeystoreDecrypt extends PureComponent { file: this.state.file, password: this.state.password }); + console.log(this.state.file, this.state.password, wallet) this.props.onUnlock(wallet); }; From 374faf74500582280d4ace14272cf306de3c0d50 Mon Sep 17 00:00:00 2001 From: Emmanuel Vilsbol Date: Tue, 14 May 2019 17:05:49 +0200 Subject: [PATCH 0505/1466] fix Mnemonic --- .../AddAccount/components/Mnemonic.tsx | 79 +++++++++---------- 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/common/v2/features/AddAccount/components/Mnemonic.tsx b/common/v2/features/AddAccount/components/Mnemonic.tsx index 2a44c1356..1fffd7aef 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.tsx +++ b/common/v2/features/AddAccount/components/Mnemonic.tsx @@ -16,50 +16,50 @@ import questionToolTip from 'common/assets/images/icn-question.svg'; import './Mnemonic.scss'; interface OwnProps { - seed: string; - onSeed(seed: string): void; onUnlock(param: any): void; } -interface StateProps { +interface StoreProps { dPath: DPath; dPaths: DPath[]; } -type Props = OwnProps & StateProps; +type Props = OwnProps & StoreProps; interface State { - phrase: string; - formattedPhrase: string; - pass: string; - dPath: DPath; + seed: string | undefined; + phrase: string | undefined; + formattedPhrase: string | undefined; + pass: string | undefined; + selectedDPath: DPath; } + class MnemonicDecryptClass extends PureComponent { - public state: State = { - phrase: '', - formattedPhrase: '', - pass: '', - dPath: this.props.dPath - }; + public state:State = { + seed: undefined, + phrase: undefined, + formattedPhrase: undefined, + pass: undefined, + selectedDPath: this.props.dPath + } public UNSAFE_componentWillReceiveProps(nextProps: Props) { if (this.props.dPath !== nextProps.dPath) { - this.setState({ dPath: nextProps.dPath }); + this.setState({ selectedDPath: nextProps.dPath }); } } public render() { - const { phrase, formattedPhrase, dPath, pass } = this.state; - const { seed } = this.props; - const isValidMnemonic = validateMnemonic(formattedPhrase); + const { seed, phrase, formattedPhrase, pass, selectedDPath} = this.state; + const isValidMnemonic = validateMnemonic(formattedPhrase || ''); if (seed) { return (
              {
              { { }); }; - public onDWModalOpen = () => { - const { formattedPhrase, pass } = this.state; + public onDWModalOpen = async () => { + const { formattedPhrase, pass = '' } = this.state; + if (!formattedPhrase || !validateMnemonic(formattedPhrase)) { return; } - if (!validateMnemonic(formattedPhrase)) { - return; - } - - try { - const seed = mnemonicToSeed(formattedPhrase, pass).toString('hex'); - this.props.onSeed(seed); - } catch (err) { - console.log(err); - } + const seed = await mnemonicToSeed(formattedPhrase, pass).toString('hex'); + this.setState({ seed }); }; private handleCancel = () => { - this.props.onSeed(''); + this.setState({ seed: undefined }); }; private handlePathChange = (dPath: DPath) => { - this.setState({ dPath }); + this.setState({ selectedDPath: dPath }); }; private handleUnlock = (address: string, index: number) => { - const { formattedPhrase, pass, dPath } = this.state; + const { formattedPhrase, pass, selectedDPath } = this.state; this.props.onUnlock({ - path: `${dPath.value}/${index}`, + path: `${selectedDPath.value}/${index}`, pass, phrase: formattedPhrase, address }); this.setState({ - pass: '', - phrase: '', - formattedPhrase: '' + seed: undefined, + phrase: undefined, + formattedPhrase: undefined, + pass: undefined, + selectedDPath: this.props.dPath }); - - this.props.onSeed(''); }; } -function mapStateToProps(state: AppState): StateProps { +function mapStateToProps(state: AppState): StoreProps { return { // Mnemonic dPath is guaranteed to always be provided dPath: configSelectors.getSingleDPath(state, InsecureWalletName.MNEMONIC_PHRASE) as DPath, From dd21a1adad49f26d844c9711c07206f3f775cef3 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Tue, 14 May 2019 13:49:04 -0400 Subject: [PATCH 0506/1466] no web 3 mobile providers styled --- .../components/Web3ProviderInstall.scss | 29 ++++++++++ .../components/Web3ProviderInstall.tsx | 57 +++++++++++-------- 2 files changed, 63 insertions(+), 23 deletions(-) create mode 100644 common/v2/features/AddAccount/components/Web3ProviderInstall.scss diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.scss b/common/v2/features/AddAccount/components/Web3ProviderInstall.scss new file mode 100644 index 000000000..7d344ee34 --- /dev/null +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.scss @@ -0,0 +1,29 @@ +.TrustWallet-img { + width: 150px; + height: 150px; +} + +.TrustWallet-container { + width: 200px; + height: 200px; + padding: 10px; + text-align: center; +} + +.CoinbaseWallet-container { + width: 200px; + height: 200px; + padding: 10px; + text-align: center; +} + +.CoinbaseWallet-img { + width: 150px; + height: 150px; +} + +.Web3-options { + display: flex; + flex-direction: row; +} + \ No newline at end of file diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx index 20aa48560..f88a6e1f4 100644 --- a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx @@ -9,6 +9,7 @@ import AppStoreBadgeIMG from 'assets/images/mobile/app-store-badge.png'; import GooglePlayBadgeIMG from 'assets/images/mobile/google-play-badge.png'; import { NewTabLink } from 'components/ui'; import { IS_MOBILE } from '../flags'; +import './Web3ProviderInstall.scss'; interface Props { wallet: object; @@ -21,29 +22,39 @@ function InstallTrunk() {
              {translate('ADD_ACCOUNT_WEB3_INSTALL_TITLE')}
              {translate('ADD_ACCOUNT_WEB3_INSTALL_MOBILE_DESC')}
              -
              - - - - TrustWallet App - - - - - - -
              -
              - - - - Coinbase App - - - - - - +
              +
              + +
              + +
              +
              + + TrustWallet App + + + + + + +
              + +
              +
              + +
              + +
              +
              + Coinbase App + + + + + + +
              +
              From 2437457ba55f481fad244d3bca22166c7e17f2f3 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Tue, 14 May 2019 14:05:40 -0400 Subject: [PATCH 0507/1466] insecure wallet methods styled, padding issues fixed --- common/components/ui/Input.scss | 4 ++++ common/v2/components/ContentPanel.tsx | 4 +++- common/v2/features/AddAccount/AddAccount.scss | 4 ++-- common/v2/features/AddAccount/AddAccountFlow.tsx | 7 ++++++- .../v2/features/AddAccount/components/Keystore.scss | 11 ++++++++++- common/v2/features/AddAccount/components/Keystore.tsx | 10 ++++++---- .../v2/features/AddAccount/components/Mnemonic.scss | 11 ++++++++++- .../v2/features/AddAccount/components/PrivateKey.scss | 4 ++++ 8 files changed, 45 insertions(+), 10 deletions(-) diff --git a/common/components/ui/Input.scss b/common/components/ui/Input.scss index 11b4598b7..6a2d72e0f 100644 --- a/common/components/ui/Input.scss +++ b/common/components/ui/Input.scss @@ -82,6 +82,10 @@ transition: border-color 120ms, box-shadow 120ms; margin-bottom: 1rem; + @media (max-width: 700px) { + margin-bottom: 0em; + } + &[placeholder] { text-overflow: ellipsis; } diff --git a/common/v2/components/ContentPanel.tsx b/common/v2/components/ContentPanel.tsx index aba4622ca..7bffe43f1 100644 --- a/common/v2/components/ContentPanel.tsx +++ b/common/v2/components/ContentPanel.tsx @@ -9,8 +9,10 @@ import backArrowIcon from 'common/assets/images/icn-back-arrow.svg'; const ContentPanelWrapper = styled.div` @media (max-width: 700px) { - max-width: 560px; + max-width: 450px; + max-height: 500px; padding-left: 0px; + margin-bottom: 1em; } `; diff --git a/common/v2/features/AddAccount/AddAccount.scss b/common/v2/features/AddAccount/AddAccount.scss index 804e16d68..086c2d3f1 100644 --- a/common/v2/features/AddAccount/AddAccount.scss +++ b/common/v2/features/AddAccount/AddAccount.scss @@ -38,7 +38,7 @@ $speed: 500ms; @media only screen and (max-width: 700px) { width: 375px; - height: 450px; + height: 500px; padding: 1em; } @@ -99,7 +99,7 @@ $speed: 500ms; text-align: center; // @media (max-width: 700px) { - // height: 50px; + // margin-bottom: 50px; // } &-button { diff --git a/common/v2/features/AddAccount/AddAccountFlow.tsx b/common/v2/features/AddAccount/AddAccountFlow.tsx index 9470b8992..df46742c9 100644 --- a/common/v2/features/AddAccount/AddAccountFlow.tsx +++ b/common/v2/features/AddAccount/AddAccountFlow.tsx @@ -86,6 +86,7 @@ function AddAccountFlow() { return ( @@ -105,7 +106,11 @@ function AddAccountFlow() { ); }; - return {isDefaultView ? renderDefault() : renderStep()}; + return ( + + {isDefaultView ? renderDefault() : renderStep()} + + ); } export default AddAccountFlow; diff --git a/common/v2/features/AddAccount/components/Keystore.scss b/common/v2/features/AddAccount/components/Keystore.scss index 6546eb26e..dec79731c 100644 --- a/common/v2/features/AddAccount/components/Keystore.scss +++ b/common/v2/features/AddAccount/components/Keystore.scss @@ -4,12 +4,21 @@ &-img { display: flex; justify-content: center; - margin: 4em; + margin: 2em; + + + @media (max-width: 700px) { + margin: 0.25em; + } } &-help { justify-content: center; text-align: center; margin-top: 2rem; + + @media (max-width: 700px) { + margin-top: 0.5em; + } } &-password { padding-top: 1em; diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 66d56820d..8c8baf562 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -94,9 +94,11 @@ export class KeystoreDecrypt extends PureComponent { type="password" />
              - +
              + +
              {translate('KEYSTORE_HELP')}
              @@ -117,7 +119,7 @@ export class KeystoreDecrypt extends PureComponent { file: this.state.file, password: this.state.password }); - console.log(this.state.file, this.state.password, wallet) + console.log(this.state.file, this.state.password, wallet); this.props.onUnlock(wallet); }; diff --git a/common/v2/features/AddAccount/components/Mnemonic.scss b/common/v2/features/AddAccount/components/Mnemonic.scss index d7ba33ff4..f2655f3cc 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.scss +++ b/common/v2/features/AddAccount/components/Mnemonic.scss @@ -4,12 +4,21 @@ &-img { display: flex; justify-content: center; - margin: 3em; + margin: 1.5em; + + @media (max-width:700px) { + margin: 0em; + } + } &-help { justify-content: center; text-align: center; margin-top: 2rem; + + @media (max-width:700px) { + margin-top: 0em; + } } &-label { diff --git a/common/v2/features/AddAccount/components/PrivateKey.scss b/common/v2/features/AddAccount/components/PrivateKey.scss index a0ea2f29d..93cadc7e6 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.scss +++ b/common/v2/features/AddAccount/components/PrivateKey.scss @@ -3,6 +3,10 @@ display: flex; justify-content: center; margin: 4em; + + @media (max-width: 700px) { + margin: 1.5em; + } } &-label { height: 18px; From 6ba86f1859a08dd393b879778a5adb78b7c9843a Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 14 May 2019 14:39:05 -0400 Subject: [PATCH 0508/1466] fix prettier --- common/v2/features/AddAccount/components/Mnemonic.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common/v2/features/AddAccount/components/Mnemonic.tsx b/common/v2/features/AddAccount/components/Mnemonic.tsx index 1fffd7aef..ce3f7ad83 100644 --- a/common/v2/features/AddAccount/components/Mnemonic.tsx +++ b/common/v2/features/AddAccount/components/Mnemonic.tsx @@ -34,15 +34,14 @@ interface State { selectedDPath: DPath; } - class MnemonicDecryptClass extends PureComponent { - public state:State = { + public state: State = { seed: undefined, phrase: undefined, formattedPhrase: undefined, pass: undefined, selectedDPath: this.props.dPath - } + }; public UNSAFE_componentWillReceiveProps(nextProps: Props) { if (this.props.dPath !== nextProps.dPath) { @@ -51,7 +50,7 @@ class MnemonicDecryptClass extends PureComponent { } public render() { - const { seed, phrase, formattedPhrase, pass, selectedDPath} = this.state; + const { seed, phrase, formattedPhrase, pass, selectedDPath } = this.state; const isValidMnemonic = validateMnemonic(formattedPhrase || ''); if (seed) { @@ -144,7 +143,9 @@ class MnemonicDecryptClass extends PureComponent { public onDWModalOpen = async () => { const { formattedPhrase, pass = '' } = this.state; - if (!formattedPhrase || !validateMnemonic(formattedPhrase)) { return; } + if (!formattedPhrase || !validateMnemonic(formattedPhrase)) { + return; + } const seed = await mnemonicToSeed(formattedPhrase, pass).toString('hex'); this.setState({ seed }); From 329f953e8fb72a60e3e75cec69c86df327662ab7 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Tue, 14 May 2019 16:28:52 -0400 Subject: [PATCH 0509/1466] try to fix shit --- package.json | 2 +- yarn.lock | 33 +++++++++++++++------------------ 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 0522f6891..8fc6901e2 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "rc-slider": "8.6.0", "react": "16.8.6", "react-copy-to-clipboard": "5.0.1", - "react-dom": "16.5.2", + "react-dom": "16.8.6", "react-hot-loader": "4.8.4", "react-markdown": "3.3.0", "react-onclickoutside": "6.7.1", diff --git a/yarn.lock b/yarn.lock index f74661c0b..1a251a2a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8654,6 +8654,7 @@ js-sha3@^0.3.1: js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" @@ -9381,13 +9382,13 @@ longest@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1: +loose-envify@^1.0.0, loose-envify@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" dependencies: js-tokens "^3.0.0" -loose-envify@^1.4.0: +loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -10337,6 +10338,7 @@ oauth-sign@~0.8.1, oauth-sign@~0.8.2: object-assign@4.x, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-assign@^2.0.0: version "2.1.1" @@ -11414,11 +11416,13 @@ prop-types@15.x, prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.8, pr object-assign "^4.1.1" prop-types@^15.6.2: - version "15.6.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== dependencies: - loose-envify "^1.3.1" + loose-envify "^1.4.0" object-assign "^4.1.1" + react-is "^16.8.1" proto-list@~1.2.1: version "1.2.4" @@ -11760,15 +11764,15 @@ react-copy-to-clipboard@5.0.1: copy-to-clipboard "^3" prop-types "^15.5.8" -react-dom@16.5.2: - version "16.5.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.5.2.tgz#b69ee47aa20bab5327b2b9d7c1fe2a30f2cfa9d7" - integrity sha512-RC8LDw8feuZOHVgzEf7f+cxBr/DnKdqp56VU0lAs1f4UfKc4cU8wU4fTq/mgnvynLQo8OtlPC19NUFh/zjZPuA== +react-dom@16.8.6: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f" + integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - schedule "^0.5.0" + scheduler "^0.13.6" react-dom@^15.3.2: version "15.6.2" @@ -11821,7 +11825,7 @@ react-is@^16.3.2: version "16.3.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.3.2.tgz#f4d3d0e2f5fbb6ac46450641eb2e25bf05d36b22" -react-is@^16.7.0, react-is@^16.8.4: +react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4: version "16.8.6" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== @@ -12853,13 +12857,6 @@ sc-formatter@~3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/sc-formatter/-/sc-formatter-3.0.2.tgz#9abdb14e71873ce7157714d3002477bbdb33c4e6" -schedule@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/schedule/-/schedule-0.5.0.tgz#c128fffa0b402488b08b55ae74bb9df55cc29cc8" - integrity sha512-HUcJicG5Ou8xfR//c2rPT0lPIRR09vVvN81T9fqfVgBmhERUbDEQoYKjpBxbueJnCPpSu2ujXzOnRQt6x9o/jw== - dependencies: - object-assign "^4.1.1" - scheduler@^0.13.6: version "0.13.6" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" From 572b22efae1ebe2b61620bc1d06f08f2e174a4cc Mon Sep 17 00:00:00 2001 From: Azarielle Date: Tue, 14 May 2019 18:06:36 -0400 Subject: [PATCH 0510/1466] fix noWeb3 linking out bug --- .../components/Web3ProviderInstall.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx index f88a6e1f4..10dff6905 100644 --- a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx @@ -11,11 +11,6 @@ import { NewTabLink } from 'components/ui'; import { IS_MOBILE } from '../flags'; import './Web3ProviderInstall.scss'; -interface Props { - wallet: object; - onUnlock(): void; -} - function InstallTrunk() { return (
              @@ -61,7 +56,7 @@ function InstallTrunk() { ); } -function InstallMetaMask({ onUnlock }: Props) { +function InstallMetaMask() { return (
              {translate('ADD_ACCOUNT_WEB3_INSTALL_TITLE')}
              @@ -71,9 +66,11 @@ function InstallMetaMask({ onUnlock }: Props) {
              - + + +
              @@ -87,8 +84,8 @@ function InstallMetaMask({ onUnlock }: Props) { ); } -function Web3ProviderInstall(props: Props) { - return <>{IS_MOBILE ? : }; +function Web3ProviderInstall() { + return <>{IS_MOBILE ? : }; } export default Web3ProviderInstall; From 0d373fe41f7296239d86874ae20c2766671f3097 Mon Sep 17 00:00:00 2001 From: Azarielle Date: Tue, 14 May 2019 18:20:35 -0400 Subject: [PATCH 0511/1466] fix link out to desktop download --- .../v2/features/AddAccount/components/Web3ProviderInstall.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx index 10dff6905..060becba3 100644 --- a/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx +++ b/common/v2/features/AddAccount/components/Web3ProviderInstall.tsx @@ -77,7 +77,7 @@ function InstallMetaMask() { {translate('ADD_ACCOUNT_WEB3_INSTALL_FOOTER')}
              From 00863fc713e43209c79ca4eecd0c480fe7c2063d Mon Sep 17 00:00:00 2001 From: Azarielle Date: Wed, 15 May 2019 16:39:09 -0400 Subject: [PATCH 0512/1466] request changes for higher order componenet --- common/v2/features/SendAssets/SendAssets.tsx | 32 +++++++++---------- .../SendAssets/components/SignTransaction.tsx | 8 ++++- .../features/SendAssets/components/index.ts | 2 +- common/v2/features/SendAssets/constants.ts | 4 +-- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/common/v2/features/SendAssets/SendAssets.tsx b/common/v2/features/SendAssets/SendAssets.tsx index 2328afa15..fa28485a5 100644 --- a/common/v2/features/SendAssets/SendAssets.tsx +++ b/common/v2/features/SendAssets/SendAssets.tsx @@ -10,7 +10,7 @@ import { createConfirmTransactionComponent, createSendAssetsForm, createTransactionReceipt, - SignTransaction + createSignTransaction } from './components'; import { headings, steps } from './constants'; @@ -109,22 +109,7 @@ export class SendAssets extends Component> { // Step 3, ConfirmTransaction, cannot go back (as backOptions[2] is undefined) const onBack = backOptions[step]; - const SendAssetsForm = createSendAssetsForm({ - transactionFields: this.state.transactionFields, - onNext: this.advanceStep, - updateState: this.updateState, - onSubmit: this.updateTransactionFields - }); - const ConfirmTransaction = createConfirmTransactionComponent({ onNext: this.advanceStep }); - const TransactionReceipt = createTransactionReceipt({ onReset: this.handleReset }); - - const sendAssetsSteps = [ - SendAssetsForm, - ConfirmTransaction, - SignTransaction, - TransactionReceipt - ]; - const Step = sendAssetsSteps[step]; + const Step = this.sendAssetsSteps[step]; // const onBack = backOptions[step]; // const Step = steps[step]; @@ -170,6 +155,19 @@ export class SendAssets extends Component> { }; private handleReset = () => this.setState(getInitialState()); + + // tslint:disable-next-line + private sendAssetsSteps = [ + createSendAssetsForm({ + transactionFields: this.state.transactionFields, + onNext: this.advanceStep, + updateState: this.updateState, + onSubmit: this.updateTransactionFields + }), + createConfirmTransactionComponent({ onNext: this.advanceStep }), + createSignTransaction(), + createTransactionReceipt({ onReset: this.handleReset }) + ]; } export default withRouter(SendAssets); diff --git a/common/v2/features/SendAssets/components/SignTransaction.tsx b/common/v2/features/SendAssets/components/SignTransaction.tsx index 9e939abf8..286b029e5 100644 --- a/common/v2/features/SendAssets/components/SignTransaction.tsx +++ b/common/v2/features/SendAssets/components/SignTransaction.tsx @@ -7,7 +7,13 @@ interface Props { stateValues: SendState; } -export default class SignTransaction extends Component { +export default function createSignTransaction() { + return (props: Pick) => { + return ; + }; +} + +export class SignTransaction extends Component { public render() { return
              This gets renders when signing Transaction
              ; } diff --git a/common/v2/features/SendAssets/components/index.ts b/common/v2/features/SendAssets/components/index.ts index eef9b129c..867be13d6 100644 --- a/common/v2/features/SendAssets/components/index.ts +++ b/common/v2/features/SendAssets/components/index.ts @@ -1,6 +1,6 @@ export { default as createConfirmTransactionComponent } from './ConfirmTransaction'; export { default as createSendAssetsForm } from './TransactionFormData'; export { default as createTransactionReceipt } from './TransactionComplete'; -export { default as SignTransaction } from './SignTransaction'; +export { default as createSignTransaction } from './SignTransaction'; export * from './fields'; diff --git a/common/v2/features/SendAssets/constants.ts b/common/v2/features/SendAssets/constants.ts index 5877c2285..330531044 100644 --- a/common/v2/features/SendAssets/constants.ts +++ b/common/v2/features/SendAssets/constants.ts @@ -1,14 +1,14 @@ import { createSendAssetsForm, createConfirmTransactionComponent, - SignTransaction, + createSignTransaction, createTransactionReceipt } from './components'; export const steps = [ createSendAssetsForm, createConfirmTransactionComponent, - SignTransaction, + createSignTransaction, createTransactionReceipt ]; From 210d7eed1978fd3fdfb5e1d35912f26a1348907b Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Wed, 15 May 2019 21:12:52 -0400 Subject: [PATCH 0513/1466] Move derived property to constructor to fix TSLint --- common/v2/features/SendAssets/SendAssets.tsx | 33 +++++++++++--------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/common/v2/features/SendAssets/SendAssets.tsx b/common/v2/features/SendAssets/SendAssets.tsx index fa28485a5..6e193b5fb 100644 --- a/common/v2/features/SendAssets/SendAssets.tsx +++ b/common/v2/features/SendAssets/SendAssets.tsx @@ -1,6 +1,6 @@ // Legacy import sendIcon from 'common/assets/images/icn-send.svg'; -import React, { Component } from 'react'; +import React, { Component, ComponentType } from 'react'; import { RouteComponentProps, withRouter } from 'react-router-dom'; import { isAdvancedQueryTransaction } from 'utils/helpers'; import { ContentPanel } from 'v2/components'; @@ -102,6 +102,24 @@ const getInitialState = (): SendState => { export class SendAssets extends Component> { public state: SendState = getInitialState(); + private sendAssetsSteps: ComponentType<{ stateValues: SendState }>[]; + + constructor(props: RouteComponentProps<{}>) { + super(props); + + this.sendAssetsSteps = [ + createSendAssetsForm({ + transactionFields: this.state.transactionFields, + onNext: this.advanceStep, + updateState: this.updateState, + onSubmit: this.updateTransactionFields + }), + createConfirmTransactionComponent({ onNext: this.advanceStep }), + createSignTransaction(), + createTransactionReceipt({ onReset: this.handleReset }) + ]; + } + public render() { const { history } = this.props; const { step } = this.state; @@ -155,19 +173,6 @@ export class SendAssets extends Component> { }; private handleReset = () => this.setState(getInitialState()); - - // tslint:disable-next-line - private sendAssetsSteps = [ - createSendAssetsForm({ - transactionFields: this.state.transactionFields, - onNext: this.advanceStep, - updateState: this.updateState, - onSubmit: this.updateTransactionFields - }), - createConfirmTransactionComponent({ onNext: this.advanceStep }), - createSignTransaction(), - createTransactionReceipt({ onReset: this.handleReset }) - ]; } export default withRouter(SendAssets); From b8fa2c7071719231c883446d3873328b78dc095e Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Thu, 16 May 2019 12:45:37 +0200 Subject: [PATCH 0514/1466] Create new keystore flow basic logic --- .../CreateWallet/Keystore/Keystore.tsx | 75 +++++++++- .../components/GenerateKeystoreFilePanel.tsx | 10 +- .../Keystore/components/MakeBackupPanel.tsx | 113 +++++++++----- .../components/SaveKeystoreFilePanel.tsx | 75 ++++++---- .../components/VerifyKeystorePanel.tsx | 138 +++++++++++++----- .../components/SelectNetworkPanel.tsx | 15 +- 6 files changed, 315 insertions(+), 111 deletions(-) diff --git a/common/v2/features/CreateWallet/Keystore/Keystore.tsx b/common/v2/features/CreateWallet/Keystore/Keystore.tsx index 9a8bb922e..c3baa34b0 100644 --- a/common/v2/features/CreateWallet/Keystore/Keystore.tsx +++ b/common/v2/features/CreateWallet/Keystore/Keystore.tsx @@ -1,22 +1,46 @@ -import React, { Component } from 'react'; +import React, { Component, ReactType } from 'react'; import { RouteComponentProps } from 'react-router-dom'; +import { IV3Wallet } from 'ethereumjs-wallet'; +import { makeBlob } from 'utils/blob'; +import { N_FACTOR } from 'config'; +import { generateKeystore, fromV3 } from 'libs/web-workers'; import { Layout } from 'v2/features'; import { KeystoreProvider, KeystoreContext } from './components'; import { KeystoreStages, keystoreStageToComponentHash, keystoreFlow } from './constants'; -export default class CreateWallet extends Component> { - public state = { - stage: KeystoreStages.GenerateKeystore +interface State { + password: string; + privateKey: string; + keystore?: IV3Wallet; + filename: string; + network: string; + stage: KeystoreStages; + isGenerating: boolean; +} + +export default class CreateWallet extends Component, State> { + public state: State = { + password: '', + privateKey: '', + filename: '', + network: '', + stage: KeystoreStages.GenerateKeystore, + isGenerating: false }; public render() { const { stage } = this.state; - const ActivePanel = keystoreStageToComponentHash[stage]; + const ActivePanel: ReactType = keystoreStageToComponentHash[stage]; const actions = { onBack: this.regressToPreviousStage, - onNext: this.advanceToNextStage + onNext: this.advanceToNextStage, + generateWalletAndContinue: this.generateWalletAndContinue, + selectNetworkAndContinue: this.selectNetworkAndContinue, + getKeystoreBlob: this.getKeystoreBlob, + verifyKeystore: this.verifyKeystore }; + const isKeystorePanel = [ KeystoreStages.GenerateKeystore, KeystoreStages.SaveKeystore, @@ -30,10 +54,10 @@ export default class CreateWallet extends Component> {
              {isKeystorePanel ? ( - {({}) => } + {({}) => } ) : ( - + )}
              @@ -63,4 +87,39 @@ export default class CreateWallet extends Component> { this.setState({ stage: nextStage }); } }; + + private generateWalletAndContinue = async (password: string) => { + this.setState({ isGenerating: true }); + try { + const res = await generateKeystore(password, N_FACTOR); + this.setState({ + password, + keystore: res.keystore, + filename: res.filename, + privateKey: res.privateKey, + isGenerating: false + }); + this.advanceToNextStage(); + } catch (e) { + console.log(e); + } + }; + + private selectNetworkAndContinue = async (network: string) => { + this.setState({ network }); + this.advanceToNextStage(); + }; + + private getKeystoreBlob = (): string => { + return makeBlob('text/json;charset=UTF-8', JSON.stringify(this.state.keystore)); + }; + + private verifyKeystore = async (keystore: string, password: string): Promise => { + try { + await fromV3(keystore, password, true); + return true; + } catch (e) { + return false; + } + }; } diff --git a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx index 6097033b4..b5d4bc446 100644 --- a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx @@ -45,7 +45,11 @@ const Description = () => { ); }; -export default function GenerateKeystoreFilePanel({ onBack, onNext }: PanelProps) { +interface Props extends PanelProps { + generateWalletAndContinue?(password: string): void; +} + +export default function GenerateKeystoreFilePanel({ onBack, generateWalletAndContinue }: Props) { return ( generateWalletAndContinue && generateWalletAndContinue(values.password)} render={() => ( @@ -90,7 +94,7 @@ export default function GenerateKeystoreFilePanel({ onBack, onNext }: PanelProps /> {translate('NEW_WALLET_KEYSTORE_DESCRIPTION_3')} - {translate('NEW_WALLET_KEYSTORE_BUTTON')} + {translate('NEW_WALLET_KEYSTORE_BUTTON')} )} /> diff --git a/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx b/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx index 148dc6d83..d02415884 100644 --- a/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx @@ -1,9 +1,11 @@ -import React from 'react'; +import React, { Component } from 'react'; import { Button, Typography } from '@mycrypto/ui'; import styled from 'styled-components'; +import { IV3Wallet } from 'ethereumjs-wallet'; import { ExtendedContentPanel } from 'v2/components'; import { PanelProps } from '../../CreateWallet'; +import { PaperWallet } from 'components'; import translate, { translateRaw } from 'translations'; import lockSafetyIcon from 'common/assets/images/icn-lock-safety.svg'; @@ -70,38 +72,79 @@ const PrivateKeyField = styled.div` margin-top: 8px; `; -export default function MakeBackupPanel({ onBack, onNext }: PanelProps) { - return ( - - - - - - {translate('MAKE_BACKUP_DESCRIPTION_1')} - {translate('MAKE_BACKUP_DESCRIPTION_2')} - {translate('MAKE_BACKUP_DESCRIPTION_3')} - - - {translate('YOUR_PRIVATE_KEY_LABEL')} - - afdfd9c3d2095ef696594f6cedcae59e72dcd697e2a7521b1578140422a4f890 - - - - - - {translate('MAKE_BACKUP_PRINT_BUTTON')} - - {translate('ACTION_6')} - - - ); +const HiddenPaperWallet = styled.div` + position: absolute; + top: -1000px; +`; + +interface Props extends PanelProps { + privateKey: string; + keystore: IV3Wallet; +} + +interface State { + paperWalletImage: string; +} + +export default class MakeBackupPanel extends Component { + public state: State = { + paperWalletImage: '' + }; + + private paperWallet: PaperWallet | null; + + public componentDidMount() { + setTimeout(() => { + if (!this.paperWallet) { + return this.componentDidMount(); + } + this.paperWallet.toPNG().then(png => this.setState({ paperWalletImage: png })); + }, 500); + } + + public render() { + const { paperWalletImage } = this.state; + const { onBack, onNext, privateKey, keystore } = this.props; + + return ( + + + + + + {translate('MAKE_BACKUP_DESCRIPTION_1')} + {translate('MAKE_BACKUP_DESCRIPTION_2')} + {translate('MAKE_BACKUP_DESCRIPTION_3')} + + + {translate('YOUR_PRIVATE_KEY_LABEL')} + {privateKey} + + + + + + {translate('MAKE_BACKUP_PRINT_BUTTON')} + + + {translate('ACTION_6')} + + + (this.paperWallet = c)} + /> + + + ); + } } diff --git a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx index 7b964dd37..d16466ae6 100644 --- a/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/SaveKeystoreFilePanel.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { Component } from 'react'; import { Button, Typography } from '@mycrypto/ui'; import styled from 'styled-components'; @@ -40,6 +40,9 @@ const StyledButton = styled(Button)` justify-content: center; align-items: center; + &:disabled { + opacity: 0.45; + } &:focus, &:hover { embed { @@ -55,30 +58,50 @@ const ImageWrapper = styled.div` margin-bottom: 25px; `; -export default function SaveKeystoreFilePanel({ onBack, onNext }: PanelProps) { - return ( - - - - +interface Props extends PanelProps { + filename: string; + getKeystoreBlob(): string; +} + +interface State { + downloaded: boolean; +} - {translate('SAVE_KEYSTORE_DESCRIPTION_1')} - {translate('SAVE_KEYSTORE_DESCRIPTION_2')} - {translate('SAVE_KEYSTORE_DESCRIPTION_3')} - - - - {translate('SAVE_KEYSTORE_BUTTON')} - - {translate('ACTION_6')} - - - ); +export default class SaveKeystorePanel extends Component { + public state: State = { + downloaded: false + }; + + public render() { + const { onBack, onNext, getKeystoreBlob, filename } = this.props; + return ( + + + + + + {translate('SAVE_KEYSTORE_DESCRIPTION_1')} + {translate('SAVE_KEYSTORE_DESCRIPTION_2')} + {translate('SAVE_KEYSTORE_DESCRIPTION_3')} + + + this.setState({ downloaded: true })} secondary={true}> + + {translate('SAVE_KEYSTORE_BUTTON')} + + + + {translate('ACTION_6')} + + + + ); + } } diff --git a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx index 74b1e5b03..6c24e2042 100644 --- a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { Component } from 'react'; import { Button, Textarea, Input } from '@mycrypto/ui'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import styled from 'styled-components'; @@ -16,6 +16,10 @@ const StyledButton = styled(Button)` font-size: 18px; margin-bottom: 16px; width: 100%; + + :disabled { + opacity: 0.45; + } `; const FormItemWrapper = styled.div` @@ -41,7 +45,15 @@ const Divider = styled.div` color: ${props => props.theme.headline}; `; -const UploadZone = styled.div` +const FileName = styled.div` + color: #999; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + font-size: 18px; +`; + +const UploadZone = styled.label` width: 100%; font-size: 13px; text-transform: uppercase; @@ -51,43 +63,95 @@ const UploadZone = styled.div` padding: 16px 4px; margin-top: 8px; text-align: center; + cursor: pointer; `; -type Props = PanelProps & RouteComponentProps<{}>; - -function VerifyKeystorePanel(props: Props) { - const { history, onBack } = props; - return ( - - - {translate('YOUR_PRIVATE_KEY_LABEL')} - - - - {translateRaw('OR')} - - - {translate('YOUR_KEYSTORE_LABEL')} - {translateRaw('UPLOAD_KEYSTORE_LABEL')} - - - {translate('INPUT_PASSWORD_LABEL')} - - - - history.replace('/dashboard')}> - {translate('DONE_AND_RETURN_LABEL')} - - - - ); +interface ExtendedProps extends PanelProps { + verifyKeystore(keystore: string, password: string): Promise; +} + +type Props = ExtendedProps & RouteComponentProps<{}>; + +class VerifyKeystorePanel extends Component { + public state = { + validating: false, + isValid: false, + keystore: null, + password: '', + privateKey: '', + fileName: '' + }; + + public validating = false; + + public validate = async () => { + const { verifyKeystore } = this.props; + const { keystore, password } = this.state; + this.validating = true; + + if (keystore) { + const isValid = await verifyKeystore(keystore, password); + this.setState({ isValid }); + } + + this.validating = false; + }; + + public handleFileDrop = (e: any) => { + const fileReader = new FileReader(); + fileReader.readAsText(e.target.files[0], 'UTF-8'); + this.setState({ fileName: e.target.files[0].name }); + + fileReader.onload = () => { + this.setState({ keystore: fileReader.result }, () => this.validate()); + }; + }; + + public handlePasswordInputChanged = (e: any) => { + this.setState({ password: e.target.value }, () => this.validate()); + }; + + public render() { + const { history, onBack } = this.props; + + return ( + + + {translate('YOUR_PRIVATE_KEY_LABEL')} + + + - {translateRaw('OR')} - + + {translate('YOUR_KEYSTORE_LABEL')} + + {translateRaw('UPLOAD_KEYSTORE_LABEL')} + {this.state.fileName && {this.state.fileName}} + + + + {translate('INPUT_PASSWORD_LABEL')} + + + + history.replace('/dashboard')} + > + {translate('DONE_AND_RETURN_LABEL')} + + + + ); + } } export default withRouter(VerifyKeystorePanel); diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx index 030e2a9ad..a5e8090b1 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -20,7 +20,15 @@ const SubmitButton = styled(Button)` font-size: 18px; `; -export default function SelectNetworkPanel({ totalSteps, onBack, onNext }: Props) { +interface Props extends PanelProps { + selectNetworkAndContinue(network: string): void; +} + +export default function SelectNetworkPanel({ + totalSteps, + onBack, + selectNetworkAndContinue +}: Props) { return ( {translateRaw('SELECT_NETWORK_LABEL')} - + selectNetworkAndContinue && selectNetworkAndContinue('Ethereum')} + > {translateRaw('ACTION_6')} From 67fb334586cc4765a6a6aa9024cba06cf33d19b9 Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Thu, 16 May 2019 15:04:09 +0200 Subject: [PATCH 0515/1466] Remove unused provider, verify private key --- .../v2/features/CreateWallet/CreateWallet.tsx | 2 + .../CreateWallet/Keystore/Keystore.tsx | 41 ++++++++----------- .../components/GenerateKeystoreFilePanel.tsx | 15 ++++--- .../Keystore/components/KeystoreProvider.tsx | 13 ------ .../Keystore/components/MakeBackupPanel.tsx | 6 +-- .../components/SaveKeystoreFilePanel.tsx | 6 +-- .../components/VerifyKeystorePanel.tsx | 29 +++++++++---- .../CreateWallet/Keystore/components/index.ts | 1 - .../CreateWallet/Mnemonic/Mnemonic.tsx | 4 +- .../components/SelectNetworkPanel.tsx | 5 ++- 10 files changed, 63 insertions(+), 59 deletions(-) delete mode 100644 common/v2/features/CreateWallet/Keystore/components/KeystoreProvider.tsx diff --git a/common/v2/features/CreateWallet/CreateWallet.tsx b/common/v2/features/CreateWallet/CreateWallet.tsx index 64b5138b7..e06483404 100644 --- a/common/v2/features/CreateWallet/CreateWallet.tsx +++ b/common/v2/features/CreateWallet/CreateWallet.tsx @@ -10,6 +10,8 @@ import './CreateWallet.scss'; import newWalletIcon from 'common/assets/images/icn-new-wallet.svg'; export interface PanelProps { + totalSteps: number; + currentStep: number; onBack(): void; onNext(): void; } diff --git a/common/v2/features/CreateWallet/Keystore/Keystore.tsx b/common/v2/features/CreateWallet/Keystore/Keystore.tsx index c3baa34b0..33a3f4071 100644 --- a/common/v2/features/CreateWallet/Keystore/Keystore.tsx +++ b/common/v2/features/CreateWallet/Keystore/Keystore.tsx @@ -5,8 +5,9 @@ import { IV3Wallet } from 'ethereumjs-wallet'; import { makeBlob } from 'utils/blob'; import { N_FACTOR } from 'config'; import { generateKeystore, fromV3 } from 'libs/web-workers'; +import { stripHexPrefix } from 'libs/formatters'; +import { getPrivKeyWallet } from 'libs/wallet/non-deterministic/wallets'; import { Layout } from 'v2/features'; -import { KeystoreProvider, KeystoreContext } from './components'; import { KeystoreStages, keystoreStageToComponentHash, keystoreFlow } from './constants'; interface State { @@ -31,6 +32,7 @@ export default class CreateWallet extends Component, Sta public render() { const { stage } = this.state; + const currentStep: number = keystoreFlow.indexOf(stage) + 1; const ActivePanel: ReactType = keystoreStageToComponentHash[stage]; const actions = { onBack: this.regressToPreviousStage, @@ -38,30 +40,14 @@ export default class CreateWallet extends Component, Sta generateWalletAndContinue: this.generateWalletAndContinue, selectNetworkAndContinue: this.selectNetworkAndContinue, getKeystoreBlob: this.getKeystoreBlob, - verifyKeystore: this.verifyKeystore + verifyKeystore: this.verifyKeystore, + verifyPrivateKey: this.verifyPrivateKey }; - const isKeystorePanel = [ - KeystoreStages.GenerateKeystore, - KeystoreStages.SaveKeystore, - KeystoreStages.MakeBackup, - KeystoreStages.VerifyKeystore - ].includes(stage); - return ( - - -
              - {isKeystorePanel ? ( - - {({}) => } - - ) : ( - - )} -
              -
              -
              + + + ); } @@ -96,7 +82,7 @@ export default class CreateWallet extends Component, Sta password, keystore: res.keystore, filename: res.filename, - privateKey: res.privateKey, + privateKey: stripHexPrefix(res.privateKey), isGenerating: false }); this.advanceToNextStage(); @@ -122,4 +108,13 @@ export default class CreateWallet extends Component, Sta return false; } }; + + private verifyPrivateKey = (key: string, password: string): boolean => { + try { + getPrivKeyWallet(key, password); + return true; + } catch (e) { + return false; + } + }; } diff --git a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx index b5d4bc446..108dd8985 100644 --- a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx @@ -46,23 +46,28 @@ const Description = () => { }; interface Props extends PanelProps { - generateWalletAndContinue?(password: string): void; + generateWalletAndContinue(password: string): void; } -export default function GenerateKeystoreFilePanel({ onBack, generateWalletAndContinue }: Props) { +export default function GenerateKeystoreFilePanel({ + onBack, + totalSteps, + currentStep, + generateWalletAndContinue +}: Props) { return ( } > generateWalletAndContinue && generateWalletAndContinue(values.password)} + onSubmit={values => generateWalletAndContinue(values.password)} render={() => ( diff --git a/common/v2/features/CreateWallet/Keystore/components/KeystoreProvider.tsx b/common/v2/features/CreateWallet/Keystore/components/KeystoreProvider.tsx deleted file mode 100644 index d4a2fbdd5..000000000 --- a/common/v2/features/CreateWallet/Keystore/components/KeystoreProvider.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React, { Component } from 'react'; - -export const KeystoreContext = React.createContext({}); - -export default class KeystoreProvider extends Component { - public state = {}; - - public render() { - const { children } = this.props; - - return {children}; - } -} diff --git a/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx b/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx index d02415884..5b91fa075 100644 --- a/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/MakeBackupPanel.tsx @@ -104,14 +104,14 @@ export default class MakeBackupPanel extends Component { public render() { const { paperWalletImage } = this.state; - const { onBack, onNext, privateKey, keystore } = this.props; + const { onBack, onNext, totalSteps, currentStep, privateKey, keystore } = this.props; return ( { }; public render() { - const { onBack, onNext, getKeystoreBlob, filename } = this.props; + const { onBack, onNext, totalSteps, currentStep, getKeystoreBlob, filename } = this.props; return ( diff --git a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx index 6c24e2042..f0a1797fc 100644 --- a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx @@ -67,7 +67,9 @@ const UploadZone = styled.label` `; interface ExtendedProps extends PanelProps { + privateKey: string; verifyKeystore(keystore: string, password: string): Promise; + verifyPrivateKey(key: string, password: string): boolean; } type Props = ExtendedProps & RouteComponentProps<{}>; @@ -85,19 +87,26 @@ class VerifyKeystorePanel extends Component { public validating = false; public validate = async () => { - const { verifyKeystore } = this.props; - const { keystore, password } = this.state; + const { verifyKeystore, verifyPrivateKey, privateKey: generatedPrivateKey } = this.props; + const { keystore, password, privateKey } = this.state; this.validating = true; if (keystore) { const isValid = await verifyKeystore(keystore, password); this.setState({ isValid }); + } else if (privateKey) { + const isValid = verifyPrivateKey(privateKey, password) && generatedPrivateKey === privateKey; + this.setState({ isValid }); } this.validating = false; }; - public handleFileDrop = (e: any) => { + public handleFileDrop = (e: React.ChangeEvent) => { + if (!e.target || !e.target.files) { + return; + } + const fileReader = new FileReader(); fileReader.readAsText(e.target.files[0], 'UTF-8'); this.setState({ fileName: e.target.files[0].name }); @@ -107,19 +116,23 @@ class VerifyKeystorePanel extends Component { }; }; - public handlePasswordInputChanged = (e: any) => { + public handlePasswordInputChanged = (e: React.ChangeEvent) => { this.setState({ password: e.target.value }, () => this.validate()); }; + public handlePrivateKeyInputChanged = (e: React.ChangeEvent) => { + this.setState({ privateKey: e.target.value }, () => this.validate()); + }; + public render() { - const { history, onBack } = this.props; + const { history, onBack, totalSteps, currentStep } = this.props; return ( { > {translate('YOUR_PRIVATE_KEY_LABEL')} - + - {translateRaw('OR')} - diff --git a/common/v2/features/CreateWallet/Keystore/components/index.ts b/common/v2/features/CreateWallet/Keystore/components/index.ts index a58a6ef0a..f9440faa5 100644 --- a/common/v2/features/CreateWallet/Keystore/components/index.ts +++ b/common/v2/features/CreateWallet/Keystore/components/index.ts @@ -1,5 +1,4 @@ export { default as GenerateKeystoreFilePanel } from './GenerateKeystoreFilePanel'; -export { KeystoreContext, default as KeystoreProvider } from './KeystoreProvider'; export { default as SaveKeystoreFilePanel } from './SaveKeystoreFilePanel'; export { default as MakeBackupPanel } from './MakeBackupPanel'; export { default as VerifyKeystorePanel } from './VerifyKeystorePanel'; diff --git a/common/v2/features/CreateWallet/Mnemonic/Mnemonic.tsx b/common/v2/features/CreateWallet/Mnemonic/Mnemonic.tsx index a7e9e8141..60f63dbcd 100644 --- a/common/v2/features/CreateWallet/Mnemonic/Mnemonic.tsx +++ b/common/v2/features/CreateWallet/Mnemonic/Mnemonic.tsx @@ -12,6 +12,7 @@ export default class CreateWallet extends Component> { public render() { const { stage } = this.state; + const currentStep: number = mnemonicFlow.indexOf(stage) + 1; const ActivePanel = mnemonicStageToComponentHash[stage]; const actions = { onBack: this.regressToPreviousStage, @@ -31,6 +32,7 @@ export default class CreateWallet extends Component> { {({ words, generateWords }) => ( > { )} ) : ( - + )}
              diff --git a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx index a5e8090b1..8e53ad6bf 100644 --- a/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx +++ b/common/v2/features/CreateWallet/components/SelectNetworkPanel.tsx @@ -26,6 +26,7 @@ interface Props extends PanelProps { export default function SelectNetworkPanel({ totalSteps, + currentStep, onBack, selectNetworkAndContinue }: Props) { @@ -33,7 +34,7 @@ export default function SelectNetworkPanel({ selectNetworkAndContinue && selectNetworkAndContinue('Ethereum')} + onClick={() => selectNetworkAndContinue('Ethereum')} > {translateRaw('ACTION_6')} From 4c930c0127527fc8cd5eab5b8112d51d51336e99 Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Thu, 16 May 2019 15:21:23 +0200 Subject: [PATCH 0516/1466] Get total steps from create keystore flow array --- common/v2/features/CreateWallet/Keystore/Keystore.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/v2/features/CreateWallet/Keystore/Keystore.tsx b/common/v2/features/CreateWallet/Keystore/Keystore.tsx index 33a3f4071..f4787d7ca 100644 --- a/common/v2/features/CreateWallet/Keystore/Keystore.tsx +++ b/common/v2/features/CreateWallet/Keystore/Keystore.tsx @@ -33,6 +33,7 @@ export default class CreateWallet extends Component, Sta public render() { const { stage } = this.state; const currentStep: number = keystoreFlow.indexOf(stage) + 1; + const totalSteps: number = keystoreFlow.length; const ActivePanel: ReactType = keystoreStageToComponentHash[stage]; const actions = { onBack: this.regressToPreviousStage, @@ -46,7 +47,12 @@ export default class CreateWallet extends Component, Sta return ( - + ); } From d0d06ddbf759b03e8ab34026fe730e61b347f2ef Mon Sep 17 00:00:00 2001 From: blurpesec Date: Thu, 16 May 2019 10:29:05 -0400 Subject: [PATCH 0517/1466] added create-account notifications --- .../v2/features/AddAccount/components/SaveAndRedirect.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx index 203b00cd1..4ef15a591 100644 --- a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx +++ b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx @@ -1,16 +1,18 @@ import React, { useContext, useEffect } from 'react'; import { Route, Redirect } from 'react-router'; import { FormData } from 'v2/features/AddAccount/types'; -import { AccountContext } from 'v2/providers'; +import { AccountContext, NotificationsContext } from 'v2/providers'; import { getNetworkByName } from 'v2/libs'; import { NetworkOptions } from 'v2/services/NetworkOptions/types'; import { Account } from 'v2/services/Account/types'; +import { NotificationTemplates } from 'v2/providers/NotificationsProvider/constants'; /* Create a new account in localStorage and redirect to dashboard. */ function SaveAndRedirect(payload: { formData: FormData }) { const { createAccount } = useContext(AccountContext); + const { displayNotification } = useContext(NotificationsContext); useEffect(() => { const network: NetworkOptions | undefined = getNetworkByName(payload.formData.network); const account: Account = { @@ -25,6 +27,9 @@ function SaveAndRedirect(payload: { formData: FormData }) { transactionHistory: '' }; createAccount(account); + displayNotification(NotificationTemplates.walletCreated, { + address: account.address + }); }); return ( From 666d293292ec928e55365a5634020a4c90c18e7c Mon Sep 17 00:00:00 2001 From: Azarielle Date: Thu, 16 May 2019 10:35:48 -0400 Subject: [PATCH 0518/1466] initial fix for add account metamask locked --- .../AddAccount/components/Web3Provider.tsx | 94 ++++++++++++------- 1 file changed, 62 insertions(+), 32 deletions(-) diff --git a/common/v2/features/AddAccount/components/Web3Provider.tsx b/common/v2/features/AddAccount/components/Web3Provider.tsx index 3ea1054cb..9fb3b608d 100644 --- a/common/v2/features/AddAccount/components/Web3Provider.tsx +++ b/common/v2/features/AddAccount/components/Web3Provider.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { Component } from 'react'; import translate from 'translations'; import { knowledgeBaseURL as KB_URL } from 'v2/config'; @@ -12,43 +12,73 @@ interface Props { onUnlock(param: any): void; } -function Web3ProviderDecrypt({ onUnlock }: Props) { - const unlockWallet = async () => { - const walletPayload = await unlockWeb3(); - onUnlock(walletPayload); +interface State { + web3Unlocked: boolean; +} + +class Web3ProviderDecrypt extends Component { + public state: State = { + web3Unlocked: false }; + private unlockWallet(onUnlock: Props) { + async () => { + const walletPayload = await unlockWeb3(); + onUnlock(walletPayload); + }; + } + + componentWillMount() { + let web3 = ''; + + window.addEventListener('load', function() { + // Checking if Web3 has been injected by the browser (Mist/MetaMask) + if (typeof web3 !== 'undefined') { + return (web3 = 'unlocked'); + } else { + return (web3 = 'locked'); + } + }); + + if (web3 === 'unlocked') { + this.setState({ web3Unlocked: true }); + } else { + this.setState({ web3Unlocked: false }); + } + } - return ( -
              -
              {translate('ADD_ACCOUNT_METAMASK_TITLE')}
              -
              {translate('ADD_ACCOUNT_METAMASK_DESC')}
              -
              -
              -
              - + public render() { + return ( +
              +
              {translate('ADD_ACCOUNT_METAMASK_TITLE')}
              +
              {translate('ADD_ACCOUNT_METAMASK_DESC')}
              +
              +
              +
              + +
              +
              - -
              -
              -
              - {translate('ADD_ACCOUNT_METAMASK_FOOTER')}{' '} - -
              -
              - +
              +
              + {translate('ADD_ACCOUNT_METAMASK_FOOTER')}{' '} + +
              +
              + +
              -
              - ); + ); + } } export default Web3ProviderDecrypt; From df2170912437d53126f615f54afa5a7979fb7cd7 Mon Sep 17 00:00:00 2001 From: blurpesec Date: Thu, 16 May 2019 11:37:43 -0400 Subject: [PATCH 0519/1466] Fix metamask error with non-privacy mode --- common/translations/lang/en.json | 3 +- .../components/ErrorMessages/InlineErrors.tsx | 9 +++ common/v2/components/ErrorMessages/index.ts | 1 + common/v2/components/index.ts | 1 + .../AddAccount/components/Web3Provider.tsx | 55 +++++++++---------- .../ScreenLock/components/InputField.tsx | 9 +-- common/v2/features/Wallets/web3/web3.ts | 1 - 7 files changed, 41 insertions(+), 38 deletions(-) create mode 100644 common/v2/components/ErrorMessages/InlineErrors.tsx create mode 100644 common/v2/components/ErrorMessages/index.ts diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index bc5e89b90..6d040abcf 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -874,6 +874,7 @@ "NOTIFICATIONS_GET_WALLET_TITLE": "Get a Hardware Wallet!", "NOTIFICATIONS_GET_WALLET_DESCRIPTION": "Keep your funds safe offline with Trezor or Ledger.", "NOTIFICATIONS_GET_WALLET_RESOURCE_TREZOR": "Get a Trezor", - "NOTIFICATIONS_GET_WALLET_RESOURCE_LEDGER": "Get a Ledger" + "NOTIFICATIONS_GET_WALLET_RESOURCE_LEDGER": "Get a Ledger", + "WEB3_ONUNLOCK_NOT_FOUND_ERROR": "Please unlock your Metamask before continuing." } } diff --git a/common/v2/components/ErrorMessages/InlineErrors.tsx b/common/v2/components/ErrorMessages/InlineErrors.tsx new file mode 100644 index 000000000..25104bd57 --- /dev/null +++ b/common/v2/components/ErrorMessages/InlineErrors.tsx @@ -0,0 +1,9 @@ +import styled from 'styled-components'; +import { COLORS } from 'v2/features/constants'; +const { PASTEL_RED } = COLORS; + +export const InlineErrorMsg = styled.div` + width: 100%; + color: ${PASTEL_RED}; + text-align: justify; +`; diff --git a/common/v2/components/ErrorMessages/index.ts b/common/v2/components/ErrorMessages/index.ts new file mode 100644 index 000000000..13599d1c5 --- /dev/null +++ b/common/v2/components/ErrorMessages/index.ts @@ -0,0 +1 @@ +export * from './InlineErrors'; diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index 29c8319b0..b6e331629 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -7,3 +7,4 @@ export { default as Overlay } from './Overlay'; export { default as Stepper } from './Stepper'; export { default as Modal } from './Modal'; export { default as NewAppReleaseModal } from './NewAppReleaseModal'; +export * from './ErrorMessages'; diff --git a/common/v2/features/AddAccount/components/Web3Provider.tsx b/common/v2/features/AddAccount/components/Web3Provider.tsx index 9fb3b608d..e6644be03 100644 --- a/common/v2/features/AddAccount/components/Web3Provider.tsx +++ b/common/v2/features/AddAccount/components/Web3Provider.tsx @@ -1,11 +1,12 @@ import React, { Component } from 'react'; -import translate from 'translations'; +import translate, { translateRaw } from 'translations'; import { knowledgeBaseURL as KB_URL } from 'v2/config'; import MetamaskSVG from 'common/assets/images/wallets/metamask-2.svg'; import { NewTabLink } from 'components/ui'; import { unlockWeb3 } from 'v2/features/Wallets'; import './Web3Provider.scss'; +import { InlineErrorMsg } from 'v2/components/ErrorMessages/InlineErrors'; interface Props { wallet: object; @@ -13,40 +14,20 @@ interface Props { } interface State { - web3Unlocked: boolean; + web3Unlocked: boolean | undefined; } -class Web3ProviderDecrypt extends Component { - public state: State = { - web3Unlocked: false - }; - private unlockWallet(onUnlock: Props) { - async () => { - const walletPayload = await unlockWeb3(); - onUnlock(walletPayload); +class Web3ProviderDecrypt extends Component { + constructor(props: Props) { + super(props); + this.state = { + web3Unlocked: undefined }; - } - - componentWillMount() { - let web3 = ''; - - window.addEventListener('load', function() { - // Checking if Web3 has been injected by the browser (Mist/MetaMask) - if (typeof web3 !== 'undefined') { - return (web3 = 'unlocked'); - } else { - return (web3 = 'locked'); - } - }); - - if (web3 === 'unlocked') { - this.setState({ web3Unlocked: true }); - } else { - this.setState({ web3Unlocked: false }); - } + this.unlockWallet = this.unlockWallet.bind(this); } public render() { + const { web3Unlocked } = this.state; return (
              {translate('ADD_ACCOUNT_METAMASK_TITLE')}
              @@ -60,6 +41,10 @@ class Web3ProviderDecrypt extends Component { + + {web3Unlocked === false && ( + {translateRaw('WEB3_ONUNLOCK_NOT_FOUND_ERROR')} + )}
              @@ -79,6 +64,18 @@ class Web3ProviderDecrypt extends Component {
              ); } + + public async unlockWallet() { + try { + const walletPayload = await unlockWeb3(); + if (!walletPayload) { + throw new Error('Failed to unlock web3'); + } + this.props.onUnlock(walletPayload); + } catch (e) { + this.setState({ ...this.state, web3Unlocked: false }); + } + } } export default Web3ProviderDecrypt; diff --git a/common/v2/features/ScreenLock/components/InputField.tsx b/common/v2/features/ScreenLock/components/InputField.tsx index a8f3c0083..797d99ed7 100644 --- a/common/v2/features/ScreenLock/components/InputField.tsx +++ b/common/v2/features/ScreenLock/components/InputField.tsx @@ -2,6 +2,7 @@ import React, { Component } from 'react'; import styled from 'styled-components'; import { COLORS } from 'v2/features/constants'; import _ from 'lodash'; +import { InlineErrorMsg } from 'v2/components/ErrorMessages/InlineErrors'; const { PASTEL_RED } = COLORS; @@ -38,12 +39,6 @@ const CustomInput = styled.input` border-color: ${(props: CustomInputProps) => (props.inputError ? PASTEL_RED : '')}; `; -const ErrorMessage = styled.div` - width: 100%; - color: ${PASTEL_RED}; - text-align: justify; -`; - interface Props { type?: string; label?: string; @@ -68,7 +63,7 @@ export class InputField extends Component { onKeyUp={this.handleKeyUp} type={type ? type : 'text'} /> - {inputError && {inputError}} + {inputError && {inputError}} ); } diff --git a/common/v2/features/Wallets/web3/web3.ts b/common/v2/features/Wallets/web3/web3.ts index 87395812b..c1ee25bbd 100644 --- a/common/v2/features/Wallets/web3/web3.ts +++ b/common/v2/features/Wallets/web3/web3.ts @@ -76,7 +76,6 @@ export const unlockWeb3 = async () => { } return new Web3Wallet(address, stripWeb3Network(network)); } catch (err) { - console.error(err); // unset web3 node so node dropdown isn't disabled //configNodesStaticActions.web3UnsetNode(); console.log('Error ' + translateRaw(err.message)); From d062fe4114318711dadbf614d91efff176c4561e Mon Sep 17 00:00:00 2001 From: blurpesec Date: Thu, 16 May 2019 23:17:51 -0400 Subject: [PATCH 0520/1466] added a couple translation entries --- common/translations/lang/en.json | 6 +++++- common/v2/features/AddAccount/components/Keystore.tsx | 1 - common/v2/features/AddAccount/components/PrivateKey.tsx | 2 +- common/v2/features/AddAccount/components/ViewOnly.tsx | 2 +- .../features/AddAccount/components/Web3ProviderInstall.tsx | 6 +++--- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 6d040abcf..7e8848834 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -875,6 +875,10 @@ "NOTIFICATIONS_GET_WALLET_DESCRIPTION": "Keep your funds safe offline with Trezor or Ledger.", "NOTIFICATIONS_GET_WALLET_RESOURCE_TREZOR": "Get a Trezor", "NOTIFICATIONS_GET_WALLET_RESOURCE_LEDGER": "Get a Ledger", - "WEB3_ONUNLOCK_NOT_FOUND_ERROR": "Please unlock your Metamask before continuing." + "WEB3_ONUNLOCK_NOT_FOUND_ERROR": "Please unlock your Metamask before continuing.", + "YOUR_PRIVATE_KEY": "Your Private Key", + "INPUT_PUBLIC_ADDRESS_LABEL": "Select or Input Your Address", + "COINBASE_APP_LABEL": "Coinbase App", + "TRUST_APP_LABEL": "Trust Wallet App" } } diff --git a/common/v2/features/AddAccount/components/Keystore.tsx b/common/v2/features/AddAccount/components/Keystore.tsx index 8c8baf562..d6a842fa5 100644 --- a/common/v2/features/AddAccount/components/Keystore.tsx +++ b/common/v2/features/AddAccount/components/Keystore.tsx @@ -119,7 +119,6 @@ export class KeystoreDecrypt extends PureComponent { file: this.state.file, password: this.state.password }); - console.log(this.state.file, this.state.password, wallet); this.props.onUnlock(wallet); }; diff --git a/common/v2/features/AddAccount/components/PrivateKey.tsx b/common/v2/features/AddAccount/components/PrivateKey.tsx index 0826e5587..e1ae71baa 100644 --- a/common/v2/features/AddAccount/components/PrivateKey.tsx +++ b/common/v2/features/AddAccount/components/PrivateKey.tsx @@ -76,7 +76,7 @@ export class PrivateKeyDecrypt extends PureComponent {
              - Coinbase App + {translateRaw('COINBASE_APP_LABEL')} From 19615a344d4ed01c9435eccead5ebd030205dd7c Mon Sep 17 00:00:00 2001 From: blurpesec Date: Fri, 17 May 2019 10:28:22 -0400 Subject: [PATCH 0521/1466] brief fix to notif type --- common/v2/features/AddAccount/components/SaveAndRedirect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx index 4ef15a591..0017fb448 100644 --- a/common/v2/features/AddAccount/components/SaveAndRedirect.tsx +++ b/common/v2/features/AddAccount/components/SaveAndRedirect.tsx @@ -27,7 +27,7 @@ function SaveAndRedirect(payload: { formData: FormData }) { transactionHistory: '' }; createAccount(account); - displayNotification(NotificationTemplates.walletCreated, { + displayNotification(NotificationTemplates.walletAdded, { address: account.address }); }); From 8a93c1c7dfc3c0ed51d05f0b141c0547529d5a1c Mon Sep 17 00:00:00 2001 From: blurpesec Date: Mon, 20 May 2019 14:38:30 -0400 Subject: [PATCH 0522/1466] implement gas price estimation --- common/v2/features/Gas/gasPriceFunctions.ts | 17 +++------------- .../components/TransactionFormData.tsx | 1 + .../components/fields/GasPriceField.tsx | 6 +----- .../components/fields/GasPriceSlider.tsx | 20 ++++++++++++++----- common/v2/features/index.ts | 1 + common/v2/libs/networks/networks.ts | 5 +++++ 6 files changed, 26 insertions(+), 24 deletions(-) diff --git a/common/v2/features/Gas/gasPriceFunctions.ts b/common/v2/features/Gas/gasPriceFunctions.ts index 009631a47..973fe9fe7 100644 --- a/common/v2/features/Gas/gasPriceFunctions.ts +++ b/common/v2/features/Gas/gasPriceFunctions.ts @@ -1,5 +1,4 @@ -import { RawTransactionValues } from '../SendAssets/SendAssets'; -import { getNetworkByAddress } from 'v2/libs/networks/networks'; +import { getNetworkById } from 'v2/libs/networks/networks'; import { NetworkOptions } from 'v2/services/NetworkOptions/types'; import { gasPriceDefaults } from 'config/data'; import { GasEstimates, fetchGasEstimates } from 'v2/api/gas'; @@ -33,19 +32,13 @@ export function getDefaultEstimates(network: NetworkOptions | undefined) { } } -export async function fetchGasPriceEstimates( - transaction: RawTransactionValues -): Promise { +export async function fetchGasPriceEstimates(networkId: string): Promise { // Don't try on non-estimating network - const transactionSender = transaction.from; - const network = getNetworkByAddress(transactionSender); - console.log('1'); + const network = getNetworkById(networkId); if (!network || network.isCustom || !network.shouldEstimateGasPrice) { - console.log('2'); const defaultEstimates: GasEstimates = getDefaultEstimates(network); return defaultEstimates; } - console.log('3'); // Don't try while offline /*const isOffline: boolean = yield select(configMetaSelectors.getOffline); if (isOffline) { @@ -55,13 +48,9 @@ export async function fetchGasPriceEstimates( // Try to fetch new estimates try { - console.log('4'); const estimates: GasEstimates = await fetchGasEstimates(); - console.log('5'); - console.log(estimates); return estimates; } catch (err) { - console.warn('Failed to fetch gas estimates:', err); const defaultEstimates: GasEstimates = getDefaultEstimates(network); return defaultEstimates; } diff --git a/common/v2/features/SendAssets/components/TransactionFormData.tsx b/common/v2/features/SendAssets/components/TransactionFormData.tsx index b659e9e1d..1266e1f55 100644 --- a/common/v2/features/SendAssets/components/TransactionFormData.tsx +++ b/common/v2/features/SendAssets/components/TransactionFormData.tsx @@ -156,6 +156,7 @@ export function SendAssetsForm({ {/* TRANSLATE THIS */} { public isValidGasPrice = (value: any) => { diff --git a/common/v2/features/SendAssets/components/fields/GasPriceSlider.tsx b/common/v2/features/SendAssets/components/fields/GasPriceSlider.tsx index 407629fff..3b107083a 100644 --- a/common/v2/features/SendAssets/components/fields/GasPriceSlider.tsx +++ b/common/v2/features/SendAssets/components/fields/GasPriceSlider.tsx @@ -6,6 +6,9 @@ import translate, { translateRaw } from 'translations'; import './styles/GasPriceSlider.scss'; import { Field, FieldProps } from 'formik'; import { Transaction } from 'v2/services/Transaction'; +import { fetchGasPriceEstimates } from 'v2/features/Gas/gasPriceFunctions'; +import { GasEstimates } from 'v2/api/gas'; +import { TransactionFields } from '../../SendAssets'; const SliderWithTooltip = createSliderWithTooltip(Slider); @@ -21,6 +24,7 @@ interface StateProps { fastest: number; isDefault: boolean; }; + transactionFieldValues: TransactionFields; handleChange: { (e: ChangeEvent): void; >(field: T): T extends ChangeEvent @@ -28,10 +32,6 @@ interface StateProps { : (e: string | ChangeEvent) => void; }; } -/* -interface ActionProps { - fetchGasEstimates: {};//gasActions.TFetchGasEstimates; -}*/ type Props = OwnProps & StateProps; // & ActionProps; @@ -50,9 +50,18 @@ export default class SimpleGas extends React.Component { realGasPrice: 0 }; + public async componentDidMount() { + const gasPriceValues: GasEstimates = await fetchGasPriceEstimates( + this.props.transactionFieldValues.asset + ); + console.log('fetched new gasPrice values'); + console.log(gasPriceValues); + this.setState({ ...this.state, gasEstimates: gasPriceValues }); + } + public render() { const { gasPrice } = this.props; - const gasEstimates = { + const gasEstimates = this.props.gasEstimates || { fastest: 20, fast: 18, standard: 12, @@ -64,6 +73,7 @@ export default class SimpleGas extends React.Component { max: gasEstimates ? gasEstimates.fastest : gasPriceDefaults.max, min: gasEstimates ? gasEstimates.safeLow : gasPriceDefaults.min }; + console.log(bounds); const gasNotches = this.makeGasNotches(); /** diff --git a/common/v2/features/index.ts b/common/v2/features/index.ts index 00b473244..c037ce054 100644 --- a/common/v2/features/index.ts +++ b/common/v2/features/index.ts @@ -14,3 +14,4 @@ export * from './Wallets'; export * from './constants'; export * from './ScreenLock'; export * from './SendAssets'; +export * from './Gas'; diff --git a/common/v2/libs/networks/networks.ts b/common/v2/libs/networks/networks.ts index 726df3610..4d2830560 100644 --- a/common/v2/libs/networks/networks.ts +++ b/common/v2/libs/networks/networks.ts @@ -29,6 +29,11 @@ export const getNetworkByName = (name: string): NetworkOptions | undefined => { return networks.find((network: NetworkOptions) => network.name === name); }; +export const getNetworkById = (id: string): NetworkOptions | undefined => { + const networks = getAllNetworks() || []; + return networks.find((network: NetworkOptions) => network.id === id); +}; + export const isWalletFormatSupportedOnNetwork = ( network: NetworkOptions, format: WalletName From 0d4973a4ac7c68f5ead47b7747b6cc0c2cff2adb Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Tue, 21 May 2019 09:03:17 +0200 Subject: [PATCH 0523/1466] Refactor input field --- common/v2/{features/ScreenLock => }/components/InputField.tsx | 0 common/v2/components/index.ts | 1 + .../features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx | 3 +-- common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx | 3 +-- 4 files changed, 3 insertions(+), 4 deletions(-) rename common/v2/{features/ScreenLock => }/components/InputField.tsx (100%) diff --git a/common/v2/features/ScreenLock/components/InputField.tsx b/common/v2/components/InputField.tsx similarity index 100% rename from common/v2/features/ScreenLock/components/InputField.tsx rename to common/v2/components/InputField.tsx diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index 29c8319b0..e89cd99f3 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -7,3 +7,4 @@ export { default as Overlay } from './Overlay'; export { default as Stepper } from './Stepper'; export { default as Modal } from './Modal'; export { default as NewAppReleaseModal } from './NewAppReleaseModal'; +export { default as InputField } from './InputField'; diff --git a/common/v2/features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx b/common/v2/features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx index 7e71ee840..20b07c656 100644 --- a/common/v2/features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx +++ b/common/v2/features/ScreenLock/ScreenLockLocked/ScreenLockLocked.tsx @@ -4,9 +4,8 @@ import { Button } from '@mycrypto/ui'; import styled from 'styled-components'; import translate, { translateRaw } from 'translations'; -import { ExtendedContentPanel } from 'v2/components'; +import { ExtendedContentPanel, InputField } from 'v2/components'; import { Layout } from 'v2/features'; -import { InputField } from '../components/InputField'; import { LockScreenContext } from 'v2/providers/LockScreenProvider/LockScreenProvider'; import { AnalyticsService, ANALYTICS_CATEGORIES } from 'v2/services'; diff --git a/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx b/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx index f666258a9..2070d2c6c 100644 --- a/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx +++ b/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx @@ -4,9 +4,8 @@ import { Button } from '@mycrypto/ui'; import styled from 'styled-components'; import translate, { translateRaw } from 'translations'; -import { ExtendedContentPanel } from 'v2/components'; +import { ExtendedContentPanel, InputField } from 'v2/components'; import { Layout } from 'v2/features'; -import { InputField } from '../components/InputField'; import { LockScreenContext } from 'v2/providers/LockScreenProvider/LockScreenProvider'; import { AnalyticsService, ANALYTICS_CATEGORIES } from 'v2/services'; From 57b6f085663e9c9752d9c9ea5ae0d361864b0e58 Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Tue, 21 May 2019 10:19:51 +0200 Subject: [PATCH 0524/1466] Save created account and show notification --- .../CreateWallet/Keystore/Keystore.tsx | 46 ++++++++++++++++++- .../components/VerifyKeystorePanel.tsx | 12 ++--- .../withAccountAndNotificationsContext.tsx | 19 ++++++++ 3 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 common/v2/features/CreateWallet/Keystore/components/withAccountAndNotificationsContext.tsx diff --git a/common/v2/features/CreateWallet/Keystore/Keystore.tsx b/common/v2/features/CreateWallet/Keystore/Keystore.tsx index f4787d7ca..b4384c161 100644 --- a/common/v2/features/CreateWallet/Keystore/Keystore.tsx +++ b/common/v2/features/CreateWallet/Keystore/Keystore.tsx @@ -1,6 +1,7 @@ import React, { Component, ReactType } from 'react'; import { RouteComponentProps } from 'react-router-dom'; import { IV3Wallet } from 'ethereumjs-wallet'; +import { addHexPrefix, toChecksumAddress } from 'ethereumjs-util'; import { makeBlob } from 'utils/blob'; import { N_FACTOR } from 'config'; @@ -9,6 +10,12 @@ import { stripHexPrefix } from 'libs/formatters'; import { getPrivKeyWallet } from 'libs/wallet/non-deterministic/wallets'; import { Layout } from 'v2/features'; import { KeystoreStages, keystoreStageToComponentHash, keystoreFlow } from './constants'; +import { NotificationTemplates } from 'v2/providers/NotificationsProvider/constants'; +import { getNetworkByName } from 'v2/libs'; +import { NetworkOptions } from 'v2/services/NetworkOptions/types'; +import { Account } from 'v2/services/Account/types'; +import { InsecureWalletName } from 'v2/config/data'; +import { withAccountAndNotificationsContext } from './components/withAccountAndNotificationsContext'; interface State { password: string; @@ -20,7 +27,12 @@ interface State { isGenerating: boolean; } -export default class CreateWallet extends Component, State> { +interface Props extends RouteComponentProps<{}> { + createAccount(accountData: Account): void; + displayNotification(templateName: string, templateData?: object): void; +} + +class CreateWallet extends Component { public state: State = { password: '', privateKey: '', @@ -42,7 +54,8 @@ export default class CreateWallet extends Component, Sta selectNetworkAndContinue: this.selectNetworkAndContinue, getKeystoreBlob: this.getKeystoreBlob, verifyKeystore: this.verifyKeystore, - verifyPrivateKey: this.verifyPrivateKey + verifyPrivateKey: this.verifyPrivateKey, + addCreatedAccountAndRedirectToDashboard: this.addCreatedAccountAndRedirectToDashboard }; return ( @@ -80,6 +93,33 @@ export default class CreateWallet extends Component, Sta } }; + private addCreatedAccountAndRedirectToDashboard = () => { + const { history, createAccount, displayNotification } = this.props; + const { keystore, network } = this.state; + + if (!keystore) { + return; + } + + const accountNetwork: NetworkOptions | undefined = getNetworkByName(network); + const account: Account = { + address: toChecksumAddress(addHexPrefix(keystore.address)), + network, + accountType: InsecureWalletName.KEYSTORE_FILE, + derivationPath: '', + assets: accountNetwork ? accountNetwork.unit : 'DefaultAsset', + value: 0, + label: 'New Account', // @TODO: we really should have the correct label before! + localSettings: 'default', + transactionHistory: '' + }; + createAccount(account); + displayNotification(NotificationTemplates.walletCreated, { + address: account.address + }); + history.replace('/dashboard'); + }; + private generateWalletAndContinue = async (password: string) => { this.setState({ isGenerating: true }); try { @@ -124,3 +164,5 @@ export default class CreateWallet extends Component, Sta } }; } + +export default withAccountAndNotificationsContext(CreateWallet); diff --git a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx index f0a1797fc..f9344b5d3 100644 --- a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx @@ -1,6 +1,5 @@ import React, { Component } from 'react'; import { Button, Textarea, Input } from '@mycrypto/ui'; -import { withRouter, RouteComponentProps } from 'react-router-dom'; import styled from 'styled-components'; import { ExtendedContentPanel } from 'v2/components'; @@ -66,14 +65,13 @@ const UploadZone = styled.label` cursor: pointer; `; -interface ExtendedProps extends PanelProps { +interface Props extends PanelProps { privateKey: string; verifyKeystore(keystore: string, password: string): Promise; verifyPrivateKey(key: string, password: string): boolean; + addCreatedAccountAndRedirectToDashboard(): void; } -type Props = ExtendedProps & RouteComponentProps<{}>; - class VerifyKeystorePanel extends Component { public state = { validating: false, @@ -125,7 +123,7 @@ class VerifyKeystorePanel extends Component { }; public render() { - const { history, onBack, totalSteps, currentStep } = this.props; + const { addCreatedAccountAndRedirectToDashboard, onBack, totalSteps, currentStep } = this.props; return ( { history.replace('/dashboard')} + onClick={addCreatedAccountAndRedirectToDashboard} > {translate('DONE_AND_RETURN_LABEL')} @@ -167,4 +165,4 @@ class VerifyKeystorePanel extends Component { } } -export default withRouter(VerifyKeystorePanel); +export default VerifyKeystorePanel; diff --git a/common/v2/features/CreateWallet/Keystore/components/withAccountAndNotificationsContext.tsx b/common/v2/features/CreateWallet/Keystore/components/withAccountAndNotificationsContext.tsx new file mode 100644 index 000000000..1a8209c40 --- /dev/null +++ b/common/v2/features/CreateWallet/Keystore/components/withAccountAndNotificationsContext.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + +import { AccountContext, NotificationsContext } from 'v2/providers'; + +export const withAccountAndNotificationsContext = (Component: any) => (props: any) => ( + + {({ createAccount }) => ( + + {({ displayNotification }) => ( + + )} + + )} + +); From 140d297cd19c887b14409f0a53eca2107f04eae9 Mon Sep 17 00:00:00 2001 From: Peter Zlodej Date: Tue, 21 May 2019 15:24:13 +0200 Subject: [PATCH 0525/1466] Verify keystore form validation --- common/translations/lang/en.json | 4 +- common/v2/components/InputField.tsx | 93 ++++++++- .../components/GenerateKeystoreFilePanel.tsx | 183 +++++++++++------- .../components/VerifyKeystorePanel.tsx | 92 +++++---- .../ScreenLockNew/ScreenLockNew.tsx | 4 +- 5 files changed, 261 insertions(+), 115 deletions(-) diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 87bc70c12..76cfd018f 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -800,8 +800,8 @@ "SCREEN_LOCK_NEW_PASSWORD_LABEL":"Password (min 8 characters)", "SCREEN_LOCK_NEW_CONFIRM_PASSWORD_LABEL":"Confirm password", "SCREEN_LOCK_NEW_CREATE_PASSWORD_BUTTON": "Create Password", - "SCREEN_LOCK_NEW_PASSWORD_TOO_SHORT":"Password must be at least 8 characters long", - "SCREEN_LOCK_NEW_PASSWORDS_DONT_MATCH":"Passwords don't match", + "INPUT_ERROR_PASSWORD_TOO_SHORT":"Password must be at least 8 characters long", + "INPUT_ERROR_PASSWORDS_DONT_MATCH":"Passwords don't match", "SCREEN_LOCK_FORGOT_PASSWORD_HEADING":"Forgot Screen Lock Password?", "SCREEN_LOCK_FORGOT_PASSWORD_DESCRIPTION":"Unlike the traditional, centralized web, we cannot recover your password.", "SCREEN_LOCK_FORGOT_PASSWORD_ADDITIONAL_DESCRIPTION":"You can import your MyCrypto Settings to regain access to your wallet. If you don't have your MyCrypto Settings, you can start from scratch and re-import your accounts.", diff --git a/common/v2/components/InputField.tsx b/common/v2/components/InputField.tsx index a8f3c0083..1e6b42d14 100644 --- a/common/v2/components/InputField.tsx +++ b/common/v2/components/InputField.tsx @@ -1,9 +1,10 @@ import React, { Component } from 'react'; import styled from 'styled-components'; import { COLORS } from 'v2/features/constants'; +import { Icon } from '@mycrypto/ui'; import _ from 'lodash'; -const { PASTEL_RED } = COLORS; +const { PASTEL_RED, BRIGHT_SKY_BLUE } = COLORS; const MainWrapper = styled.div` margin-bottom: 15px; @@ -22,6 +23,7 @@ const Label = styled.p` interface CustomInputProps { inputError?: string; + showEye?: boolean; } const CustomInput = styled.input` @@ -29,7 +31,7 @@ const CustomInput = styled.input` background: ${props => props.theme.controlBackground}; border: 0.125em solid ${props => props.theme.controlBorder}; border-radius: 0.125em; - padding: 12px 12px; + padding: ${props => (props.showEye ? '12px 36px 12px 12px' : '12px 12px')} display: flex; :focus-within { outline: none; @@ -38,36 +40,107 @@ const CustomInput = styled.input` border-color: ${(props: CustomInputProps) => (props.inputError ? PASTEL_RED : '')}; `; +const CustomTextArea = styled.textarea` + width: 100%; + background: ${props => props.theme.controlBackground}; + border: 0.125em solid ${props => props.theme.controlBorder}; + border-radius: 0.125em; + padding: ${props => (props.showEye ? '12px 36px 12px 12px' : '12px 12px')} + display: flex; + :focus-within { + outline: none; + box-shadow: ${props => props.theme.outline}; + } + border-color: ${(props: CustomInputProps) => (props.inputError ? PASTEL_RED : '')}; + resize: none; +`; + const ErrorMessage = styled.div` + font-size: 16px; width: 100%; color: ${PASTEL_RED}; text-align: justify; `; +const InputWrapper = styled.div` + position: relative; + width: 100%; +`; + +interface CustomIconProps { + showPassword?: boolean; +} + +const CustomIcon = styled(Icon)` + svg { + margin-top: 6px; + width: 23px; + height: 23px; + color: ${(props: CustomIconProps) => (props.showPassword ? BRIGHT_SKY_BLUE : '')}; + cursor: pointer; + user-select: none; + } +`; + +const CustomIconWrapper = styled.div` + display: flex; + height: 100%; + align-items: center; + position: absolute; + right: 10px; + top: 0; +`; + interface Props { type?: string; label?: string; value: string; inputError?: string | undefined; + showEye?: boolean; + textarea?: boolean; onChange(event: any): void; validate?(): void | undefined; } export class InputField extends Component { + public state = { showPassword: false }; private validatorTimeout: any = null; + public handleEyeClick = () => { + this.setState({ showPassword: !this.state.showPassword }); + }; + public render() { - const { value, label, onChange, inputError, type } = this.props; + const { value, label, onChange, inputError, type, showEye, textarea } = this.props; return ( {label && } - + + {textarea ? ( + + ) : ( + + )} + + {showEye && ( + + + + )} + + {inputError && {inputError}} ); diff --git a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx index 108dd8985..02c73af74 100644 --- a/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/GenerateKeystoreFilePanel.tsx @@ -1,16 +1,13 @@ -import React from 'react'; -import { Formik, Form, Field, FieldProps } from 'formik'; +import React, { Component } from 'react'; import styled from 'styled-components'; -import { Button, Input } from '@mycrypto/ui'; +import { Button } from '@mycrypto/ui'; -import { ExtendedContentPanel } from 'v2/components'; +import { ExtendedContentPanel, InputField } from 'v2/components'; import { PanelProps } from '../../CreateWallet'; import translate, { translateRaw } from 'translations'; -const initialValues = { - password: '', - confirmPassword: '' -}; +// Legacy +import Spinner from 'components/ui/Spinner'; const DescriptionItem = styled.div` margin-top: 18px; @@ -22,7 +19,7 @@ const DescriptionItem = styled.div` } `; -const PasswordForm = styled(Form)` +const PasswordForm = styled.form` margin-top: 22px; `; @@ -32,10 +29,19 @@ const FormItem = styled.fieldset` const SubmitButton = styled(Button)` width: 100%; - margin-top: 30px; font-size: 18px; `; +const ButtonWrapper = styled.div` + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin-top: 30px; + width: 100%; + height: 51px; +`; + const Description = () => { return ( @@ -49,60 +55,105 @@ interface Props extends PanelProps { generateWalletAndContinue(password: string): void; } -export default function GenerateKeystoreFilePanel({ - onBack, - totalSteps, - currentStep, - generateWalletAndContinue -}: Props) { - return ( - } - > - generateWalletAndContinue(values.password)} - render={() => ( - - - - ) => ( - form.setFieldValue(field.name, value)} - icon="showNetworks" - iconSide="right" - /> - )} - /> - - - - ) => ( - form.setFieldValue(field.name, value)} - icon="showNetworks" - iconSide="right" - /> - )} - /> - - {translate('NEW_WALLET_KEYSTORE_DESCRIPTION_3')} - {translate('NEW_WALLET_KEYSTORE_BUTTON')} - - )} - /> - - ); +export default class GenerateKeystoreFilePanel extends Component { + public state = { + password1: '', + password2: '', + password1Error: '', + password2Error: '', + generatingKeystore: false + }; + + public onPassword1Changed = (event: React.ChangeEvent) => { + this.setState({ password1: event.target.value }); + }; + + public onPassword2Changed = (event: React.ChangeEvent) => { + this.setState({ password2: event.target.value }); + }; + + public validateForm = (): boolean => { + this.setState({ password1Error: '', password2Error: '' }); + const { password1, password2 } = this.state; + const minLength = 8; + + if (password1.length < minLength) { + this.setState({ + password1Error: translate('INPUT_ERROR_PASSWORD_TOO_SHORT') + }); + return false; + } + + if (password1 !== password2) { + this.setState({ + password2Error: translate('INPUT_ERROR_PASSWORDS_DONT_MATCH') + }); + + return false; + } + + return true; + }; + + public handleFormSubmit = async (event: React.FormEvent) => { + event.preventDefault(); + const { generateWalletAndContinue } = this.props; + + if (this.validateForm()) { + try { + this.setState({ generatingKeystore: true }); + await generateWalletAndContinue(this.state.password1); + this.setState({ generatingKeystore: false }); + } catch (e) { + console.log(e); + } + } + }; + + public render() { + const { onBack, totalSteps, currentStep } = this.props; + + return ( + } + > + + + + + + + + {translate('NEW_WALLET_KEYSTORE_DESCRIPTION_3')} + + {this.state.generatingKeystore ? ( + + ) : ( + {translate('NEW_WALLET_KEYSTORE_BUTTON')} + )} + + + + ); + } } diff --git a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx index f0a1797fc..5e03f0035 100644 --- a/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx +++ b/common/v2/features/CreateWallet/Keystore/components/VerifyKeystorePanel.tsx @@ -1,9 +1,9 @@ import React, { Component } from 'react'; -import { Button, Textarea, Input } from '@mycrypto/ui'; +import { Button } from '@mycrypto/ui'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import styled from 'styled-components'; -import { ExtendedContentPanel } from 'v2/components'; +import { ExtendedContentPanel, InputField } from 'v2/components'; import { PanelProps } from '../../CreateWallet'; import translate, { translateRaw } from 'translations'; @@ -27,15 +27,6 @@ const FormItemWrapper = styled.div` margin-top: 28px; `; -const StyledTextArea = styled(Textarea)` - font-size: 18px; - resize: none; - width: 100%; - height: 75px; - margin-top: 8px; - padding: 8px 18px; -`; - const Divider = styled.div` margin-top: 28px; margin-bottom: 22px; @@ -77,32 +68,51 @@ type Props = ExtendedProps & RouteComponentProps<{}>; class VerifyKeystorePanel extends Component { public state = { validating: false, - isValid: false, + submited: false, keystore: null, password: '', privateKey: '', - fileName: '' + fileName: '', + passwordError: '', + privateKeyError: '' }; public validating = false; public validate = async () => { - const { verifyKeystore, verifyPrivateKey, privateKey: generatedPrivateKey } = this.props; + const { + verifyKeystore, + verifyPrivateKey, + privateKey: generatedPrivateKey, + history + } = this.props; const { keystore, password, privateKey } = this.state; this.validating = true; + this.setState({ passwordError: '', privateKeyError: '' }); + if (keystore) { const isValid = await verifyKeystore(keystore, password); - this.setState({ isValid }); + if (!isValid) { + this.setState({ passwordError: 'Wrong password' }); + return; + } else { + history.replace('/dashboard'); + } } else if (privateKey) { const isValid = verifyPrivateKey(privateKey, password) && generatedPrivateKey === privateKey; - this.setState({ isValid }); + if (!isValid) { + this.setState({ privateKeyError: 'Invalid private key' }); + return; + } else { + history.replace('/dashboard'); + } } - + this.setState({ submited: true }); this.validating = false; }; - public handleFileDrop = (e: React.ChangeEvent) => { + public handleFileSelection = (e: React.ChangeEvent) => { if (!e.target || !e.target.files) { return; } @@ -112,20 +122,20 @@ class VerifyKeystorePanel extends Component { this.setState({ fileName: e.target.files[0].name }); fileReader.onload = () => { - this.setState({ keystore: fileReader.result }, () => this.validate()); + this.setState({ keystore: fileReader.result }); }; }; public handlePasswordInputChanged = (e: React.ChangeEvent) => { - this.setState({ password: e.target.value }, () => this.validate()); + this.setState({ password: e.target.value }); }; public handlePrivateKeyInputChanged = (e: React.ChangeEvent) => { - this.setState({ privateKey: e.target.value }, () => this.validate()); + this.setState({ privateKey: e.target.value }); }; public render() { - const { history, onBack, totalSteps, currentStep } = this.props; + const { onBack, totalSteps, currentStep } = this.props; return ( { className="SaveKeystoreFilePanel" > - {translate('YOUR_PRIVATE_KEY_LABEL')} - + - {translateRaw('OR')} - {translate('YOUR_KEYSTORE_LABEL')} - - {translateRaw('UPLOAD_KEYSTORE_LABEL')} + {translateRaw('UPLOAD_KEYSTORE_LABEL')} {this.state.fileName && {this.state.fileName}} - + - {translate('INPUT_PASSWORD_LABEL')} - + - history.replace('/dashboard')} - > - {translate('DONE_AND_RETURN_LABEL')} - + {translate('DONE_AND_RETURN_LABEL')} ); @@ -168,3 +188,5 @@ class VerifyKeystorePanel extends Component { } export default withRouter(VerifyKeystorePanel); + +/* history.replace('/dashboard') */ diff --git a/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx b/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx index 2070d2c6c..b879bcaff 100644 --- a/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx +++ b/common/v2/features/ScreenLock/ScreenLockNew/ScreenLockNew.tsx @@ -51,14 +51,14 @@ export class ScreenLockNew extends Component { if (password1.length > 0 && password1.length < minLength) { this.setState({ - password1Error: translate('SCREEN_LOCK_NEW_PASSWORD_TOO_SHORT') + password1Error: translate('INPUT_ERROR_PASSWORD_TOO_SHORT') }); } if (password1 !== password2) { if (password2.length > 0) { this.setState({ - password2Error: translate('SCREEN_LOCK_NEW_PASSWORDS_DONT_MATCH') + password2Error: translate('INPUT_ERROR_PASSWORDS_DONT_MATCH') }); } } From a8fede8ff64e01bbfdd69ca3f3228aa5ce826f08 Mon Sep 17 00:00:00 2001 From: Amadej Pevec Date: Tue, 21 May 2019 15:44:30 +0200 Subject: [PATCH 0526/1466] Move network select dropdown to component --- .../v2/components/NetworkSelectDropdown.tsx | 37 +++++++++++++++++++ common/v2/components/index.ts | 1 + .../components/NetworkSelectPanel.tsx | 35 ++++++++---------- .../CreateWallet/Keystore/Keystore.tsx | 17 +++++---- .../components/SelectNetworkPanel.tsx | 29 ++++++++------- 5 files changed, 79 insertions(+), 40 deletions(-) create mode 100644 common/v2/components/NetworkSelectDropdown.tsx diff --git a/common/v2/components/NetworkSelectDropdown.tsx b/common/v2/components/NetworkSelectDropdown.tsx new file mode 100644 index 000000000..ff1345d4d --- /dev/null +++ b/common/v2/components/NetworkSelectDropdown.tsx @@ -0,0 +1,37 @@ +import React, { useContext } from 'react'; +import { ComboBox } from '@mycrypto/ui'; + +import { translate } from 'translations'; +import { NetworkOptionsContext } from 'v2/providers'; +import { isWalletFormatSupportedOnNetwork } from 'v2/libs'; +import { WalletName } from 'v2/config/data'; + +interface Props { + network: string; + accountType: WalletName; + onChange(network: string): void; +} + +function NetworkSelectDropdown({ network, accountType, onChange }: Props) { + const { networkOptions } = useContext(NetworkOptionsContext); + + // @ADD_ACCOUNT_TODO: The difference in accountType is likely causing + // the absence of list. + const validNetworks = networkOptions + .filter(options => isWalletFormatSupportedOnNetwork(options, accountType)) + .map(n => n.name); + + return ( +
              + + onChange(value)} + /> +
              + ); +} + +export default NetworkSelectDropdown; diff --git a/common/v2/components/index.ts b/common/v2/components/index.ts index b6e331629..ea343822c 100644 --- a/common/v2/components/index.ts +++ b/common/v2/components/index.ts @@ -7,4 +7,5 @@ export { default as Overlay } from './Overlay'; export { default as Stepper } from './Stepper'; export { default as Modal } from './Modal'; export { default as NewAppReleaseModal } from './NewAppReleaseModal'; +export { default as NetworkSelectDropdown } from './NetworkSelectDropdown'; export * from './ErrorMessages'; diff --git a/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx index a297def98..4bec80ff3 100644 --- a/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx +++ b/common/v2/features/AddAccount/components/NetworkSelectPanel.tsx @@ -1,12 +1,17 @@ -import React, { useState, useContext } from 'react'; -import { Button, ComboBox } from '@mycrypto/ui'; +import React, { useState } from 'react'; +import { Button } from '@mycrypto/ui'; +import styled from 'styled-components'; + import './NetworkSelectPanel.scss'; import { translate } from 'translations'; -import { NetworkOptionsContext } from 'v2/providers'; -import { isWalletFormatSupportedOnNetwork } from 'v2/libs'; import { FormDataActionType as ActionType } from '../types'; import { FormData } from 'v2/features/AddAccount/types'; +import { NetworkSelectDropdown } from 'v2/components'; + +const NetworkForm = styled.div` + margin-top: 22px; +`; interface Props { formData: FormData; @@ -16,13 +21,6 @@ interface Props { function NetworkSelectPanel({ formData, formDispatch, goToNextStep }: Props) { const [network, setNetwork] = useState(formData.network); - const { networkOptions } = useContext(NetworkOptionsContext); - - // @ADD_ACCOUNT_TODO: The difference in accountType is likely causing - // the absence of list. - const validNetworks = networkOptions - .filter(options => isWalletFormatSupportedOnNetwork(options, formData.accountType)) - .map(n => n.name); const onSubmit = () => { formDispatch({ @@ -38,14 +36,13 @@ function NetworkSelectPanel({ formData, formDispatch, goToNextStep }: Props) {
              {translate('ADD_ACCOUNT_NETWORK_SELCT')}
              - - setNetwork(value)} - /> + + +
              - - - ); +function isValidFile(rawFile: File): boolean { + const fileType = rawFile.type; + return fileType === '' || fileType === 'application/json'; +} + +interface ImportProps { + importCache(importedCache: any): void; + onNext(): void; +} + +export default class ImportBox extends React.Component { + public submit = () => { + this.props.onNext(); + }; + + public render() { + return ( + + + {translate('SETTINGS_IMPORT_BUTTON')} + + {' '} + {translate('SETTINGS_IMPORT_PASTE')} +