diff --git a/examples/reactive-graphql/src/index.js b/examples/reactive-graphql/src/index.js index f4a4c72..0a2ab3b 100644 --- a/examples/reactive-graphql/src/index.js +++ b/examples/reactive-graphql/src/index.js @@ -30,9 +30,7 @@ const run = async () => { const resolvers = { Query: { - myEvents: () => { - return subspace.trackEvent(MyContractInstance, "MyEvent", {filter: {}, fromBlock: 1}); - } + myEvents: () => subspace.trackEvent(MyContractInstance, "MyEvent", {filter: {}, fromBlock: 1}) } }; diff --git a/examples/vue/src/App.vue b/examples/vue/src/App.vue index b9f519e..2b34699 100644 --- a/examples/vue/src/App.vue +++ b/examples/vue/src/App.vue @@ -22,7 +22,7 @@ export default { created: async function(){ this.MyContractInstance = await MyContract.getInstance(); - const subspace = new Subspace(web3.currentProvider); + const subspace = new Subspace(web3); await subspace.init(); this.myEventObservable$ = subspace.trackEvent(this.MyContractInstance, "MyEvent", {filter: {}, fromBlock: 1 });