@riocrypto/common-server 1.0.778 → 1.0.779

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.
@@ -16,10 +16,16 @@ const ccxt_client_1 = require("../clients/ccxt-client");
16
16
  const getNetworkFees = (crypto, cryptoPrice, conversionRateToUSD) => __awaiter(void 0, void 0, void 0, function* () {
17
17
  let withdrawFee;
18
18
  const fireblocksClient = yield (0, fireblocks_client_1.buildFireblocksClient)();
19
- if (crypto === common_1.Crypto.USDCPolygon || crypto === common_1.Crypto.USDCSolana) {
20
- const address = crypto === common_1.Crypto.USDCPolygon
21
- ? "0x66ECBd38905CC32249ddd6f4f0B4A3DdDDCbd608"
22
- : "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH";
19
+ if ([
20
+ common_1.Crypto.USDTEthereum,
21
+ common_1.Crypto.USDCPolygon,
22
+ common_1.Crypto.USDTPolygon,
23
+ common_1.Crypto.USDTEthereum,
24
+ common_1.Crypto.USDTEthereum,
25
+ ].includes(crypto)) {
26
+ const address = crypto === common_1.Crypto.USDCSolana
27
+ ? "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH"
28
+ : "0x66ECBd38905CC32249ddd6f4f0B4A3DdDDCbd608";
23
29
  withdrawFee = yield fireblocksClient.estimateWithdrawFee(crypto, address, 100);
24
30
  if (!withdrawFee) {
25
31
  throw new Error("Withdraw fee not set");
@@ -1,7 +1,7 @@
1
1
  import { Country, Fiat, Processor, User } from "@riocrypto/common";
2
2
  import { Mongoose } from "mongoose";
3
3
  export declare const getPlatformAndPartnerFees: (mongoose: Mongoose, amountFiat: number, fiat: Fiat, processor: Processor, country: Country, discount: number, partnerId?: string, brokerId?: string, user?: User) => Promise<{
4
- platformFeeFiat: number | undefined;
4
+ platformFeeFiat: number;
5
5
  platformFeeFiatTax: number;
6
6
  partnerFeeFiat: number;
7
7
  feesComped: boolean;
@@ -143,7 +143,7 @@ const getPlatformAndPartnerFees = (mongoose, amountFiat, fiat, processor, countr
143
143
  }
144
144
  }
145
145
  return {
146
- platformFeeFiat,
146
+ platformFeeFiat: platformFeeFiat,
147
147
  platformFeeFiatTax,
148
148
  partnerFeeFiat,
149
149
  feesComped,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.778",
3
+ "version": "1.0.779",
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.685",
27
+ "@riocrypto/common": "^1.0.687",
28
28
  "@types/express": "^4.17.13",
29
29
  "axios": "^0.27.2",
30
30
  "ccxt": "^3.0.30",