From cfd9130e544812e61b10cf1007a9cd1f0d9ec9ad Mon Sep 17 00:00:00 2001 From: Samuel Furter Date: Tue, 15 Jan 2019 20:22:11 +0100 Subject: [PATCH] Web3 static utils and version method removed otherwise the utils and version property does not exists on the inititated web3 object --- packages/web3/src/Web3.js | 20 ++------------------ packages/web3/tests/src/Web3Test.js | 4 ---- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/packages/web3/src/Web3.js b/packages/web3/src/Web3.js index ee81bf1f1ab..679d4db0a63 100644 --- a/packages/web3/src/Web3.js +++ b/packages/web3/src/Web3.js @@ -46,6 +46,8 @@ export default class Web3 extends AbstractWeb3Module { this.eth = new Eth(provider, options); this.shh = new Shh(provider, options); this.bzz = new Bzz(provider); + this.utils = Utils; + this.version = version; } /** @@ -244,24 +246,6 @@ export default class Web3 extends AbstractWeb3Module { return new ProvidersModuleFactory().createProviderDetector().detect(); } - /** - * Returns the web3 version - * - * @returns {String} - */ - static get version() { - return version; - } - - /** - * Returns the utils - * - * @returns {Utils} - */ - static get utils() { - return Utils; - } - /** * Returns an object with all public web3 modules * diff --git a/packages/web3/tests/src/Web3Test.js b/packages/web3/tests/src/Web3Test.js index 1769ab53fa5..e748b0ae92b 100644 --- a/packages/web3/tests/src/Web3Test.js +++ b/packages/web3/tests/src/Web3Test.js @@ -131,10 +131,6 @@ describe('Web3Test', () => { expect(bzzMock.setProvider).toHaveBeenCalledWith('http://localhost'); }); - it('calls the static utils property and gets the expected object', () => { - expect(Web3.utils).toEqual(Utils); - }); - it('calls the static modules property and gets the expected object', () => { const modules = Web3.modules;