Browse Source

Added IPFS config

develop
Ezerous 6 years ago
parent
commit
e3cf240ecf
  1. 8
      app/src/config/ipfsOptions.js
  2. 4
      app/src/redux/sagas/orbitSaga.js

8
app/src/config/ipfsOptions.js

@ -1,13 +1,17 @@
// OrbitDB uses Pubsub which is an experimental feature and need to be turned on manually.
// OrbitDB uses Pubsub which is an experimental feature
// and need to be turned on manually.
const ipfsOptions = {
EXPERIMENTAL: {
pubsub: true
}, config: {
Addresses: {
Swarm: [
'/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star',
// Use local signal server (https://github.com/libp2p/js-libp2p-websocket-star-rendezvous)
'/ip4/127.0.0.1/tcp/9090/ws/p2p-websocket-star'
]
}
},
}
};
export default ipfsOptions;

4
app/src/redux/sagas/orbitSaga.js

@ -8,8 +8,8 @@ function* getOrbitDBInfo() {
yield put({type: 'ORRBIT_GETTING_INFO', ...[]});
const account = yield call(getCurrentAccount);
if(account!==latestAccount) {
console.log("Deleting local storage..");
localStorage.clear();
//console.log("Deleting local storage..");
//localStorage.clear();
const txObj1 = yield call(contract.methods["hasUserSignedUp"], ...[account]);
try {
const callResult = yield call(txObj1.call, {address:account});

Loading…
Cancel
Save