Use ethereum-blockies-base64 (#1326)

* use makeBlockie from ethereum-blockies-base64

* adjust type ethereum-blockies-base64 type declaration

* add ethereum-blockies-base64

* update ethereum-blockies-base64; remove redundent declaration file
This commit is contained in:
Daniel Ternyak 2018-03-17 16:31:28 -05:00 committed by GitHub
parent 825e467db7
commit 8c0dd3f455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View File

@ -1,6 +1,6 @@
import { toDataUrl } from 'ethereum-blockies';
import { isValidETHAddress } from 'libs/validators';
import React from 'react';
import makeBlockie from 'ethereum-blockies-base64';
interface Props {
address: string;
@ -12,7 +12,7 @@ export default function Identicon(props: Props) {
const size = props.size || '4rem';
const { address, className } = props;
// FIXME breaks on failed checksums
const identiconDataUrl = isValidETHAddress(address) ? toDataUrl(address) : '';
const identiconDataUrl = isValidETHAddress(address) ? makeBlockie(address) : '';
return (
// Use inline styles for printable wallets
<div

View File

@ -1,3 +0,0 @@
declare module 'ethereum-blockies' {
export function toDataUrl(address: string): string;
}

View File

@ -16,7 +16,7 @@
"bootstrap-sass": "3.3.7",
"classnames": "2.2.5",
"electron-updater": "2.21.0",
"ethereum-blockies": "git+https://github.com/MyCryptoHQ/blockies.git",
"ethereum-blockies-base64": "1.0.1",
"ethereumjs-abi": "0.6.5",
"ethereumjs-tx": "1.3.4",
"ethereumjs-util": "5.1.5",