Store subscriptionId, use it to send changes
This commit is contained in:
parent
2be5247567
commit
1f1dc8b89d
@ -342,7 +342,8 @@ export default class Contract {
|
||||
options: _options,
|
||||
autoRemove,
|
||||
callback,
|
||||
filterId
|
||||
filterId,
|
||||
id: subscriptionId
|
||||
};
|
||||
|
||||
if (skipInitFetch) {
|
||||
@ -452,13 +453,13 @@ export default class Contract {
|
||||
})
|
||||
)
|
||||
.then((logsArray) => {
|
||||
logsArray.forEach((logs, subscriptionId) => {
|
||||
logsArray.forEach((logs, index) => {
|
||||
if (!logs || !logs.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this._sendData(subscriptionId, null, this.parseEventLogs(logs));
|
||||
this._sendData(subscriptions[index].id, null, this.parseEventLogs(logs));
|
||||
} catch (error) {
|
||||
console.error('_sendSubscriptionChanges', error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user