aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/sender-to-recipient.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-03-21 08:15:59 +0800
committerGitHub <noreply@github.com>2018-03-21 08:15:59 +0800
commite005e9ac51e247620544f9c9871ff7ebd2bf80f6 (patch)
tree4fcfece5ff9e10c171dffdd0b0226820c74250f5 /ui/app/components/sender-to-recipient.js
parentcbaa70751b7ce20be04de4a9def2cbf8831274c5 (diff)
parent3c1248c8169a1cb96a0ee2bc0f523fb9c765569e (diff)
downloadtangerine-wallet-browser-e005e9ac51e247620544f9c9871ff7ebd2bf80f6.tar.gz
tangerine-wallet-browser-e005e9ac51e247620544f9c9871ff7ebd2bf80f6.tar.zst
tangerine-wallet-browser-e005e9ac51e247620544f9c9871ff7ebd2bf80f6.zip
Merge pull request #3624 from alextsg/cb-941
Update confirm transaction screen
Diffstat (limited to 'ui/app/components/sender-to-recipient.js')
-rw-r--r--ui/app/components/sender-to-recipient.js29
1 files changed, 25 insertions, 4 deletions
diff --git a/ui/app/components/sender-to-recipient.js b/ui/app/components/sender-to-recipient.js
index 25b9c7d6b..f35c353ad 100644
--- a/ui/app/components/sender-to-recipient.js
+++ b/ui/app/components/sender-to-recipient.js
@@ -5,6 +5,28 @@ const t = require('../../i18n')
const Identicon = require('./identicon')
class SenderToRecipient extends Component {
+ renderRecipientIcon () {
+ const { recipientAddress } = this.props
+ return (
+ recipientAddress
+ ? h(Identicon, { address: recipientAddress, diameter: 20 })
+ : h('i.fa.fa-file-text-o')
+ )
+ }
+
+ renderRecipient () {
+ const { recipientName } = this.props
+ return (
+ h('.sender-to-recipient__recipient', [
+ this.renderRecipientIcon(),
+ h(
+ '.sender-to-recipient__name.sender-to-recipient__recipient-name',
+ recipientName || t('newContract')
+ ),
+ ])
+ )
+ }
+
render () {
const { senderName, senderAddress } = this.props
@@ -28,10 +50,7 @@ class SenderToRecipient extends Component {
}),
]),
]),
- h('.sender-to-recipient__recipient', [
- h('i.fa.fa-file-text-o'),
- h('.sender-to-recipient__name.sender-to-recipient__recipient-name', t('newContract')),
- ]),
+ this.renderRecipient(),
])
)
}
@@ -40,6 +59,8 @@ class SenderToRecipient extends Component {
SenderToRecipient.propTypes = {
senderName: PropTypes.string,
senderAddress: PropTypes.string,
+ recipientName: PropTypes.string,
+ recipientAddress: PropTypes.string,
}
module.exports = SenderToRecipient