@discomedia/utils 1.0.29 → 1.0.31

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.
package/dist/index.cjs CHANGED
@@ -667,7 +667,8 @@ function getMarketStatusImpl(date = new Date()) {
667
667
  const nextMarketDay = calendar.getNextMarketDay(date);
668
668
  nextStatusTime = getDayBoundaries(nextMarketDay, 'extended_hours').start;
669
669
  }
670
- const nextStatusTimeDifference = nextStatusTime.getTime() - nyDate.getTime();
670
+ // I think using nyDate here may be wrong - should use current time? i.e. date.getTime()
671
+ const nextStatusTimeDifference = nextStatusTime.getTime() - date.getTime();
671
672
  return {
672
673
  time: date,
673
674
  timeString: formatNYLocale(nyDate),
@@ -17314,7 +17315,6 @@ class AlpacaTradingAPI {
17314
17315
  clearTimeout(authTimeout);
17315
17316
  if (message.data?.status === 'authorized') {
17316
17317
  this.authenticated = true;
17317
- this.log('WebSocket authenticated');
17318
17318
  resolve();
17319
17319
  }
17320
17320
  else {
@@ -17356,7 +17356,6 @@ class AlpacaTradingAPI {
17356
17356
  this.ws?.removeListener('message', handleListenResponse);
17357
17357
  clearTimeout(listenTimeout);
17358
17358
  if (message.data?.streams?.includes('trade_updates')) {
17359
- this.log('Subscribed to trade updates');
17360
17359
  resolve();
17361
17360
  }
17362
17361
  else {