Merge branch 'develop' into enhancement/address-book-to-view-address

This commit is contained in:
Connor Bryan 2018-08-16 11:18:21 -05:00 committed by GitHub
commit 7d1f7184d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 94 additions and 15 deletions

View File

@ -6,6 +6,7 @@ import { Link } from 'react-router-dom';
import isEmpty from 'lodash/isEmpty';
import {
HardwareWalletName,
SecureWalletName,
InsecureWalletName,
MiscWalletName,
@ -98,12 +99,17 @@ export interface InsecureWalletInfo extends BaseWalletInfo {
// tslint:disable-next-line:no-empty-interface
interface MiscWalletInfo extends InsecureWalletInfo {}
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 = SecureWallets & InsecureWallets & MiscWallet;
type Wallets = HardwareWallets & SecureWallets & InsecureWallets & MiscWallet;
const SECURE_WALLETS = Object.values(SecureWalletName);
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);
@ -309,7 +315,7 @@ const WalletDecrypt = withRouter<Props>(
<h2 className="WalletDecrypt-wallets-title">{translate('DECRYPT_ACCESS')}</h2>
<div className="WalletDecrypt-wallets-row">
{SECURE_WALLETS.map((walletType: SecureWalletName) => {
{HARDWARE_WALLETS.map((walletType: SecureWalletName) => {
const wallet = this.WALLETS[walletType];
return (
<WalletButton
@ -328,23 +334,22 @@ const WalletDecrypt = withRouter<Props>(
})}
</div>
<div className="WalletDecrypt-wallets-row">
{INSECURE_WALLETS.map((walletType: InsecureWalletName) => {
{SECURE_WALLETS.map((walletType: SecureWalletName) => {
const wallet = this.WALLETS[walletType];
return (
<WalletButton
key={walletType}
name={translateRaw(wallet.lid)}
example={wallet.example}
description={translateRaw(wallet.description)}
helpLink={wallet.helpLink}
walletType={walletType}
isSecure={false}
isSecure={true}
isDisabled={this.isWalletDisabled(walletType)}
disableReason={reasons[walletType]}
onClick={this.handleWalletChoice}
/>
);
})}
{MISC_WALLETS.map((walletType: MiscWalletName) => {
const wallet = this.WALLETS[walletType];
return (
@ -355,6 +360,26 @@ const WalletDecrypt = withRouter<Props>(
helpLink={wallet.helpLink}
walletType={walletType}
isReadOnly={true}
isSecure={true}
isDisabled={this.isWalletDisabled(walletType)}
disableReason={reasons[walletType]}
onClick={this.handleWalletChoice}
/>
);
})}
</div>
<div className="WalletDecrypt-wallets-row">
{INSECURE_WALLETS.map((walletType: InsecureWalletName) => {
const wallet = this.WALLETS[walletType];
return (
<WalletButton
key={walletType}
name={translateRaw(wallet.lid)}
example={wallet.example}
helpLink={wallet.helpLink}
walletType={walletType}
isSecure={false}
isDisabled={this.isWalletDisabled(walletType)}
disableReason={reasons[walletType]}
onClick={this.handleWalletChoice}

File diff suppressed because one or more lines are too long

View File

@ -340,7 +340,7 @@ export const STATIC_NETWORKS_INITIAL_STATE: StaticNetworksState = {
EGEM: {
id: 'EGEM',
name: 'EtherGem',
unit: 'EGT',
unit: 'EGEM',
chainId: 1987,
isCustom: false,
color: '#D0F7FF',
@ -467,6 +467,32 @@ export const STATIC_NETWORKS_INITIAL_STATE: StaticNetworksState = {
}
},
GO_TESTNET: {
id: 'GO_TESTNET',
name: 'GO',
unit: 'GO',
chainId: 31337,
isCustom: false,
color: '#00b04a',
blockExplorer: makeExplorer({
name: 'GoChain Testnet Explorer',
origin: 'https://testnet-explorer.gochain.io'
}),
tokens: [],
contracts: [],
isTestnet: true,
dPathFormats: {
[SecureWalletName.TREZOR]: GO_DEFAULT,
[SecureWalletName.SAFE_T]: GO_DEFAULT,
[InsecureWalletName.MNEMONIC_PHRASE]: GO_DEFAULT
},
gasPriceSettings: {
min: 2,
max: 60,
initial: 2
}
},
EOSC: {
id: 'EOSC',
name: 'EOS Classic',
@ -491,6 +517,7 @@ export const STATIC_NETWORKS_INITIAL_STATE: StaticNetworksState = {
initial: 20
}
},
ESN: {
id: 'ESN',
name: 'EthersocialNetwork',

View File

@ -74,16 +74,16 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = {
url: 'https://cry.epool.io'
},
{
name: makeNodeName('ETC', 'commonwealth'),
name: makeNodeName('ETC', 'gastracker'),
type: 'rpc',
service: 'Ethereum Commonwealth',
url: 'https://etc-geth.0xinfra.com/'
service: 'GasTracker',
url: 'https://web3.gastracker.io'
},
{
name: makeNodeName('ETC', 'chainkorea'),
name: makeNodeName('ETC', 'etccooperative'),
type: 'rpc',
service: 'Chainkorea',
url: 'https://node.classicexplorer.org/'
service: 'ETC Cooperative',
url: 'https://ethereumclassic.network'
}
],
@ -165,6 +165,12 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = {
type: 'rpc',
service: '0xinfra.com',
url: 'https://clo-geth.0xinfra.com/'
},
{
name: makeNodeName('CLO', 'chainkorea'),
type: 'rpc',
service: 'Chainkorea',
url: 'https://node.clopool.net/'
}
],
@ -195,6 +201,15 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = {
}
],
GO_TESTNET: [
{
name: makeNodeName('GO_TESTNET', 'go_testnet'),
type: 'rpc',
service: 'testnet-rpc.gochain.io',
url: 'https://testnet-rpc.gochain.io/'
}
],
EOSC: [
{
name: makeNodeName('EOSC', 'eosc'),

View File

@ -35,7 +35,6 @@
var passphrase = "";
function unlockWithPassphrase() {
if (!passphrase.length) return;
ipcRenderer.send('$EVENT', passphrase);
}

View File

@ -18,6 +18,7 @@ type StaticNetworkIds =
| 'RSK'
| 'RSK_TESTNET'
| 'GO'
| 'GO_TESTNET'
| 'EOSC'
| 'ESN';