From ea9d51e427b8e607e612a01629bebf153e516ad9 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Fri, 22 Jun 2018 23:52:45 -0700 Subject: Refactor and redesign confirm transaction views --- .../confirm-deploy-contract.component.js | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js (limited to 'ui/app/components/pages/confirm-deploy-contract/confirm-deploy-contract.component.js') 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 ( +
+
+
+
+ { `${t('origin')}:` } +
+
+ { origin } +
+
+
+
+ { `${t('bytes')}:` } +
+
+ { ethUtil.toBuffer(data).length } +
+
+
+
+ { `${t('hexData')}:` } +
+
+ { data } +
+
+ ) + } + + render () { + return ( + + ) + } +} -- cgit v1.2.3