Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix decrypt message confirmation UI crash #10252

Merged
merged 1 commit into from
Jan 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ export default class ConfirmDecryptMessage extends Component {
const { decryptMessageInline, domainMetadata, txData } = this.props
const { t } = this.context

const origin = domainMetadata[txData.msgParams.origin]
const notice = t('decryptMessageNotice', [origin.name])
const originMetadata = domainMetadata[txData.msgParams.origin]
const name = originMetadata?.name || txData.msgParams.origin
const notice = t('decryptMessageNotice', [txData.msgParams.origin])

const {
hasCopied,
Expand All @@ -191,15 +192,15 @@ export default class ConfirmDecryptMessage extends Component {
{this.renderAccountInfo()}
<div className="request-decrypt-message__visual">
<section>
{origin.icon ? (
{originMetadata?.icon ? (
<img
className="request-decrypt-message__visual-identicon"
src={origin.icon}
src={originMetadata?.icon}
rekmarks marked this conversation as resolved.
Show resolved Hide resolved
alt=""
/>
) : (
<i className="request-decrypt-message__visual-identicon--default">
{origin.name.charAt(0).toUpperCase()}
{name.charAt(0).toUpperCase()}
</i>
)}
<div className="request-decrypt-message__notice">{notice}</div>
Expand Down