|
|
|
@ -6,6 +6,7 @@ const { withRouter } = require('react-router-dom') |
|
|
|
|
const { compose } = require('recompose') |
|
|
|
|
const inherits = require('util').inherits |
|
|
|
|
const classnames = require('classnames') |
|
|
|
|
const { checksumAddress } = require('../util') |
|
|
|
|
const Identicon = require('./identicon') |
|
|
|
|
// const AccountDropdowns = require('./dropdowns/index.js').AccountDropdowns
|
|
|
|
|
const Tooltip = require('./tooltip-v2.js') |
|
|
|
@ -107,6 +108,8 @@ WalletView.prototype.render = function () { |
|
|
|
|
// temporary logs + fake extra wallets
|
|
|
|
|
// console.log('walletview, selectedAccount:', selectedAccount)
|
|
|
|
|
|
|
|
|
|
const checksummedAddress = checksumAddress(selectedAddress) |
|
|
|
|
|
|
|
|
|
const keyring = keyrings.find((kr) => { |
|
|
|
|
return kr.accounts.includes(selectedAddress) || |
|
|
|
|
kr.accounts.includes(selectedIdentity.address) |
|
|
|
@ -135,7 +138,7 @@ WalletView.prototype.render = function () { |
|
|
|
|
}, [ |
|
|
|
|
h(Identicon, { |
|
|
|
|
diameter: 54, |
|
|
|
|
address: selectedAddress, |
|
|
|
|
address: checksummedAddress, |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
h('span.account-name', { |
|
|
|
@ -158,7 +161,7 @@ WalletView.prototype.render = function () { |
|
|
|
|
'wallet-view__address__pressed': this.state.copyToClipboardPressed, |
|
|
|
|
}), |
|
|
|
|
onClick: () => { |
|
|
|
|
copyToClipboard(selectedAddress) |
|
|
|
|
copyToClipboard(checksummedAddress) |
|
|
|
|
this.setState({ hasCopied: true }) |
|
|
|
|
setTimeout(() => this.setState({ hasCopied: false }), 3000) |
|
|
|
|
}, |
|
|
|
@ -169,7 +172,7 @@ WalletView.prototype.render = function () { |
|
|
|
|
this.setState({ copyToClipboardPressed: false }) |
|
|
|
|
}, |
|
|
|
|
}, [ |
|
|
|
|
`${selectedAddress.slice(0, 4)}...${selectedAddress.slice(-4)}`, |
|
|
|
|
`${checksummedAddress.slice(0, 4)}...${checksummedAddress.slice(-4)}`, |
|
|
|
|
h('i.fa.fa-clipboard', { style: { marginLeft: '8px' } }), |
|
|
|
|
]), |
|
|
|
|
]), |
|
|
|
|