diff --git a/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js
index 8938652f4..e175638b5 100644
--- a/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js
+++ b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import copyToClipboard from 'copy-to-clipboard';
import classnames from 'classnames';
+import log from 'loglevel';
import AccountListItem from '../../components/app/account-list-item';
import Identicon from '../../components/ui/identicon';
@@ -298,6 +299,11 @@ export default class ConfirmDecryptMessage extends Component {
};
render = () => {
+ if (!this.props.txData) {
+ log.warn('ConfirmDecryptMessage Page: Missing txData prop.');
+ return null;
+ }
+
return (
{this.renderHeader()}
diff --git a/ui/pages/confirm-decrypt-message/confirm-decrypt-message.container.js b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.container.js
index cdc56ed5b..57358ecdd 100644
--- a/ui/pages/confirm-decrypt-message/confirm-decrypt-message.container.js
+++ b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.container.js
@@ -27,11 +27,10 @@ function mapStateToProps(state) {
const txData = unconfirmedTransactions[0];
- const {
- msgParams: { from },
- } = txData;
-
- const fromAccount = getTargetAccountWithSendEtherInfo(state, from);
+ const fromAccount = getTargetAccountWithSendEtherInfo(
+ state,
+ txData?.msgParams?.from,
+ );
return {
txData,
diff --git a/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js
index 205f2d0cc..f7f58258e 100644
--- a/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js
+++ b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
+import log from 'loglevel';
import AccountListItem from '../../components/app/account-list-item';
import Identicon from '../../components/ui/identicon';
@@ -197,6 +198,11 @@ export default class ConfirmEncryptionPublicKey extends Component {
};
render = () => {
+ if (!this.props.txData) {
+ log.warn('ConfirmEncryptionPublicKey Page: Missing txData prop.');
+ return null;
+ }
+
return (
{this.renderHeader()}
diff --git a/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js
index e512e99ff..5fd0a07af 100644
--- a/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js
+++ b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js
@@ -28,9 +28,10 @@ function mapStateToProps(state) {
const txData = unconfirmedTransactions[0];
- const { msgParams: from } = txData;
-
- const fromAccount = getTargetAccountWithSendEtherInfo(state, from);
+ const fromAccount = getTargetAccountWithSendEtherInfo(
+ state,
+ txData?.msgParams,
+ );
return {
txData,