Strip hex prefix from raw private key displayed during wallet generation (#388)
This commit is contained in:
parent
6da5fac1d1
commit
01f020ff59
|
@ -3,6 +3,7 @@ import { IFullWallet } from 'ethereumjs-wallet';
|
|||
import React from 'react';
|
||||
import translate from 'translations';
|
||||
import printElement from 'utils/printElement';
|
||||
import { stripHexPrefix } from 'libs/values';
|
||||
|
||||
const print = (address: string, privateKey: string) => () =>
|
||||
address &&
|
||||
|
@ -27,7 +28,7 @@ const print = (address: string, privateKey: string) => () =>
|
|||
|
||||
const PrintableWallet: React.SFC<{ wallet: IFullWallet }> = ({ wallet }) => {
|
||||
const address = wallet.getAddressString();
|
||||
const privateKey = wallet.getPrivateKeyString();
|
||||
const privateKey = stripHexPrefix(wallet.getPrivateKeyString());
|
||||
|
||||
if (!address || !privateKey) {
|
||||
return null;
|
||||
|
|
|
@ -4,6 +4,7 @@ import { NewTabLink } from 'components/ui';
|
|||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import translate from 'translations';
|
||||
import { stripHexPrefix } from 'libs/values';
|
||||
import './PaperWallet.scss';
|
||||
import Template from './Template';
|
||||
|
||||
|
@ -13,7 +14,7 @@ const content = (wallet: IFullWallet) => (
|
|||
<h1 className="GenPaper-title">{translate('GEN_Label_5')}</h1>
|
||||
<input
|
||||
className="GenPaper-private form-control"
|
||||
value={wallet.getPrivateKeyString()}
|
||||
value={stripHexPrefix(wallet.getPrivateKeyString())}
|
||||
aria-label={translate('x_PrivKey')}
|
||||
aria-describedby="x_PrivKeyDesc"
|
||||
type="text"
|
||||
|
|
Loading…
Reference in New Issue