Hex prefix & checksum paper wallet address. (#1926)

This commit is contained in:
William O'Beirne 2018-06-11 17:22:25 -04:00 committed by Daniel Ternyak
parent bab2400397
commit 5ba62ccd45
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import { Identicon, QRCode } from 'components/ui';
import React from 'react';
import { addHexPrefix, toChecksumAddress } from 'ethereumjs-util';
import ethLogo from 'assets/images/logo-ethereum-1.png';
import notesBg from 'assets/images/notes-bg.png';
@ -96,7 +97,8 @@ interface Props {
export default class PaperWallet extends React.Component<Props, {}> {
public render() {
const { privateKey, address } = this.props;
const { privateKey } = this.props;
const address = toChecksumAddress(addHexPrefix(this.props.address));
return (
<div style={styles.container}>

View File

@ -11,7 +11,6 @@ interface Props {
export default function Identicon(props: Props) {
const size = props.size || '4rem';
const { address, className = '' } = props;
// FIXME breaks on failed checksums
const identiconDataUrl = isValidETHAddress(address) ? makeBlockie(address) : '';
return (
// Use inline styles for printable wallets