connect to network using murmur
This commit is contained in:
parent
821b4fa6d1
commit
28a1a663ed
|
@ -10,7 +10,7 @@ import SpotifyPlayer from 'react-spotify-player';
|
||||||
import { Emoji } from 'emoji-mart';
|
import { Emoji } from 'emoji-mart';
|
||||||
import Jazzicon, { jsNumberForAddress } from 'react-jazzicon'
|
import Jazzicon, { jsNumberForAddress } from 'react-jazzicon'
|
||||||
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
||||||
import { atomDark } from 'react-syntax-highlighter/dist/styles/prism';
|
import { atomDark } from 'react-syntax-highlighter/dist/cjs/styles/prism';
|
||||||
import { Matcher } from '@areknawo/rex'
|
import { Matcher } from '@areknawo/rex'
|
||||||
import SyntaxLookup from '../utils/syntaxLookup';
|
import SyntaxLookup from '../utils/syntaxLookup';
|
||||||
import { getFile } from '../utils/ipfs';
|
import { getFile } from '../utils/ipfs';
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React, { PureComponent, Fragment } from 'react';
|
import React, { PureComponent, Fragment } from 'react';
|
||||||
import StatusJS from 'status-js-api';
|
import StatusJS from 'status-js-api';
|
||||||
|
import Murmur from 'murmur-client';
|
||||||
import IPFS from 'ipfs';
|
import IPFS from 'ipfs';
|
||||||
import { isNil } from 'lodash';
|
import { isNil } from 'lodash';
|
||||||
import Grid from '@material-ui/core/Grid';
|
import Grid from '@material-ui/core/Grid';
|
||||||
|
@ -18,6 +19,7 @@ const typingNotificationsTimestamp = {};
|
||||||
|
|
||||||
const DEFAULT_CHANNEL = "mytest";
|
const DEFAULT_CHANNEL = "mytest";
|
||||||
const URL = "ws://localhost:8546";
|
const URL = "ws://localhost:8546";
|
||||||
|
const murmur = new Murmur();
|
||||||
const status = new StatusJS();
|
const status = new StatusJS();
|
||||||
|
|
||||||
type Props = {};
|
type Props = {};
|
||||||
|
@ -50,7 +52,9 @@ export default class Home extends PureComponent<Props> {
|
||||||
connect = async (account) => {
|
connect = async (account) => {
|
||||||
if (!account) {
|
if (!account) {
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
status.connect(URL);
|
//status.connect(URL);
|
||||||
|
status.connectToProvider(murmur.provider);
|
||||||
|
murmur.start();
|
||||||
return this.onConnect();
|
return this.onConnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -271,6 +271,7 @@
|
||||||
"ipfs": "^0.33.1",
|
"ipfs": "^0.33.1",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"memoize-one": "^4.0.3",
|
"memoize-one": "^4.0.3",
|
||||||
|
"murmur-client": "0.0.3",
|
||||||
"react": "^16.6.3",
|
"react": "^16.6.3",
|
||||||
"react-dom": "^16.6.3",
|
"react-dom": "^16.6.3",
|
||||||
"react-dropzone": "^7.0.1",
|
"react-dropzone": "^7.0.1",
|
||||||
|
@ -282,12 +283,12 @@
|
||||||
"react-router-dom": "^4.3.1",
|
"react-router-dom": "^4.3.1",
|
||||||
"react-spinners": "^0.4.7",
|
"react-spinners": "^0.4.7",
|
||||||
"react-spotify-player": "^1.0.4",
|
"react-spotify-player": "^1.0.4",
|
||||||
"react-syntax-highlighter": "^10.0.1",
|
"react-syntax-highlighter": "^10.1.1",
|
||||||
"react-youtube": "^7.8.0",
|
"react-youtube": "^7.8.0",
|
||||||
"redux": "^4.0.0",
|
"redux": "^4.0.0",
|
||||||
"redux-thunk": "^2.3.0",
|
"redux-thunk": "^2.3.0",
|
||||||
"source-map-support": "^0.5.6",
|
"source-map-support": "^0.5.6",
|
||||||
"status-js-api": "^1.0.6"
|
"status-js-api": "^1.0.9"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.x <11",
|
"node": ">=10.x <11",
|
||||||
|
|
Loading…
Reference in New Issue