fix: examples

This commit is contained in:
Richard Ramos 2020-03-04 14:55:29 -04:00
parent 85c4d9300a
commit 728157bc37
4 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
const Subspace = require('@embarklabs/subspace');
const Subspace = require('@embarklabs/subspace').default;
const web3 = require('./web3');
const MyContract = require('./MyContract');
const { pluck } = require('rxjs/operators');
@ -7,7 +7,7 @@ const gql = require("graphql-tag");
const { graphql } = require("reactive-graphql");
const run = (async () => {
const subspace = new Subspace(web3.currentProvider);
const subspace = new Subspace(web3);
await subspace.init();
const MyContractInstance = await MyContract.getInstance();

View File

@ -39,7 +39,7 @@ const initSubspaceEpic = action$ =>
action$.pipe(
ofType(INIT_SUBSPACE),
mergeMap(() => {
subspace = new Subspace(web3.currentProvider);
subspace = new Subspace(web3);
return subspace.init();
}),
mapTo(subspaceReady())

View File

@ -1711,6 +1711,11 @@ readable-stream@^2.3.0, readable-stream@^2.3.5:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
redux-observable@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/redux-observable/-/redux-observable-1.2.0.tgz#ff51b6c6be2598e9b5e89fc36639186bb0e669c7"
integrity sha512-yeR90RP2WzZzCxxnQPlh2uFzyfFLsfXu8ROh53jGDPXVqj71uNDMmvi/YKQkd9ofiVoO4OYb1snbowO49tCEMg==
redux@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.4.tgz#4ee1aeb164b63d6a1bcc57ae4aa0b6e6fa7a3796"

View File

@ -13,7 +13,7 @@ store.subscribe(() => console.log("=====\n", store.getState()))
const run = async () => {
const MyContractInstance = await MyContract.getInstance(); //
const subspace = new Subspace(web3.currentProvider);
const subspace = new Subspace(web3);
await subspace.init();
subspace.trackEvent(MyContractInstance, "MyEvent", {filter: {}, fromBlock: 1 })