@orderly.network/trading-rewards 2.8.10 → 2.8.11-alpha.0
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.
- package/dist/index.js +6 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
package/dist/index.mjs
CHANGED
|
@@ -202,8 +202,7 @@ var init_curEpoch_script = __esm({
|
|
|
202
202
|
return state.status <= AccountStatusEnum.SignedIn || disabledConnect;
|
|
203
203
|
}, [state, disabledConnect]);
|
|
204
204
|
const rewardsTooltip = useMemo(() => {
|
|
205
|
-
if (typeof estimate === "undefined" || estimate === null)
|
|
206
|
-
return void 0;
|
|
205
|
+
if (typeof estimate === "undefined" || estimate === null) return void 0;
|
|
207
206
|
const otherRewards = estimate.rows.filter((item) => item.broker_id !== brokerId).reduce((a, b) => a + b.est_r_account, 0);
|
|
208
207
|
const curRewards = Number(estimate.est_r_wallet) - otherRewards;
|
|
209
208
|
return {
|
|
@@ -691,8 +690,7 @@ var init_curEpoch_ui = __esm({
|
|
|
691
690
|
});
|
|
692
691
|
useEffect(() => {
|
|
693
692
|
const intervalId = setInterval(() => {
|
|
694
|
-
if (typeof targetTimestamp === "undefined")
|
|
695
|
-
return;
|
|
693
|
+
if (typeof targetTimestamp === "undefined") return;
|
|
696
694
|
const now = (/* @__PURE__ */ new Date()).getTime();
|
|
697
695
|
const distance = targetTimestamp - now;
|
|
698
696
|
if (distance < 0) {
|
|
@@ -754,8 +752,7 @@ var init_curEpoch_ui = __esm({
|
|
|
754
752
|
);
|
|
755
753
|
};
|
|
756
754
|
getDate = (timestamp) => {
|
|
757
|
-
if (!timestamp)
|
|
758
|
-
return "";
|
|
755
|
+
if (!timestamp) return "";
|
|
759
756
|
const date = new Date(timestamp);
|
|
760
757
|
const monthNames = [
|
|
761
758
|
"Jan",
|
|
@@ -1049,8 +1046,7 @@ var init_stakeBooster_script = __esm({
|
|
|
1049
1046
|
if (typeof estStakeBoost === "undefined" || estStakeBoost === null) {
|
|
1050
1047
|
return void 0;
|
|
1051
1048
|
}
|
|
1052
|
-
if (estStakeBoost === 0)
|
|
1053
|
-
return estStakeBoost;
|
|
1049
|
+
if (estStakeBoost === 0) return estStakeBoost;
|
|
1054
1050
|
return new Decimal(estStakeBoost).div(new Decimal(10).pow(0.15)).toDecimalPlaces(2, Decimal.ROUND_DOWN).toString();
|
|
1055
1051
|
}, [curEpochEstimate?.est_stake_boost]);
|
|
1056
1052
|
return {
|
|
@@ -1738,8 +1734,7 @@ var useTradingRewardsLayoutScript = (props) => {
|
|
|
1738
1734
|
const { t } = useTranslation();
|
|
1739
1735
|
const [current, setCurrent] = useState(props.current || "/rewards/affiliate");
|
|
1740
1736
|
useEffect(() => {
|
|
1741
|
-
if (props.current)
|
|
1742
|
-
setCurrent(props.current);
|
|
1737
|
+
if (props.current) setCurrent(props.current);
|
|
1743
1738
|
}, [props.current]);
|
|
1744
1739
|
const items = useMemo(() => {
|
|
1745
1740
|
return [
|
|
@@ -1857,5 +1852,5 @@ var TradingRewardsLayoutWidget = (props) => {
|
|
|
1857
1852
|
};
|
|
1858
1853
|
|
|
1859
1854
|
export { index_exports as TradingRewards, TradingRewardsLayout, TradingRewardsLayoutWidget, TradingRewardsLeftSidebarPath, useTradingRewardsLayoutScript };
|
|
1860
|
-
//# sourceMappingURL=
|
|
1855
|
+
//# sourceMappingURL=index.mjs.map
|
|
1861
1856
|
//# sourceMappingURL=index.mjs.map
|