@riocrypto/common-server 1.0.1402 → 1.0.1404
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.
|
@@ -20,11 +20,14 @@ const getUserTransactionLimits = (mongoose, id) => __awaiter(void 0, void 0, voi
|
|
|
20
20
|
throw new common_1.NotFoundError("User");
|
|
21
21
|
}
|
|
22
22
|
const { volume } = yield (0, calculate_aggregate_volume_and_revenue_1.calculateAggregateVolumeAndRevenue)(mongoose, 30, user, true);
|
|
23
|
+
console.log("usuario", user);
|
|
23
24
|
//@ts-ignore
|
|
24
25
|
let risk = user.risk;
|
|
26
|
+
console.log("risk", risk);
|
|
25
27
|
if (!risk) {
|
|
26
28
|
//@ts-ignore
|
|
27
29
|
risk = user.riskTier;
|
|
30
|
+
console.log("risk", risk);
|
|
28
31
|
}
|
|
29
32
|
let limit = 0;
|
|
30
33
|
if (risk === common_1.RiskTier.High) {
|
|
@@ -41,6 +44,7 @@ const getUserTransactionLimits = (mongoose, id) => __awaiter(void 0, void 0, voi
|
|
|
41
44
|
limit = 100000;
|
|
42
45
|
}
|
|
43
46
|
}
|
|
47
|
+
console.log("limit", limit);
|
|
44
48
|
return { limit, used: volume };
|
|
45
49
|
});
|
|
46
50
|
exports.getUserTransactionLimits = getUserTransactionLimits;
|
|
@@ -126,7 +126,8 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
|
|
|
126
126
|
req.user = user;
|
|
127
127
|
}
|
|
128
128
|
else {
|
|
129
|
-
if (
|
|
129
|
+
if (user.kycStatus === common_1.KYCStatus.Approved ||
|
|
130
|
+
((_f = (_e = user.KYC) === null || _e === void 0 ? void 0 : _e.MX) === null || _f === void 0 ? void 0 : _f.status) === common_1.KYCStatus.Approved ||
|
|
130
131
|
((_h = (_g = user.KYC) === null || _g === void 0 ? void 0 : _g.PE) === null || _h === void 0 ? void 0 : _h.status) === common_1.KYCStatus.Approved) {
|
|
131
132
|
req.user = user;
|
|
132
133
|
}
|