mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #1592 from MetaMask/qrPrefix
prefix the address with "ethereum:"
This commit is contained in:
commit
16593d0b9d
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Current Master
|
## Current Master
|
||||||
|
|
||||||
|
- Add a `ethereum:` prefix to the QR code address
|
||||||
- The default network on installation is now MainNet
|
- The default network on installation is now MainNet
|
||||||
- Fix currency API URL from cryptonator.
|
- Fix currency API URL from cryptonator.
|
||||||
- Update gasLimit params with every new block seen.
|
- Update gasLimit params with every new block seen.
|
||||||
|
@ -3,6 +3,7 @@ const h = require('react-hyperscript')
|
|||||||
const qrCode = require('qrcode-npm').qrcode
|
const qrCode = require('qrcode-npm').qrcode
|
||||||
const inherits = require('util').inherits
|
const inherits = require('util').inherits
|
||||||
const connect = require('react-redux').connect
|
const connect = require('react-redux').connect
|
||||||
|
const isHexPrefixed = require('ethereumjs-util').isHexPrefixed
|
||||||
const CopyButton = require('./copyButton')
|
const CopyButton = require('./copyButton')
|
||||||
|
|
||||||
module.exports = connect(mapStateToProps)(QrCodeView)
|
module.exports = connect(mapStateToProps)(QrCodeView)
|
||||||
@ -22,13 +23,12 @@ function QrCodeView () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QrCodeView.prototype.render = function () {
|
QrCodeView.prototype.render = function () {
|
||||||
var props = this.props
|
const props = this.props
|
||||||
var Qr = props.Qr
|
const Qr = props.Qr
|
||||||
var qrImage = qrCode(4, 'M')
|
const address = `${isHexPrefixed(Qr.data) ? 'ethereum:' : ''}${Qr.data}`
|
||||||
|
const qrImage = qrCode(4, 'M')
|
||||||
qrImage.addData(Qr.data)
|
qrImage.addData(address)
|
||||||
qrImage.make()
|
qrImage.make()
|
||||||
|
|
||||||
return h('.main-container.flex-column', {
|
return h('.main-container.flex-column', {
|
||||||
key: 'qr',
|
key: 'qr',
|
||||||
style: {
|
style: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user