Skip to content
Snippets Groups Projects
Commit 2634128b authored by Jason Salyers's avatar Jason Salyers
Browse files

Merge branch 'jsalyers-fix-expiry-warning' into 'develop'

[JES] Fix an error that was clogging up the logs. If no user is logged in, the...

See merge request !129
parents 41d326ef 0c6366ad
No related branches found
No related tags found
2 merge requests!131[JES] Fix some log errors,!129[JES] Fix an error that was clogging up the logs. If no user is logged in, the...
......@@ -5,7 +5,12 @@ import { FormattedHTMLMessage } from 'app/Translator';
class WitnessVoteExpiryWarning extends React.Component {
render() {
const { governance_vote_expiration_ts } = this.props;
let governance_vote_expiration_ts =
this.props.governance_vote_expiration_ts !== undefined
? this.props.governance_vote_expiration_ts
: new Date(new Date().setFullYear(new Date().getFullYear() + 1))
.toISOString()
.split('.')[0];
const now = Moment();
const expiryDate = Moment(`${governance_vote_expiration_ts}Z`);
const expiryDiff = expiryDate.diff(now, 'months');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment