@riocrypto/common-server 1.0.1215 → 1.0.1216
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.
|
@@ -24,6 +24,7 @@ const getUser = (req, userId) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
24
24
|
const User = (0, user_1.buildUser)(mongoose_1.default);
|
|
25
25
|
const user = yield User.findById(userId);
|
|
26
26
|
if (req.admin ||
|
|
27
|
+
req.validClusterApiKey ||
|
|
27
28
|
(user === null || user === void 0 ? void 0 : user.id) === ((_a = req.user) === null || _a === void 0 ? void 0 : _a.id) ||
|
|
28
29
|
(user === null || user === void 0 ? void 0 : user.brokerId) === ((_b = req.user) === null || _b === void 0 ? void 0 : _b.id)) {
|
|
29
30
|
return user;
|
|
@@ -23,7 +23,7 @@ const admin_auth_1 = require("../models/admin-auth");
|
|
|
23
23
|
const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
24
|
var _a, _b, _c, _d;
|
|
25
25
|
if (authorizationTypes.includes(common_1.AuthorizationType.Cluster)) {
|
|
26
|
-
let apiKey = req.header("x-api-key");
|
|
26
|
+
let apiKey = req.header("x-cluster-api-key");
|
|
27
27
|
const CLUSTER_API_KEY = yield secret_manager_client_1.secretManagerClient.getSecretValue("CLUSTER_API_KEY");
|
|
28
28
|
if (!CLUSTER_API_KEY) {
|
|
29
29
|
throw new common_1.SecretManagerError();
|
package/build/models/order.d.ts
CHANGED
|
@@ -21,7 +21,6 @@ interface OrderAttrs {
|
|
|
21
21
|
fees: Fees;
|
|
22
22
|
actualFees?: Fees;
|
|
23
23
|
price: number;
|
|
24
|
-
actualPrice?: number;
|
|
25
24
|
depositAddress?: string;
|
|
26
25
|
depositTxId?: string;
|
|
27
26
|
withdrawalTxId?: string;
|
|
@@ -37,7 +36,6 @@ interface OrderAttrs {
|
|
|
37
36
|
partner?: Partner;
|
|
38
37
|
imported?: boolean;
|
|
39
38
|
managedWallet?: boolean;
|
|
40
|
-
amountFixed?: number;
|
|
41
39
|
exchangeRateOrders?: ExchangeRateOrder[];
|
|
42
40
|
autoFXDisabled?: boolean;
|
|
43
41
|
USBankTransferMethod?: "wire" | "ach_push";
|
|
@@ -63,7 +61,6 @@ interface OrderDoc extends Document {
|
|
|
63
61
|
fees: Fees;
|
|
64
62
|
actualFees?: Fees;
|
|
65
63
|
price: number;
|
|
66
|
-
actualPrice: number;
|
|
67
64
|
depositAddress?: string;
|
|
68
65
|
depositTxId?: string;
|
|
69
66
|
withdrawalTxId?: string;
|
|
@@ -79,7 +76,6 @@ interface OrderDoc extends Document {
|
|
|
79
76
|
partner?: Partner;
|
|
80
77
|
imported?: boolean;
|
|
81
78
|
managedWallet?: boolean;
|
|
82
|
-
amountFixed?: number;
|
|
83
79
|
exchangeRateOrders?: ExchangeRateOrder[];
|
|
84
80
|
autoFXDisabled?: boolean;
|
|
85
81
|
USBankTransferMethod?: "wire" | "ach_push";
|
package/build/models/order.js
CHANGED
|
@@ -111,9 +111,6 @@ const buildOrder = (mongoose) => {
|
|
|
111
111
|
type: Number,
|
|
112
112
|
required: true,
|
|
113
113
|
},
|
|
114
|
-
actualPrice: {
|
|
115
|
-
type: Number,
|
|
116
|
-
},
|
|
117
114
|
brokerId: {
|
|
118
115
|
type: String,
|
|
119
116
|
},
|
|
@@ -154,9 +151,6 @@ const buildOrder = (mongoose) => {
|
|
|
154
151
|
managedWallet: {
|
|
155
152
|
type: Boolean,
|
|
156
153
|
},
|
|
157
|
-
amountFixed: {
|
|
158
|
-
type: Number,
|
|
159
|
-
},
|
|
160
154
|
autoFXDisabled: {
|
|
161
155
|
type: Boolean,
|
|
162
156
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1216",
|
|
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.
|
|
29
|
+
"@riocrypto/common": "^1.0.1112",
|
|
30
30
|
"@types/express": "^4.17.13",
|
|
31
31
|
"axios": "^0.27.2",
|
|
32
32
|
"ccxt": "^3.0.30",
|