From 8eeefe7e253f79f31d6fcabca8ae19b7fec45323 Mon Sep 17 00:00:00 2001 From: Michael - Blurpesec Date: Wed, 21 Mar 2018 14:49:33 -0400 Subject: [PATCH 1/4] Fix offline broadcast link (#1350) * Fixed offline broadcast link * fix for link from root --- common/components/SendButtonFactory/OfflineBroadcast.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/components/SendButtonFactory/OfflineBroadcast.tsx b/common/components/SendButtonFactory/OfflineBroadcast.tsx index 90787e29..1caf46a5 100644 --- a/common/components/SendButtonFactory/OfflineBroadcast.tsx +++ b/common/components/SendButtonFactory/OfflineBroadcast.tsx @@ -20,7 +20,7 @@ export const OfflineBroadcast = connect((state: AppState) => ({ offline: getOffl const BroadCast: React.SFC<{}> = () => (

To broadcast this transaction, paste the above into the{' '} - Broadcast Transaction tab or{' '} + Broadcast Transaction tab or{' '} etherscan.io/pushTx

); From aa08c1902df24871d9363963434b01ebb9a75372 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 21 Mar 2018 14:08:54 -0500 Subject: [PATCH 2/4] chore(package): update ts-jest to version 22.4.2 (#1339) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb60b2fe..bbf02217 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "sass-loader": "6.0.7", "style-loader": "0.20.3", "thread-loader": "1.1.5", - "ts-jest": "22.4.1", + "ts-jest": "22.4.2", "ts-loader": "3.3.1", "tslint": "5.9.1", "tslint-config-prettier": "1.10.0", From f42b81ac8a6ac97d99ea37774345b1e7bcf6797b Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 21 Mar 2018 14:45:05 -0500 Subject: [PATCH 3/4] fix(package): update electron-updater to version 2.21.1 (#1338) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bbf02217..eb4fdf10 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "bn.js": "4.11.8", "bootstrap-sass": "3.3.7", "classnames": "2.2.5", - "electron-updater": "2.21.0", + "electron-updater": "2.21.1", "ethereum-blockies-base64": "1.0.1", "ethereumjs-abi": "0.6.5", "ethereumjs-tx": "1.3.4", From 7521337bda8b05af48efbbc97999d86491957ef5 Mon Sep 17 00:00:00 2001 From: William O'Beirne Date: Wed, 21 Mar 2018 16:19:15 -0400 Subject: [PATCH 4/4] Custom DPaths, Improvements, and Fix SingularDTV (#1351) * Add dpath to select option display * Re-enable custom path * Make it a submittable form to behave better with HW wallets * Adjust styles * Widen regex to allow for SingularDTV dpath --- .../components/DeterministicWalletsModal.scss | 33 ++++++-- .../components/DeterministicWalletsModal.tsx | 75 +++++++++++++------ common/config/dpaths.ts | 2 +- 3 files changed, 80 insertions(+), 30 deletions(-) diff --git a/common/components/WalletDecrypt/components/DeterministicWalletsModal.scss b/common/components/WalletDecrypt/components/DeterministicWalletsModal.scss index 60cd205e..cbc474ee 100644 --- a/common/components/WalletDecrypt/components/DeterministicWalletsModal.scss +++ b/common/components/WalletDecrypt/components/DeterministicWalletsModal.scss @@ -7,19 +7,42 @@ &-label { font-size: $font-size-medium; - margin-right: 16px; + margin-right: $space-md; line-height: $input-height-base; } + &-select { + flex: 1; + + small { + padding-left: 5px; + opacity: 0.5; + font-size: 11px; + @include mono; + } + } + + &-custom { + flex: 1; + margin-left: $space-md; + + .input-group-input { + margin: 0; + } + } + + &-submit { + margin-left: $space-md; + padding-left: $space; + padding-right: $space; + border: none; + } + .form-control { display: inline-block; width: auto; margin: 0 0 0 10px; } - - .Select { - flex-grow: 1; - } } &-addresses { diff --git a/common/components/WalletDecrypt/components/DeterministicWalletsModal.tsx b/common/components/WalletDecrypt/components/DeterministicWalletsModal.tsx index 9fc02f04..46d73cf0 100644 --- a/common/components/WalletDecrypt/components/DeterministicWalletsModal.tsx +++ b/common/components/WalletDecrypt/components/DeterministicWalletsModal.tsx @@ -1,3 +1,7 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import Select, { Option } from 'react-select'; +import translate from 'translations'; import { DeterministicWalletData, getDeterministicWallets, @@ -9,14 +13,11 @@ import { import Modal, { IButton } from 'components/ui/Modal'; import { AppState } from 'reducers'; import { isValidPath } from 'libs/validators'; -import React from 'react'; -import { connect } from 'react-redux'; import { getNetworkConfig } from 'selectors/config'; import { getTokens, MergedToken } from 'selectors/wallet'; import { UnitDisplay, Input } from 'components/ui'; -import './DeterministicWalletsModal.scss'; import { StaticNetworkConfig } from 'types/network'; -import Select from 'react-select'; +import './DeterministicWalletsModal.scss'; const WALLETS_PER_PAGE = 5; @@ -125,23 +126,36 @@ class DeterministicWalletsModalClass extends React.PureComponent { onSubmit={this.handleSubmitCustomPath} > Addresses - + + + + )} @@ -215,7 +229,7 @@ class DeterministicWalletsModalClass extends React.PureComponent { const { value: dPathLabel } = newPath; const { value } = this.findDPath('value', dPathLabel); - if (value === 'custom') { + if (value === customDPath.value) { this.setState({ isCustomPath: true, currentLabel: dPathLabel }); } else { this.setState({ isCustomPath: false, currentLabel: dPathLabel }); @@ -228,11 +242,12 @@ class DeterministicWalletsModalClass extends React.PureComponent { }; private handleSubmitCustomPath = (ev: React.FormEvent) => { + const { customPath, currentLabel } = this.state; ev.preventDefault(); - if (!isValidPath(this.state.customPath)) { - return; + + if (currentLabel === customDPath.label && isValidPath(customPath)) { + this.props.onPathChange(customPath); } - this.props.onPathChange(this.state.customPath); }; private handleChangeToken = (ev: React.FormEvent) => { @@ -257,6 +272,18 @@ class DeterministicWalletsModalClass extends React.PureComponent { this.setState({ page: Math.max(this.state.page - 1, 0) }, this.getAddresses); }; + private renderDPathOption(option: Option) { + if (option.value === customDPath.value) { + return translate('ADD_Radio_5_PathCustom'); + } + + return ( + + {option.label} {option.value && ({option.value.toString().replace(' ', '')})} + + ); + } + private renderWalletRow(wallet: DeterministicWalletData) { const { desiredToken, network } = this.props; const { selectedAddress } = this.state; diff --git a/common/config/dpaths.ts b/common/config/dpaths.ts index c6f2b335..0e8a7a7c 100644 --- a/common/config/dpaths.ts +++ b/common/config/dpaths.ts @@ -68,5 +68,5 @@ export const EXTRA_PATHS = [ETH_SINGULAR]; // 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\/44'\/[0-9]+\'\/[0-9]+(\'+$|\'+(\/[0-1]+$))/; +export const dPathRegex = /m\/(44|0)'\/[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]+$))/;