mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-01 13:55:50 +00:00
9cac0298a2
* Manage modal focus * Add isOpen prop to CustomNodeModal * Remove outline overrides * Update outline style for inputs * Fix modal focus management & Cleanup CustomNodeModal * Add aria-label on modal close button * Fix modal scroll to top * Add aria-live property for notifications * Add aria-busy to Spinner component * Fix border styles for generatewallet password inputs * Update token balances inputs * Remove multiple h1's & Update styles * Add alt text to all img elements * Update swap link from bity to shapeshift * Update aria-labels and alt text * Only show keystore password input when required * Revert "Only show keystore password input when required" This reverts commit 7ec5de52da0982cd3131f365b142f6915638d831. * address changes requested
62 lines
1.9 KiB
TypeScript
62 lines
1.9 KiB
TypeScript
import PrintableWallet from 'components/PrintableWallet';
|
|
import { IV3Wallet } from 'ethereumjs-wallet';
|
|
import React from 'react';
|
|
import translate, { translateRaw } from 'translations';
|
|
import { stripHexPrefix } from 'libs/values';
|
|
import './PaperWallet.scss';
|
|
import Template from '../Template';
|
|
import { Input } from 'components/ui';
|
|
|
|
interface Props {
|
|
keystore: IV3Wallet;
|
|
privateKey: string;
|
|
continue(): void;
|
|
}
|
|
|
|
const PaperWallet: React.SFC<Props> = props => (
|
|
<Template>
|
|
<div className="GenPaper">
|
|
{/* Private Key */}
|
|
<label className="input-group GenPaper-private">
|
|
{/* translateRaw isn't used here because it wont properly render the ` characters as a string of code in markdown*/}
|
|
<h1 className="input-group-header">{translate('GEN_Label_5')}</h1>
|
|
<Input
|
|
value={stripHexPrefix(props.privateKey)}
|
|
aria-label={translateRaw('x_PrivKey')}
|
|
aria-describedby="x_PrivKeyDesc"
|
|
type="text"
|
|
readOnly={true}
|
|
/>
|
|
</label>
|
|
|
|
{/* Download Paper Wallet */}
|
|
<h2 className="GenPaper-title">{translate('x_Print')}</h2>
|
|
<div className="GenPaper-paper">
|
|
<PrintableWallet address={props.keystore.address} privateKey={props.privateKey} />
|
|
</div>
|
|
|
|
{/* Warning */}
|
|
<div className="GenPaper-warning">
|
|
<p>
|
|
<strong>Do not lose it!</strong> It cannot be recovered if you lose it.
|
|
</p>
|
|
<p>
|
|
<strong>Do not share it!</strong> Your funds will be stolen if you use this file on a
|
|
malicious/phishing site.
|
|
</p>
|
|
<p>
|
|
<strong>Make a backup!</strong> Secure it like the millions of dollars it may one day be
|
|
worth.
|
|
</p>
|
|
</div>
|
|
|
|
{/* Continue button */}
|
|
<button className="GenPaper-continue btn btn-default" onClick={props.continue}>
|
|
{translate('NAV_ViewWallet')} →
|
|
</button>
|
|
</div>
|
|
</Template>
|
|
);
|
|
|
|
export default PaperWallet;
|