diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-07-21 05:18:50 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-07-21 05:23:53 +0800 |
commit | 469a79f97ff887eae5ec99cf6be7b19c20972d02 (patch) | |
tree | d863732641d56c33bb41ce1ab66eaf6d5056bcbc /ui/app/components/selected-account | |
parent | cb045fd8feec88bd631329ab9b3285aeed0f2e97 (diff) | |
download | tangerine-wallet-browser-469a79f97ff887eae5ec99cf6be7b19c20972d02.tar tangerine-wallet-browser-469a79f97ff887eae5ec99cf6be7b19c20972d02.tar.gz tangerine-wallet-browser-469a79f97ff887eae5ec99cf6be7b19c20972d02.tar.bz2 tangerine-wallet-browser-469a79f97ff887eae5ec99cf6be7b19c20972d02.tar.lz tangerine-wallet-browser-469a79f97ff887eae5ec99cf6be7b19c20972d02.tar.xz tangerine-wallet-browser-469a79f97ff887eae5ec99cf6be7b19c20972d02.tar.zst tangerine-wallet-browser-469a79f97ff887eae5ec99cf6be7b19c20972d02.zip |
Add fallback options for displaying recipient name in the Confirm screen
Diffstat (limited to 'ui/app/components/selected-account')
-rw-r--r-- | ui/app/components/selected-account/selected-account.component.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/ui/app/components/selected-account/selected-account.component.js b/ui/app/components/selected-account/selected-account.component.js index 79f0cb93a..6c202141e 100644 --- a/ui/app/components/selected-account/selected-account.component.js +++ b/ui/app/components/selected-account/selected-account.component.js @@ -1,17 +1,10 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import copyToClipboard from 'copy-to-clipboard' +import { addressSlicer } from '../../util' const Tooltip = require('../tooltip-v2.js') -const addressStripper = (address = '') => { - if (address.length < 11) { - return address - } - - return `${address.slice(0, 6)}...${address.slice(-4)}` -} - class SelectedAccount extends Component { state = { copied: false, @@ -48,7 +41,7 @@ class SelectedAccount extends Component { { selectedIdentity.name } </div> <div className="selected-account__address"> - { addressStripper(selectedAddress) } + { addressSlicer(selectedAddress) } </div> </div> </Tooltip> |