1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

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

This commit is contained in:
Dan J Miller 2019-03-06 12:49:23 -03:30 committed by GitHub
parent 7160cef4c7
commit d547e0b80b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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() }