@coinlist-co/react 0.12.2-rc.726778a → 0.12.2-rc.7b430dd

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.
@@ -7,7 +7,7 @@ import {
7
7
  getUUIDv4,
8
8
  internalLogger,
9
9
  viemChain
10
- } from "./chunk-IRV5YU42.js";
10
+ } from "./chunk-MOE5S6CE.js";
11
11
 
12
12
  // src/universal/api/nabu/config.ts
13
13
  var NABU_BASE_URL = "https://asset.coinlist.co";
@@ -402,4 +402,4 @@ export {
402
402
  SDK_LOGGER_NAME,
403
403
  loggerOverPino
404
404
  };
405
- //# sourceMappingURL=chunk-C6F5FOFP.js.map
405
+ //# sourceMappingURL=chunk-DCW7NQXH.js.map
@@ -1069,11 +1069,7 @@ function formatAmount(amount, locale, options) {
1069
1069
  const decimal = formatRawAmount(amount);
1070
1070
  let [integerPart, fractionPart = ""] = decimal.split(".");
1071
1071
  const maxFractionDigits = options?.maxFractionDigits;
1072
- const minFractionDigits = Math.min(
1073
- options?.minFractionDigits ?? (maxFractionDigits !== void 0 ? maxFractionDigits : 2),
1074
- maxFractionDigits ?? amount.decimals,
1075
- amount.decimals
1076
- );
1072
+ const minFractionDigits = maxFractionDigits !== void 0 ? Math.min(maxFractionDigits, amount.decimals) : Math.min(2, amount.decimals);
1077
1073
  if (maxFractionDigits !== void 0 && fractionPart.length > maxFractionDigits) {
1078
1074
  ({ integerPart, fractionPart } = roundFractionHalfUp(
1079
1075
  integerPart,
@@ -1081,8 +1077,7 @@ function formatAmount(amount, locale, options) {
1081
1077
  maxFractionDigits
1082
1078
  ));
1083
1079
  }
1084
- const trimmed = fractionPart.replace(/0+$/, "");
1085
- const fraction = trimmed.padEnd(minFractionDigits, "0");
1080
+ const fraction = minFractionDigits === 0 ? "" : fractionPart.padEnd(minFractionDigits, "0");
1086
1081
  const integerFormatted = BigInt(integerPart).toLocaleString(locale);
1087
1082
  if (minFractionDigits === 0 && fraction === "") {
1088
1083
  return FormattedAmountUi(integerFormatted);
@@ -1151,14 +1146,6 @@ function assetAmount(amount, symbol) {
1151
1146
  return FormattedAmountAssetUi(`${amount} ${symbol}`);
1152
1147
  }
1153
1148
  var NA_AMOUNT_ASSET_UI = FormattedAmountAssetUi("-");
1154
- var SHARE_MAX_FRACTION_DIGITS = AssetDecimals(6);
1155
- var SHARE_MIN_FRACTION_DIGITS = AssetDecimals(2);
1156
- function formatShareAmount(amount, locale) {
1157
- return formatAmount(amount, locale, {
1158
- maxFractionDigits: SHARE_MAX_FRACTION_DIGITS,
1159
- minFractionDigits: SHARE_MIN_FRACTION_DIGITS
1160
- });
1161
- }
1162
1149
  var USD_FRACTION_DIGITS = AssetDecimals(2);
1163
1150
  function formattedUsdPrice(amount, locale) {
1164
1151
  if (!amount) return NA_AMOUNT_ASSET_UI;
@@ -3486,7 +3473,6 @@ export {
3486
3473
  usdAmount,
3487
3474
  assetAmount,
3488
3475
  NA_AMOUNT_ASSET_UI,
3489
- formatShareAmount,
3490
3476
  formattedUsdPrice,
3491
3477
  viemChain,
3492
3478
  getChainId,
@@ -3535,4 +3521,4 @@ export {
3535
3521
  OAuthRefreshToken,
3536
3522
  OAuthSession
3537
3523
  };
3538
- //# sourceMappingURL=chunk-IRV5YU42.js.map
3524
+ //# sourceMappingURL=chunk-MOE5S6CE.js.map