@riocrypto/common-server 1.0.2918 → 1.0.2920

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/build/index.js CHANGED
@@ -208,7 +208,6 @@ __exportStar(require("./helpers/find-user-tier-forward-curve-rate"), exports);
208
208
  __exportStar(require("./helpers/resolve-forward-curve-rate"), exports);
209
209
  __exportStar(require("./helpers/get-resolved-forward-curve-tiers"), exports);
210
210
  __exportStar(require("./helpers/get-fx-trading-policy"), exports);
211
- ;
212
211
  __exportStar(require("./clients/google-sheets-api-client"), exports);
213
212
  __exportStar(require("./clients/binance-client"), exports);
214
213
  __exportStar(require("./clients/kraken-client"), exports);
@@ -415,6 +415,10 @@ const buildOrder = (mongoose) => {
415
415
  // At most one order per real quoteId. Imported orders use quoteId "" and are
416
416
  // excluded by the partial filter (which also serves the createOrder lookup).
417
417
  orderSchema.index({ quoteId: 1 }, { unique: true, partialFilterExpression: { quoteId: { $gt: "" } } });
418
+ // Looking up an order by quote matches on quoteId or expiredQuotes in one
419
+ // $or, and an $or falls back to a collection scan unless every branch is
420
+ // indexed. Without this the partial quoteId index above never gets used.
421
+ orderSchema.index({ expiredQuotes: 1 });
418
422
  // At most one order per (broker family, clientReferenceId). rootUserId is
419
423
  // brokerId || userId; orders without a clientReferenceId (or, defensively,
420
424
  // without rootUserId) are excluded from the constraint.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2918",
3
+ "version": "1.0.2920",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",