aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-06-13 06:23:53 +0800
committerGitHub <noreply@github.com>2017-06-13 06:23:53 +0800
commit16593d0b9d461abc40986aa3413b0d59e69c1055 (patch)
treecb60e1925a37c2dc4407531f319cdbda4d9ff126
parent33a32bb06be408d197d2f7784d9c1a9e04280fda (diff)
parent3da887e56ef6819aa0cb0f9a19c33025d80bca35 (diff)
downloadtangerine-wallet-browser-16593d0b9d461abc40986aa3413b0d59e69c1055.tar
tangerine-wallet-browser-16593d0b9d461abc40986aa3413b0d59e69c1055.tar.gz
tangerine-wallet-browser-16593d0b9d461abc40986aa3413b0d59e69c1055.tar.bz2
tangerine-wallet-browser-16593d0b9d461abc40986aa3413b0d59e69c1055.tar.lz
tangerine-wallet-browser-16593d0b9d461abc40986aa3413b0d59e69c1055.tar.xz
tangerine-wallet-browser-16593d0b9d461abc40986aa3413b0d59e69c1055.tar.zst
tangerine-wallet-browser-16593d0b9d461abc40986aa3413b0d59e69c1055.zip
Merge pull request #1592 from MetaMask/qrPrefix
prefix the address with "ethereum:"
-rw-r--r--CHANGELOG.md1
-rw-r--r--ui/app/components/qr-code.js12
2 files changed, 7 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38aebcbd4..b3823109d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## Current Master
+- Add a `ethereum:` prefix to the QR code address
- The default network on installation is now MainNet
- Fix currency API URL from cryptonator.
- Update gasLimit params with every new block seen.
diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js
index 5488599eb..06b9aed9b 100644
--- a/ui/app/components/qr-code.js
+++ b/ui/app/components/qr-code.js
@@ -3,6 +3,7 @@ const h = require('react-hyperscript')
const qrCode = require('qrcode-npm').qrcode
const inherits = require('util').inherits
const connect = require('react-redux').connect
+const isHexPrefixed = require('ethereumjs-util').isHexPrefixed
const CopyButton = require('./copyButton')
module.exports = connect(mapStateToProps)(QrCodeView)
@@ -22,13 +23,12 @@ function QrCodeView () {
}
QrCodeView.prototype.render = function () {
- var props = this.props
- var Qr = props.Qr
- var qrImage = qrCode(4, 'M')
-
- qrImage.addData(Qr.data)
+ const props = this.props
+ const Qr = props.Qr
+ const address = `${isHexPrefixed(Qr.data) ? 'ethereum:' : ''}${Qr.data}`
+ const qrImage = qrCode(4, 'M')
+ qrImage.addData(address)
qrImage.make()
-
return h('.main-container.flex-column', {
key: 'qr',
style: {