@bulletxyz/bullet-sdk 0.23.1-rc.4 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7058,13 +7058,13 @@ var Orderbook = class _Orderbook {
7058
7058
  }
7059
7059
  // TODO: eventually ideal to move to data structure like btree map (https://www.npmjs.com/package/sorted-btree)
7060
7060
  // Get bids sorted by price descending
7061
- getSortedBids(levels = Infinity) {
7061
+ getSortedBids(levels = Number.POSITIVE_INFINITY) {
7062
7062
  return Array.from(this.bids.entries()).map(([price, size]) => [new decimal_default(price), size]).sort(
7063
7063
  (priceLevel1, priceLevel2) => priceLevel2[0].minus(priceLevel1[0]).toNumber()
7064
7064
  ).slice(0, levels);
7065
7065
  }
7066
7066
  // Get asks sorted by price ascending
7067
- getSortedAsks(levels = Infinity) {
7067
+ getSortedAsks(levels = Number.POSITIVE_INFINITY) {
7068
7068
  return Array.from(this.asks.entries()).map(([price, size]) => [new decimal_default(price), size]).sort(
7069
7069
  (priceLevel1, priceLevel2) => priceLevel1[0].minus(priceLevel2[0]).toNumber()
7070
7070
  ).slice(0, levels);
@@ -7082,8 +7082,8 @@ var Orderbook = class _Orderbook {
7082
7082
  static toOrderbookL2(orderbook) {
7083
7083
  return {
7084
7084
  asset_id: orderbook.asset,
7085
- bids: orderbook.getSortedBids(Infinity),
7086
- asks: orderbook.getSortedAsks(Infinity)
7085
+ bids: orderbook.getSortedBids(Number.POSITIVE_INFINITY),
7086
+ asks: orderbook.getSortedAsks(Number.POSITIVE_INFINITY)
7087
7087
  };
7088
7088
  }
7089
7089
  toDisplay(levels = 10) {
@@ -7350,7 +7350,7 @@ var ExchangeConnection = class _ExchangeConnection extends BaseConnection {
7350
7350
  return parsed.data.found;
7351
7351
  }
7352
7352
  async getUserAccountAddresses(offset, limit) {
7353
- const path = `/modules/exchange/api/v1/account/addresses`;
7353
+ const path = "/modules/exchange/api/v1/account/addresses";
7354
7354
  const response = await this.fetchApiResource(path, {
7355
7355
  offset: offset?.toString(),
7356
7356
  limit: limit?.toString()