aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-13 00:54:08 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-13 00:54:08 +0800
commit07d8bfaec51a798e090bd2521debeddaf53bf2f9 (patch)
tree735338e1dbaa38601376024ed6e4fa4d89c66a2c /ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js
parent2a0a7853249284cb27831890f3b62847ea27eb83 (diff)
parent0d4dbbec2abfa8c8015063d6e4a5ff0d34abe7b9 (diff)
downloadtangerine-wallet-browser-07d8bfaec51a798e090bd2521debeddaf53bf2f9.tar
tangerine-wallet-browser-07d8bfaec51a798e090bd2521debeddaf53bf2f9.tar.gz
tangerine-wallet-browser-07d8bfaec51a798e090bd2521debeddaf53bf2f9.tar.bz2
tangerine-wallet-browser-07d8bfaec51a798e090bd2521debeddaf53bf2f9.tar.lz
tangerine-wallet-browser-07d8bfaec51a798e090bd2521debeddaf53bf2f9.tar.xz
tangerine-wallet-browser-07d8bfaec51a798e090bd2521debeddaf53bf2f9.tar.zst
tangerine-wallet-browser-07d8bfaec51a798e090bd2521debeddaf53bf2f9.zip
Merge branch 'develop' of github.com:MetaMask/metamask-extension into initial-trezor-support
Diffstat (limited to 'ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js')
-rw-r--r--ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js64
1 files changed, 64 insertions, 0 deletions
diff --git a/ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js b/ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js
new file mode 100644
index 000000000..9bc0daab9
--- /dev/null
+++ b/ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js
@@ -0,0 +1,64 @@
+import React, { Component } from 'react'
+import PropTypes from 'prop-types'
+import ethUtil from 'ethereumjs-util'
+import ConfirmTransactionBase from '../confirm-transaction-base'
+
+export default class ConfirmDeployContract extends Component {
+ static contextTypes = {
+ t: PropTypes.func,
+ }
+
+ static propTypes = {
+ txData: PropTypes.object,
+ }
+
+ renderData () {
+ const { t } = this.context
+ const {
+ txData: {
+ origin,
+ txParams: {
+ data,
+ } = {},
+ } = {},
+ } = this.props
+
+ return (
+ <div className="confirm-page-container-content__data">
+ <div className="confirm-page-container-content__data-box">
+ <div className="confirm-page-container-content__data-field">
+ <div className="confirm-page-container-content__data-field-label">
+ { `${t('origin')}:` }
+ </div>
+ <div>
+ { origin }
+ </div>
+ </div>
+ <div className="confirm-page-container-content__data-field">
+ <div className="confirm-page-container-content__data-field-label">
+ { `${t('bytes')}:` }
+ </div>
+ <div>
+ { ethUtil.toBuffer(data).length }
+ </div>
+ </div>
+ </div>
+ <div className="confirm-page-container-content__data-box-label">
+ { `${t('hexData')}:` }
+ </div>
+ <div className="confirm-page-container-content__data-box">
+ { data }
+ </div>
+ </div>
+ )
+ }
+
+ render () {
+ return (
+ <ConfirmTransactionBase
+ action={this.context.t('contractDeployment')}
+ dataComponent={this.renderData()}
+ />
+ )
+ }
+}