@riocrypto/common-server 1.0.1551 → 1.0.1553

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.
@@ -23,10 +23,10 @@ const getProcessorFees = (processor, amountFiat, conversionRateFromUSD, side, fi
23
23
  }
24
24
  else if (processor === common_1.Processor.Interbank) {
25
25
  if (side === common_1.Side.Buy) {
26
- return amountFiat * 0.015;
26
+ return amountFiat * 0.005;
27
27
  }
28
28
  else {
29
- let baseFee = amountFiat * 0.015;
29
+ let baseFee = amountFiat * 0.005;
30
30
  if (fiat === common_1.Fiat.PEN) {
31
31
  baseFee += 4.47;
32
32
  }
@@ -21,7 +21,7 @@ const apiKey_1 = require("../services/apiKey");
21
21
  const secret_manager_client_1 = require("../clients/secret-manager-client");
22
22
  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
- var _a, _b, _c, _d, _e, _f, _g;
24
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
25
25
  if (authorizationTypes.includes(common_1.AuthorizationType.Cluster)) {
26
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");
@@ -110,7 +110,8 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
110
110
  }
111
111
  else {
112
112
  if (((_e = (_d = user.onboarding) === null || _d === void 0 ? void 0 : _d.MX) === null || _e === void 0 ? void 0 : _e.status) === common_1.OnboardingStatus.Approved ||
113
- ((_g = (_f = user.onboarding) === null || _f === void 0 ? void 0 : _f.PE) === null || _g === void 0 ? void 0 : _g.status) === common_1.OnboardingStatus.Approved) {
113
+ ((_g = (_f = user.onboarding) === null || _f === void 0 ? void 0 : _f.PE) === null || _g === void 0 ? void 0 : _g.status) === common_1.OnboardingStatus.Approved ||
114
+ ((_j = (_h = user.onboarding) === null || _h === void 0 ? void 0 : _h.US) === null || _j === void 0 ? void 0 : _j.status) === common_1.OnboardingStatus.Approved) {
114
115
  req.user = user;
115
116
  }
116
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1551",
3
+ "version": "1.0.1553",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/storage": "^6.9.5",
29
29
  "@google-cloud/vision": "^4.0.2",
30
30
  "@hyperdx/node-opentelemetry": "^0.4.2",
31
- "@riocrypto/common": "^1.0.1382",
31
+ "@riocrypto/common": "^1.0.1388",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.6.0",
34
34
  "ccxt": "^3.0.30",