From 825402b0f91ce266b310aed78e4fa73ae1359d36 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 7 Dec 2017 01:15:15 +0300 Subject: Address feedback --- packages/contracts/deploy/cli.ts | 1 - packages/contracts/deploy/src/utils/network.ts | 1 - packages/types/README.md | 6 +++--- packages/web3-wrapper/package.json | 2 +- packages/web3-wrapper/src/index.ts | 6 ------ 5 files changed, 4 insertions(+), 12 deletions(-) (limited to 'packages') diff --git a/packages/contracts/deploy/cli.ts b/packages/contracts/deploy/cli.ts index df3ae33b4..0fdf85a9f 100644 --- a/packages/contracts/deploy/cli.ts +++ b/packages/contracts/deploy/cli.ts @@ -1,4 +1,3 @@ -import {TxData} from '@0xproject/types'; import {BigNumber} from 'bignumber.js'; import * as _ from 'lodash'; import * as path from 'path'; diff --git a/packages/contracts/deploy/src/utils/network.ts b/packages/contracts/deploy/src/utils/network.ts index fcb78287c..fc8709e0f 100644 --- a/packages/contracts/deploy/src/utils/network.ts +++ b/packages/contracts/deploy/src/utils/network.ts @@ -1,5 +1,4 @@ import {promisify} from '@0xproject/utils'; -import {Web3Wrapper} from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; import * as Web3 from 'web3'; diff --git a/packages/types/README.md b/packages/types/README.md index 0df8c6333..d4d48b1fe 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -1,10 +1,10 @@ -Web3 wrapper +0x types ------ -Wrapped version of web3 with nicer interface to be used across 0x projects and packages +TS types shared across 0x projects and packages ## Install ```bash -yarn add @0xproject/web3-wrapper +yarn add -D @0xproject/types ``` diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index dd1cd54fb..4eea7ed31 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -20,6 +20,7 @@ "homepage": "https://github.com/0xProject/0x.js/packages/web3-wrapper/README.md", "devDependencies": { "@0xproject/tslint-config": "^0.2.0", + "@0xproject/types": "^0.0.1", "@types/lodash": "^4.14.86", "npm-run-all": "^4.1.2", "shx": "^0.2.2", @@ -29,7 +30,6 @@ }, "dependencies": { "@0xproject/utils": "^0.0.1", - "@0xproject/types": "^0.0.1", "bignumber.js": "~4.1.0", "lodash": "^4.17.4", "web3": "^0.20.0" diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts index 9b37e5a0d..b823c5c15 100644 --- a/packages/web3-wrapper/src/index.ts +++ b/packages/web3-wrapper/src/index.ts @@ -74,12 +74,6 @@ export class Web3Wrapper { balanceInWei = new BigNumber(balanceInWei); return balanceInWei; } - public async getBalanceInEthAsync(owner: string): Promise { - const balanceInWei = await this.getBalanceInWeiAsync(owner); - const balanceEthOldBigNumber = this.web3.fromWei(balanceInWei, 'ether'); - const balanceEth = new BigNumber(balanceEthOldBigNumber); - return balanceEth; - } public async doesContractExistAtAddressAsync(address: string): Promise { const code = await promisify(this.web3.eth.getCode)(address); // Regex matches 0x0, 0x00, 0x in order to accommodate poorly implemented clients -- cgit