@rhinestone/deposit-modal 0.1.49 → 0.1.51

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 (32) hide show
  1. package/README.md +3 -0
  2. package/dist/{DepositModalReown-PWD3WK7I.mjs → DepositModalReown-BMHCHJ2P.mjs} +18 -7
  3. package/dist/{DepositModalReown-AVQEEWEQ.cjs → DepositModalReown-KT5MMNTJ.cjs} +21 -10
  4. package/dist/{WithdrawModalReown-ZSR3RP44.cjs → WithdrawModalReown-DULPL255.cjs} +6 -6
  5. package/dist/{WithdrawModalReown-FODH7PY5.mjs → WithdrawModalReown-V5HYDMO2.mjs} +3 -3
  6. package/dist/{chunk-KOYHFHYW.cjs → chunk-2AS2NAJ2.cjs} +149 -119
  7. package/dist/{chunk-FKNYONM2.mjs → chunk-BNSX25TA.mjs} +5 -4
  8. package/dist/{chunk-PW55TOFK.cjs → chunk-DKYHVAHN.cjs} +45 -36
  9. package/dist/{chunk-HCZNF6CR.mjs → chunk-G2GXEC7C.mjs} +14 -5
  10. package/dist/{chunk-7HJ7IBRH.cjs → chunk-NU3ES4JY.cjs} +5 -4
  11. package/dist/{chunk-QLLL6ARN.mjs → chunk-SKL3JJP6.mjs} +42 -12
  12. package/dist/{chunk-JGB6XSYS.mjs → chunk-UPA7N6GY.mjs} +11 -12
  13. package/dist/{chunk-XLRQCIYD.cjs → chunk-XAGXQV4K.cjs} +11 -12
  14. package/dist/deposit.cjs +3 -3
  15. package/dist/deposit.d.cts +2 -2
  16. package/dist/deposit.d.ts +2 -2
  17. package/dist/deposit.mjs +2 -2
  18. package/dist/index.cjs +4 -4
  19. package/dist/index.d.cts +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.mjs +3 -3
  22. package/dist/reown.cjs +4 -4
  23. package/dist/reown.d.cts +1 -1
  24. package/dist/reown.d.ts +1 -1
  25. package/dist/reown.mjs +3 -3
  26. package/dist/{types-B0FLVdXb.d.ts → types-D1nvo2dK.d.ts} +11 -0
  27. package/dist/{types-dY70pF2y.d.cts → types-DgiqazTb.d.cts} +11 -0
  28. package/dist/withdraw.cjs +3 -3
  29. package/dist/withdraw.d.cts +2 -2
  30. package/dist/withdraw.d.ts +2 -2
  31. package/dist/withdraw.mjs +2 -2
  32. package/package.json +1 -1
@@ -1401,6 +1401,7 @@ function ProcessingStep({
1401
1401
  directTransfer,
1402
1402
  flowLabel = "deposit",
1403
1403
  debug,
1404
+ targetToken,
1404
1405
  onClose,
1405
1406
  onNewDeposit,
1406
1407
  onDepositComplete,
@@ -1419,10 +1420,10 @@ function ProcessingStep({
1419
1420
  txHash,
1420
1421
  flowLabel
1421
1422
  });
1422
- onDepositComplete?.(txHash);
1423
+ onDepositComplete?.(txHash, void 0, { amount, sourceChain, sourceToken, targetChain, targetToken });
1423
1424
  return;
1424
1425
  }
1425
- }, [debug, directTransfer, flowLabel, txHash, onDepositComplete]);
1426
+ }, [debug, directTransfer, flowLabel, txHash, onDepositComplete, amount, sourceChain, sourceToken, targetChain, targetToken]);
1426
1427
  useEffect2(() => {
1427
1428
  if (directTransfer) return;
1428
1429
  startTimeRef.current = Date.now();
@@ -1479,7 +1480,7 @@ function ProcessingStep({
1479
1480
  destinationTxHash: destinationTxHash2,
1480
1481
  event: eventForCurrentTx.type
1481
1482
  });
1482
- onDepositComplete?.(txHash, destinationTxHash2);
1483
+ onDepositComplete?.(txHash, destinationTxHash2, { amount, sourceChain, sourceToken, targetChain, targetToken });
1483
1484
  return;
1484
1485
  }
1485
1486
  if (!waitForFinalTx && eventForCurrentTx?.type === "bridge-started") {
@@ -1488,7 +1489,7 @@ function ProcessingStep({
1488
1489
  txHash,
1489
1490
  event: eventForCurrentTx.type
1490
1491
  });
1491
- onDepositComplete?.(txHash);
1492
+ onDepositComplete?.(txHash, void 0, { amount, sourceChain, sourceToken, targetChain, targetToken });
1492
1493
  return;
1493
1494
  }
1494
1495
  if (eventForCurrentTx?.type === "bridge-failed") {
@@ -20,7 +20,7 @@
20
20
 
21
21
 
22
22
 
23
- var _chunk7HJ7IBRHcjs = require('./chunk-7HJ7IBRH.cjs');
23
+ var _chunkNU3ES4JYcjs = require('./chunk-NU3ES4JY.cjs');
24
24
 
25
25
 
26
26
 
@@ -141,7 +141,7 @@ function WithdrawFormStep({
141
141
  setIsSwitching(true);
142
142
  switchChain(asset.chainId).catch((err) => {
143
143
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
144
- setError(_chunk7HJ7IBRHcjs.formatUserError.call(void 0, raw));
144
+ setError(_chunkNU3ES4JYcjs.formatUserError.call(void 0, raw));
145
145
  }).finally(() => {
146
146
  setIsSwitching(false);
147
147
  });
@@ -161,7 +161,7 @@ function WithdrawFormStep({
161
161
  return;
162
162
  }
163
163
  try {
164
- const bal = _chunk7HJ7IBRHcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
164
+ const bal = _chunkNU3ES4JYcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
165
165
  address: asset.token,
166
166
  abi: _viem.erc20Abi,
167
167
  functionName: "balanceOf",
@@ -264,7 +264,7 @@ function WithdrawFormStep({
264
264
  await onSubmit(recipient, amount);
265
265
  } catch (err) {
266
266
  const raw = err instanceof Error ? err.message : "Withdrawal failed";
267
- setError(_chunk7HJ7IBRHcjs.formatUserError.call(void 0, raw));
267
+ setError(_chunkNU3ES4JYcjs.formatUserError.call(void 0, raw));
268
268
  } finally {
269
269
  setIsSubmitting(false);
270
270
  }
@@ -272,11 +272,11 @@ function WithdrawFormStep({
272
272
  if (isBalanceLoading) {
273
273
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
274
274
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-body rs-withdraw-loading", children: [
275
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.Spinner, { className: "rs-spinner--lg" }),
275
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.Spinner, { className: "rs-spinner--lg" }),
276
276
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
277
277
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${_chunkNELAYNA3cjs.getChainName.call(void 0, asset.chainId)} to continue.` : "Please wait before withdrawing." })
278
278
  ] }),
279
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.PoweredBy, {})
279
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.PoweredBy, {})
280
280
  ] });
281
281
  }
282
282
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
@@ -372,7 +372,7 @@ function WithdrawFormStep({
372
372
  ] })
373
373
  ] }),
374
374
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
375
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunk7HJ7IBRHcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
375
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkNU3ES4JYcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
376
376
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
377
377
  formattedBalance,
378
378
  " ",
@@ -565,7 +565,7 @@ function WithdrawFormStep({
565
565
  ] })
566
566
  ] }),
567
567
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
568
- _chunk7HJ7IBRHcjs.Button,
568
+ _chunkNU3ES4JYcjs.Button,
569
569
  {
570
570
  onClick: handleWithdraw,
571
571
  fullWidth: true,
@@ -574,7 +574,7 @@ function WithdrawFormStep({
574
574
  children: isBusy ? "Preparing..." : "Withdraw"
575
575
  }
576
576
  ) }),
577
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.PoweredBy, {})
577
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.PoweredBy, {})
578
578
  ] });
579
579
  }
580
580
  WithdrawFormStep.displayName = "WithdrawFormStep";
@@ -905,13 +905,13 @@ function WithdrawFlow({
905
905
  const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = _react.useState.call(void 0, false);
906
906
  const logFlow = _react.useCallback.call(void 0,
907
907
  (message, data) => {
908
- _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
908
+ _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
909
909
  },
910
910
  [debug]
911
911
  );
912
912
  const logFlowError = _react.useCallback.call(void 0,
913
913
  (message, error, data) => {
914
- _chunk7HJ7IBRHcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
914
+ _chunkNU3ES4JYcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
915
915
  },
916
916
  [debug]
917
917
  );
@@ -970,14 +970,14 @@ function WithdrawFlow({
970
970
  return {
971
971
  ownerAddress: dappAddress,
972
972
  walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
973
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, sourceChain))),
973
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, sourceChain))),
974
974
  switchChain: dappSwitchChain
975
975
  };
976
976
  }
977
977
  return {
978
978
  ownerAddress: dappWalletClient.account.address,
979
979
  walletClient: dappWalletClient,
980
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, sourceChain))),
980
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, sourceChain))),
981
981
  switchChain: dappSwitchChain
982
982
  };
983
983
  }
@@ -988,7 +988,7 @@ function WithdrawFlow({
988
988
  return {
989
989
  ownerAddress: dappWalletClient.account.address,
990
990
  walletClient: dappWalletClient,
991
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, sourceChain))),
991
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, sourceChain))),
992
992
  switchChain: dappSwitchChain
993
993
  };
994
994
  }
@@ -1018,7 +1018,7 @@ function WithdrawFlow({
1018
1018
  const symbol = _chunkNELAYNA3cjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
1019
1019
  const decimals = _chunkNELAYNA3cjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1020
1020
  return {
1021
- id: _chunk7HJ7IBRHcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1021
+ id: _chunkNU3ES4JYcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1022
1022
  chainId: sourceChain,
1023
1023
  token: sourceToken,
1024
1024
  symbol,
@@ -1068,15 +1068,15 @@ function WithdrawFlow({
1068
1068
  [logFlowError, onError]
1069
1069
  );
1070
1070
  const resolveSessionOwner = _react.useCallback.call(void 0, async (eoaAddress) => {
1071
- const localOwner = _chunk7HJ7IBRHcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
1071
+ const localOwner = _chunkNU3ES4JYcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
1072
1072
  if (localOwner) {
1073
1073
  return {
1074
- account: _chunk7HJ7IBRHcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
1074
+ account: _chunkNU3ES4JYcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
1075
1075
  address: localOwner.address
1076
1076
  };
1077
1077
  }
1078
- const created = _chunk7HJ7IBRHcjs.createSessionOwnerKey.call(void 0, );
1079
- _chunk7HJ7IBRHcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
1078
+ const created = _chunkNU3ES4JYcjs.createSessionOwnerKey.call(void 0, );
1079
+ _chunkNU3ES4JYcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
1080
1080
  return {
1081
1081
  account: created.account,
1082
1082
  address: created.address
@@ -1106,7 +1106,7 @@ function WithdrawFlow({
1106
1106
  const setup = await service.setupAccount({
1107
1107
  ownerAddress: ownerAddress2,
1108
1108
  sessionOwnerAddress: sessionOwner.address,
1109
- targetChain: _chunk7HJ7IBRHcjs.toEvmCaip2.call(void 0, targetChain),
1109
+ targetChain: _chunkNU3ES4JYcjs.toEvmCaip2.call(void 0, targetChain),
1110
1110
  targetToken,
1111
1111
  signerAddress,
1112
1112
  sessionChainIds,
@@ -1133,7 +1133,7 @@ function WithdrawFlow({
1133
1133
  primaryType: typedData.primaryType,
1134
1134
  message: typedData.message
1135
1135
  });
1136
- const sessionDetails = _chunk7HJ7IBRHcjs.buildSessionDetails.call(void 0,
1136
+ const sessionDetails = _chunkNU3ES4JYcjs.buildSessionDetails.call(void 0,
1137
1137
  setup.sessionDetailsUnsigned,
1138
1138
  signature
1139
1139
  );
@@ -1147,7 +1147,7 @@ function WithdrawFlow({
1147
1147
  eoaAddress: ownerAddress2,
1148
1148
  sessionOwner: sessionOwner.address,
1149
1149
  target: {
1150
- chain: _chunk7HJ7IBRHcjs.toEvmCaip2.call(void 0, targetChain),
1150
+ chain: _chunkNU3ES4JYcjs.toEvmCaip2.call(void 0, targetChain),
1151
1151
  token: targetToken,
1152
1152
  recipient
1153
1153
  }
@@ -1156,7 +1156,7 @@ function WithdrawFlow({
1156
1156
  }
1157
1157
  handleConnected(ownerAddress2, smartAccount);
1158
1158
  const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
1159
- const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _26 => _26.publicClient]), () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, sourceChain)));
1159
+ const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _26 => _26.publicClient]), () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, sourceChain)));
1160
1160
  let result;
1161
1161
  if (onSignTransaction) {
1162
1162
  const transferData = isSourceNative ? { to: smartAccount, value: amountUnits, data: "0x" } : {
@@ -1179,7 +1179,7 @@ function WithdrawFlow({
1179
1179
  const { signature } = await onSignTransaction(request);
1180
1180
  const relayResult = await service.relayWithdraw({
1181
1181
  smartAccount,
1182
- chainId: _chunk7HJ7IBRHcjs.toEvmCaip2.call(void 0, sourceChain),
1182
+ chainId: _chunkNU3ES4JYcjs.toEvmCaip2.call(void 0, sourceChain),
1183
1183
  safeAddress,
1184
1184
  safeTransaction: request.typedData.message,
1185
1185
  signature
@@ -1237,7 +1237,7 @@ function WithdrawFlow({
1237
1237
  targetChain,
1238
1238
  targetToken
1239
1239
  });
1240
- handleError(_chunk7HJ7IBRHcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1240
+ handleError(_chunkNU3ES4JYcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1241
1241
  throw err;
1242
1242
  } finally {
1243
1243
  setIsSubmitting(false);
@@ -1266,9 +1266,17 @@ function WithdrawFlow({
1266
1266
  ]
1267
1267
  );
1268
1268
  const handleWithdrawComplete = _react.useCallback.call(void 0,
1269
- (txHash, destinationTxHash) => {
1270
- logFlow("withdraw:complete", { txHash, destinationTxHash });
1271
- _optionalChain([onWithdrawComplete, 'optionalCall', _28 => _28({ txHash, destinationTxHash })]);
1269
+ (txHash, destinationTxHash, context) => {
1270
+ logFlow("withdraw:complete", { txHash, destinationTxHash, ...context });
1271
+ _optionalChain([onWithdrawComplete, 'optionalCall', _28 => _28({
1272
+ txHash,
1273
+ destinationTxHash,
1274
+ amount: context.amount,
1275
+ sourceChain: context.sourceChain,
1276
+ sourceToken: context.sourceToken,
1277
+ targetChain: context.targetChain,
1278
+ targetToken: context.targetToken
1279
+ })]);
1272
1280
  },
1273
1281
  [logFlow, onWithdrawComplete]
1274
1282
  );
@@ -1347,7 +1355,7 @@ function WithdrawFlow({
1347
1355
  }, [walletOptions, ownerAddress, _optionalChain([reownWallet, 'optionalAccess', _37 => _37.icon])]);
1348
1356
  if (showConnectStep) {
1349
1357
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1350
- _chunk7HJ7IBRHcjs.ConnectStep,
1358
+ _chunkNU3ES4JYcjs.ConnectStep,
1351
1359
  {
1352
1360
  walletOptions,
1353
1361
  selectedWalletId: selectedWalletIdEffective,
@@ -1370,7 +1378,7 @@ function WithdrawFlow({
1370
1378
  const resolvedOwnerAddress = signerContext.ownerAddress;
1371
1379
  const resolvedConnectedAddress = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _38 => _38.walletClient, 'optionalAccess', _39 => _39.account, 'optionalAccess', _40 => _40.address]), () => ( _optionalChain([reownWallet, 'optionalAccess', _41 => _41.address]))), () => ( _optionalChain([dappWalletClient, 'optionalAccess', _42 => _42.account, 'optionalAccess', _43 => _43.address]))), () => ( resolvedOwnerAddress));
1372
1380
  const resolvedDefaultRecipient = _nullishCoalesce(defaultRecipient, () => ( resolvedConnectedAddress));
1373
- const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, sourceChain)));
1381
+ const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, sourceChain)));
1374
1382
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
1375
1383
  step.type === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1376
1384
  WithdrawFormStep,
@@ -1397,13 +1405,14 @@ function WithdrawFlow({
1397
1405
  }
1398
1406
  ),
1399
1407
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1400
- _chunk7HJ7IBRHcjs.ProcessingStep,
1408
+ _chunkNU3ES4JYcjs.ProcessingStep,
1401
1409
  {
1402
1410
  smartAccount: step.smartAccount,
1403
1411
  txHash: step.txHash,
1404
1412
  sourceChain: step.sourceChain,
1405
1413
  sourceToken: step.sourceToken,
1406
1414
  targetChain,
1415
+ targetToken,
1407
1416
  amount: step.amount,
1408
1417
  waitForFinalTx,
1409
1418
  service,
@@ -1422,7 +1431,7 @@ function WithdrawFlow({
1422
1431
  // src/WithdrawModal.tsx
1423
1432
 
1424
1433
  var ReownWithdrawInner = _react.lazy.call(void 0,
1425
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-ZSR3RP44.cjs"))).then((m) => ({
1434
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-DULPL255.cjs"))).then((m) => ({
1426
1435
  default: m.WithdrawModalReown
1427
1436
  }))
1428
1437
  );
@@ -1478,12 +1487,12 @@ function WithdrawModalInner({
1478
1487
  const targetChain = _chunkNELAYNA3cjs.getChainId.call(void 0, targetChainProp);
1479
1488
  const sourceChain = _chunkNELAYNA3cjs.getChainId.call(void 0, sourceChainProp);
1480
1489
  const service = _react.useMemo.call(void 0,
1481
- () => _chunk7HJ7IBRHcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1490
+ () => _chunkNU3ES4JYcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1482
1491
  [backendUrl, debug]
1483
1492
  );
1484
1493
  _react.useEffect.call(void 0, () => {
1485
1494
  if (isOpen && modalRef.current) {
1486
- _chunk7HJ7IBRHcjs.applyTheme.call(void 0, modalRef.current, theme);
1495
+ _chunkNU3ES4JYcjs.applyTheme.call(void 0, modalRef.current, theme);
1487
1496
  }
1488
1497
  }, [isOpen, theme]);
1489
1498
  const hasCalledReady = _react.useRef.call(void 0, false);
@@ -1519,7 +1528,7 @@ function WithdrawModalInner({
1519
1528
  const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _52 => _52.title]), () => ( "Withdraw"));
1520
1529
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 3 && backHandlerRef.current;
1521
1530
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1522
- _chunk7HJ7IBRHcjs.Modal,
1531
+ _chunkNU3ES4JYcjs.Modal,
1523
1532
  {
1524
1533
  isOpen,
1525
1534
  onClose,
@@ -1577,7 +1586,7 @@ function WithdrawModalInner({
1577
1586
  ] }),
1578
1587
  balance && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-balance", children: [
1579
1588
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-label", children: balance.title }),
1580
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunk7HJ7IBRHcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
1589
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkNU3ES4JYcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
1581
1590
  ] })
1582
1591
  ] }),
1583
1592
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -20,7 +20,7 @@ import {
20
20
  loadSessionOwnerFromStorage,
21
21
  saveSessionOwnerToStorage,
22
22
  toEvmCaip2
23
- } from "./chunk-FKNYONM2.mjs";
23
+ } from "./chunk-BNSX25TA.mjs";
24
24
  import {
25
25
  DEFAULT_BACKEND_URL,
26
26
  DEFAULT_SIGNER_ADDRESS,
@@ -1266,9 +1266,17 @@ function WithdrawFlow({
1266
1266
  ]
1267
1267
  );
1268
1268
  const handleWithdrawComplete = useCallback2(
1269
- (txHash, destinationTxHash) => {
1270
- logFlow("withdraw:complete", { txHash, destinationTxHash });
1271
- onWithdrawComplete?.({ txHash, destinationTxHash });
1269
+ (txHash, destinationTxHash, context) => {
1270
+ logFlow("withdraw:complete", { txHash, destinationTxHash, ...context });
1271
+ onWithdrawComplete?.({
1272
+ txHash,
1273
+ destinationTxHash,
1274
+ amount: context.amount,
1275
+ sourceChain: context.sourceChain,
1276
+ sourceToken: context.sourceToken,
1277
+ targetChain: context.targetChain,
1278
+ targetToken: context.targetToken
1279
+ });
1272
1280
  },
1273
1281
  [logFlow, onWithdrawComplete]
1274
1282
  );
@@ -1404,6 +1412,7 @@ function WithdrawFlow({
1404
1412
  sourceChain: step.sourceChain,
1405
1413
  sourceToken: step.sourceToken,
1406
1414
  targetChain,
1415
+ targetToken,
1407
1416
  amount: step.amount,
1408
1417
  waitForFinalTx,
1409
1418
  service,
@@ -1422,7 +1431,7 @@ function WithdrawFlow({
1422
1431
  // src/WithdrawModal.tsx
1423
1432
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1424
1433
  var ReownWithdrawInner = lazy(
1425
- () => import("./WithdrawModalReown-FODH7PY5.mjs").then((m) => ({
1434
+ () => import("./WithdrawModalReown-V5HYDMO2.mjs").then((m) => ({
1426
1435
  default: m.WithdrawModalReown
1427
1436
  }))
1428
1437
  );
@@ -1401,6 +1401,7 @@ function ProcessingStep({
1401
1401
  directTransfer,
1402
1402
  flowLabel = "deposit",
1403
1403
  debug,
1404
+ targetToken,
1404
1405
  onClose,
1405
1406
  onNewDeposit,
1406
1407
  onDepositComplete,
@@ -1419,10 +1420,10 @@ function ProcessingStep({
1419
1420
  txHash,
1420
1421
  flowLabel
1421
1422
  });
1422
- _optionalChain([onDepositComplete, 'optionalCall', _84 => _84(txHash)]);
1423
+ _optionalChain([onDepositComplete, 'optionalCall', _84 => _84(txHash, void 0, { amount, sourceChain, sourceToken, targetChain, targetToken })]);
1423
1424
  return;
1424
1425
  }
1425
- }, [debug, directTransfer, flowLabel, txHash, onDepositComplete]);
1426
+ }, [debug, directTransfer, flowLabel, txHash, onDepositComplete, amount, sourceChain, sourceToken, targetChain, targetToken]);
1426
1427
  _react.useEffect.call(void 0, () => {
1427
1428
  if (directTransfer) return;
1428
1429
  startTimeRef.current = Date.now();
@@ -1479,7 +1480,7 @@ function ProcessingStep({
1479
1480
  destinationTxHash: destinationTxHash2,
1480
1481
  event: eventForCurrentTx.type
1481
1482
  });
1482
- _optionalChain([onDepositComplete, 'optionalCall', _90 => _90(txHash, destinationTxHash2)]);
1483
+ _optionalChain([onDepositComplete, 'optionalCall', _90 => _90(txHash, destinationTxHash2, { amount, sourceChain, sourceToken, targetChain, targetToken })]);
1483
1484
  return;
1484
1485
  }
1485
1486
  if (!waitForFinalTx && _optionalChain([eventForCurrentTx, 'optionalAccess', _91 => _91.type]) === "bridge-started") {
@@ -1488,7 +1489,7 @@ function ProcessingStep({
1488
1489
  txHash,
1489
1490
  event: eventForCurrentTx.type
1490
1491
  });
1491
- _optionalChain([onDepositComplete, 'optionalCall', _92 => _92(txHash)]);
1492
+ _optionalChain([onDepositComplete, 'optionalCall', _92 => _92(txHash, void 0, { amount, sourceChain, sourceToken, targetChain, targetToken })]);
1492
1493
  return;
1493
1494
  }
1494
1495
  if (_optionalChain([eventForCurrentTx, 'optionalAccess', _93 => _93.type]) === "bridge-failed") {
@@ -25,7 +25,7 @@ import {
25
25
  toEvmCaip2,
26
26
  tokenFormatter,
27
27
  txRefsMatch
28
- } from "./chunk-FKNYONM2.mjs";
28
+ } from "./chunk-BNSX25TA.mjs";
29
29
  import {
30
30
  DEFAULT_BACKEND_URL,
31
31
  DEFAULT_SIGNER_ADDRESS,
@@ -84,6 +84,7 @@ function SetupStep({
84
84
  sessionChainIds,
85
85
  recipient,
86
86
  forceRegister,
87
+ enableSolana = true,
87
88
  service,
88
89
  onSetupComplete,
89
90
  onError,
@@ -114,7 +115,10 @@ function SetupStep({
114
115
  if (!setup.needsRegistration) {
115
116
  setState({ type: "ready", smartAccount });
116
117
  onConnected?.(address, smartAccount);
117
- onSetupComplete(smartAccount, setup.solanaDepositAddress);
118
+ onSetupComplete(
119
+ smartAccount,
120
+ enableSolana ? setup.solanaDepositAddress : void 0
121
+ );
118
122
  return;
119
123
  }
120
124
  setState({ type: "signing-session" });
@@ -150,7 +154,10 @@ function SetupStep({
150
154
  });
151
155
  setState({ type: "ready", smartAccount });
152
156
  onConnected?.(address, smartAccount);
153
- onSetupComplete(smartAccount, registerResult.solanaDepositAddress);
157
+ onSetupComplete(
158
+ smartAccount,
159
+ enableSolana ? registerResult.solanaDepositAddress : void 0
160
+ );
154
161
  } catch (error) {
155
162
  const message = error instanceof Error ? error.message : "Setup failed";
156
163
  setState({ type: "error", message });
@@ -165,6 +172,7 @@ function SetupStep({
165
172
  sessionChainIds,
166
173
  recipient,
167
174
  forceRegister,
175
+ enableSolana,
168
176
  service,
169
177
  onSetupComplete,
170
178
  onError,
@@ -2535,6 +2543,7 @@ function DepositFlow({
2535
2543
  sessionChainIds,
2536
2544
  forceRegister = false,
2537
2545
  waitForFinalTx = true,
2546
+ enableSolana = true,
2538
2547
  reownWallet,
2539
2548
  onConnect,
2540
2549
  onDisconnect,
@@ -2610,7 +2619,7 @@ function DepositFlow({
2610
2619
  });
2611
2620
  seen.add(id);
2612
2621
  }
2613
- if (reownWallet?.isConnected && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
2622
+ if (enableSolana && reownWallet?.isConnected && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
2614
2623
  const id = reownWallet.caipAddress ?? `solana:${reownWallet.solanaAddress}`;
2615
2624
  if (!seen.has(id)) {
2616
2625
  options.push({
@@ -2644,6 +2653,7 @@ function DepositFlow({
2644
2653
  reownWallet?.walletClient,
2645
2654
  reownWallet?.publicClient,
2646
2655
  reownWallet?.icon,
2656
+ enableSolana,
2647
2657
  reownWallet?.isSolana,
2648
2658
  reownWallet?.solanaAddress,
2649
2659
  reownWallet?.caipAddress
@@ -2651,7 +2661,7 @@ function DepositFlow({
2651
2661
  const canAutoLock = dappWalletClient?.account && dappAddress && !reownWallet;
2652
2662
  const hasWalletOptions = walletOptions.length > 0;
2653
2663
  const hasReownSession = Boolean(
2654
- reownWallet?.isConnected || reownWallet?.address
2664
+ enableSolana ? reownWallet?.isConnected || reownWallet?.address : reownWallet?.address
2655
2665
  );
2656
2666
  const showConnectStep = flowMode === null && !canAutoLock && !isConnectSelectionConfirmed;
2657
2667
  const walletSelectionKey = useMemo7(() => {
@@ -3100,9 +3110,9 @@ function DepositFlow({
3100
3110
  [onDepositSubmitted]
3101
3111
  );
3102
3112
  const handleDepositComplete = useCallback3(
3103
- (txHash, destinationTxHash) => {
3104
- logFlow("deposit:complete", { txHash, destinationTxHash });
3105
- onDepositComplete?.({ txHash, destinationTxHash });
3113
+ (txHash, destinationTxHash, context) => {
3114
+ logFlow("deposit:complete", { txHash, destinationTxHash, ...context });
3115
+ onDepositComplete?.({ txHash, destinationTxHash, ...context });
3106
3116
  },
3107
3117
  [logFlow, onDepositComplete]
3108
3118
  );
@@ -3153,6 +3163,17 @@ function DepositFlow({
3153
3163
  setFlowMode(null);
3154
3164
  }
3155
3165
  }, [showConnectStep, isConnectSelectionConfirmed, flowMode, signerContext]);
3166
+ useEffect9(() => {
3167
+ if (enableSolana || flowMode !== "solana-wallet") {
3168
+ return;
3169
+ }
3170
+ setFlowMode(null);
3171
+ setIsConnectSelectionConfirmed(false);
3172
+ setSelectedWalletId(null);
3173
+ if (step.type !== "processing") {
3174
+ setStep({ type: "setup" });
3175
+ }
3176
+ }, [enableSolana, flowMode, step.type]);
3156
3177
  useEffect9(() => {
3157
3178
  if (hasNavigatedBackRef.current || isConnectSelectionConfirmed || flowMode) {
3158
3179
  return;
@@ -3162,7 +3183,7 @@ function DepositFlow({
3162
3183
  if (walletId) {
3163
3184
  const selectedOption = walletOptions.find((o) => o.id === walletId);
3164
3185
  setSelectedWalletId(walletId);
3165
- if (selectedOption?.kind === "solana") {
3186
+ if (enableSolana && selectedOption?.kind === "solana") {
3166
3187
  handleSelectSolanaWallet();
3167
3188
  } else {
3168
3189
  handleSelectProvider();
@@ -3178,6 +3199,7 @@ function DepositFlow({
3178
3199
  }, [
3179
3200
  hasWalletOptions,
3180
3201
  hasReownSession,
3202
+ enableSolana,
3181
3203
  isConnectSelectionConfirmed,
3182
3204
  flowMode,
3183
3205
  selectedWalletIdEffective,
@@ -3209,7 +3231,7 @@ function DepositFlow({
3209
3231
  const selectedOption = walletOptions.find(
3210
3232
  (o) => o.id === selectedWalletIdEffective
3211
3233
  );
3212
- if (selectedOption?.kind === "solana") {
3234
+ if (enableSolana && selectedOption?.kind === "solana") {
3213
3235
  handleSelectSolanaWallet();
3214
3236
  } else {
3215
3237
  handleSelectProvider();
@@ -3233,6 +3255,7 @@ function DepositFlow({
3233
3255
  sessionChainIds,
3234
3256
  recipient,
3235
3257
  forceRegister,
3258
+ enableSolana,
3236
3259
  service,
3237
3260
  onSetupComplete: handleSetupComplete,
3238
3261
  onConnected: handleConnected,
@@ -3243,7 +3266,7 @@ function DepositFlow({
3243
3266
  DepositAddressStep,
3244
3267
  {
3245
3268
  smartAccount: step.smartAccount,
3246
- solanaDepositAddress: step.solanaDepositAddress,
3269
+ solanaDepositAddress: enableSolana ? step.solanaDepositAddress : void 0,
3247
3270
  service,
3248
3271
  onDepositDetected: handleDepositAddressDetected,
3249
3272
  onError: handleError
@@ -3257,6 +3280,7 @@ function DepositFlow({
3257
3280
  sourceChain: step.sourceChain,
3258
3281
  sourceToken: step.sourceToken,
3259
3282
  targetChain,
3283
+ targetToken,
3260
3284
  amount: step.amount,
3261
3285
  sourceSymbol: step.sourceSymbol,
3262
3286
  sourceDecimals: step.sourceDecimals,
@@ -3288,6 +3312,7 @@ function DepositFlow({
3288
3312
  sessionChainIds,
3289
3313
  recipient,
3290
3314
  forceRegister,
3315
+ enableSolana,
3291
3316
  service,
3292
3317
  onSetupComplete: handleSetupComplete,
3293
3318
  onConnected: handleConnected,
@@ -3377,6 +3402,7 @@ function DepositFlow({
3377
3402
  sourceChain: step.sourceChain,
3378
3403
  sourceToken: step.sourceToken,
3379
3404
  targetChain,
3405
+ targetToken,
3380
3406
  amount: step.amount,
3381
3407
  sourceSymbol: step.sourceSymbol,
3382
3408
  sourceDecimals: step.sourceDecimals,
@@ -3416,6 +3442,7 @@ function DepositFlow({
3416
3442
  sessionChainIds,
3417
3443
  recipient,
3418
3444
  forceRegister,
3445
+ enableSolana,
3419
3446
  service,
3420
3447
  onSetupComplete: handleSetupComplete,
3421
3448
  onConnected: handleConnected,
@@ -3479,6 +3506,7 @@ function DepositFlow({
3479
3506
  sourceChain: step.sourceChain,
3480
3507
  sourceToken: step.sourceToken,
3481
3508
  targetChain,
3509
+ targetToken,
3482
3510
  amount: step.amount,
3483
3511
  sourceSymbol: step.sourceSymbol,
3484
3512
  sourceDecimals: step.sourceDecimals,
@@ -3499,7 +3527,7 @@ function DepositFlow({
3499
3527
  // src/DepositModal.tsx
3500
3528
  import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
3501
3529
  var ReownDepositInner = lazy(
3502
- () => import("./DepositModalReown-PWD3WK7I.mjs").then((m) => ({ default: m.DepositModalReown }))
3530
+ () => import("./DepositModalReown-BMHCHJ2P.mjs").then((m) => ({ default: m.DepositModalReown }))
3503
3531
  );
3504
3532
  function DepositModal(props) {
3505
3533
  const needsReown = !!props.reownAppId;
@@ -3528,6 +3556,7 @@ function DepositModalInner({
3528
3556
  sessionChainIds,
3529
3557
  forceRegister = false,
3530
3558
  waitForFinalTx = true,
3559
+ enableSolana = true,
3531
3560
  reownWallet,
3532
3561
  onConnect,
3533
3562
  onDisconnect,
@@ -3708,6 +3737,7 @@ function DepositModalInner({
3708
3737
  sessionChainIds,
3709
3738
  forceRegister,
3710
3739
  waitForFinalTx,
3740
+ enableSolana,
3711
3741
  reownWallet,
3712
3742
  onConnect,
3713
3743
  onDisconnect,