60p82u21t54k 1.0.21 → 1.0.23

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.
@@ -4226,6 +4226,10 @@ const isTimeExpired = (targetDate, seconds = 0) => {
4226
4226
  }
4227
4227
  return false;
4228
4228
  };
4229
+ const getStringNumericValue = (value) => {
4230
+ const numericValue = parseFloat(value.replace(/,/g, "").replace(/[^\d.-]/g, ""));
4231
+ return isNaN(numericValue) ? 0 : numericValue;
4232
+ };
4229
4233
  const getFormattedAmount = (value, decimalPlaces = 2) => {
4230
4234
  if (Number(value) !== 0 && !Number(value)) {
4231
4235
  return `${value || ""}`;
@@ -5377,13 +5381,13 @@ const modifyVipListResponse = (result) => {
5377
5381
  const next_deposit_total = nextItem === void 0 ? "0.00" : nextItem.deposit.total;
5378
5382
  const next_turnover_total = nextItem === void 0 ? "0.00" : nextItem.turnover.total;
5379
5383
  if (i === userVipLevelIndex) {
5380
- c_deposit = `${Math.min(Number(deposit), Number(next_deposit_total))}`;
5381
- c_turnover = `${Math.min(Number(turnover), Number(next_turnover_total))}`;
5384
+ c_deposit = `${Math.min(getStringNumericValue(deposit), getStringNumericValue(next_deposit_total))}`;
5385
+ c_turnover = `${Math.min(getStringNumericValue(turnover), getStringNumericValue(next_turnover_total))}`;
5382
5386
  c_percentage = percentage;
5383
5387
  } else if (i < userVipLevelIndex) {
5384
5388
  c_deposit = item.deposit.total;
5385
5389
  c_turnover = item.turnover.total;
5386
- c_percentage = 1;
5390
+ c_percentage = 100;
5387
5391
  } else if (i > userVipLevelIndex) {
5388
5392
  c_deposit = "0.00";
5389
5393
  c_turnover = "0.00";