diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-15 05:03:21 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-21 01:48:46 +0800 |
commit | 3c73781787f7aab6cdba0b738e4844a26aab5d8e (patch) | |
tree | 5a98f0acdcda6d3dd1a8368be6bb0ddf77c8fa6a /old-ui/app/account-qr.js | |
parent | 41f89ac7edf994f3d15d32d3d82d8d2b03dec481 (diff) | |
download | tangerine-wallet-browser-3c73781787f7aab6cdba0b738e4844a26aab5d8e.tar.gz tangerine-wallet-browser-3c73781787f7aab6cdba0b738e4844a26aab5d8e.tar.zst tangerine-wallet-browser-3c73781787f7aab6cdba0b738e4844a26aab5d8e.zip |
Delete old-ui folder
Diffstat (limited to 'old-ui/app/account-qr.js')
-rw-r--r-- | old-ui/app/account-qr.js | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/old-ui/app/account-qr.js b/old-ui/app/account-qr.js deleted file mode 100644 index b41cc5112..000000000 --- a/old-ui/app/account-qr.js +++ /dev/null @@ -1,86 +0,0 @@ -const PropTypes = require('prop-types') -const {PureComponent} = require('react') -const h = require('react-hyperscript') -const {qrcode: qrCode} = require('qrcode-npm') -const {connect} = require('react-redux') -const {isHexPrefixed} = require('ethereumjs-util') -const actions = require('../../ui/app/actions') -const CopyButton = require('./components/copyButton') - -class AccountQrScreen extends PureComponent { - static defaultProps = { - warning: null, - } - - static propTypes = { - dispatch: PropTypes.func.isRequired, - buyView: PropTypes.any.isRequired, - Qr: PropTypes.object.isRequired, - selectedAddress: PropTypes.string.isRequired, - warning: PropTypes.node, - } - - render () { - const {dispatch, Qr, selectedAddress, warning} = this.props - const address = `${isHexPrefixed(Qr.data) ? 'ethereum:' : ''}${Qr.data}` - const qrImage = qrCode(4, 'M') - - qrImage.addData(address) - qrImage.make() - - return h('div.flex-column.full-width', { - style: { - alignItems: 'center', - boxSizing: 'border-box', - padding: '50px', - }, - }, [ - h('div.flex-row.full-width', { - style: { - alignItems: 'flex-start', - }, - }, [ - h('i.fa.fa-arrow-left.fa-lg.cursor-pointer.color-orange', { - onClick () { - dispatch(actions.backToAccountDetail(selectedAddress)) - }, - }), - ]), - h('div.qr-header', Qr.message), - warning && h('span.error.flex-center', { - style: { - textAlign: 'center', - width: '229px', - height: '82px', - }, - }, [ - this.props.warning, - ]), - h('div#qr-container.flex-column', { - style: { - marginTop: '25px', - marginBottom: '15px', - }, - dangerouslySetInnerHTML: { - __html: qrImage.createTableTag(4), - }, - }), - h('div.flex-row.full-width', [ - h('h3.ellip-address.grow-tenx', Qr.data), - h(CopyButton, { - value: Qr.data, - }), - ]), - ]) - } -} - -function mapStateToProps (state) { - return { - Qr: state.appState.Qr, - buyView: state.appState.buyView, - warning: state.appState.warning, - } -} - -module.exports = connect(mapStateToProps)(AccountQrScreen) |