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