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

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.
This commit is contained in:
Mark Stacey 2021-02-01 14:32:20 -03:30 committed by GitHub
parent f381f41cb2
commit e6f4c89945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,