1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00

Adding default properties to NetworkForm (#10682)

Fixes MetaMask/metamask-extension#10681
This commit is contained in:
ryanml 2021-03-22 09:57:34 -07:00 committed by GitHub
parent 1b4504e233
commit fc8ffc134d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,14 @@ export default class NetworkForm extends PureComponent {
isFullScreen: PropTypes.bool, isFullScreen: PropTypes.bool,
}; };
static defaultProps = {
rpcUrl: '',
chainId: '',
ticker: '',
networkName: '',
blockExplorerUrl: '',
};
state = { state = {
rpcUrl: this.props.rpcUrl, rpcUrl: this.props.rpcUrl,
chainId: this.getDisplayChainId(this.props.chainId), chainId: this.getDisplayChainId(this.props.chainId),