@riocrypto/common-server 1.0.2425 → 1.0.2427

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.
@@ -31,10 +31,11 @@ declare class ClusterClient {
31
31
  getNewChainedQuote(chainedOrderId: string, chainedQuote: ChainedQuote, newOriginAmount?: number): Promise<ChainedQuote>;
32
32
  getBidQuote(userId: string, side: Side, country: Country, fiat: Fiat, crypto: Crypto, amountFiat?: number, amountCrypto?: number, USBankTransferMethod?: "ach_push" | "wire", netPrice?: string): Promise<Quote>;
33
33
  getCryptoAddresses(userId: string, crypto: Crypto): Promise<CryptoAddress[]>;
34
- createOrder({ quoteId, userAddressId, payoutBankAccountId, notes, isAxeTaker, }: {
34
+ createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, }: {
35
35
  quoteId: string;
36
36
  userAddressId?: string;
37
37
  payoutBankAccountId?: string;
38
+ parentOrderId?: string;
38
39
  notes?: string;
39
40
  isAxeTaker?: boolean;
40
41
  }): Promise<Order>;
@@ -155,7 +155,7 @@ class ClusterClient {
155
155
  return response.data;
156
156
  });
157
157
  }
158
- createOrder({ quoteId, userAddressId, payoutBankAccountId, notes, isAxeTaker, }) {
158
+ createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, }) {
159
159
  return __awaiter(this, void 0, void 0, function* () {
160
160
  const response = yield this.axios.post(`${this.baseUrl}/api/orders`, {
161
161
  quoteId,
@@ -165,6 +165,7 @@ class ClusterClient {
165
165
  : undefined,
166
166
  notes: notes ? notes : undefined,
167
167
  isAxeTaker: isAxeTaker ? isAxeTaker : undefined,
168
+ parentOrderId: parentOrderId ? parentOrderId : undefined,
168
169
  }, {
169
170
  headers: {
170
171
  "x-cluster-api-key": this.clusterApiKey,
@@ -24,7 +24,7 @@ interface OrderAttrs {
24
24
  actualFees?: Fees;
25
25
  wireMessage?: string;
26
26
  parentOrderId?: string;
27
- price: number;
27
+ marketPrice: number;
28
28
  depositAddress?: string;
29
29
  depositTxId?: string;
30
30
  withdrawalTxId?: string;
@@ -152,7 +152,7 @@ interface OrderDoc extends Document {
152
152
  processor: Processor;
153
153
  fees: Fees;
154
154
  actualFees?: Fees;
155
- price: number;
155
+ marketPrice: number;
156
156
  depositAddress?: string;
157
157
  depositTxId?: string;
158
158
  withdrawalTxId?: string;
@@ -154,7 +154,7 @@ const buildOrder = (mongoose) => {
154
154
  type: Number,
155
155
  },
156
156
  },
157
- price: {
157
+ marketPrice: {
158
158
  type: Number,
159
159
  required: true,
160
160
  },
@@ -17,7 +17,7 @@ interface QuoteAttrs {
17
17
  processor: Processor;
18
18
  fees: Fees;
19
19
  assetPriceInUSD: number;
20
- price: number;
20
+ marketPrice: number;
21
21
  createdAt: Date;
22
22
  noMarkups: boolean;
23
23
  quoteInCrypto: boolean;
@@ -29,7 +29,6 @@ interface QuoteAttrs {
29
29
  discount?: number;
30
30
  markup?: number;
31
31
  USBankTransferMethod?: "wire" | "ach_push";
32
- isBid?: boolean;
33
32
  isAfterHours?: boolean;
34
33
  isSurgePricing?: boolean;
35
34
  netPrice: number;
@@ -58,7 +57,7 @@ interface QuoteDoc extends Document {
58
57
  processor: Processor;
59
58
  createdAt: Date;
60
59
  fees: Fees;
61
- price: number;
60
+ marketPrice: number;
62
61
  assetPriceInUSD: number;
63
62
  quoteInCrypto: boolean;
64
63
  noMarkups: boolean;
@@ -71,7 +70,6 @@ interface QuoteDoc extends Document {
71
70
  markup?: number;
72
71
  isSurgePricing?: boolean;
73
72
  USBankTransferMethod?: "wire" | "ach_push";
74
- isBid?: boolean;
75
73
  isAfterHours?: boolean;
76
74
  netPrice: number;
77
75
  requestedNetPrice?: number;
@@ -91,7 +91,7 @@ const buildQuote = (mongoose) => {
91
91
  noMarkups: {
92
92
  type: Boolean,
93
93
  },
94
- price: {
94
+ marketPrice: {
95
95
  type: Number,
96
96
  },
97
97
  assetPriceInUSD: {
@@ -118,9 +118,6 @@ const buildQuote = (mongoose) => {
118
118
  markup: {
119
119
  type: Number,
120
120
  },
121
- isBid: {
122
- type: Boolean,
123
- },
124
121
  quoteInCrypto: {
125
122
  type: Boolean,
126
123
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2425",
3
+ "version": "1.0.2427",
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.2176",
31
+ "@riocrypto/common": "^1.0.2178",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",