@orderly.network/trading-rewards 2.8.10-alpha.0 → 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 CHANGED
@@ -209,8 +209,7 @@ var init_curEpoch_script = __esm({
209
209
  return state.status <= types.AccountStatusEnum.SignedIn || disabledConnect;
210
210
  }, [state, disabledConnect]);
211
211
  const rewardsTooltip = React3.useMemo(() => {
212
- if (typeof estimate === "undefined" || estimate === null)
213
- return void 0;
212
+ if (typeof estimate === "undefined" || estimate === null) return void 0;
214
213
  const otherRewards = estimate.rows.filter((item) => item.broker_id !== brokerId).reduce((a, b) => a + b.est_r_account, 0);
215
214
  const curRewards = Number(estimate.est_r_wallet) - otherRewards;
216
215
  return {
@@ -698,8 +697,7 @@ var init_curEpoch_ui = __esm({
698
697
  });
699
698
  React3.useEffect(() => {
700
699
  const intervalId = setInterval(() => {
701
- if (typeof targetTimestamp === "undefined")
702
- return;
700
+ if (typeof targetTimestamp === "undefined") return;
703
701
  const now = (/* @__PURE__ */ new Date()).getTime();
704
702
  const distance = targetTimestamp - now;
705
703
  if (distance < 0) {
@@ -761,8 +759,7 @@ var init_curEpoch_ui = __esm({
761
759
  );
762
760
  };
763
761
  getDate = (timestamp) => {
764
- if (!timestamp)
765
- return "";
762
+ if (!timestamp) return "";
766
763
  const date = new Date(timestamp);
767
764
  const monthNames = [
768
765
  "Jan",
@@ -1056,8 +1053,7 @@ var init_stakeBooster_script = __esm({
1056
1053
  if (typeof estStakeBoost === "undefined" || estStakeBoost === null) {
1057
1054
  return void 0;
1058
1055
  }
1059
- if (estStakeBoost === 0)
1060
- return estStakeBoost;
1056
+ if (estStakeBoost === 0) return estStakeBoost;
1061
1057
  return new utils.Decimal(estStakeBoost).div(new utils.Decimal(10).pow(0.15)).toDecimalPlaces(2, utils.Decimal.ROUND_DOWN).toString();
1062
1058
  }, [curEpochEstimate?.est_stake_boost]);
1063
1059
  return {
@@ -1745,8 +1741,7 @@ var useTradingRewardsLayoutScript = (props) => {
1745
1741
  const { t } = i18n.useTranslation();
1746
1742
  const [current, setCurrent] = React3.useState(props.current || "/rewards/affiliate");
1747
1743
  React3.useEffect(() => {
1748
- if (props.current)
1749
- setCurrent(props.current);
1744
+ if (props.current) setCurrent(props.current);
1750
1745
  }, [props.current]);
1751
1746
  const items = React3.useMemo(() => {
1752
1747
  return [
@@ -1868,5 +1863,5 @@ exports.TradingRewardsLayout = TradingRewardsLayout;
1868
1863
  exports.TradingRewardsLayoutWidget = TradingRewardsLayoutWidget;
1869
1864
  exports.TradingRewardsLeftSidebarPath = TradingRewardsLeftSidebarPath;
1870
1865
  exports.useTradingRewardsLayoutScript = useTradingRewardsLayoutScript;
1871
- //# sourceMappingURL=out.js.map
1866
+ //# sourceMappingURL=index.js.map
1872
1867
  //# sourceMappingURL=index.js.map