@riocrypto/common-server 1.0.740 → 1.0.742

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.
@@ -1,6 +1,6 @@
1
1
  import { Country, Fiat, Processor, User } from "@riocrypto/common";
2
2
  import { Mongoose } from "mongoose";
3
- export declare const getPlatformAndPartnerFees: (mongoose: Mongoose, amountFiat: number, fiat: Fiat, processor: Processor, country: Country, partnerId?: string, brokerCustomerId?: string, user?: User) => Promise<{
3
+ export declare const getPlatformAndPartnerFees: (mongoose: Mongoose, amountFiat: number, fiat: Fiat, processor: Processor, country: Country, partnerId?: string, brokerId?: string, user?: User) => Promise<{
4
4
  platformFeeFiat: number;
5
5
  platformFeeFiatTax: number;
6
6
  partnerFeeFiat: number;
@@ -17,7 +17,7 @@ const currency_api_client_1 = require("../clients/currency-api-client");
17
17
  const partner_1 = require("../models/partner");
18
18
  const user_1 = require("../models/user");
19
19
  const calculate_aggregate_volume_1 = require("./calculate-aggregate-volume");
20
- const getPlatformAndPartnerFees = (mongoose, amountFiat, fiat, processor, country, partnerId, brokerCustomerId, user) => __awaiter(void 0, void 0, void 0, function* () {
20
+ const getPlatformAndPartnerFees = (mongoose, amountFiat, fiat, processor, country, partnerId, brokerId, user) => __awaiter(void 0, void 0, void 0, function* () {
21
21
  var _a;
22
22
  let platformFeeFiat;
23
23
  let platformFeeFiatTax = 0;
@@ -82,9 +82,9 @@ const getPlatformAndPartnerFees = (mongoose, amountFiat, fiat, processor, countr
82
82
  platformFeeFiat = amountFiat * rioSettings.platformFee;
83
83
  partnerFeeFiat = 0;
84
84
  }
85
- if (brokerCustomerId) {
85
+ if (brokerId) {
86
86
  const User = (0, user_1.buildUser)(mongoose);
87
- const brokerCustomer = yield User.findById(brokerCustomerId);
87
+ const brokerCustomer = yield User.findById(brokerId);
88
88
  if (!brokerCustomer) {
89
89
  throw new Error("Broker customer not found");
90
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.740",
3
+ "version": "1.0.742",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "@aws-sdk/client-s3": "^3.297.0",
25
25
  "@everapi/currencyapi-js": "^1.0.6",
26
26
  "@google-cloud/storage": "^6.9.5",
27
- "@riocrypto/common": "^1.0.657",
27
+ "@riocrypto/common": "^1.0.659",
28
28
  "@types/express": "^4.17.13",
29
29
  "axios": "^0.27.2",
30
30
  "ccxt": "^3.0.30",