aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-02-24 06:23:45 +0800
committerDan Finlay <dan@danfinlay.com>2017-02-24 06:23:45 +0800
commit4697aca02c669b1787e72f0648b3043270867799 (patch)
treeecc07db1ce05ec6a88612a0fa7d1c86007ef6389 /ui/app/components
parent7ec25526b70473247a69ab4a3a1302e50b06f12b (diff)
downloadtangerine-wallet-browser-4697aca02c669b1787e72f0648b3043270867799.tar.gz
tangerine-wallet-browser-4697aca02c669b1787e72f0648b3043270867799.tar.zst
tangerine-wallet-browser-4697aca02c669b1787e72f0648b3043270867799.zip
Got personal_sign working
Also fixed bug where signing would not close popup.
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/pending-personal-msg-details.js50
-rw-r--r--ui/app/components/pending-personal-msg.js4
2 files changed, 52 insertions, 2 deletions
diff --git a/ui/app/components/pending-personal-msg-details.js b/ui/app/components/pending-personal-msg-details.js
new file mode 100644
index 000000000..16308d121
--- /dev/null
+++ b/ui/app/components/pending-personal-msg-details.js
@@ -0,0 +1,50 @@
+const Component = require('react').Component
+const h = require('react-hyperscript')
+const inherits = require('util').inherits
+
+const AccountPanel = require('./account-panel')
+
+module.exports = PendingMsgDetails
+
+inherits(PendingMsgDetails, Component)
+function PendingMsgDetails () {
+ Component.call(this)
+}
+
+PendingMsgDetails.prototype.render = function () {
+ var state = this.props
+ var msgData = state.txData
+
+ var msgParams = msgData.msgParams || {}
+ var address = msgParams.from || state.selectedAddress
+ var identity = state.identities[address] || { address: address }
+ var account = state.accounts[address] || { address: address }
+
+ return (
+ h('div', {
+ key: msgData.id,
+ style: {
+ margin: '10px 20px',
+ },
+ }, [
+
+ // account that will sign
+ h(AccountPanel, {
+ showFullAddress: true,
+ identity: identity,
+ account: account,
+ imageifyIdenticons: state.imageifyIdenticons,
+ }),
+
+ // message data
+ h('.tx-data.flex-column.flex-justify-center.flex-grow.select-none', [
+ h('.flex-row.flex-space-between', [
+ h('label.font-small', 'MESSAGE'),
+ h('span.font-small', msgParams.data),
+ ]),
+ ]),
+
+ ])
+ )
+}
+
diff --git a/ui/app/components/pending-personal-msg.js b/ui/app/components/pending-personal-msg.js
index f4bde91dc..d48dd5ecc 100644
--- a/ui/app/components/pending-personal-msg.js
+++ b/ui/app/components/pending-personal-msg.js
@@ -1,7 +1,7 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
-const PendingTxDetails = require('./pending-msg-details')
+const PendingTxDetails = require('./pending-personal-msg-details')
module.exports = PendingMsg
@@ -37,7 +37,7 @@ PendingMsg.prototype.render = function () {
onClick: state.cancelMessage,
}, 'Cancel'),
h('button', {
- onClick: state.signMessage,
+ onClick: state.signPersonalMessage,
}, 'Sign'),
]),
])