1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-12-29 16:17:52 +01:00

Merge pull request #18 from kremalicious/fix/identicons

identicon fixes
This commit is contained in:
Matthias Kretschmann 2019-06-04 22:59:30 +02:00 committed by GitHub
commit 06a7ad6668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 19 deletions

View File

@ -23,6 +23,7 @@
"dependencies": { "dependencies": {
"@coingecko/cryptoformat": "^0.3.2", "@coingecko/cryptoformat": "^0.3.2",
"ethereum-address": "0.0.4", "ethereum-address": "0.0.4",
"ethereum-blockies": "MyEtherWallet/blockies",
"ms": "^2.1.1" "ms": "^2.1.1"
}, },
"devDependencies": { "devDependencies": {
@ -50,7 +51,6 @@
"prettier": "^1.17.1", "prettier": "^1.17.1",
"prettier-stylelint": "^0.4.2", "prettier-stylelint": "^0.4.2",
"react": "^16.8.6", "react": "^16.8.6",
"react-blockies": "^1.4.1",
"react-dom": "^16.8.6", "react-dom": "^16.8.6",
"react-pose": "^4.0.8", "react-pose": "^4.0.8",
"release-it": "^12.2.2", "release-it": "^12.2.2",

View File

@ -43,8 +43,7 @@
font-size: .85rem; font-size: .85rem;
display: block; display: block;
white-space: nowrap; white-space: nowrap;
margin-top: .3rem; margin-top: .5rem;
transition: color .2s ease-out;
} }
.number-unit-wrap--accounts { .number-unit-wrap--accounts {

View File

@ -1,6 +1,6 @@
import React, { PureComponent } from 'react' import React, { PureComponent } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Blockies from 'react-blockies' import { toDataUrl } from 'ethereum-blockies'
import posed, { PoseGroup } from 'react-pose' import posed, { PoseGroup } from 'react-pose'
import Store from 'electron-store' import Store from 'electron-store'
import ethereum_address from 'ethereum-address' import ethereum_address from 'ethereum-address'
@ -11,10 +11,13 @@ const Item = posed.li(fadeIn)
const AccountsList = ({ accounts, handleDelete }) => ( const AccountsList = ({ accounts, handleDelete }) => (
<PoseGroup> <PoseGroup>
{accounts.map(account => ( {accounts.map(account => {
const identicon = account && toDataUrl(account)
return (
<Item key={account}> <Item key={account}>
<div> <div>
<Blockies seed={account} size={10} scale={3} /> <img className="identicon" src={identicon} alt="Blockies" />
{account} {account}
</div> </div>
@ -26,7 +29,8 @@ const AccountsList = ({ accounts, handleDelete }) => (
&times; &times;
</button> </button>
</Item> </Item>
))} )
})}
</PoseGroup> </PoseGroup>
) )