From e6f4c89945e9a317c9f07c1437f40dbc5cf2d33e Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 1 Feb 2021 14:32:20 -0330 Subject: [PATCH] Fix signature confirmation PropType error (#10317) Upon the first render, the "original" signature request confirmation page would trigger a PropType error. This was caused by unexpected mutation of the state props. The container has been updated to avoid mutating the props, and now the PropType warning is no longer present. --- .../signature-request-original.container.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/app/components/app/signature-request-original/signature-request-original.container.js b/ui/app/components/app/signature-request-original/signature-request-original.container.js index 5987fcb27..90b78b734 100644 --- a/ui/app/components/app/signature-request-original/signature-request-original.container.js +++ b/ui/app/components/app/signature-request-original/signature-request-original.container.js @@ -44,8 +44,7 @@ function mergeProps(stateProps, dispatchProps, ownProps) { txData, } = ownProps - const { allAccounts } = stateProps - delete stateProps.allAccounts + const { allAccounts, ...otherStateProps } = stateProps const { type, @@ -69,7 +68,7 @@ function mergeProps(stateProps, dispatchProps, ownProps) { return { ...ownProps, - ...stateProps, + ...otherStateProps, ...dispatchProps, fromAccount, txData,