From c17036b02816e8a27b794812b50fe8dc7001da19 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 9 Jan 2019 16:04:23 +0100 Subject: [PATCH] Change checking for re-sububscriptions (#555) --- packages/rpc-provider/src/ws/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/rpc-provider/src/ws/index.ts b/packages/rpc-provider/src/ws/index.ts index 70a4cd8e20..21b982dda2 100644 --- a/packages/rpc-provider/src/ws/index.ts +++ b/packages/rpc-provider/src/ws/index.ts @@ -331,9 +331,10 @@ export default class WsProvider implements WSProviderInterface { Object.keys(subscriptions).forEach(async (id) => { const { callback, method, params, type } = subscriptions[id]; - // only re-create methods with '
_subscribe`, i.e. submissions such - // as 'author_submitAndWatchExtrinsic' are not included - if (method.indexOf('_subscribe') === -1) { + // only re-create subscriptions which are not in author (only area where + // transactions are created, i.e. submissions such as 'author_submitAndWatchExtrinsic' + // are not included (and will not be re-broadcast) + if (type.startsWith('author_')) { return; }