diff options
-rw-r--r-- | packages/connect/src/http_client.ts | 8 | ||||
-rw-r--r-- | packages/connect/test/http_client_test.ts | 6 | ||||
-rw-r--r-- | packages/contracts/package.json | 3 | ||||
-rw-r--r-- | packages/deployer/package.json | 3 | ||||
-rw-r--r-- | packages/web3-typescript-typings/CHANGELOG.md | 4 | ||||
-rw-r--r-- | packages/web3-typescript-typings/index.d.ts | 2 |
6 files changed, 16 insertions, 10 deletions
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts index 815d42e67..9e5f0f448 100644 --- a/packages/connect/src/http_client.ts +++ b/packages/connect/src/http_client.ts @@ -23,7 +23,7 @@ import { relayerResponseJsonParsers } from './utils/relayer_response_json_parser const TRAILING_SLASHES_REGEX = /\/+$/; const DEFAULT_PAGED_REQUEST_OPTS: PagedRequestOpts = { - page: 0, + page: 1, perPage: 100, }; /** @@ -66,7 +66,7 @@ export class HttpClient implements Client { } /** * Retrieve token pair info from the API - * @param requestOpts Options specifying token information to retrieve and page information, defaults to { page: 0, perPage: 100 } + * @param requestOpts Options specifying token information to retrieve and page information, defaults to { page: 1, perPage: 100 } * @return The resulting TokenPairsItems that match the request */ public async getTokenPairsAsync(requestOpts?: TokenPairsRequestOpts & PagedRequestOpts): Promise<TokenPairsItem[]> { @@ -83,7 +83,7 @@ export class HttpClient implements Client { } /** * Retrieve orders from the API - * @param requestOpts Options specifying orders to retrieve and page information, defaults to { page: 0, perPage: 100 } + * @param requestOpts Options specifying orders to retrieve and page information, defaults to { page: 1, perPage: 100 } * @return The resulting SignedOrders that match the request */ public async getOrdersAsync(requestOpts?: OrdersRequestOpts & PagedRequestOpts): Promise<SignedOrder[]> { @@ -112,7 +112,7 @@ export class HttpClient implements Client { /** * Retrieve an orderbook from the API * @param request An OrderbookRequest instance describing the specific orderbook to retrieve - * @param requestOpts Options specifying page information, defaults to { page: 0, perPage: 100 } + * @param requestOpts Options specifying page information, defaults to { page: 1, perPage: 100 } * @return The resulting OrderbookResponse that matches the request */ public async getOrderbookAsync( diff --git a/packages/connect/test/http_client_test.ts b/packages/connect/test/http_client_test.ts index 93b252ace..311dc96e6 100644 --- a/packages/connect/test/http_client_test.ts +++ b/packages/connect/test/http_client_test.ts @@ -41,7 +41,7 @@ describe('HttpClient', () => { describe('#getTokenPairsAsync', () => { const url = `${relayUrl}/token_pairs`; it('gets token pairs with default options when none are provided', async () => { - const urlWithQuery = `${url}?page=0&per_page=100`; + const urlWithQuery = `${url}?page=1&per_page=100`; fetchMock.get(urlWithQuery, tokenPairsResponseJSON); const tokenPairs = await relayerClient.getTokenPairsAsync(); expect(tokenPairs).to.be.deep.equal(tokenPairsResponse); @@ -66,7 +66,7 @@ describe('HttpClient', () => { describe('#getOrdersAsync', () => { const url = `${relayUrl}/orders`; it('gets orders with default options when none are provided', async () => { - const urlWithQuery = `${url}?page=0&per_page=100`; + const urlWithQuery = `${url}?page=1&per_page=100`; fetchMock.get(urlWithQuery, ordersResponseJSON); const orders = await relayerClient.getOrdersAsync(); expect(orders).to.be.deep.equal(ordersResponse); @@ -110,7 +110,7 @@ describe('HttpClient', () => { it('gets orderbook with default page options when none are provided', async () => { const urlWithQuery = `${url}?baseTokenAddress=${ request.baseTokenAddress - }&page=0&per_page=100"eTokenAddress=${request.quoteTokenAddress}`; + }&page=1&per_page=100"eTokenAddress=${request.quoteTokenAddress}`; fetchMock.get(urlWithQuery, orderbookJSON); const orderbook = await relayerClient.getOrderbookAsync(request); expect(orderbook).to.be.deep.equal(orderbookResponse); diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 7e7caa002..fd411f820 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -16,7 +16,7 @@ "run_mocha": "mocha 'lib/test/**/*.js' --timeout 10000 --bail --exit", "compile:comment": "Yarn workspaces do not link binaries correctly so we need to reference them directly https://github.com/yarnpkg/yarn/issues/3846", "compile": "node ../deployer/lib/src/cli.js compile --contracts-dir src/contracts --artifacts-dir src/artifacts", - "clean": "rm -rf ./lib", + "clean": "shx rm -rf ./lib", "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/artifacts/@(DummyToken|TokenTransferProxy|Exchange|TokenRegistry|MultiSigWallet|MultiSigWalletWithTimeLock|MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress|TokenRegistry|ZRXToken).json' --template contract_templates/contract.handlebars --partials 'contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated", "migrate": "node ../deployer/lib/src/cli.js migrate", "lint": "tslint --project . 'migrations/**/*.ts' 'test/**/*.ts' 'util/**/*.ts' 'deploy/**/*.ts'", @@ -51,6 +51,7 @@ "mocha": "^4.0.1", "npm-run-all": "^4.1.2", "solc": "^0.4.18", + "shx": "^0.2.2", "tslint": "5.8.0", "types-bn": "^0.0.1", "types-ethereumjs-util": "0xProject/types-ethereumjs-util", diff --git a/packages/deployer/package.json b/packages/deployer/package.json index af5c33354..89dfd3ef1 100644 --- a/packages/deployer/package.json +++ b/packages/deployer/package.json @@ -9,7 +9,7 @@ "build": "yarn clean && copyfiles 'test/fixtures/contracts/**/*' src/solc/solc_bin/* ./lib && tsc", "test": "npm run build; mocha lib/test/*_test.js", "compile": "npm run build; node lib/src/cli.js compile", - "clean": "rm -rf ./lib", + "clean": "shx rm -rf ./lib", "migrate": "npm run build; node lib/src/cli.js migrate", "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", "test:circleci": "yarn test" @@ -31,6 +31,7 @@ "@0xproject/tslint-config": "^0.4.9", "chai": "^4.0.1", "copyfiles": "^1.2.0", + "shx": "^0.2.2", "mocha": "^4.0.1", "tslint": "5.8.0", "types-bn": "^0.0.1", diff --git a/packages/web3-typescript-typings/CHANGELOG.md b/packages/web3-typescript-typings/CHANGELOG.md index 56bb4ed48..88dac67f6 100644 --- a/packages/web3-typescript-typings/CHANGELOG.md +++ b/packages/web3-typescript-typings/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## v0.9.11 - _TBD, 2018_ + +* Fix `web3.net.peerCount` to be of type number instead of boolean (#397) + ## v0.9.3 - _January 11, 2018_ * Fix `getTransactionReceipt` not returning null (#338) diff --git a/packages/web3-typescript-typings/index.d.ts b/packages/web3-typescript-typings/index.d.ts index cd34759ed..915c73b90 100644 --- a/packages/web3-typescript-typings/index.d.ts +++ b/packages/web3-typescript-typings/index.d.ts @@ -298,7 +298,7 @@ declare module 'web3' { interface NetApi { listening: boolean; - peerCount: boolean; + peerCount: number; getListening(cd: (err: Error, listening: boolean) => void): void; getPeerCount(cd: (err: Error, peerCount: number) => void): void; } |