diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/0x.js/package.json | 8 | ||||
-rw-r--r-- | packages/abi-gen/package.json | 4 | ||||
-rw-r--r-- | packages/connect/CHANGELOG.md | 6 | ||||
-rw-r--r-- | packages/connect/package.json | 4 | ||||
-rw-r--r-- | packages/connect/src/http_client.ts | 13 | ||||
-rw-r--r-- | packages/connect/test/http_client_test.ts | 21 | ||||
-rw-r--r-- | packages/contracts/package.json | 8 | ||||
-rw-r--r-- | packages/kovan-faucets/package.json | 6 | ||||
-rw-r--r-- | packages/web3-typescript-typings/CHANGELOG.md | 5 | ||||
-rw-r--r-- | packages/web3-typescript-typings/index.d.ts | 1 | ||||
-rw-r--r-- | packages/web3-typescript-typings/package.json | 2 | ||||
-rw-r--r-- | packages/web3-wrapper/package.json | 4 | ||||
-rw-r--r-- | packages/website/CHANGELOG.md | 5 | ||||
-rw-r--r-- | packages/website/package.json | 6 | ||||
-rw-r--r-- | packages/website/public/images/team/jacob.jpg | bin | 0 -> 1177087 bytes | |||
-rw-r--r-- | packages/website/public/images/team/tom.jpg | bin | 0 -> 41810 bytes | |||
-rw-r--r-- | packages/website/ts/pages/about/about.tsx | 46 | ||||
-rw-r--r-- | packages/website/ts/pages/about/profile.tsx | 2 |
18 files changed, 92 insertions, 49 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index be2be28aa..1f11c43d6 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "0.29.1", + "version": "0.29.2", "description": "A javascript library for interacting with the 0x protocol", "keywords": ["0x.js", "0xproject", "ethereum", "tokens", "exchange"], "main": "lib/src/index.js", @@ -43,7 +43,7 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0xproject/abi-gen": "^0.1.0", + "@0xproject/abi-gen": "^0.1.1", "@0xproject/dev-utils": "^0.0.4", "@0xproject/tslint-config": "^0.4.1", "@0xproject/types": "^0.1.3", @@ -78,14 +78,14 @@ "typedoc": "~0.8.0", "typescript": "~2.6.1", "web3-provider-engine": "^13.0.1", - "web3-typescript-typings": "^0.9.1", + "web3-typescript-typings": "^0.9.3", "webpack": "^3.1.0" }, "dependencies": { "@0xproject/assert": "^0.0.10", "@0xproject/json-schemas": "^0.7.2", "@0xproject/utils": "^0.1.3", - "@0xproject/web3-wrapper": "^0.1.3", + "@0xproject/web3-wrapper": "^0.1.4", "bintrees": "^1.0.2", "bn.js": "^4.11.8", "compare-versions": "^3.0.1", diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index 8e640309d..05f7a8778 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/abi-gen", - "version": "0.1.0", + "version": "0.1.1", "description": "Generate contract wrappers from ABI and handlebars templates", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -43,6 +43,6 @@ "shx": "^0.2.2", "tslint": "5.8.0", "typescript": "~2.6.1", - "web3-typescript-typings": "^0.9.1" + "web3-typescript-typings": "^0.9.3" } } diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index 2d9e2d89f..d8e99b5d3 100644 --- a/packages/connect/CHANGELOG.md +++ b/packages/connect/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## v0.x.x - _TBD, 2017_ + + * Sanitize api endpoint url and remove trailing slashes (#318) + * Improve error message text in HttpClient (#318) + * Stop appending '/v0' to api endpoint url in HttpClient (#318) + ## v0.4.0 - _January 11, 2017_ * Prevent getFeesAsync method on HttpClient from mutating input (#296) diff --git a/packages/connect/package.json b/packages/connect/package.json index 8be599e55..4ca9e65a2 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/connect", - "version": "0.4.0", + "version": "0.4.1", "description": "A javascript library for interacting with the standard relayer api", "keywords": ["connect", "0xproject", "ethereum", "tokens", "exchange"], "main": "lib/src/index.js", @@ -59,6 +59,6 @@ "tslint": "5.8.0", "typedoc": "~0.8.0", "typescript": "~2.6.1", - "web3-typescript-typings": "^0.9.1" + "web3-typescript-typings": "^0.9.3" } } diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts index 5604a9607..3df77b0f0 100644 --- a/packages/connect/src/http_client.ts +++ b/packages/connect/src/http_client.ts @@ -20,6 +20,7 @@ import { } from './types'; import { relayerResponseJsonParsers } from './utils/relayer_response_json_parsers'; +const TRAILING_SLASHES_REGEX = /\/+$/; /** * This class includes all the functionality related to interacting with a set of HTTP endpoints * that implement the standard relayer API v0 @@ -33,7 +34,7 @@ export class HttpClient implements Client { */ constructor(url: string) { assert.isHttpUrl('url', url); - this._apiEndpointUrl = url; + this._apiEndpointUrl = url.replace(TRAILING_SLASHES_REGEX, ''); // remove trailing slashes } /** * Retrieve token pair info from the API @@ -130,20 +131,22 @@ export class HttpClient implements Client { const stringifiedParams = queryString.stringify(params); query = `?${stringifiedParams}`; } - const url = `${this._apiEndpointUrl}/v0${path}${query}`; + const url = `${this._apiEndpointUrl}${path}${query}`; const headers = new Headers({ 'content-type': 'application/json', }); - const response = await fetch(url, { method: requestType, body: JSON.stringify(payload), headers, }); + const json = await response.json(); if (!response.ok) { - throw Error(response.statusText); + const errorString = `${response.status} - ${response.statusText}\n${requestType} ${url}\n${JSON.stringify( + json, + )}`; + throw Error(errorString); } - const json = await response.json(); return json; } } diff --git a/packages/connect/test/http_client_test.ts b/packages/connect/test/http_client_test.ts index e7096edad..15759d911 100644 --- a/packages/connect/test/http_client_test.ts +++ b/packages/connect/test/http_client_test.ts @@ -29,14 +29,23 @@ describe('HttpClient', () => { afterEach(() => { fetchMock.restore(); }); + describe('#constructor', () => { + it('should remove trailing slashes from api url', async () => { + const urlWithTrailingSlash = 'https://slash.com/'; + const urlWithoutTrailingSlash = 'https://slash.com'; + const client = new HttpClient(urlWithTrailingSlash); + const sanitizedUrl = (client as any)._apiEndpointUrl; + expect(sanitizedUrl).to.be.deep.equal(urlWithoutTrailingSlash); + }); + }); describe('#getTokenPairsAsync', () => { - const url = `${relayUrl}/v0/token_pairs`; + const url = `${relayUrl}/token_pairs`; it('gets token pairs', async () => { fetchMock.get(url, tokenPairsResponseJSON); const tokenPairs = await relayerClient.getTokenPairsAsync(); expect(tokenPairs).to.be.deep.equal(tokenPairsResponse); }); - it('gets specfic token pairs for request', async () => { + it('gets specific token pairs for request', async () => { const tokenAddress = '0x323b5d4c32345ced77393b3530b1eed0f346429d'; const tokenPairsRequest = { tokenA: tokenAddress, @@ -52,7 +61,7 @@ describe('HttpClient', () => { }); }); describe('#getOrdersAsync', () => { - const url = `${relayUrl}/v0/orders`; + const url = `${relayUrl}/orders`; it('gets orders', async () => { fetchMock.get(url, ordersResponseJSON); const orders = await relayerClient.getOrdersAsync(); @@ -75,7 +84,7 @@ describe('HttpClient', () => { }); describe('#getOrderAsync', () => { const orderHash = '0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f'; - const url = `${relayUrl}/v0/order/${orderHash}`; + const url = `${relayUrl}/order/${orderHash}`; it('gets order', async () => { fetchMock.get(url, orderResponseJSON); const order = await relayerClient.getOrderAsync(orderHash); @@ -91,7 +100,7 @@ describe('HttpClient', () => { baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d', quoteTokenAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', }; - const url = `${relayUrl}/v0/orderbook?baseTokenAddress=${request.baseTokenAddress}"eTokenAddress=${ + const url = `${relayUrl}/orderbook?baseTokenAddress=${request.baseTokenAddress}"eTokenAddress=${ request.quoteTokenAddress }`; it('gets order book', async () => { @@ -116,7 +125,7 @@ describe('HttpClient', () => { salt: new BigNumber('256'), expirationUnixTimestampSec: new BigNumber('42'), }; - const url = `${relayUrl}/v0/fees`; + const url = `${relayUrl}/fees`; it('gets fees', async () => { fetchMock.post(url, feesResponseJSON); const fees = await relayerClient.getFeesAsync(request); diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 1bacda811..a3abac517 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "contracts", - "version": "2.1.2", + "version": "2.1.3", "description": "Smart contract components of 0x protocol", "main": "index.js", "directories": { @@ -52,14 +52,14 @@ "types-bn": "^0.0.1", "types-ethereumjs-util": "0xProject/types-ethereumjs-util", "typescript": "~2.6.1", - "web3-typescript-typings": "^0.9.1", + "web3-typescript-typings": "^0.9.3", "yargs": "^10.0.3" }, "dependencies": { - "0x.js": "^0.29.1", + "0x.js": "^0.29.2", "@0xproject/json-schemas": "^0.7.2", "@0xproject/utils": "^0.1.3", - "@0xproject/web3-wrapper": "^0.1.3", + "@0xproject/web3-wrapper": "^0.1.4", "bluebird": "^3.5.0", "bn.js": "^4.11.8", "ethereumjs-abi": "^0.6.4", diff --git a/packages/kovan-faucets/package.json b/packages/kovan-faucets/package.json index e209dde82..bb5106496 100644 --- a/packages/kovan-faucets/package.json +++ b/packages/kovan-faucets/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@0xproject/kovan_faucets", - "version": "1.0.3", + "version": "1.0.4", "description": "A faucet micro-service that dispenses test ERC20 tokens or Ether", "main": "server.js", "scripts": { @@ -14,7 +14,7 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^0.29.1", + "0x.js": "^0.29.2", "@0xproject/utils": "^0.1.3", "body-parser": "^1.17.1", "ethereumjs-tx": "^1.3.3", @@ -36,7 +36,7 @@ "source-map-loader": "^0.1.6", "tslint": "5.8.0", "typescript": "~2.6.1", - "web3-typescript-typings": "^0.9.1", + "web3-typescript-typings": "^0.9.3", "webpack": "^3.1.0", "webpack-node-externals": "^1.6.0" } diff --git a/packages/web3-typescript-typings/CHANGELOG.md b/packages/web3-typescript-typings/CHANGELOG.md new file mode 100644 index 000000000..e77b6e113 --- /dev/null +++ b/packages/web3-typescript-typings/CHANGELOG.md @@ -0,0 +1,5 @@ +# CHANGELOG + +## v0.9.3 - _January 11, 2018_ + +* Add type for getData on a contract diff --git a/packages/web3-typescript-typings/index.d.ts b/packages/web3-typescript-typings/index.d.ts index 6fd126d2a..b4fc146b3 100644 --- a/packages/web3-typescript-typings/index.d.ts +++ b/packages/web3-typescript-typings/index.d.ts @@ -107,6 +107,7 @@ declare module 'web3' { interface Contract<A extends ContractInstance> { at(address: string): A; + getData(...args: any[]): string; 'new'(...args: any[]): A; } diff --git a/packages/web3-typescript-typings/package.json b/packages/web3-typescript-typings/package.json index 2db6937d0..8b3d716a3 100644 --- a/packages/web3-typescript-typings/package.json +++ b/packages/web3-typescript-typings/package.json @@ -1,6 +1,6 @@ { "name": "web3-typescript-typings", - "version": "0.9.1", + "version": "0.9.3", "description": "Typescript type definitions for web3", "main": "index.d.ts", "types": "index.d.ts", diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 0b780aea0..8c20f3f2e 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/web3-wrapper", - "version": "0.1.3", + "version": "0.1.4", "description": "Wraps around web3 and gives a nicer interface", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -26,7 +26,7 @@ "shx": "^0.2.2", "tslint": "5.8.0", "typescript": "~2.6.1", - "web3-typescript-typings": "^0.9.1" + "web3-typescript-typings": "^0.9.3" }, "dependencies": { "@0xproject/utils": "^0.1.3", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md new file mode 100644 index 000000000..6cb8cd0b0 --- /dev/null +++ b/packages/website/CHANGELOG.md @@ -0,0 +1,5 @@ +# CHANGELOG + +## v0.x.x - _TBD_ + + * Added new team members to the about page (#317) diff --git a/packages/website/package.json b/packages/website/package.json index dea0b9c83..83733f060 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/website", - "version": "0.0.5", + "version": "0.0.6", "private": true, "description": "Website and 0x portal dapp", "scripts": { @@ -21,7 +21,7 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^0.29.1", + "0x.js": "^0.29.2", "@0xproject/subproviders": "^0.3.0", "@0xproject/utils": "^0.1.3", "accounting": "^0.4.1", @@ -101,7 +101,7 @@ "style-loader": "0.13.x", "tslint": "5.8.0", "typescript": "~2.6.1", - "web3-typescript-typings": "^0.9.1", + "web3-typescript-typings": "^0.9.3", "webpack": "^3.1.0", "webpack-dev-middleware": "^1.10.0", "webpack-dev-server": "^2.5.0" diff --git a/packages/website/public/images/team/jacob.jpg b/packages/website/public/images/team/jacob.jpg Binary files differnew file mode 100644 index 000000000..62ff412d2 --- /dev/null +++ b/packages/website/public/images/team/jacob.jpg diff --git a/packages/website/public/images/team/tom.jpg b/packages/website/public/images/team/tom.jpg Binary files differnew file mode 100644 index 000000000..a6b763816 --- /dev/null +++ b/packages/website/public/images/team/tom.jpg diff --git a/packages/website/ts/pages/about/about.tsx b/packages/website/ts/pages/about/about.tsx index 3ff16f9fe..c929673f5 100644 --- a/packages/website/ts/pages/about/about.tsx +++ b/packages/website/ts/pages/about/about.tsx @@ -40,6 +40,9 @@ const teamRow1: ProfileInfo[] = [ github: 'https://github.com/fabioberger', medium: 'https://medium.com/@fabioberger', }, +]; + +const teamRow2: ProfileInfo[] = [ { name: 'Alex Xu', title: 'Director of Operations', @@ -48,11 +51,8 @@ const teamRow1: ProfileInfo[] = [ image: '/images/team/alex.jpg', linkedIn: 'https://www.linkedin.com/in/alex-xu/', github: '', - medium: '', + medium: 'https://medium.com/@aqxu', }, -]; - -const teamRow2: ProfileInfo[] = [ { name: 'Leonid Logvinov', title: 'Engineer', @@ -61,7 +61,7 @@ const teamRow2: ProfileInfo[] = [ image: '/images/team/leonid.png', linkedIn: 'https://www.linkedin.com/in/leonidlogvinov/', github: 'https://github.com/LogvinovLeon', - medium: '', + medium: 'https://medium.com/@Logvinov', }, { name: 'Ben Burns', @@ -73,23 +73,36 @@ const teamRow2: ProfileInfo[] = [ github: '', medium: '', }, - { - name: 'Philippe Castonguay', - title: 'Dev Relations Manager', - description: `Developer relations. Previously computational neuroscience \ - research at Janelia. Statistics at Western University. MA Dropout.`, - image: '/images/team/philippe.png', - linkedIn: '', - github: 'https://github.com/PhABC', - medium: '', - }, +]; + +const teamRow3: ProfileInfo[] = [ { name: 'Brandon Millman', title: 'Senior Engineer', description: `Full-stack engineer. Previously senior software engineer at \ Twitter. Electrical and Computer Engineering at Duke.`, image: '/images/team/brandon.png', - linkedIn: 'https://www.linkedin.com/company-beta/17942619/', + linkedIn: 'https://www.linkedin.com/in/brandon-millman-b093a022/', + github: 'https://github.com/BMillman19', + medium: 'https://medium.com/@bchillman', + }, + { + name: 'Tom Schmidt', + title: 'Product Manager', + description: `Previously engineering at Apple, product management at Facebook and Instagram. Computer Science at Stanford.`, + image: '/images/team/tom.jpg', + linkedIn: 'https://www.linkedin.com/in/tomhschmidt/', + github: 'https://github.com/tomhschmidt', + medium: '', + }, + { + name: 'Jacob Evans', + title: 'Blockchain Engineer', + description: `Previously software engineer at Qantas and RSA Security.`, + image: '/images/team/jacob.jpg', + linkedIn: 'https://www.linkedin.com/in/dekzter/', + github: 'https://github.com/dekz', + medium: '', }, ]; @@ -181,6 +194,7 @@ export class About extends React.Component<AboutProps, AboutState> { <div className="pt3 md-px4 lg-px0"> <div className="clearfix pb3">{this._renderProfiles(teamRow1)}</div> <div className="clearfix">{this._renderProfiles(teamRow2)}</div> + <div className="clearfix">{this._renderProfiles(teamRow3)}</div> </div> <div className="pt3 pb2"> <div diff --git a/packages/website/ts/pages/about/profile.tsx b/packages/website/ts/pages/about/profile.tsx index bd2316f31..18b4e0d5a 100644 --- a/packages/website/ts/pages/about/profile.tsx +++ b/packages/website/ts/pages/about/profile.tsx @@ -47,7 +47,7 @@ export function Profile(props: ProfileProps) { <div style={{ minHeight: 60, lineHeight: 1.4 }} className="pt1 pb2 mx-auto lg-h6 md-h6 sm-h5 sm-center"> {props.profileInfo.description} </div> - <div className="flex pb3 mx-auto sm-hide xs-hide" style={{ width: 180, opacity: 0.5 }}> + <div className="flex pb3 mx-auto sm-hide xs-hide" style={{ width: 280, opacity: 0.5 }}> {renderSocialMediaIcons(props.profileInfo)} </div> </div> |