@@ -93,6 +97,6 @@ class DeployClass extends Component { } export const Deploy = connect(null, { - setToField, - resetWallet + resetWallet, + resetTransactionRequested })(DeployClass); diff --git a/common/containers/Tabs/Contracts/components/Interact/components/InteractExplorer/index.tsx b/common/containers/Tabs/Contracts/components/Interact/components/InteractExplorer/index.tsx index 8c9687d4..35e0b73a 100644 --- a/common/containers/Tabs/Contracts/components/Interact/components/InteractExplorer/index.tsx +++ b/common/containers/Tabs/Contracts/components/Interact/components/InteractExplorer/index.tsx @@ -8,7 +8,16 @@ import { GenerateTransaction } from 'components/GenerateTransaction'; import { AppState } from 'reducers'; import { connect } from 'react-redux'; import { Fields } from './components'; -import { setDataField, TSetDataField } from 'actions/transaction'; +import { + setDataField, + resetTransactionRequested, + TSetDataField, + TResetTransactionRequested, + TSetAsContractInteraction, + TSetAsViewAndSend, + setAsContractInteraction, + setAsViewAndSend +} from 'actions/transaction'; import { Data } from 'libs/units'; import { Input, Dropdown } from 'components/ui'; import { INode } from 'libs/nodes'; @@ -23,6 +32,9 @@ interface StateProps { interface DispatchProps { showNotification: TShowNotification; setDataField: TSetDataField; + resetTransactionRequested: TResetTransactionRequested; + setAsContractInteraction: TSetAsContractInteraction; + setAsViewAndSend: TSetAsViewAndSend; } interface OwnProps { @@ -64,6 +76,15 @@ class InteractExplorerClass extends Component { outputs: {} }; + public componentDidMount() { + this.props.setAsContractInteraction(); + this.props.resetTransactionRequested(); + } + + public componentWillUnmount() { + this.props.setAsViewAndSend(); + } + public render() { const { inputs, outputs, selectedFunction } = this.state; const contractFunctionsOptions = this.contractOptions(); @@ -296,5 +317,11 @@ export const InteractExplorer = connect( to: getTo(state), dataExists: getDataExists(state) }), - { showNotification, setDataField } + { + showNotification, + setDataField, + resetTransactionRequested, + setAsContractInteraction, + setAsViewAndSend + } )(InteractExplorerClass); diff --git a/common/containers/Tabs/Contracts/index.tsx b/common/containers/Tabs/Contracts/index.tsx index 62ae7527..35b515aa 100644 --- a/common/containers/Tabs/Contracts/index.tsx +++ b/common/containers/Tabs/Contracts/index.tsx @@ -1,13 +1,6 @@ import translate from 'translations'; import { Interact } from './components/Interact'; import { Deploy } from './components/Deploy'; -import { - setAsContractInteraction, - TSetAsContractInteraction, - setAsViewAndSend, - TSetAsViewAndSend -} from 'actions/transaction'; - import TabSection from 'containers/TabSection'; import React, { Component } from 'react'; import { connect } from 'react-redux'; @@ -15,11 +8,6 @@ import { Switch, Route, Redirect, RouteComponentProps } from 'react-router'; import SubTabs from 'components/SubTabs'; import { RouteNotFound } from 'components/RouteNotFound'; -interface DispatchProps { - setAsContractInteraction: TSetAsContractInteraction; - setAsViewAndSend: TSetAsViewAndSend; -} - const tabs = [ { path: 'interact', @@ -31,14 +19,7 @@ const tabs = [ } ]; -class Contracts extends Component> { - public componentDidMount() { - this.props.setAsContractInteraction(); - } - public componentWillUnmount() { - this.props.setAsViewAndSend(); - } - +class Contracts extends Component> { public render() { const { match, location, history } = this.props; const currentPath = match.url; @@ -65,4 +46,4 @@ class Contracts extends Component> { } } -export default connect(null, { setAsContractInteraction, setAsViewAndSend })(Contracts); +export default connect(null, {})(Contracts); From 6ba78b89bf96604dc67d793d4f1db17918ebd372 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Fri, 25 May 2018 12:32:26 -0500 Subject: [PATCH 7/7] update versions --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ad811f33..7c481bdb 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "MyCrypto", "author": "MyCryptoHQ", - "version": "1.0.1", - "electron-version": "1.0.1-alpha.4", + "version": "1.0.2", + "electron-version": "1.0.2-alpha.5", "main": "main.js", "description": "MyCrypto web and electron app", "repository": "https://github.com/MyCryptoHQ/MyCrypto",