From c75b37aae9fb872e6f1a617b10c41d593c9cd12f Mon Sep 17 00:00:00 2001 From: andrepimenta Date: Mon, 26 Oct 2020 17:44:58 +0000 Subject: [PATCH 1/2] more sentry cleanup --- app/components/UI/Notification/index.js | 3 ++- app/components/Views/Onboarding/index.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/components/UI/Notification/index.js b/app/components/UI/Notification/index.js index 20bd948ed5b..7457ec9f25f 100644 --- a/app/components/UI/Notification/index.js +++ b/app/components/UI/Notification/index.js @@ -461,6 +461,7 @@ class Notification extends PureComponent { const { status } = this.props; const { tx, transactionDetailsIsVisible, inBrowserView } = this.state; const isPaymentChannelTransaction = tx && tx.paymentChannelTransaction; + const data = tx ? { ...tx.transaction, ...this.props.transaction } : { ...this.props.transaction }; return ( diff --git a/app/components/Views/Onboarding/index.js b/app/components/Views/Onboarding/index.js index 177aefbd207..27b68cb59b0 100644 --- a/app/components/Views/Onboarding/index.js +++ b/app/components/Views/Onboarding/index.js @@ -637,7 +637,11 @@ class Onboarding extends PureComponent { } const mapStateToProps = state => ({ - selectedAddress: state.engine.backgroundState.PreferencesController.selectedAddress, + selectedAddress: + state.engine && + state.engine.backgroundState && + state.engine.backgroundState.PreferencesController && + state.engine.backgroundState.PreferencesController.selectedAddress, accounts: state.engine.backgroundState.AccountTrackerController.accounts, passwordSet: state.user.passwordSet }); From 2335e8bfc1ba0fd54bce7bb68249bc238a9ec17d Mon Sep 17 00:00:00 2001 From: andrepimenta Date: Wed, 28 Oct 2020 10:55:46 +0000 Subject: [PATCH 2/2] Optional chaining --- app/components/Views/Onboarding/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/components/Views/Onboarding/index.js b/app/components/Views/Onboarding/index.js index 27b68cb59b0..8975913457e 100644 --- a/app/components/Views/Onboarding/index.js +++ b/app/components/Views/Onboarding/index.js @@ -637,11 +637,7 @@ class Onboarding extends PureComponent { } const mapStateToProps = state => ({ - selectedAddress: - state.engine && - state.engine.backgroundState && - state.engine.backgroundState.PreferencesController && - state.engine.backgroundState.PreferencesController.selectedAddress, + selectedAddress: state?.engine?.backgroundState?.PreferencesController?.selectedAddress, accounts: state.engine.backgroundState.AccountTrackerController.accounts, passwordSet: state.user.passwordSet });