Browse Source

Signup hotfix

develop
Ezerous 6 years ago
parent
commit
5227a1bddf
  1. 7
      app/src/components/UsernameFormContainer.js
  2. 2
      app/src/helpers/EpochTimeConverter.js

7
app/src/components/UsernameFormContainer.js

@ -5,11 +5,8 @@ import { connect } from 'react-redux';
import { Button, Dimmer, Form, Header, Loader, Message } from 'semantic-ui-react'; import { Button, Dimmer, Form, Header, Loader, Message } from 'semantic-ui-react';
import { drizzle } from '../index'; import { drizzle } from '../index';
import { createDatabases } from '../utils/orbitUtils';
import { updateUsername } from '../redux/actions/transactionsActions'; import { updateUsername } from '../redux/actions/transactionsActions';
import { DATABASES_CREATED, updateDatabases } from '../redux/actions/orbitActions';
const contract = 'Forum'; const contract = 'Forum';
const checkUsernameTakenMethod = 'isUserNameTaken'; const checkUsernameTakenMethod = 'isUserNameTaken';
const signUpMethod = 'signUp'; const signUpMethod = 'signUp';
@ -79,10 +76,6 @@ class UsernameFormContainer extends Component {
this.setState({ this.setState({
signingUp: true signingUp: true
}); });
const { orbitdb,topicsDB,postsDB } = await createDatabases();
dispatch(
updateDatabases(DATABASES_CREATED, orbitdb, topicsDB, postsDB),
);
this.stackId = drizzle.contracts[contract].methods[signUpMethod].cacheSend( this.stackId = drizzle.contracts[contract].methods[signUpMethod].cacheSend(
...[usernameInput], { from: account } ...[usernameInput], { from: account }
); );

2
app/src/helpers/EpochTimeConverter.js

@ -6,7 +6,7 @@ const epochTimeConverter = (timestamp) => {
timestampDate.getFullYear()}, ${ timestampDate.getFullYear()}, ${
timestampDate.getHours()}:${ timestampDate.getHours()}:${
("0"+timestampDate.getMinutes()).slice(-2)}:${ ("0"+timestampDate.getMinutes()).slice(-2)}:${
timestampDate.getSeconds()}`); ("0"+timestampDate.getSeconds()).slice(-2)}`);
}; };
export default epochTimeConverter; export default epochTimeConverter;

Loading…
Cancel
Save