fix: examples
This commit is contained in:
parent
85c4d9300a
commit
728157bc37
|
@ -1,4 +1,4 @@
|
||||||
const Subspace = require('@embarklabs/subspace');
|
const Subspace = require('@embarklabs/subspace').default;
|
||||||
const web3 = require('./web3');
|
const web3 = require('./web3');
|
||||||
const MyContract = require('./MyContract');
|
const MyContract = require('./MyContract');
|
||||||
const { pluck } = require('rxjs/operators');
|
const { pluck } = require('rxjs/operators');
|
||||||
|
@ -7,7 +7,7 @@ const gql = require("graphql-tag");
|
||||||
const { graphql } = require("reactive-graphql");
|
const { graphql } = require("reactive-graphql");
|
||||||
|
|
||||||
const run = (async () => {
|
const run = (async () => {
|
||||||
const subspace = new Subspace(web3.currentProvider);
|
const subspace = new Subspace(web3);
|
||||||
await subspace.init();
|
await subspace.init();
|
||||||
|
|
||||||
const MyContractInstance = await MyContract.getInstance();
|
const MyContractInstance = await MyContract.getInstance();
|
||||||
|
|
|
@ -39,7 +39,7 @@ const initSubspaceEpic = action$ =>
|
||||||
action$.pipe(
|
action$.pipe(
|
||||||
ofType(INIT_SUBSPACE),
|
ofType(INIT_SUBSPACE),
|
||||||
mergeMap(() => {
|
mergeMap(() => {
|
||||||
subspace = new Subspace(web3.currentProvider);
|
subspace = new Subspace(web3);
|
||||||
return subspace.init();
|
return subspace.init();
|
||||||
}),
|
}),
|
||||||
mapTo(subspaceReady())
|
mapTo(subspaceReady())
|
||||||
|
|
|
@ -1711,6 +1711,11 @@ readable-stream@^2.3.0, readable-stream@^2.3.5:
|
||||||
string_decoder "~1.1.1"
|
string_decoder "~1.1.1"
|
||||||
util-deprecate "~1.0.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:
|
redux@^4.0.4:
|
||||||
version "4.0.4"
|
version "4.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.4.tgz#4ee1aeb164b63d6a1bcc57ae4aa0b6e6fa7a3796"
|
resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.4.tgz#4ee1aeb164b63d6a1bcc57ae4aa0b6e6fa7a3796"
|
||||||
|
|
|
@ -13,7 +13,7 @@ store.subscribe(() => console.log("=====\n", store.getState()))
|
||||||
const run = async () => {
|
const run = async () => {
|
||||||
const MyContractInstance = await MyContract.getInstance(); //
|
const MyContractInstance = await MyContract.getInstance(); //
|
||||||
|
|
||||||
const subspace = new Subspace(web3.currentProvider);
|
const subspace = new Subspace(web3);
|
||||||
await subspace.init();
|
await subspace.init();
|
||||||
|
|
||||||
subspace.trackEvent(MyContractInstance, "MyEvent", {filter: {}, fromBlock: 1 })
|
subspace.trackEvent(MyContractInstance, "MyEvent", {filter: {}, fromBlock: 1 })
|
||||||
|
|
Loading…
Reference in New Issue