From f9b3d1ef13de76476863f9d91111b887c0045ace Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 21 Jan 2020 11:58:34 -0800 Subject: [PATCH 1/3] Add types for subscription.on(connected) --- packages/web3-core-subscriptions/types/index.d.ts | 2 ++ .../web3-core-subscriptions/types/tests/subscriptions.tests.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/packages/web3-core-subscriptions/types/index.d.ts b/packages/web3-core-subscriptions/types/index.d.ts index 39d8135157c..a49de3c91a3 100644 --- a/packages/web3-core-subscriptions/types/index.d.ts +++ b/packages/web3-core-subscriptions/types/index.d.ts @@ -35,6 +35,8 @@ export class Subscription { on(type: 'changed', handler: (data: T) => void): Subscription; + on(type: 'connected', handler: (subscriptionId: string) => void): Subscription; + on(type: 'error', handler: (data: Error) => void): Subscription; } diff --git a/packages/web3-core-subscriptions/types/tests/subscriptions.tests.ts b/packages/web3-core-subscriptions/types/tests/subscriptions.tests.ts index 467ac5f7808..2e48923e27d 100644 --- a/packages/web3-core-subscriptions/types/tests/subscriptions.tests.ts +++ b/packages/web3-core-subscriptions/types/tests/subscriptions.tests.ts @@ -83,3 +83,6 @@ subscription.on('changed', () => {}); // $ExpectType Subscription subscription.on('error', () => {}); + +// $ExpectType Subscription +subscription.on('connected', () => {}); From fef8e31f8cb69e21fb10d1c178d3fc72ef52a48f Mon Sep 17 00:00:00 2001 From: cgewecke Date: Tue, 21 Jan 2020 12:05:13 -0800 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 239cf0a4bfc..38cd364ec30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -137,3 +137,7 @@ Released with 1.0.0-beta.37 code base. ### Changed - Ensure '0x' prefix is existing for Accounts.sign and Accounts.privateKeyToAccount (#3041) + +### Fixed + +- Add missing subscription.on('connected') TS type definition (#3319) From d9ac8c131c1adc4ba96df200eb50bcca7d9fdd64 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Tue, 21 Jan 2020 12:24:35 -0800 Subject: [PATCH 3/3] Add another network-timeout for mosaic E2E --- scripts/e2e.mosaic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/e2e.mosaic.sh b/scripts/e2e.mosaic.sh index 4149fa9e30f..d66f0c71bfc 100755 --- a/scripts/e2e.mosaic.sh +++ b/scripts/e2e.mosaic.sh @@ -31,7 +31,7 @@ echo "Installing updated web3 via virtual registry " echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" git submodule update --init --recursive -yarn --registry http://localhost:4873 +yarn --registry http://localhost:4873 --network-timeout 100000 yarn add web3@e2e --registry http://localhost:4873 --network-timeout 100000