@riocrypto/common-server 1.0.2313 → 1.0.2315

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.
@@ -4,10 +4,11 @@ declare class ClusterClient {
4
4
  private clusterApiKey;
5
5
  private axios;
6
6
  constructor(baseUrl: string, clusterApiKey: string);
7
- refreshQuote({ orderId, newAmountFiat, newAmountCrypto, }: {
7
+ refreshQuote({ orderId, newAmountFiat, newAmountCrypto, useSamePrice, }: {
8
8
  orderId: string;
9
9
  newAmountFiat?: number;
10
10
  newAmountCrypto?: number;
11
+ useSamePrice?: boolean;
11
12
  }): Promise<Quote>;
12
13
  createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, settlementTime, netPrice, price, ignoreLiquidityError, }: {
13
14
  userId: string;
@@ -55,7 +55,7 @@ class ClusterClient {
55
55
  }
56
56
  this.axios.defaults.headers.common["Host"] = hostHeader;
57
57
  }
58
- refreshQuote({ orderId, newAmountFiat, newAmountCrypto, }) {
58
+ refreshQuote({ orderId, newAmountFiat, newAmountCrypto, useSamePrice, }) {
59
59
  return __awaiter(this, void 0, void 0, function* () {
60
60
  if (newAmountCrypto && newAmountFiat) {
61
61
  throw new common_1.GenericInternalError("Cannot specify both newAmountCrypto and newAmountFiat");
@@ -64,6 +64,7 @@ class ClusterClient {
64
64
  orderId,
65
65
  newAmountFiat,
66
66
  newAmountCrypto,
67
+ useSamePrice,
67
68
  ignoreLiquidityError: true,
68
69
  }, {
69
70
  headers: {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sanitizeOrderDoc = void 0;
4
4
  const sanitizeOrderDoc = (doc) => {
5
+ var _a;
5
6
  const obj = doc.toJSON();
6
7
  delete obj.substatus;
7
8
  delete obj.liquidityProvider;
@@ -16,6 +17,14 @@ const sanitizeOrderDoc = (doc) => {
16
17
  delete obj.discount;
17
18
  delete obj.markup;
18
19
  delete obj.rioPayoutFireblocksVaultId;
20
+ if (((_a = obj.payoutsSent) === null || _a === void 0 ? void 0 : _a.length) > 0) {
21
+ obj.payoutsSent = obj.payoutsSent.map((payout) => {
22
+ if (payout.fireblocksTransferId) {
23
+ delete payout.fireblocksTransferId;
24
+ }
25
+ return payout;
26
+ });
27
+ }
19
28
  return obj;
20
29
  };
21
30
  exports.sanitizeOrderDoc = sanitizeOrderDoc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2313",
3
+ "version": "1.0.2315",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/secret-manager": "^5.3.0",
29
29
  "@google-cloud/storage": "^6.9.5",
30
30
  "@hyperdx/node-opentelemetry": "^0.7.0",
31
- "@riocrypto/common": "^1.0.2028",
31
+ "@riocrypto/common": "^1.0.2029",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",