@riocrypto/common-server 1.0.1020 → 1.0.1021
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.
|
@@ -46,16 +46,13 @@ const calculateWeeklyVolumeAndRevenue = (mongoose, user) => __awaiter(void 0, vo
|
|
|
46
46
|
orders.forEach((order) => {
|
|
47
47
|
var _a;
|
|
48
48
|
const fiatAmount = order.amountFiat || 0;
|
|
49
|
-
const conversionRate = order.
|
|
50
|
-
const platformFee = ((_a = order.
|
|
51
|
-
const price = order.price || 0;
|
|
49
|
+
const conversionRate = order.actualConversionRateUSD || 0;
|
|
50
|
+
const platformFee = ((_a = order.actualFees) === null || _a === void 0 ? void 0 : _a.platformFeeFiat) || 0;
|
|
52
51
|
const amountCrypto = order.amountCrypto || 0;
|
|
53
52
|
let orderVolume = 0;
|
|
54
53
|
let orderRevenue = 0;
|
|
55
54
|
if (order.side === common_1.Side.Sell) {
|
|
56
|
-
orderVolume = conversionRate
|
|
57
|
-
? amountCrypto * price * (1 / conversionRate)
|
|
58
|
-
: 0;
|
|
55
|
+
orderVolume = conversionRate ? amountCrypto * (1 / conversionRate) : 0;
|
|
59
56
|
orderRevenue = conversionRate ? platformFee * (1 / conversionRate) : 0;
|
|
60
57
|
}
|
|
61
58
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1021",
|
|
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.881",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|