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. 8
      ui/app/components/sender-to-recipient/sender-to-recipient.component.js

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

Loading…
Cancel
Save