@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.
@@ -5,7 +5,7 @@ import {
5
5
  SDK_LOGGER_NAME,
6
6
  loggerOverPino,
7
7
  publicClients
8
- } from "../chunk-C6F5FOFP.js";
8
+ } from "../chunk-DCW7NQXH.js";
9
9
  import {
10
10
  API_VERSION,
11
11
  ClientCredentialsOAuth,
@@ -25,7 +25,7 @@ import {
25
25
  fetchOffers,
26
26
  fetchOffersPage,
27
27
  internalLogger
28
- } from "../chunk-IRV5YU42.js";
28
+ } from "../chunk-MOE5S6CE.js";
29
29
 
30
30
  // src/server/core/api/api-client.ts
31
31
  var ApiClient = class {
@@ -166,7 +166,6 @@ __export(universal_exports, {
166
166
  formatBpsAsPercent: () => formatBpsAsPercent,
167
167
  formatCompactAmount: () => formatCompactAmount,
168
168
  formatRawAmount: () => formatRawAmount,
169
- formatShareAmount: () => formatShareAmount,
170
169
  formattedPricePerShare: () => formattedPricePerShare,
171
170
  formattedUsdPrice: () => formattedUsdPrice,
172
171
  generatePKCEParams: () => generatePKCEParams,
@@ -1266,11 +1265,7 @@ function formatAmount(amount, locale, options) {
1266
1265
  const decimal = formatRawAmount(amount);
1267
1266
  let [integerPart, fractionPart = ""] = decimal.split(".");
1268
1267
  const maxFractionDigits = options?.maxFractionDigits;
1269
- const minFractionDigits = Math.min(
1270
- options?.minFractionDigits ?? (maxFractionDigits !== void 0 ? maxFractionDigits : 2),
1271
- maxFractionDigits ?? amount.decimals,
1272
- amount.decimals
1273
- );
1268
+ const minFractionDigits = maxFractionDigits !== void 0 ? Math.min(maxFractionDigits, amount.decimals) : Math.min(2, amount.decimals);
1274
1269
  if (maxFractionDigits !== void 0 && fractionPart.length > maxFractionDigits) {
1275
1270
  ({ integerPart, fractionPart } = roundFractionHalfUp(
1276
1271
  integerPart,
@@ -1278,8 +1273,7 @@ function formatAmount(amount, locale, options) {
1278
1273
  maxFractionDigits
1279
1274
  ));
1280
1275
  }
1281
- const trimmed = fractionPart.replace(/0+$/, "");
1282
- const fraction = trimmed.padEnd(minFractionDigits, "0");
1276
+ const fraction = minFractionDigits === 0 ? "" : fractionPart.padEnd(minFractionDigits, "0");
1283
1277
  const integerFormatted = BigInt(integerPart).toLocaleString(locale);
1284
1278
  if (minFractionDigits === 0 && fraction === "") {
1285
1279
  return FormattedAmountUi(integerFormatted);
@@ -1348,14 +1342,6 @@ function assetAmount(amount, symbol) {
1348
1342
  return FormattedAmountAssetUi(`${amount} ${symbol}`);
1349
1343
  }
1350
1344
  var NA_AMOUNT_ASSET_UI = FormattedAmountAssetUi("-");
1351
- var SHARE_MAX_FRACTION_DIGITS = AssetDecimals(6);
1352
- var SHARE_MIN_FRACTION_DIGITS = AssetDecimals(2);
1353
- function formatShareAmount(amount, locale) {
1354
- return formatAmount(amount, locale, {
1355
- maxFractionDigits: SHARE_MAX_FRACTION_DIGITS,
1356
- minFractionDigits: SHARE_MIN_FRACTION_DIGITS
1357
- });
1358
- }
1359
1345
  var USD_FRACTION_DIGITS = AssetDecimals(2);
1360
1346
  function formattedUsdPrice(amount, locale) {
1361
1347
  if (!amount) return NA_AMOUNT_ASSET_UI;
@@ -4020,7 +4006,6 @@ var User = {
4020
4006
  formatBpsAsPercent,
4021
4007
  formatCompactAmount,
4022
4008
  formatRawAmount,
4023
- formatShareAmount,
4024
4009
  formattedPricePerShare,
4025
4010
  formattedUsdPrice,
4026
4011
  generatePKCEParams,