File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import React from "react";
33import { ReactComponent as Brand } from "../assets/images/logo-dispute-resolver-white.svg" ;
44import { LinkContainer } from "react-router-bootstrap" ;
55import SmartContractWalletWarning from "./smartContractWalletWarning" ;
6+ import PropTypes from "prop-types" ;
67
78class Header extends React . Component {
89 render ( ) {
@@ -49,3 +50,10 @@ class Header extends React.Component {
4950}
5051
5152export default Header ;
53+
54+ Header . propTypes = {
55+ viewOnly : PropTypes . bool . isRequired ,
56+ route : PropTypes . object . isRequired ,
57+ activeAddress : PropTypes . string . isRequired ,
58+ web3Provider : PropTypes . object . isRequired ,
59+ } ;
Original file line number Diff line number Diff line change 11import React from "react" ;
22import styled from "styled-components" ;
33import { Alert } from "antd" ;
4+ import PropTypes from "prop-types" ;
45
56const StyledAlert = styled ( Alert ) `
67 text-align: center;
@@ -58,6 +59,7 @@ export default class SmartContractWalletWarning extends React.Component {
5859 const code = await web3Provider . getCode ( activeAddress ) ;
5960 this . setState ( { isSmartContractWallet : code !== "0x" } ) ;
6061 } catch ( error ) {
62+ console . error ( "Error getting code at wallet address" , error ) ;
6163 this . setState ( { isSmartContractWallet : false } ) ;
6264 }
6365 } ;
@@ -69,7 +71,7 @@ export default class SmartContractWalletWarning extends React.Component {
6971
7072 render ( ) {
7173 const { isSmartContractWallet, showWarning } = this . state ;
72-
74+
7375 if ( ! showWarning || ! isSmartContractWallet ) {
7476 return null ;
7577 }
@@ -97,3 +99,8 @@ export default class SmartContractWalletWarning extends React.Component {
9799 ) ;
98100 }
99101}
102+
103+ SmartContractWalletWarning . propTypes = {
104+ activeAddress : PropTypes . string . isRequired ,
105+ web3Provider : PropTypes . object . isRequired ,
106+ } ;
You can’t perform that action at this time.
0 commit comments