Skip to content

Commit

Permalink
Yarn upgrade gdax (coinbase#219)
Browse files Browse the repository at this point in the history
* GDAXExchangeAPI: remove type unnecessary type assertion.

The type assertion is no longer necessary after [email protected] was
released which includes coinbase/coinbase-pro-node#269 .

* Run `yarn upgrade [email protected]`.
  • Loading branch information
blair authored and fb55 committed Apr 20, 2018
1 parent 437c5d2 commit db2f807
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"bintrees": "1.0.1",
"ccxt": "1.12.137",
"commander": "2.9.0",
"gdax": "0.6.0",
"gdax": "0.7.0",
"limiter": "1.1.2",
"node-bittrex-api": "0.7.7",
"pushbullet": "2.0.0",
Expand Down
3 changes: 1 addition & 2 deletions src/exchanges/gdax/GDAXExchangeAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ export class GDAXExchangeAPI implements PublicExchangeAPI, AuthenticatedExchange

return this.authClient.placeOrder(gdaxOrder).then((result: OrderResult) => {
// Check for error
// TODO: Remove the first type assertion when https://github.com/coinbase/gdax-node/issues/269 is fixed.
if ((result as any).status === 'rejected' || (result as any).message) {
if (result.status === 'rejected' || (result as any).message) {
return Promise.reject(new APIError(`Placing order on ${order.productId} failed`, undefined, result));
}
return Promise.resolve(GDAXOrderResultToOrder(result));
Expand Down
30 changes: 27 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
version "1.0.2"
resolved "https://registry.yarnpkg.com/@types/bintrees/-/bintrees-1.0.2.tgz#0dfdce4eeebdf90427bd35b0e79dc248b3d157a6"

"@types/caseless@*":
version "0.12.1"
resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.1.tgz#9794c69c8385d0192acc471a540d1f8e0d16218a"

"@types/[email protected]":
version "2.3.31"
resolved "https://registry.yarnpkg.com/@types/commander/-/commander-2.3.31.tgz#c60e5517091f9e2200a5e2063a830eddac4a7036"
Expand All @@ -16,6 +20,12 @@
version "3.1.32"
resolved "https://registry.yarnpkg.com/@types/crypto-js/-/crypto-js-3.1.32.tgz#e2f3003d19a1a500d1b7eba5d4ea0d1d77b9bbd5"

"@types/form-data@*":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e"
dependencies:
"@types/node" "*"

"@types/fs-extra@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-4.0.0.tgz#1dd742ad5c9bce308f7a52d02ebc01421bc9102f"
Expand Down Expand Up @@ -60,6 +70,15 @@
version "3.0.30"
resolved "https://registry.yarnpkg.com/@types/query-string/-/query-string-3.0.30.tgz#8b1a2b382ccf2e4793ec41a9a004cc5b2a43a072"

"@types/[email protected]":
version "2.47.0"
resolved "https://registry.yarnpkg.com/@types/request/-/request-2.47.0.tgz#76a666cee4cb85dcffea6cd4645227926d9e114e"
dependencies:
"@types/caseless" "*"
"@types/form-data" "*"
"@types/node" "*"
"@types/tough-cookie" "*"

"@types/shelljs@^0.7.0":
version "0.7.3"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.3.tgz#dcf22ae660405fd50437f09b5af7fd838493aec7"
Expand All @@ -76,6 +95,10 @@
dependencies:
"@types/node" "*"

"@types/tough-cookie@*":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.2.tgz#e0d481d8bb282ad8a8c9e100ceb72c995fb5e709"

"@types/[email protected]":
version "2.3.9"
resolved "https://registry.yarnpkg.com/@types/winston/-/winston-2.3.9.tgz#1ff9f1bb57952fe3d88c1b21c4899ede316a35bc"
Expand Down Expand Up @@ -977,10 +1000,11 @@ fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"

gdax@0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/gdax/-/gdax-0.6.0.tgz#185184852035f5b8607abbd9468e0678fcf0881f"
gdax@0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/gdax/-/gdax-0.7.0.tgz#b9f3395730fc0b33f4ddd99cdd659ae1cf4a12ac"
dependencies:
"@types/request" "2.47.0"
bignumber.js "^5.0.0"
bintrees "^1.0.1"
request "^2.81.0"
Expand Down

0 comments on commit db2f807

Please sign in to comment.