@coinlist-co/react 0.12.1-rc.b902290 → 0.12.1-rc.df659d8

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.
@@ -19,7 +19,7 @@ import {
19
19
  generateSecureRandomBase64Url,
20
20
  internalLogger,
21
21
  sha256
22
- } from "./chunk-2YEJXE2V.js";
22
+ } from "./chunk-VSYGGTI6.js";
23
23
 
24
24
  // src/universal/types/oauth.ts
25
25
  var AuthorizationCode = (value) => value;
@@ -354,4 +354,4 @@ export {
354
354
  UserEmail,
355
355
  User
356
356
  };
357
- //# sourceMappingURL=chunk-DX4VTV7L.js.map
357
+ //# sourceMappingURL=chunk-3EOK47CQ.js.map
@@ -7,7 +7,7 @@ import {
7
7
  getUUIDv4,
8
8
  internalLogger,
9
9
  viemChain
10
- } from "./chunk-2YEJXE2V.js";
10
+ } from "./chunk-VSYGGTI6.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-DOSABR7Q.js.map
405
+ //# sourceMappingURL=chunk-I5EHOV7V.js.map
@@ -1166,10 +1166,14 @@ function parseBlockchainAmount(amount, decimals) {
1166
1166
  if (/[eE]/.test(trimmed)) {
1167
1167
  return { valid: false, reason: { type: "invalid-format" } };
1168
1168
  }
1169
- if (!/^\d+(\.\d+)?$/.test(trimmed)) {
1169
+ if (trimmed === ".") {
1170
1170
  return { valid: false, reason: { type: "invalid-format" } };
1171
1171
  }
1172
- const [, fraction = ""] = trimmed.split(".");
1172
+ const normalised = trimmed.replace(/^\./, "0.").replace(/\.$/, "");
1173
+ if (!/^\d+(\.\d+)?$/.test(normalised)) {
1174
+ return { valid: false, reason: { type: "invalid-format" } };
1175
+ }
1176
+ const [, fraction = ""] = normalised.split(".");
1173
1177
  if (fraction.length > decimals) {
1174
1178
  return {
1175
1179
  valid: false,
@@ -1177,7 +1181,7 @@ function parseBlockchainAmount(amount, decimals) {
1177
1181
  };
1178
1182
  }
1179
1183
  try {
1180
- const raw = parseUnits(trimmed, decimals);
1184
+ const raw = parseUnits(normalised, decimals);
1181
1185
  if (raw > MAX_UINT_256) {
1182
1186
  return { valid: false, reason: { type: "overflow" } };
1183
1187
  }
@@ -3437,4 +3441,4 @@ export {
3437
3441
  OAuthRefreshToken,
3438
3442
  OAuthSession
3439
3443
  };
3440
- //# sourceMappingURL=chunk-2YEJXE2V.js.map
3444
+ //# sourceMappingURL=chunk-VSYGGTI6.js.map