diff options
author | Chad Grimaldi <chadmg@umich.edu> | 2018-09-16 04:31:21 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-09-16 04:31:21 +0800 |
commit | 2f14f978e390772e78e4cc2ee7a778c9106d053c (patch) | |
tree | f2036eafa48dfa90ca3ff051178111da7be4b04f /ui/app/components/selected-account/selected-account.component.js | |
parent | cd28dbb1d5400589347d1ed868ed5d20f9b2f9aa (diff) | |
download | tangerine-wallet-browser-2f14f978e390772e78e4cc2ee7a778c9106d053c.tar tangerine-wallet-browser-2f14f978e390772e78e4cc2ee7a778c9106d053c.tar.gz tangerine-wallet-browser-2f14f978e390772e78e4cc2ee7a778c9106d053c.tar.bz2 tangerine-wallet-browser-2f14f978e390772e78e4cc2ee7a778c9106d053c.tar.lz tangerine-wallet-browser-2f14f978e390772e78e4cc2ee7a778c9106d053c.tar.xz tangerine-wallet-browser-2f14f978e390772e78e4cc2ee7a778c9106d053c.tar.zst tangerine-wallet-browser-2f14f978e390772e78e4cc2ee7a778c9106d053c.zip |
compute and display checksummed hash in selected-account component (#5255)
Diffstat (limited to 'ui/app/components/selected-account/selected-account.component.js')
-rw-r--r-- | ui/app/components/selected-account/selected-account.component.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/app/components/selected-account/selected-account.component.js b/ui/app/components/selected-account/selected-account.component.js index 55b935ee0..4f98df9b6 100644 --- a/ui/app/components/selected-account/selected-account.component.js +++ b/ui/app/components/selected-account/selected-account.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import copyToClipboard from 'copy-to-clipboard' -import { addressSlicer } from '../../util' +import { addressSlicer, checksumAddress } from '../../util' const Tooltip = require('../tooltip-v2.js').default @@ -22,6 +22,7 @@ class SelectedAccount extends Component { render () { const { t } = this.context const { selectedAddress, selectedIdentity } = this.props + const checksummedAddress = checksumAddress(selectedAddress) return ( <div className="selected-account"> @@ -34,14 +35,14 @@ class SelectedAccount extends Component { onClick={() => { this.setState({ copied: true }) setTimeout(() => this.setState({ copied: false }), 3000) - copyToClipboard(selectedAddress) + copyToClipboard(checksummedAddress) }} > <div className="selected-account__name"> { selectedIdentity.name } </div> <div className="selected-account__address"> - { addressSlicer(selectedAddress) } + { addressSlicer(checksummedAddress) } </div> </div> </Tooltip> |