diff --git a/app/components/ens/nameLookup.js b/app/components/ens/nameLookup.js index 880d302..086d7ce 100644 --- a/app/components/ens/nameLookup.js +++ b/app/components/ens/nameLookup.js @@ -3,6 +3,7 @@ import web3 from 'web3'; import EmbarkJS from 'Embark/EmbarkJS'; import { connect } from 'react-redux'; import { actions as accountActions, getDefaultAccount } from '../../reducers/accounts'; +import { checkAndDispatchStatusContactCode } from '../../actions/accounts'; import { hash } from 'eth-ens-namehash'; import { isNil } from 'lodash'; import Hidden from '@material-ui/core/Hidden'; @@ -64,8 +65,8 @@ const backButton = { const validTimestamp = timestamp => Number(timestamp) > 99999999; const generatePrettyDate = timestamp => new Date(timestamp * 1000).toDateString(); -const DisplayBox = ({ displayType, pubKey }) => ( -
+const WrappedDisplayBox = ({ displayType, pubKey, getStatusContactCode }) => ( +
{displayType}
@@ -75,6 +76,14 @@ const DisplayBox = ({ displayType, pubKey }) => (
); +const mapDispatchToDisplayBoxProps = dispatch => ({ + getStatusContactCode() { + checkAndDispatchStatusContactCode(dispatch) + } +}); + +const DisplayBox = connect(null, mapDispatchToDisplayBoxProps)(WrappedDisplayBox); + const MobileAddressDisplay = ({ domainName, address, statusAccount, expirationTime, defaultAccount, isOwner, edit, onSubmit, handleChange, values, handleSubmit }) => ( diff --git a/app/store/init.js b/app/store/init.js index 2c9edee..5515005 100644 --- a/app/store/init.js +++ b/app/store/init.js @@ -1,14 +1,13 @@ import web3 from "Embark/web3" import EmbarkJS from 'Embark/EmbarkJS' import store from './configureStore' -import { fetchAndDispatchSNTAllowance, fetchAndDispatchAccountsWithBalances, checkAndDispatchStatusContactCode } from '../actions/accounts' +import { fetchAndDispatchSNTAllowance, fetchAndDispatchAccountsWithBalances } from '../actions/accounts' const dispatch = action => store.dispatch(action) export default () => { EmbarkJS.onReady(async (err) => { fetchAndDispatchAccountsWithBalances(web3, dispatch) - checkAndDispatchStatusContactCode(dispatch) fetchAndDispatchSNTAllowance(dispatch) }) }