aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals/export-private-key-modal.js
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2018-04-19 02:43:38 +0800
committerGitHub <noreply@github.com>2018-04-19 02:43:38 +0800
commit40f0a40edfdb928f824f08ed0ba39a707825e2d3 (patch)
tree288a2aeab0beec8ec1b068bc29a906632962f7c8 /ui/app/components/modals/export-private-key-modal.js
parent7e21fc2aa780ccb4ffb2f642156385db22c47a52 (diff)
parentcce123c30e9562e01971edf9ae11b89cf91c7089 (diff)
downloadtangerine-wallet-browser-40f0a40edfdb928f824f08ed0ba39a707825e2d3.tar.gz
tangerine-wallet-browser-40f0a40edfdb928f824f08ed0ba39a707825e2d3.tar.zst
tangerine-wallet-browser-40f0a40edfdb928f824f08ed0ba39a707825e2d3.zip
Merge pull request #3998 from MetaMask/i3988-checksummed-address
Show checksum addresses on UI
Diffstat (limited to 'ui/app/components/modals/export-private-key-modal.js')
-rw-r--r--ui/app/components/modals/export-private-key-modal.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/app/components/modals/export-private-key-modal.js b/ui/app/components/modals/export-private-key-modal.js
index 1f80aed39..447e43b7a 100644
--- a/ui/app/components/modals/export-private-key-modal.js
+++ b/ui/app/components/modals/export-private-key-modal.js
@@ -3,12 +3,13 @@ const PropTypes = require('prop-types')
const h = require('react-hyperscript')
const inherits = require('util').inherits
const connect = require('react-redux').connect
-const ethUtil = require('ethereumjs-util')
+const { stripHexPrefix } = require('ethereumjs-util')
const actions = require('../../actions')
const AccountModalContainer = require('./account-modal-container')
const { getSelectedIdentity } = require('../../selectors')
const ReadOnlyInput = require('../readonly-input')
const copyToClipboard = require('copy-to-clipboard')
+const { checksumAddress } = require('../../util')
function mapStateToProps (state) {
return {
@@ -60,7 +61,7 @@ ExportPrivateKeyModal.prototype.renderPasswordLabel = function (privateKey) {
}
ExportPrivateKeyModal.prototype.renderPasswordInput = function (privateKey) {
- const plainKey = privateKey && ethUtil.stripHexPrefix(privateKey)
+ const plainKey = privateKey && stripHexPrefix(privateKey)
return privateKey
? h(ReadOnlyInput, {
@@ -121,7 +122,7 @@ ExportPrivateKeyModal.prototype.render = function () {
h(ReadOnlyInput, {
wrapperClass: 'ellip-address-wrapper',
inputClass: 'qr-ellip-address ellip-address',
- value: address,
+ value: checksumAddress(address),
}),
h('div.account-modal-divider'),