Skip to content

Commit

Permalink
Fix updatable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariano Aguero committed Sep 28, 2018
1 parent 64e5e4b commit 988adb6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
15 changes: 8 additions & 7 deletions src/components/contribute/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,13 +676,14 @@ export class Contribute extends React.Component {
</div>
<p className="contribute-title">Contribute page</p>
<p className="contribute-description">
{'Here you can contribute in the crowdsale campaign. At the moment, you need' +
(
<a href="https://chrome.google.com/webstore/detail/nifty-wallet/jbdaocneiiinmjbjlgalhcelgbejmnid">
a Wallet
</a>
) +
'client to contribute into the crowdsale.'}
Here you can contribute in the crowdsale campaign. At the moment, you need{' '}
<a
target="_blank"
href="https://chrome.google.com/webstore/detail/nifty-wallet/jbdaocneiiinmjbjlgalhcelgbejmnid"
>
a Wallet
</a>{' '}
client to contribute into the crowdsale.
</p>
</div>
<div className={rightColumnClasses}>
Expand Down
9 changes: 5 additions & 4 deletions src/components/manage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,6 @@ export class Manage extends Component {
const crowdsaleHasEnded = startTime <= Date.now() && endTime <= Date.now()
const crowdsaleHasStarted = startTime <= Date.now() && endTime >= Date.now()

logger.log('Crowdsale has ended', crowdsaleHasEnded)
logger.log('Crowdsale has started', crowdsaleHasStarted)

this.setState({
crowdsaleHasEnded: crowdsaleHasEnded,
crowdsaleHasStarted: crowdsaleHasStarted,
Expand Down Expand Up @@ -709,7 +706,11 @@ export class Manage extends Component {

saveDisplayed = () => {
const { ownerCurrentUser, crowdsaleHasEnded, crowdsaleIsFinalized, canFinalize } = this.state
return ownerCurrentUser && !crowdsaleHasEnded && (!crowdsaleIsFinalized || !canFinalize)
const { selected } = this.props.crowdsaleStore

const updatable = (selected && selected.updatable) || false

return ownerCurrentUser && !crowdsaleHasEnded && (!crowdsaleIsFinalized || !canFinalize) && updatable
}

saveCrowdsale = () => {
Expand Down

0 comments on commit 988adb6

Please sign in to comment.