fix: subscription error on call
This commit is contained in:
parent
011637f3cb
commit
c9db388565
|
@ -85,12 +85,11 @@ class EventSyncer {
|
||||||
|
|
||||||
// TODO: use call args from user
|
// TODO: use call args from user
|
||||||
let method = contractInstance.methods[propName].apply(contractInstance.methods[propName], [])
|
let method = contractInstance.methods[propName].apply(contractInstance.methods[propName], [])
|
||||||
|
|
||||||
method.call.apply(method.call, [{}, (err, result) => {
|
method.call.apply(method.call, [{}, (err, result) => {
|
||||||
sub.next(result)
|
sub.next(result)
|
||||||
}])
|
}])
|
||||||
|
|
||||||
this.web3.eth.subscribe('newBlockHeaders', (error, result) => {
|
this.web3.subscribe('newBlockHeaders', (error, result) => {
|
||||||
method.call.apply(method.call, [({}), (err, result) => {
|
method.call.apply(method.call, [({}), (err, result) => {
|
||||||
sub.next(result)
|
sub.next(result)
|
||||||
}])
|
}])
|
||||||
|
|
|
@ -128,7 +128,6 @@ async function deployContract() {
|
||||||
async function run() {
|
async function run() {
|
||||||
let accounts = await eth.getAccounts();
|
let accounts = await eth.getAccounts();
|
||||||
var SimpleStorageContract = await deployContract()
|
var SimpleStorageContract = await deployContract()
|
||||||
console.dir(SimpleStorageContract)
|
|
||||||
console.dir(SimpleStorageContract.options.address)
|
console.dir(SimpleStorageContract.options.address)
|
||||||
|
|
||||||
// var subscription = web3.eth.subscribe('logs', {
|
// var subscription = web3.eth.subscribe('logs', {
|
||||||
|
|
Loading…
Reference in New Issue