From a53e6db537289e088f107acfc5d7202892c92983 Mon Sep 17 00:00:00 2001 From: Olaf Tomalka Date: Mon, 15 Jan 2018 16:02:42 +0100 Subject: Fix web3 typing defaultAccount not allowing `undefined` The default value for the defaultAccount property is undefined, this happens in real-life scenarios, and so the type should explicitly warn users about it --- packages/web3-typescript-typings/CHANGELOG.md | 1 + packages/web3-typescript-typings/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/web3-typescript-typings/CHANGELOG.md b/packages/web3-typescript-typings/CHANGELOG.md index e77b6e113..5544c95c3 100644 --- a/packages/web3-typescript-typings/CHANGELOG.md +++ b/packages/web3-typescript-typings/CHANGELOG.md @@ -3,3 +3,4 @@ ## v0.9.3 - _January 11, 2018_ * Add type for getData on a contract +* Fixed the `defaultAccount` not allowing for `undefined` value diff --git a/packages/web3-typescript-typings/index.d.ts b/packages/web3-typescript-typings/index.d.ts index b4fc146b3..ff379cb3d 100644 --- a/packages/web3-typescript-typings/index.d.ts +++ b/packages/web3-typescript-typings/index.d.ts @@ -170,7 +170,7 @@ declare module 'web3' { gasPrice: BigNumber.BigNumber; accounts: string[]; blockNumber: number; - defaultAccount: string; + defaultAccount?: string; defaultBlock: Web3.BlockParam; syncing: Web3.SyncingResult; compile: { -- cgit v1.2.3 From 86668eb7b9bbeb5241aef32241cb2368efb999ae Mon Sep 17 00:00:00 2001 From: Olaf Tomalka Date: Tue, 16 Jan 2018 13:24:53 +0100 Subject: Added PR number to web3 typings changelog --- packages/web3-typescript-typings/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web3-typescript-typings/CHANGELOG.md b/packages/web3-typescript-typings/CHANGELOG.md index 5544c95c3..46f70d864 100644 --- a/packages/web3-typescript-typings/CHANGELOG.md +++ b/packages/web3-typescript-typings/CHANGELOG.md @@ -3,4 +3,4 @@ ## v0.9.3 - _January 11, 2018_ * Add type for getData on a contract -* Fixed the `defaultAccount` not allowing for `undefined` value +* Fixed the `defaultAccount` not allowing for `undefined` value (#320) -- cgit v1.2.3