Only call onRecipient and onSender methods if defined in sender-to-recipient (#6247)

feature/default_network_editable
Dan J Miller 6 years ago committed by GitHub
parent 7160cef4c7
commit d547e0b80b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ui/app/components/sender-to-recipient/sender-to-recipient.component.js

@ -97,7 +97,9 @@ export default class SenderToRecipient extends PureComponent {
onClick={() => { onClick={() => {
this.setState({ recipientAddressCopied: true }) this.setState({ recipientAddressCopied: true })
copyToClipboard(checksummedRecipientAddress) copyToClipboard(checksummedRecipientAddress)
if (onRecipientClick) {
onRecipientClick() onRecipientClick()
}
}} }}
> >
{ this.renderRecipientIdenticon() } { this.renderRecipientIdenticon() }
@ -164,7 +166,9 @@ export default class SenderToRecipient extends PureComponent {
onClick={() => { onClick={() => {
this.setState({ senderAddressCopied: true }) this.setState({ senderAddressCopied: true })
copyToClipboard(checksummedSenderAddress) copyToClipboard(checksummedSenderAddress)
if (onSenderClick) {
onSenderClick() onSenderClick()
}
}} }}
> >
{ this.renderSenderIdenticon() } { this.renderSenderIdenticon() }

Loading…
Cancel
Save