Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

Commit

Permalink
Upgrade bignumber.js to latest version. (#309)
Browse files Browse the repository at this point in the history
* Prepare for bignumber.js 6.0.0: cmp() alias was removed.

* Prepare for bignumber.js 6.0.0: sub() alias was removed.

* Upgrade bignumber.js to latest version.
  • Loading branch information
blair authored and fb55 committed Apr 18, 2018
1 parent 5f2a11f commit f89bbf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/orderbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const assert = require('assert');
class Orderbook {
constructor() {
this._ordersByID = {};
this._bids = new RBTree((a, b) => a.price.cmp(b.price));
this._asks = new RBTree((a, b) => a.price.cmp(b.price));
this._bids = new RBTree((a, b) => a.price.comparedTo(b.price));
this._asks = new RBTree((a, b) => a.price.comparedTo(b.price));
}

_getTree(side) {
Expand Down Expand Up @@ -99,7 +99,7 @@ class Orderbook {

assert(order);

order.size = order.size.sub(size);
order.size = order.size.minus(size);
this._ordersByID[order.id] = order;

assert(order.size >= 0);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"dependencies": {
"@types/request": "2.47.0",
"bignumber.js": "^5.0.0",
"bignumber.js": "^6.0.0",
"bintrees": "^1.0.1",
"request": "^2.81.0",
"ws": "^4.0.0"
Expand Down

0 comments on commit f89bbf9

Please sign in to comment.