@rhinestone/deposit-modal 0.1.30 → 0.1.31

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.
Files changed (36) hide show
  1. package/dist/{DepositModalReown-ZD3ROLZG.cjs → DepositModalReown-N7GCYZF7.cjs} +7 -7
  2. package/dist/{DepositModalReown-OHTRNISJ.mjs → DepositModalReown-S7HER5HU.mjs} +4 -4
  3. package/dist/{WithdrawModalReown-SVZQKH2X.cjs → WithdrawModalReown-DJCJ5U7E.cjs} +7 -7
  4. package/dist/{WithdrawModalReown-IJAMIPSY.mjs → WithdrawModalReown-DMDRLYTE.mjs} +4 -4
  5. package/dist/{chunk-VL47TLTE.mjs → chunk-3ICS43XC.mjs} +9 -8
  6. package/dist/{chunk-BOKLFGNS.mjs → chunk-AWFJFSPH.mjs} +76 -36
  7. package/dist/{chunk-LBEP3A2Z.mjs → chunk-CS6UIMCF.mjs} +3 -1
  8. package/dist/{chunk-CIAKCO7G.mjs → chunk-EVU7M7A6.mjs} +55 -23
  9. package/dist/{chunk-KIRDZLOS.cjs → chunk-G2RDCQHL.cjs} +80 -48
  10. package/dist/{chunk-WDDONQLV.cjs → chunk-MU2BOEDN.cjs} +204 -164
  11. package/dist/{chunk-WB3ZJJBH.cjs → chunk-PE6OK3FH.cjs} +9 -8
  12. package/dist/{chunk-S76PY7GZ.mjs → chunk-SLI5FHTT.mjs} +9 -9
  13. package/dist/{chunk-K4YSUWIT.cjs → chunk-SZ35G2DT.cjs} +59 -59
  14. package/dist/{chunk-6VJ2ZTNQ.cjs → chunk-VKQA3FO3.cjs} +2 -0
  15. package/dist/constants.cjs +2 -2
  16. package/dist/constants.mjs +1 -1
  17. package/dist/deposit.cjs +4 -4
  18. package/dist/deposit.d.cts +2 -2
  19. package/dist/deposit.d.ts +2 -2
  20. package/dist/deposit.mjs +3 -3
  21. package/dist/index.cjs +5 -5
  22. package/dist/index.d.cts +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.mjs +4 -4
  25. package/dist/reown.cjs +5 -5
  26. package/dist/reown.d.cts +1 -1
  27. package/dist/reown.d.ts +1 -1
  28. package/dist/reown.mjs +4 -4
  29. package/dist/styles.css +8 -5
  30. package/dist/{types-BwaQ7jK5.d.cts → types-DELv717e.d.cts} +5 -1
  31. package/dist/{types-CgXyx46m.d.ts → types-DTBfMH0p.d.ts} +5 -1
  32. package/dist/withdraw.cjs +4 -4
  33. package/dist/withdraw.d.cts +2 -2
  34. package/dist/withdraw.d.ts +2 -2
  35. package/dist/withdraw.mjs +3 -3
  36. package/package.json +1 -1
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkWB3ZJJBHcjs = require('./chunk-WB3ZJJBH.cjs');
10
+ var _chunkPE6OK3FHcjs = require('./chunk-PE6OK3FH.cjs');
11
11
 
12
12
  // src/components/ui/Modal.tsx
13
13
 
@@ -360,14 +360,14 @@ function normalizeOrchestratorPortfolio(data) {
360
360
  const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _4 => _4.balance, 'optionalAccess', _5 => _5.unlocked]), () => ( "0"));
361
361
  const normalizedName = tokenData.tokenName.trim();
362
362
  const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
363
- const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkWB3ZJJBHcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
364
- const resolvedTokenAddress = isNativeSymbol ? _chunkWB3ZJJBHcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
363
+ const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkPE6OK3FHcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
364
+ const resolvedTokenAddress = isNativeSymbol ? _chunkPE6OK3FHcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
365
365
  if (!resolvedTokenAddress) {
366
366
  continue;
367
367
  }
368
- const registrySymbol = _chunkWB3ZJJBHcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
368
+ const registrySymbol = _chunkPE6OK3FHcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
369
369
  const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
370
- const decimals = registrySymbol !== "Token" ? _chunkWB3ZJJBHcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
370
+ const decimals = registrySymbol !== "Token" ? _chunkPE6OK3FHcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
371
371
  tokens.push({
372
372
  chainId: chainBalance.chainId,
373
373
  address: resolvedTokenAddress,
@@ -394,14 +394,14 @@ function normalizeDirectToken(token) {
394
394
  const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
395
395
  token.token,
396
396
  "address"
397
- ))), () => ( _chunkWB3ZJJBHcjs.getTokenAddress.call(void 0, symbol, chainId)));
397
+ ))), () => ( _chunkPE6OK3FHcjs.getTokenAddress.call(void 0, symbol, chainId)));
398
398
  if (!address) return null;
399
399
  const addressAsToken = address;
400
400
  const balanceUsd = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractNumber(token, "balanceUsd"), () => ( extractNumber(token, "usdValue"))), () => ( extractNumber(token, "valueUsd"))), () => ( extractNumericString(token, "balanceUsd"))), () => ( extractNumericString(token, "usdValue"))), () => ( extractNumericString(token, "valueUsd"))), () => ( 0));
401
- const registrySymbol = _chunkWB3ZJJBHcjs.getTokenSymbol.call(void 0, addressAsToken, chainId);
401
+ const registrySymbol = _chunkPE6OK3FHcjs.getTokenSymbol.call(void 0, addressAsToken, chainId);
402
402
  const resolvedSymbol = registrySymbol !== "Token" ? registrySymbol : symbol;
403
403
  const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
404
- const resolvedDecimals = registrySymbol !== "Token" ? _chunkWB3ZJJBHcjs.getTokenDecimalsByAddress.call(void 0, addressAsToken, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
404
+ const resolvedDecimals = registrySymbol !== "Token" ? _chunkPE6OK3FHcjs.getTokenDecimalsByAddress.call(void 0, addressAsToken, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
405
405
  return {
406
406
  chainId,
407
407
  address: addressAsToken,
@@ -731,7 +731,14 @@ function ConnectStep({
731
731
  "div",
732
732
  {
733
733
  className: `rs-connect-wallet-icon ${isSelected ? "rs-connect-wallet-icon--selected" : ""}`,
734
- children: rowIcon(option.kind)
734
+ children: option.icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
735
+ "img",
736
+ {
737
+ src: option.icon,
738
+ alt: option.label,
739
+ style: { width: 18, height: 18, borderRadius: 4 }
740
+ }
741
+ ) : rowIcon(option.kind)
735
742
  }
736
743
  ),
737
744
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-wallet-meta", children: [
@@ -800,6 +807,42 @@ function ConnectStep({
800
807
  ] });
801
808
  }
802
809
  const handleConnect = _nullishCoalesce(onConnect, () => ( onRequestConnect));
810
+ if (onSelectTransferCrypto) {
811
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-centered rs-connect-centered--wallets", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-wallet-list", children: [
812
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
813
+ "button",
814
+ {
815
+ type: "button",
816
+ className: "rs-connect-wallet-row rs-connect-wallet-row--action",
817
+ onClick: onSelectTransferCrypto,
818
+ children: [
819
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-wallet-icon rs-connect-wallet-icon--action", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TransferIcon, {}) }),
820
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-wallet-meta", children: [
821
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-wallet-label", children: "Transfer Crypto" }),
822
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-wallet-address", children: "Deposit via QR code" })
823
+ ] }),
824
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-wallet-indicator", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronRightIcon, {}) })
825
+ ]
826
+ }
827
+ ),
828
+ handleConnect && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
829
+ "button",
830
+ {
831
+ type: "button",
832
+ className: "rs-connect-wallet-row rs-connect-wallet-row--action",
833
+ onClick: handleConnect,
834
+ children: [
835
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-wallet-icon rs-connect-wallet-icon--action", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}) }),
836
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-wallet-meta", children: [
837
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-wallet-label", children: "Connect Wallet" }),
838
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-wallet-address", children: "Connect your wallet to deposit" })
839
+ ] }),
840
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-wallet-indicator", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronRightIcon, {}) })
841
+ ]
842
+ }
843
+ )
844
+ ] }) }) });
845
+ }
803
846
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
804
847
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-centered rs-connect-centered--minimal", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-empty", children: [
805
848
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-empty-graphic", "aria-hidden": "true", children: [
@@ -839,27 +882,16 @@ function ConnectStep({
839
882
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-empty-title", children: "No wallet connected" }),
840
883
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-connect-empty-subtitle", children: "Connect an external wallet to continue." })
841
884
  ] }) }),
842
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-footer rs-step-footer--connect-empty", children: [
843
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
844
- Button,
845
- {
846
- onClick: handleConnect,
847
- variant: "accent",
848
- fullWidth: true,
849
- disabled: !handleConnect,
850
- children: connectButtonLabel
851
- }
852
- ),
853
- onSelectTransferCrypto && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
854
- "button",
855
- {
856
- type: "button",
857
- className: "rs-connect-transfer-link",
858
- onClick: onSelectTransferCrypto,
859
- children: "Or deposit via QR code"
860
- }
861
- )
862
- ] })
885
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer rs-step-footer--connect-empty", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
886
+ Button,
887
+ {
888
+ onClick: handleConnect,
889
+ variant: "accent",
890
+ fullWidth: true,
891
+ disabled: !handleConnect,
892
+ children: connectButtonLabel
893
+ }
894
+ ) })
863
895
  ] });
864
896
  }
865
897
  ConnectStep.displayName = "ConnectStep";
@@ -1176,8 +1208,8 @@ function ProcessingStep({
1176
1208
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
1177
1209
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
1178
1210
  const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _76 => _76.data, 'optionalAccess', _77 => _77.destination, 'optionalAccess', _78 => _78.transactionHash]) || null;
1179
- const sourceExplorerUrl = _chunkWB3ZJJBHcjs.getExplorerTxUrl.call(void 0, sourceChain, txHash);
1180
- const destExplorerUrl = destinationTxHash ? _chunkWB3ZJJBHcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
1211
+ const sourceExplorerUrl = _chunkPE6OK3FHcjs.getExplorerTxUrl.call(void 0, sourceChain, txHash);
1212
+ const destExplorerUrl = destinationTxHash ? _chunkPE6OK3FHcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
1181
1213
  const truncateHash = (hash) => `${hash.slice(0, 10)}...${hash.slice(-8)}`;
1182
1214
  const formatElapsedTime = (seconds) => {
1183
1215
  if (seconds < 60) return `${seconds} second${seconds !== 1 ? "s" : ""}`;
@@ -1185,8 +1217,8 @@ function ProcessingStep({
1185
1217
  const secs = seconds % 60;
1186
1218
  return `${mins}m ${secs}s`;
1187
1219
  };
1188
- const targetSymbol = _chunkWB3ZJJBHcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1189
- const sourceDecimals = _chunkWB3ZJJBHcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1220
+ const targetSymbol = _chunkPE6OK3FHcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1221
+ const sourceDecimals = _chunkPE6OK3FHcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1190
1222
  const formattedReceivedAmount = (() => {
1191
1223
  try {
1192
1224
  const raw = _viem.formatUnits.call(void 0, BigInt(amount), sourceDecimals);
@@ -1257,15 +1289,15 @@ function ProcessingStep({
1257
1289
  className: "rs-card-value",
1258
1290
  style: { display: "flex", alignItems: "center", gap: 6 },
1259
1291
  children: [
1260
- _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, sourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1292
+ _chunkPE6OK3FHcjs.getChainIcon.call(void 0, sourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1261
1293
  "img",
1262
1294
  {
1263
- src: _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, sourceChain),
1295
+ src: _chunkPE6OK3FHcjs.getChainIcon.call(void 0, sourceChain),
1264
1296
  alt: "",
1265
1297
  style: { width: 14, height: 14, borderRadius: "50%" }
1266
1298
  }
1267
1299
  ),
1268
- _chunkWB3ZJJBHcjs.getChainName.call(void 0, sourceChain)
1300
+ _chunkPE6OK3FHcjs.getChainName.call(void 0, sourceChain)
1269
1301
  ]
1270
1302
  }
1271
1303
  )
@@ -1278,15 +1310,15 @@ function ProcessingStep({
1278
1310
  className: "rs-card-value",
1279
1311
  style: { display: "flex", alignItems: "center", gap: 6 },
1280
1312
  children: [
1281
- _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1313
+ _chunkPE6OK3FHcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1282
1314
  "img",
1283
1315
  {
1284
- src: _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, targetChain),
1316
+ src: _chunkPE6OK3FHcjs.getChainIcon.call(void 0, targetChain),
1285
1317
  alt: "",
1286
1318
  style: { width: 14, height: 14, borderRadius: "50%" }
1287
1319
  }
1288
1320
  ),
1289
- _chunkWB3ZJJBHcjs.getChainName.call(void 0, targetChain)
1321
+ _chunkPE6OK3FHcjs.getChainName.call(void 0, targetChain)
1290
1322
  ]
1291
1323
  }
1292
1324
  )
@@ -1408,7 +1440,7 @@ function ProcessingStep({
1408
1440
  {
1409
1441
  className: `rs-step-description ${isError ? "rs-text-error" : "rs-text-secondary"}`,
1410
1442
  children: [
1411
- state.type === "processing" && (_optionalChain([lastEvent, 'optionalAccess', _79 => _79.type]) === "deposit-received" ? "Transfer received. Preparing bridge..." : _optionalChain([lastEvent, 'optionalAccess', _80 => _80.type]) === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${_chunkWB3ZJJBHcjs.getChainName.call(void 0, targetChain)}.`),
1443
+ state.type === "processing" && (_optionalChain([lastEvent, 'optionalAccess', _79 => _79.type]) === "deposit-received" ? "Transfer received. Preparing bridge..." : _optionalChain([lastEvent, 'optionalAccess', _80 => _80.type]) === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${_chunkPE6OK3FHcjs.getChainName.call(void 0, targetChain)}.`),
1412
1444
  state.type === "failed" && state.message,
1413
1445
  state.type === "error" && state.message
1414
1446
  ]
@@ -1464,15 +1496,15 @@ function ProcessingStep({
1464
1496
  className: "rs-card-value",
1465
1497
  style: { display: "flex", alignItems: "center", gap: 8 },
1466
1498
  children: [
1467
- _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, sourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1499
+ _chunkPE6OK3FHcjs.getChainIcon.call(void 0, sourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1468
1500
  "img",
1469
1501
  {
1470
- src: _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, sourceChain),
1502
+ src: _chunkPE6OK3FHcjs.getChainIcon.call(void 0, sourceChain),
1471
1503
  alt: "",
1472
1504
  style: { width: 16, height: 16, borderRadius: "50%" }
1473
1505
  }
1474
1506
  ),
1475
- _chunkWB3ZJJBHcjs.getChainName.call(void 0, sourceChain)
1507
+ _chunkPE6OK3FHcjs.getChainName.call(void 0, sourceChain)
1476
1508
  ]
1477
1509
  }
1478
1510
  )
@@ -1485,15 +1517,15 @@ function ProcessingStep({
1485
1517
  className: "rs-card-value",
1486
1518
  style: { display: "flex", alignItems: "center", gap: 8 },
1487
1519
  children: [
1488
- _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1520
+ _chunkPE6OK3FHcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1489
1521
  "img",
1490
1522
  {
1491
- src: _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, targetChain),
1523
+ src: _chunkPE6OK3FHcjs.getChainIcon.call(void 0, targetChain),
1492
1524
  alt: "",
1493
1525
  style: { width: 16, height: 16, borderRadius: "50%" }
1494
1526
  }
1495
1527
  ),
1496
- _chunkWB3ZJJBHcjs.getChainName.call(void 0, targetChain)
1528
+ _chunkPE6OK3FHcjs.getChainName.call(void 0, targetChain)
1497
1529
  ]
1498
1530
  }
1499
1531
  )
@@ -1546,7 +1578,7 @@ var clientCache = /* @__PURE__ */ new Map();
1546
1578
  function getPublicClient(chainId) {
1547
1579
  let client = clientCache.get(chainId);
1548
1580
  if (!client) {
1549
- const chain = _chunkWB3ZJJBHcjs.CHAIN_BY_ID[chainId];
1581
+ const chain = _chunkPE6OK3FHcjs.CHAIN_BY_ID[chainId];
1550
1582
  client = _viem.createPublicClient.call(void 0, {
1551
1583
  chain,
1552
1584
  transport: _viem.http.call(void 0, )