@riocrypto/common-server 1.0.892 → 1.0.894
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.
|
@@ -93,6 +93,21 @@ const getPlatformAndPartnerFees = (mongoose, conversionRateToUSD, amountFiat, fi
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
+
// @ts-ignore
|
|
97
|
+
if (platformFeeFiat === undefined) {
|
|
98
|
+
let netPlatformFee = rioSettings.platformFee;
|
|
99
|
+
if (discount) {
|
|
100
|
+
netPlatformFee -= discount;
|
|
101
|
+
}
|
|
102
|
+
if (markup) {
|
|
103
|
+
netPlatformFee += markup;
|
|
104
|
+
}
|
|
105
|
+
if (netPlatformFee < 0) {
|
|
106
|
+
throw new Error("Discount cannot be greater than platform fee");
|
|
107
|
+
}
|
|
108
|
+
platformFeeFiat = amountFiat * netPlatformFee;
|
|
109
|
+
}
|
|
110
|
+
partnerFeeFiat = 0;
|
|
96
111
|
}
|
|
97
112
|
else if (user === null || user === void 0 ? void 0 : user.platformFeeRanges) {
|
|
98
113
|
let volume;
|
|
@@ -12,7 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.getProcessorFees = void 0;
|
|
13
13
|
const common_1 = require("@riocrypto/common");
|
|
14
14
|
const getProcessorFees = (processor, amountFiat, conversionRateFromUSD) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
if (processor === common_1.Processor.
|
|
15
|
+
if (processor === common_1.Processor.Bridge) {
|
|
16
|
+
return ((amountFiat * (1 / conversionRateFromUSD) * 0.00015 + 20) *
|
|
17
|
+
conversionRateFromUSD);
|
|
18
|
+
}
|
|
19
|
+
else if (processor === common_1.Processor.Kapstar) {
|
|
16
20
|
return amountFiat * 0.006;
|
|
17
21
|
}
|
|
18
22
|
else if (processor === common_1.Processor.SWIFT) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.894",
|
|
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.
|
|
27
|
+
"@riocrypto/common": "^1.0.767",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|