2017-09-25 02:06:28 +00:00
|
|
|
import { Identicon, QRCode } from 'components/ui';
|
2017-07-16 21:02:13 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import ethLogo from 'assets/images/logo-ethereum-1.png';
|
|
|
|
import notesBg from 'assets/images/notes-bg.png';
|
2017-09-25 02:06:28 +00:00
|
|
|
import sidebarImg from 'assets/images/print-sidebar.png';
|
2017-07-16 21:02:13 +00:00
|
|
|
|
|
|
|
const walletWidth = 680;
|
|
|
|
const walletHeight = 280;
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
const styles: any = {
|
2017-07-16 21:02:13 +00:00
|
|
|
container: {
|
|
|
|
position: 'relative',
|
|
|
|
margin: '0 auto',
|
|
|
|
width: `${walletWidth}px`,
|
|
|
|
height: `${walletHeight}px`,
|
|
|
|
border: '1px solid #163151',
|
|
|
|
userSelect: 'none',
|
|
|
|
cursor: 'default'
|
|
|
|
},
|
|
|
|
|
|
|
|
// Images
|
|
|
|
sidebar: {
|
|
|
|
float: 'left',
|
|
|
|
height: '100%',
|
|
|
|
width: 'auto'
|
|
|
|
},
|
|
|
|
ethLogo: {
|
|
|
|
position: 'absolute',
|
|
|
|
left: '86px',
|
|
|
|
height: '100%',
|
|
|
|
width: 'auto',
|
|
|
|
zIndex: '-1'
|
|
|
|
},
|
|
|
|
|
|
|
|
// Blocks / QR Codes
|
|
|
|
block: {
|
|
|
|
position: 'relative',
|
|
|
|
float: 'left',
|
|
|
|
width: '27.5%',
|
|
|
|
padding: '20px'
|
|
|
|
},
|
|
|
|
blockText: {
|
|
|
|
position: 'absolute',
|
|
|
|
top: '50%',
|
|
|
|
left: '100%',
|
|
|
|
width: '100%',
|
|
|
|
margin: 0,
|
|
|
|
transform: 'translate(-50%, -50%) rotate(-90deg)',
|
|
|
|
fontSize: '13px',
|
|
|
|
fontWeight: '600',
|
|
|
|
color: '#0b7290',
|
|
|
|
textAlign: 'center',
|
|
|
|
textTransform: 'uppercase',
|
|
|
|
letterSpacing: '1px'
|
|
|
|
},
|
|
|
|
// Address / private key info
|
|
|
|
infoContainer: {
|
|
|
|
float: 'left',
|
|
|
|
width: '85%',
|
|
|
|
padding: '0 20px'
|
|
|
|
},
|
|
|
|
infoText: {
|
|
|
|
margin: '0 0 8px',
|
|
|
|
textAlign: 'left',
|
|
|
|
fontSize: '14px',
|
|
|
|
fontFamily: 'Menlo, Monaco, Consolas, "Courier New", monospace',
|
|
|
|
fontWeight: 300
|
|
|
|
},
|
|
|
|
infoLabel: {
|
|
|
|
fontWeight: 600
|
|
|
|
},
|
|
|
|
identiconContainer: {
|
|
|
|
position: 'absolute',
|
|
|
|
right: '15px',
|
|
|
|
bottom: '45px'
|
|
|
|
},
|
|
|
|
identiconText: {
|
|
|
|
float: 'left',
|
|
|
|
width: '130px',
|
|
|
|
padding: '0 5px',
|
|
|
|
margin: '12px 0 0',
|
|
|
|
fontSize: '9px',
|
|
|
|
textAlign: 'center'
|
|
|
|
},
|
|
|
|
box: {
|
|
|
|
width: 150,
|
|
|
|
height: 150
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
interface Props {
|
|
|
|
address: string;
|
2017-10-14 19:24:48 +00:00
|
|
|
privateKey: string;
|
2017-09-25 02:06:28 +00:00
|
|
|
}
|
2017-08-09 12:01:34 +00:00
|
|
|
|
2017-10-14 19:24:48 +00:00
|
|
|
export default class PaperWallet extends React.Component<Props, {}> {
|
2017-09-25 02:06:28 +00:00
|
|
|
public render() {
|
2017-10-14 19:24:48 +00:00
|
|
|
const { privateKey, address } = this.props;
|
2017-07-16 21:02:13 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div style={styles.container}>
|
|
|
|
<img src={sidebarImg} style={styles.sidebar} />
|
|
|
|
<img src={ethLogo} style={styles.ethLogo} />
|
|
|
|
|
|
|
|
<div style={styles.block}>
|
|
|
|
<div style={styles.box}>
|
2017-10-14 19:24:48 +00:00
|
|
|
<QRCode data={address} />
|
2017-07-16 21:02:13 +00:00
|
|
|
</div>
|
|
|
|
<p style={styles.blockText}>YOUR ADDRESS</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style={styles.block}>
|
|
|
|
<img src={notesBg} style={styles.box} />
|
|
|
|
<p style={styles.blockText}>AMOUNT / NOTES</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style={styles.block}>
|
|
|
|
<div style={styles.box}>
|
|
|
|
<QRCode data={privateKey} />
|
|
|
|
</div>
|
|
|
|
<p style={styles.blockText}>YOUR PRIVATE KEY</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style={styles.infoContainer}>
|
|
|
|
<p style={styles.infoText}>
|
|
|
|
<strong style={styles.infoLabel}>Your Address:</strong>
|
|
|
|
<br />
|
2017-10-14 19:24:48 +00:00
|
|
|
{address}
|
2017-07-16 21:02:13 +00:00
|
|
|
</p>
|
|
|
|
<p style={styles.infoText}>
|
|
|
|
<strong style={styles.infoLabel}>Your Private Key:</strong>
|
|
|
|
<br />
|
|
|
|
{privateKey}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style={styles.identiconContainer}>
|
|
|
|
<div style={{ float: 'left' }}>
|
2017-10-14 19:24:48 +00:00
|
|
|
<Identicon address={address} size={'42px'} />
|
2017-07-16 21:02:13 +00:00
|
|
|
</div>
|
|
|
|
<p style={styles.identiconText}>
|
|
|
|
Always look for this icon when sending to this wallet
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|