@riocrypto/common-server 1.0.1134 → 1.0.1136

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.
@@ -7,7 +7,7 @@ interface AdminTaskAttrs {
7
7
  orderId?: string;
8
8
  userId?: string;
9
9
  bankAccountId?: string;
10
- amountToFix?: string;
10
+ amountToFix?: number;
11
11
  }
12
12
  interface AdminTaskDoc extends Document {
13
13
  type: AdminTaskType;
@@ -16,7 +16,7 @@ interface AdminTaskDoc extends Document {
16
16
  orderId?: string;
17
17
  userId?: string;
18
18
  bankAccountId?: string;
19
- amountToFix?: string;
19
+ amountToFix?: number;
20
20
  }
21
21
  interface AdminTaskModel extends Model<AdminTaskDoc> {
22
22
  build(attrs: AdminTaskAttrs): AdminTaskDoc;
@@ -1,4 +1,4 @@
1
- import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, Partner } from "@riocrypto/common";
1
+ import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, Partner, ExchangeRateOrder } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface OrderAttrs {
4
4
  quoteId: string;
@@ -38,6 +38,7 @@ interface OrderAttrs {
38
38
  managedWallet?: boolean;
39
39
  sourceUserId?: string;
40
40
  amountFixed?: number;
41
+ exchangeRateOrders?: ExchangeRateOrder[];
41
42
  }
42
43
  interface OrderDoc extends Document {
43
44
  quoteId: string;
@@ -77,6 +78,7 @@ interface OrderDoc extends Document {
77
78
  managedWallet?: boolean;
78
79
  sourceUserId?: string;
79
80
  amountFixed?: number;
81
+ exchangeRateOrders?: ExchangeRateOrder[];
80
82
  }
81
83
  interface OrderModel extends Model<OrderDoc> {
82
84
  build(attrs: OrderAttrs): OrderDoc;
@@ -157,6 +157,19 @@ const buildOrder = (mongoose) => {
157
157
  amountFixed: {
158
158
  type: Number,
159
159
  },
160
+ exchangeRateOrders: [
161
+ {
162
+ amount: {
163
+ type: Number,
164
+ },
165
+ price: {
166
+ type: String,
167
+ },
168
+ provider: {
169
+ type: String,
170
+ },
171
+ },
172
+ ],
160
173
  }, {
161
174
  toJSON: {
162
175
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1134",
3
+ "version": "1.0.1136",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "@aws-sdk/client-s3": "^3.297.0",
27
27
  "@everapi/currencyapi-js": "^1.0.6",
28
28
  "@google-cloud/storage": "^6.9.5",
29
- "@riocrypto/common": "^1.0.977",
29
+ "@riocrypto/common": "^1.0.982",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^0.27.2",
32
32
  "ccxt": "^3.0.30",