@typus/typus-sdk 1.0.117 → 1.0.118
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.
|
@@ -6,9 +6,9 @@ function getExpEarn(u64_padding) {
|
|
|
6
6
|
// console.log(`usd_in_deposit: ${usd_in_deposit}`);
|
|
7
7
|
var snapshot_ms = Number(u64_padding.get("snapshot_ms"));
|
|
8
8
|
// console.log(`snapshot_ms: ${snapshot_ms}`);
|
|
9
|
-
var minutes =
|
|
9
|
+
var minutes = round((new Date().getTime() - snapshot_ms) / 60000);
|
|
10
10
|
// console.log(`minutes: ${minutes}`);
|
|
11
|
-
var exp_earn =
|
|
11
|
+
var exp_earn = round((usd_in_deposit * minutes) / 6000);
|
|
12
12
|
// console.log(`exp_earn: ${exp_earn}`);
|
|
13
13
|
return exp_earn;
|
|
14
14
|
}
|
|
@@ -21,3 +21,6 @@ function getExpEarnPerMinute(u64_padding) {
|
|
|
21
21
|
return exp_earn;
|
|
22
22
|
}
|
|
23
23
|
exports.getExpEarnPerMinute = getExpEarnPerMinute;
|
|
24
|
+
function round(a) {
|
|
25
|
+
return a - (a % 1);
|
|
26
|
+
}
|