diff --git a/common/Root.tsx b/common/Root.tsx index c0c139c8..a531d9a4 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -11,6 +11,7 @@ import Swap from 'containers/Tabs/Swap'; import ViewWallet from 'containers/Tabs/ViewWallet'; import SignAndVerifyMessage from 'containers/Tabs/SignAndVerifyMessage'; import BroadcastTx from 'containers/Tabs/BroadcastTx'; +import RestoreKeystore from 'containers/Tabs/RestoreKeystore'; // TODO: fix this interface Props { @@ -33,12 +34,12 @@ export default class Root extends Component { + - diff --git a/common/components/Header/components/Navigation.tsx b/common/components/Header/components/Navigation.tsx index facdd691..8a37f04e 100644 --- a/common/components/Header/components/Navigation.tsx +++ b/common/components/Header/components/Navigation.tsx @@ -8,6 +8,7 @@ const tabs = [ name: 'NAV_GenerateWallet', to: '/' }, + { name: 'NAV_SendEther', to: 'send-transaction' @@ -36,6 +37,10 @@ const tabs = [ name: 'Broadcast Transaction', to: 'pushTx' }, + { + name: 'NAV_Utilities', + to: 'utilities' + }, { name: 'NAV_Help', to: 'https://myetherwallet.groovehq.com/help_center', diff --git a/common/components/WalletDecrypt/PrivateKey.tsx b/common/components/WalletDecrypt/PrivateKey.tsx index 0e564144..96af3673 100644 --- a/common/components/WalletDecrypt/PrivateKey.tsx +++ b/common/components/WalletDecrypt/PrivateKey.tsx @@ -1,4 +1,5 @@ import { isValidEncryptedPrivKey, isValidPrivKey } from 'libs/validators'; +import { stripHexPrefix } from 'libs/values'; import React, { Component } from 'react'; import translate, { translateRaw } from 'translations'; @@ -8,13 +9,6 @@ export interface PrivateKeyValue { valid: boolean; } -function fixPkey(key) { - if (key.indexOf('0x') === 0) { - return key.slice(2); - } - return key; -} - interface Validated { fixedPkey: string; isValidPkey: boolean; @@ -23,7 +17,7 @@ interface Validated { } function validatePkeyAndPass(pkey: string, pass: string): Validated { - const fixedPkey = fixPkey(pkey); + const fixedPkey = stripHexPrefix(pkey); const validPkey = isValidPrivKey(fixedPkey); const validEncPkey = isValidEncryptedPrivKey(fixedPkey); const isValidPkey = validPkey || validEncPkey; @@ -58,15 +52,13 @@ export default class PrivateKeyDecrypt extends Component { return (
-

- {translate('ADD_Radio_3')} -

+

{translate('ADD_Radio_3')}