diff --git a/common/components/ConfirmationModal/components/Body/Body.tsx b/common/components/ConfirmationModal/components/Body/Body.tsx index ff25034a..7a8e44e0 100644 --- a/common/components/ConfirmationModal/components/Body/Body.tsx +++ b/common/components/ConfirmationModal/components/Body/Body.tsx @@ -6,13 +6,14 @@ import { connect } from 'react-redux'; import { AppState } from 'reducers'; import './Body.scss'; import { getNetworkConfig } from 'selectors/config'; +import { NetworkConfig } from 'types/network'; interface State { showDetails: boolean; } interface StateProps { - network: AppState['config']['network']; + network: NetworkConfig; } class BodyClass extends React.Component { diff --git a/common/components/ConfirmationModal/components/Body/components/Amounts.tsx b/common/components/ConfirmationModal/components/Body/components/Amounts.tsx index a5f5969d..e05823c4 100644 --- a/common/components/ConfirmationModal/components/Body/components/Amounts.tsx +++ b/common/components/ConfirmationModal/components/Body/components/Amounts.tsx @@ -6,7 +6,7 @@ import { getAllUSDValuesFromSerializedTx, AllUSDValues } from 'selectors/rates'; import { SerializedTxParams, getParamsFromSerializedTx } from 'selectors/transaction'; import { connect } from 'react-redux'; import { getNetworkConfig } from 'selectors/config'; -import { NetworkConfig } from 'config'; +import { NetworkConfig } from 'types/network'; interface StateProps extends SerializedTxParams, AllUSDValues { network: NetworkConfig; diff --git a/common/components/ConfirmationModal/components/Body/components/Details.tsx b/common/components/ConfirmationModal/components/Body/components/Details.tsx index 2fcfa5fb..5f6a20d8 100644 --- a/common/components/ConfirmationModal/components/Body/components/Details.tsx +++ b/common/components/ConfirmationModal/components/Body/components/Details.tsx @@ -4,9 +4,9 @@ import './Details.scss'; import { SerializedTransaction } from 'components/renderCbs'; import { AppState } from 'reducers'; import { getNodeConfig } from 'selectors/config'; -import { NodeConfig } from 'config'; import { connect } from 'react-redux'; import { TokenValue } from 'libs/units'; +import { NodeConfig } from 'types/node'; interface StateProps { node: NodeConfig; diff --git a/common/components/CurrentCustomMessage.tsx b/common/components/CurrentCustomMessage.tsx index 4b3f734e..0dee62c3 100644 --- a/common/components/CurrentCustomMessage.tsx +++ b/common/components/CurrentCustomMessage.tsx @@ -4,7 +4,8 @@ import { AppState } from 'reducers'; import { getCurrentTo, ICurrentTo } from 'selectors/transaction'; import { getAllTokens } from 'selectors/config'; import { getWalletInst } from 'selectors/wallet'; -import { getAddressMessage, Token } from 'config'; +import { getAddressMessage } from 'config'; +import { Token } from 'types/network'; interface ReduxProps { currentTo: ICurrentTo; diff --git a/common/libs/wallet/non-deterministic/web3.ts b/common/libs/wallet/non-deterministic/web3.ts index d8389afb..ec4f9918 100644 --- a/common/libs/wallet/non-deterministic/web3.ts +++ b/common/libs/wallet/non-deterministic/web3.ts @@ -70,7 +70,7 @@ export default class Web3Wallet implements IFullWallet { private async networkCheck(lib: Web3Node) { const netId = await lib.getNetVersion(); - const netName = networkIdToName(netId); + const netName = networkIdToName(netId as any); if (this.network !== netName) { throw new Error( `Expected MetaMask / Mist network to be ${ diff --git a/common/reducers/config/networks/staticNetworks.ts b/common/reducers/config/networks/staticNetworks.ts index 856fa4e2..cc1e4bc2 100644 --- a/common/reducers/config/networks/staticNetworks.ts +++ b/common/reducers/config/networks/staticNetworks.ts @@ -129,7 +129,7 @@ const INITIAL_STATE: State = { chainId: 2, isCustom: false, color: '#673ab7', - blockExplorer: makeExplorer('http://www.gander.tech'), + blockExplorer: makeExplorer('https://www.gander.tech'), tokens: require('config/tokens/exp.json'), contracts: require('config/contracts/exp.json'), dPathFormats: { diff --git a/spec/integration/data.int.ts b/spec/integration/data.int.ts index e8eb0640..3a7db3f6 100644 --- a/spec/integration/data.int.ts +++ b/spec/integration/data.int.ts @@ -6,6 +6,7 @@ import EtherscanNode from 'libs/nodes/etherscan'; import InfuraNode from 'libs/nodes/infura'; import RpcNodeTestConfig from './RpcNodeTestConfig'; import { StaticNodeConfig } from 'types/node'; +import { staticNodesExpectedState } from '../reducers/config/nodes/staticNodes.spec'; const v = new Validator(); @@ -79,4 +80,6 @@ const mapNodeEndpoints = (nodes: { [key: string]: StaticNodeConfig }) => { }); }; -mapNodeEndpoints(NODES); +mapNodeEndpoints((staticNodesExpectedState.initialState as any) as { + [key: string]: StaticNodeConfig; +}); diff --git a/spec/pages/SendTransaction.spec.tsx b/spec/pages/SendTransaction.spec.tsx index 6fe9ef3c..e5503d77 100644 --- a/spec/pages/SendTransaction.spec.tsx +++ b/spec/pages/SendTransaction.spec.tsx @@ -11,7 +11,7 @@ import { config } from 'reducers/config'; Enzyme.configure({ adapter: new Adapter() }); it('render snapshot', () => { - const testStateConfig = config(undefined, {}); + const testStateConfig = config(undefined as any, {} as any); const testState = { wallet: {}, balance: {}, diff --git a/spec/reducers/config/networks/staticNetworks.spec.ts b/spec/reducers/config/networks/staticNetworks.spec.ts index 41ff0fc6..b9fdb977 100644 --- a/spec/reducers/config/networks/staticNetworks.spec.ts +++ b/spec/reducers/config/networks/staticNetworks.spec.ts @@ -115,7 +115,7 @@ const expectedInitialState = { chainId: 2, isCustom: false, color: '#673ab7', - blockExplorer: makeExplorer('http://www.gander.tech'), + blockExplorer: makeExplorer('https://www.gander.tech'), tokens: require('config/tokens/exp.json'), contracts: require('config/contracts/exp.json'), dPathFormats: {