From cec32dac3d1596292bb993dc8dd0809e257b39a2 Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Mon, 27 Aug 2018 13:23:07 -0400 Subject: [PATCH] fix modal not closing bug --- app/components/ens/nameLookup.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/components/ens/nameLookup.js b/app/components/ens/nameLookup.js index 55cd723..924c819 100644 --- a/app/components/ens/nameLookup.js +++ b/app/components/ens/nameLookup.js @@ -4,6 +4,7 @@ import EmbarkJS from 'Embark/EmbarkJS'; import { connect } from 'react-redux'; import { actions as accountActions, getDefaultAccount } from '../../reducers/accounts'; import { hash } from 'eth-ens-namehash'; +import { isNil } from 'lodash'; import Hidden from '@material-ui/core/Hidden'; import Typography from '@material-ui/core/Typography'; import ENSSubdomainRegistry from 'Embark/contracts/ENSSubdomainRegistry'; @@ -91,7 +92,7 @@ const MobileAddressDisplay = ({ domainName, address, statusAccount, expirationTi {edit && } @@ -112,13 +113,15 @@ class RenderAddresses extends PureComponent { const onClose = value => { this.setState({ editAction: value, editMenu: false }) } const isOwner = defaultAccount === ownerAddress; const closeReleaseAlert = value => { - if (value) { + if (!isNil(value)) { this.setState({ submitted: true }) release( soliditySha3(domainName), hash('stateofus.eth'), ) .send() + } else { + this.setState({ editAction: null }) } } return (