@rhinestone/deposit-modal 0.1.13 → 0.1.15

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.
package/dist/index.cjs CHANGED
@@ -240,7 +240,89 @@ var init_Button = __esm({
240
240
  }
241
241
  });
242
242
 
243
+ // src/components/ui/Icons.tsx
244
+ function WalletIcon() {
245
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
246
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
247
+ "rect",
248
+ {
249
+ x: "3",
250
+ y: "6",
251
+ width: "18",
252
+ height: "13",
253
+ rx: "2",
254
+ strokeLinecap: "round",
255
+ strokeLinejoin: "round"
256
+ }
257
+ ),
258
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
259
+ "path",
260
+ {
261
+ d: "M16 12.5a1 1 0 100-2 1 1 0 000 2z",
262
+ fill: "currentColor",
263
+ stroke: "none"
264
+ }
265
+ ),
266
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3 10h18", strokeLinecap: "round" })
267
+ ] });
268
+ }
269
+ function ExternalLinkIcon() {
270
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
271
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
272
+ "path",
273
+ {
274
+ d: "M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5",
275
+ strokeLinecap: "round",
276
+ strokeLinejoin: "round"
277
+ }
278
+ ),
279
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M15 3h6v6", strokeLinecap: "round", strokeLinejoin: "round" }),
280
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M10 14L21 3", strokeLinecap: "round", strokeLinejoin: "round" })
281
+ ] });
282
+ }
283
+ function TransferIcon() {
284
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
285
+ "path",
286
+ {
287
+ d: "M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-9L21 12m0 0l-4.5 4.5M21 12H7.5",
288
+ strokeLinecap: "round",
289
+ strokeLinejoin: "round"
290
+ }
291
+ ) });
292
+ }
293
+ function CheckIcon() {
294
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
295
+ "path",
296
+ {
297
+ d: "M5 13l4 4L19 7",
298
+ strokeLinecap: "round",
299
+ strokeLinejoin: "round"
300
+ }
301
+ ) });
302
+ }
303
+ function ChevronRightIcon() {
304
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
305
+ "path",
306
+ {
307
+ d: "M9 5l7 7-7 7",
308
+ strokeLinecap: "round",
309
+ strokeLinejoin: "round"
310
+ }
311
+ ) });
312
+ }
313
+ var import_jsx_runtime4;
314
+ var init_Icons = __esm({
315
+ "src/components/ui/Icons.tsx"() {
316
+ "use strict";
317
+ import_jsx_runtime4 = require("react/jsx-runtime");
318
+ }
319
+ });
320
+
243
321
  // src/components/steps/ConnectStep.tsx
322
+ function rowIcon(kind) {
323
+ if (kind === "connected") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(WalletIcon, {});
324
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ExternalLinkIcon, {});
325
+ }
244
326
  function ConnectStep({
245
327
  walletOptions,
246
328
  selectedAddress,
@@ -256,52 +338,70 @@ function ConnectStep({
256
338
  if (hasWalletOptions) {
257
339
  const hasExternalWallet = walletOptions?.some((option) => option.kind === "external") ?? false;
258
340
  const showConnectDifferentWalletOption = Boolean(onConnect) && !hasExternalWallet;
259
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-step", children: [
260
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-connect-centered rs-connect-centered--wallets", children: [
261
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-connect-wallet-list", children: [
341
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-step", children: [
342
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-connect-centered rs-connect-centered--wallets", children: [
343
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-connect-wallet-list", children: [
262
344
  walletOptions?.map((option) => {
263
345
  const isSelected = option.address.toLowerCase() === (selectedAddress ?? "").toLowerCase();
264
346
  const shortAddress = `${option.address.slice(0, 6)}...${option.address.slice(-4)}`;
265
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
347
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
266
348
  "button",
267
349
  {
268
350
  type: "button",
269
351
  className: `rs-connect-wallet-row ${isSelected ? "rs-connect-wallet-row--selected" : ""}`,
270
352
  onClick: () => onSelectAddress?.(option.address),
271
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-connect-wallet-meta", children: [
272
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-wallet-label", children: option.label }),
273
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-wallet-address", children: shortAddress })
274
- ] })
353
+ children: [
354
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
355
+ "div",
356
+ {
357
+ className: `rs-connect-wallet-icon ${isSelected ? "rs-connect-wallet-icon--selected" : ""}`,
358
+ children: rowIcon(option.kind)
359
+ }
360
+ ),
361
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-connect-wallet-meta", children: [
362
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-label", children: option.label }),
363
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-address", children: shortAddress })
364
+ ] }),
365
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-indicator", children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChevronRightIcon, {}) })
366
+ ]
275
367
  },
276
368
  `${option.label}-${option.address}`
277
369
  );
278
370
  }),
279
- showConnectDifferentWalletOption && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
371
+ showConnectDifferentWalletOption && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
280
372
  "button",
281
373
  {
282
374
  type: "button",
283
375
  className: "rs-connect-wallet-row rs-connect-wallet-row--action",
284
376
  onClick: onConnect,
285
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-connect-wallet-meta", children: [
286
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-wallet-label", children: "External Wallet" }),
287
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-wallet-address", children: "Connect different wallet" })
288
- ] })
377
+ children: [
378
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-icon rs-connect-wallet-icon--action", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ExternalLinkIcon, {}) }),
379
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-connect-wallet-meta", children: [
380
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-label", children: "External Wallet" }),
381
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-address", children: "Connect different wallet" })
382
+ ] }),
383
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChevronRightIcon, {}) })
384
+ ]
289
385
  }
290
386
  ),
291
- onSelectTransferCrypto && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
387
+ onSelectTransferCrypto && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
292
388
  "button",
293
389
  {
294
390
  type: "button",
295
391
  className: "rs-connect-wallet-row rs-connect-wallet-row--action",
296
392
  onClick: onSelectTransferCrypto,
297
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-connect-wallet-meta", children: [
298
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-wallet-label", children: "Transfer Crypto" }),
299
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-wallet-address", children: "Deposit via QR code" })
300
- ] })
393
+ children: [
394
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-icon rs-connect-wallet-icon--action", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TransferIcon, {}) }),
395
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-connect-wallet-meta", children: [
396
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-label", children: "Transfer Crypto" }),
397
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-address", children: "Deposit via QR code" })
398
+ ] }),
399
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-wallet-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChevronRightIcon, {}) })
400
+ ]
301
401
  }
302
402
  )
303
403
  ] }),
304
- onConnect && walletOptions?.some((option) => option.kind === "external") && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
404
+ onConnect && walletOptions?.some((option) => option.kind === "external") && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
305
405
  "button",
306
406
  {
307
407
  type: "button",
@@ -311,7 +411,7 @@ function ConnectStep({
311
411
  }
312
412
  )
313
413
  ] }),
314
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
414
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-step-footer rs-step-footer--connect-empty", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
315
415
  Button,
316
416
  {
317
417
  onClick: onContinue,
@@ -324,12 +424,12 @@ function ConnectStep({
324
424
  ] });
325
425
  }
326
426
  const handleConnect = onConnect ?? onRequestConnect;
327
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-step", children: [
328
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-centered rs-connect-centered--minimal", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-connect-empty", children: [
329
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-connect-empty-graphic", "aria-hidden": "true", children: [
330
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-empty-orbit rs-connect-empty-orbit--outer" }),
331
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-empty-orbit rs-connect-empty-orbit--inner" }),
332
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-empty-core", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
427
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-step", children: [
428
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-centered rs-connect-centered--minimal", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-connect-empty", children: [
429
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-connect-empty-graphic", "aria-hidden": "true", children: [
430
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-empty-orbit rs-connect-empty-orbit--outer" }),
431
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-empty-orbit rs-connect-empty-orbit--inner" }),
432
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-empty-core", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
333
433
  "svg",
334
434
  {
335
435
  viewBox: "0 0 24 24",
@@ -337,7 +437,7 @@ function ConnectStep({
337
437
  stroke: "currentColor",
338
438
  strokeWidth: "1.6",
339
439
  children: [
340
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
440
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
341
441
  "path",
342
442
  {
343
443
  strokeLinecap: "round",
@@ -345,7 +445,7 @@ function ConnectStep({
345
445
  d: "M4 8.25A2.25 2.25 0 016.25 6h11.5A2.25 2.25 0 0120 8.25v7.5A2.25 2.25 0 0117.75 18H6.25A2.25 2.25 0 014 15.75v-7.5z"
346
446
  }
347
447
  ),
348
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
448
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
349
449
  "path",
350
450
  {
351
451
  strokeLinecap: "round",
@@ -353,18 +453,18 @@ function ConnectStep({
353
453
  d: "M20 10.5h-3.75a2.25 2.25 0 100 4.5H20"
354
454
  }
355
455
  ),
356
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "16.25", cy: "12.75", r: "0.85", fill: "currentColor" })
456
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "16.25", cy: "12.75", r: "0.85", fill: "currentColor" })
357
457
  ]
358
458
  }
359
459
  ) }),
360
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "rs-connect-empty-dot rs-connect-empty-dot--left" }),
361
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "rs-connect-empty-dot rs-connect-empty-dot--right" })
460
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "rs-connect-empty-dot rs-connect-empty-dot--left" }),
461
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "rs-connect-empty-dot rs-connect-empty-dot--right" })
362
462
  ] }),
363
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-empty-title", children: "No wallet connected" }),
364
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "rs-connect-empty-subtitle", children: "Connect an external wallet to continue." })
463
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-empty-title", children: "No wallet connected" }),
464
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-connect-empty-subtitle", children: "Connect an external wallet to continue." })
365
465
  ] }) }),
366
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "rs-step-footer rs-step-footer--connect-empty", children: [
367
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
466
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-step-footer rs-step-footer--connect-empty", children: [
467
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
368
468
  Button,
369
469
  {
370
470
  onClick: handleConnect,
@@ -374,7 +474,7 @@ function ConnectStep({
374
474
  children: connectButtonLabel
375
475
  }
376
476
  ),
377
- onSelectTransferCrypto && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
477
+ onSelectTransferCrypto && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
378
478
  "button",
379
479
  {
380
480
  type: "button",
@@ -386,12 +486,13 @@ function ConnectStep({
386
486
  ] })
387
487
  ] });
388
488
  }
389
- var import_jsx_runtime4;
489
+ var import_jsx_runtime5;
390
490
  var init_ConnectStep = __esm({
391
491
  "src/components/steps/ConnectStep.tsx"() {
392
492
  "use strict";
393
493
  init_Button();
394
- import_jsx_runtime4 = require("react/jsx-runtime");
494
+ init_Icons();
495
+ import_jsx_runtime5 = require("react/jsx-runtime");
395
496
  ConnectStep.displayName = "ConnectStep";
396
497
  }
397
498
  });
@@ -1021,24 +1122,24 @@ function SetupStep({
1021
1122
  };
1022
1123
  const isLoading = state.type === "idle" || state.type === "checking" || state.type === "creating-account" || state.type === "signing-session" || state.type === "registering";
1023
1124
  const isError = state.type === "error";
1024
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-step", children: [
1025
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-loading-state", children: [
1026
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
1027
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Spinner, { className: "rs-spinner--lg rs-text-accent" }),
1028
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-loading-text", children: [
1029
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-loading-title", children: renderStateMessage() }),
1030
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-loading-subtitle", children: "This may take a moment" })
1125
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "rs-step", children: [
1126
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "rs-loading-state", children: [
1127
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
1128
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, { className: "rs-spinner--lg rs-text-accent" }),
1129
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "rs-loading-text", children: [
1130
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "rs-loading-title", children: renderStateMessage() }),
1131
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "rs-loading-subtitle", children: "This may take a moment" })
1031
1132
  ] })
1032
1133
  ] }),
1033
- isError && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
1034
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1134
+ isError && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
1135
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1035
1136
  "svg",
1036
1137
  {
1037
1138
  viewBox: "0 0 24 24",
1038
1139
  fill: "none",
1039
1140
  stroke: "currentColor",
1040
1141
  strokeWidth: "2",
1041
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1142
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1042
1143
  "path",
1043
1144
  {
1044
1145
  strokeLinecap: "round",
@@ -1048,9 +1149,9 @@ function SetupStep({
1048
1149
  )
1049
1150
  }
1050
1151
  ) }),
1051
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "rs-loading-text", children: [
1052
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-loading-title rs-text-error", children: "Setup failed" }),
1053
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1152
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "rs-loading-text", children: [
1153
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "rs-loading-title rs-text-error", children: "Setup failed" }),
1154
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1054
1155
  "div",
1055
1156
  {
1056
1157
  className: "rs-loading-subtitle",
@@ -1061,10 +1162,10 @@ function SetupStep({
1061
1162
  ] })
1062
1163
  ] })
1063
1164
  ] }),
1064
- isError && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
1165
+ isError && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
1065
1166
  ] });
1066
1167
  }
1067
- var import_react2, import_sdk2, import_jsx_runtime5;
1168
+ var import_react2, import_sdk2, import_jsx_runtime6;
1068
1169
  var init_SetupStep = __esm({
1069
1170
  "src/components/steps/SetupStep.tsx"() {
1070
1171
  "use strict";
@@ -1074,21 +1175,21 @@ var init_SetupStep = __esm({
1074
1175
  init_Spinner();
1075
1176
  init_account();
1076
1177
  init_session_owner();
1077
- import_jsx_runtime5 = require("react/jsx-runtime");
1178
+ import_jsx_runtime6 = require("react/jsx-runtime");
1078
1179
  }
1079
1180
  });
1080
1181
 
1081
1182
  // src/components/ui/PoweredBy.tsx
1082
1183
  function PoweredBy() {
1083
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "rs-powered-by", children: [
1084
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1184
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rs-powered-by", children: [
1185
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1085
1186
  "svg",
1086
1187
  {
1087
1188
  viewBox: "0 0 24 24",
1088
1189
  fill: "none",
1089
1190
  stroke: "currentColor",
1090
1191
  strokeWidth: "2",
1091
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1192
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1092
1193
  "path",
1093
1194
  {
1094
1195
  strokeLinecap: "round",
@@ -1098,10 +1199,10 @@ function PoweredBy() {
1098
1199
  )
1099
1200
  }
1100
1201
  ),
1101
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { children: [
1202
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
1102
1203
  "Powered by",
1103
1204
  " ",
1104
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1205
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1105
1206
  "a",
1106
1207
  {
1107
1208
  href: "https://www.rhinestone.dev",
@@ -1113,11 +1214,11 @@ function PoweredBy() {
1113
1214
  ] })
1114
1215
  ] });
1115
1216
  }
1116
- var import_jsx_runtime6;
1217
+ var import_jsx_runtime7;
1117
1218
  var init_PoweredBy = __esm({
1118
1219
  "src/components/ui/PoweredBy.tsx"() {
1119
1220
  "use strict";
1120
- import_jsx_runtime6 = require("react/jsx-runtime");
1221
+ import_jsx_runtime7 = require("react/jsx-runtime");
1121
1222
  }
1122
1223
  });
1123
1224
 
@@ -1488,21 +1589,21 @@ function AssetSelectStep({
1488
1589
  return asset.balance;
1489
1590
  }
1490
1591
  };
1491
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rs-step", children: [
1492
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { padding: "12px 12px 4px" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "rs-step-title", children: "Select source asset" }) }),
1493
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1592
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-step", children: [
1593
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { padding: "12px 12px 4px" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-step-title", children: "Select source asset" }) }),
1594
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1494
1595
  "div",
1495
1596
  {
1496
1597
  className: "rs-step-body",
1497
1598
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
1498
1599
  children: [
1499
- loading && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
1500
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Spinner, { className: "rs-text-tertiary" }),
1501
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
1600
+ loading && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
1601
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Spinner, { className: "rs-text-tertiary" }),
1602
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
1502
1603
  ] }),
1503
- error && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "rs-alert rs-alert--error", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "rs-alert-text", children: error }) }),
1504
- !loading && !error && rows.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rs-empty-state", children: [
1505
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1604
+ error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-alert rs-alert--error", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rs-alert-text", children: error }) }),
1605
+ !loading && !error && rows.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-empty-state", children: [
1606
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1506
1607
  "svg",
1507
1608
  {
1508
1609
  className: "rs-empty-icon",
@@ -1510,7 +1611,7 @@ function AssetSelectStep({
1510
1611
  fill: "none",
1511
1612
  stroke: "currentColor",
1512
1613
  strokeWidth: "1.5",
1513
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1614
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1514
1615
  "path",
1515
1616
  {
1516
1617
  strokeLinecap: "round",
@@ -1520,20 +1621,20 @@ function AssetSelectStep({
1520
1621
  )
1521
1622
  }
1522
1623
  ),
1523
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
1524
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rs-empty-address", children: [
1624
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
1625
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-empty-address", children: [
1525
1626
  address.slice(0, 6),
1526
1627
  "...",
1527
1628
  address.slice(-4)
1528
1629
  ] })
1529
1630
  ] }),
1530
- !loading && !error && rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "rs-asset-list", children: rows.map((asset) => {
1631
+ !loading && !error && rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-asset-list", children: rows.map((asset) => {
1531
1632
  const isSelected = selectedAssetId === asset.id;
1532
1633
  const tokenAmount = formatBalance(asset);
1533
1634
  const badge = getChainBadge(asset.chainId);
1534
1635
  const tokenIcon = getTokenIcon(asset.symbol);
1535
1636
  const chainIcon = getChainIcon(asset.chainId);
1536
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1637
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1537
1638
  "button",
1538
1639
  {
1539
1640
  type: "button",
@@ -1541,9 +1642,9 @@ function AssetSelectStep({
1541
1642
  className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
1542
1643
  style: { textAlign: "left" },
1543
1644
  children: [
1544
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rs-asset-info", children: [
1545
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rs-asset-icon-wrapper", children: [
1546
- tokenIcon ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1645
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-asset-info", children: [
1646
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-asset-icon-wrapper", children: [
1647
+ tokenIcon ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1547
1648
  "img",
1548
1649
  {
1549
1650
  src: tokenIcon,
@@ -1551,15 +1652,15 @@ function AssetSelectStep({
1551
1652
  className: "rs-asset-icon",
1552
1653
  style: { background: "transparent" }
1553
1654
  }
1554
- ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "rs-asset-icon", children: asset.symbol.slice(0, 4) }),
1555
- chainIcon ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1655
+ ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-asset-icon", children: asset.symbol.slice(0, 4) }),
1656
+ chainIcon ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1556
1657
  "img",
1557
1658
  {
1558
1659
  src: chainIcon,
1559
1660
  alt: getChainName(asset.chainId),
1560
1661
  className: "rs-asset-chain-badge"
1561
1662
  }
1562
- ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1663
+ ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1563
1664
  "div",
1564
1665
  {
1565
1666
  className: "rs-asset-chain-badge",
@@ -1571,23 +1672,23 @@ function AssetSelectStep({
1571
1672
  }
1572
1673
  )
1573
1674
  ] }),
1574
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
1575
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rs-asset-name", children: [
1675
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
1676
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-asset-name", children: [
1576
1677
  asset.symbol,
1577
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "rs-asset-chain", children: [
1678
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "rs-asset-chain", children: [
1578
1679
  " ",
1579
1680
  "on ",
1580
1681
  getChainName(asset.chainId)
1581
1682
  ] })
1582
1683
  ] }),
1583
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rs-asset-balance-small", children: [
1684
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-asset-balance-small", children: [
1584
1685
  tokenAmount,
1585
1686
  " ",
1586
1687
  asset.symbol
1587
1688
  ] })
1588
1689
  ] })
1589
1690
  ] }),
1590
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 ? currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
1691
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 ? currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
1591
1692
  ]
1592
1693
  },
1593
1694
  asset.id
@@ -1596,7 +1697,7 @@ function AssetSelectStep({
1596
1697
  ]
1597
1698
  }
1598
1699
  ),
1599
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1700
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1600
1701
  Button,
1601
1702
  {
1602
1703
  onClick: () => selectedAsset && onContinue(selectedAsset),
@@ -1605,7 +1706,7 @@ function AssetSelectStep({
1605
1706
  children: "Continue"
1606
1707
  }
1607
1708
  ) }),
1608
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PoweredBy, {})
1709
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PoweredBy, {})
1609
1710
  ] });
1610
1711
  }
1611
1712
  async function fetchNativeAssets(address, publicClient, existing) {
@@ -1646,7 +1747,7 @@ function mergeAssets(existing, incoming) {
1646
1747
  }
1647
1748
  return merged;
1648
1749
  }
1649
- var import_react3, import_viem3, import_jsx_runtime7;
1750
+ var import_react3, import_viem3, import_jsx_runtime8;
1650
1751
  var init_AssetSelectStep = __esm({
1651
1752
  "src/components/steps/AssetSelectStep.tsx"() {
1652
1753
  "use strict";
@@ -1658,7 +1759,7 @@ var init_AssetSelectStep = __esm({
1658
1759
  init_deposit_service();
1659
1760
  init_constants();
1660
1761
  init_formatters();
1661
- import_jsx_runtime7 = require("react/jsx-runtime");
1762
+ import_jsx_runtime8 = require("react/jsx-runtime");
1662
1763
  }
1663
1764
  });
1664
1765
 
@@ -1833,10 +1934,10 @@ function AmountStep({
1833
1934
  setIsSwitching(false);
1834
1935
  }
1835
1936
  };
1836
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-step", children: [
1837
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: [
1838
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-amount-display", children: [
1839
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-amount-input-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1937
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-step", children: [
1938
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: [
1939
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-amount-display", children: [
1940
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "rs-amount-input-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1840
1941
  "input",
1841
1942
  {
1842
1943
  type: "text",
@@ -1854,17 +1955,17 @@ function AmountStep({
1854
1955
  autoFocus: true
1855
1956
  }
1856
1957
  ) }),
1857
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-amount-token-value", children: [
1958
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-amount-token-value", children: [
1858
1959
  formattedTokenAmount,
1859
1960
  " ",
1860
1961
  asset.symbol
1861
1962
  ] }),
1862
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-amount-available", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "rs-amount-available-value", children: [
1963
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "rs-amount-available", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "rs-amount-available-value", children: [
1863
1964
  formattedBalance,
1864
1965
  " ",
1865
1966
  asset.symbol,
1866
1967
  " available",
1867
- balanceUsd !== null && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { color: "var(--rs-muted-foreground)" }, children: [
1968
+ balanceUsd !== null && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { style: { color: "var(--rs-muted-foreground)" }, children: [
1868
1969
  " ",
1869
1970
  "(",
1870
1971
  currencyFormatter.format(balanceUsd),
@@ -1872,16 +1973,16 @@ function AmountStep({
1872
1973
  ] })
1873
1974
  ] }) })
1874
1975
  ] }),
1875
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1976
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1876
1977
  "div",
1877
1978
  {
1878
1979
  style: { display: "flex", justifyContent: "center", marginTop: 16 },
1879
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-flow-pill", children: [
1880
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-flow-pill-side", children: [
1881
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rs-flow-pill-label", children: "You send" }),
1882
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-flow-pill-token", children: [
1883
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-flow-pill-token-icon-wrapper", children: [
1884
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-flow-pill-token-icon", children: getTokenIcon(asset.symbol) ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1980
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-flow-pill", children: [
1981
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-flow-pill-side", children: [
1982
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-flow-pill-label", children: "You send" }),
1983
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-flow-pill-token", children: [
1984
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-flow-pill-token-icon-wrapper", children: [
1985
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "rs-flow-pill-token-icon", children: getTokenIcon(asset.symbol) ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1885
1986
  "img",
1886
1987
  {
1887
1988
  src: getTokenIcon(asset.symbol),
@@ -1891,7 +1992,7 @@ function AmountStep({
1891
1992
  (() => {
1892
1993
  const chainIcon = getChainIcon(asset.chainId);
1893
1994
  if (chainIcon) {
1894
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1995
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1895
1996
  "img",
1896
1997
  {
1897
1998
  src: chainIcon,
@@ -1901,7 +2002,7 @@ function AmountStep({
1901
2002
  );
1902
2003
  }
1903
2004
  const badge = getChainBadge(asset.chainId);
1904
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2005
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1905
2006
  "div",
1906
2007
  {
1907
2008
  className: "rs-flow-pill-chain-badge",
@@ -1914,17 +2015,17 @@ function AmountStep({
1914
2015
  );
1915
2016
  })()
1916
2017
  ] }),
1917
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rs-flow-pill-token-symbol", children: asset.symbol })
2018
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-flow-pill-token-symbol", children: asset.symbol })
1918
2019
  ] })
1919
2020
  ] }),
1920
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-flow-pill-arrow", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2021
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "rs-flow-pill-arrow", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1921
2022
  "svg",
1922
2023
  {
1923
2024
  viewBox: "0 0 24 24",
1924
2025
  fill: "none",
1925
2026
  stroke: "currentColor",
1926
2027
  strokeWidth: "2",
1927
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2028
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1928
2029
  "path",
1929
2030
  {
1930
2031
  strokeLinecap: "round",
@@ -1934,11 +2035,11 @@ function AmountStep({
1934
2035
  )
1935
2036
  }
1936
2037
  ) }),
1937
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-flow-pill-side", children: [
1938
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rs-flow-pill-label", children: "You receive" }),
1939
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-flow-pill-token", children: [
1940
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-flow-pill-token-icon-wrapper", children: [
1941
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-flow-pill-token-icon", children: getTokenIcon(targetSymbol) ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2038
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-flow-pill-side", children: [
2039
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-flow-pill-label", children: "You receive" }),
2040
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-flow-pill-token", children: [
2041
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-flow-pill-token-icon-wrapper", children: [
2042
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "rs-flow-pill-token-icon", children: getTokenIcon(targetSymbol) ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1942
2043
  "img",
1943
2044
  {
1944
2045
  src: getTokenIcon(targetSymbol),
@@ -1948,7 +2049,7 @@ function AmountStep({
1948
2049
  (() => {
1949
2050
  const chainIcon = getChainIcon(targetChain);
1950
2051
  if (chainIcon) {
1951
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2052
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1952
2053
  "img",
1953
2054
  {
1954
2055
  src: chainIcon,
@@ -1958,7 +2059,7 @@ function AmountStep({
1958
2059
  );
1959
2060
  }
1960
2061
  const badge = getChainBadge(targetChain);
1961
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2062
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1962
2063
  "div",
1963
2064
  {
1964
2065
  className: "rs-flow-pill-chain-badge",
@@ -1971,14 +2072,14 @@ function AmountStep({
1971
2072
  );
1972
2073
  })()
1973
2074
  ] }),
1974
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rs-flow-pill-token-symbol", children: targetSymbol })
2075
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-flow-pill-token-symbol", children: targetSymbol })
1975
2076
  ] })
1976
2077
  ] })
1977
2078
  ] })
1978
2079
  }
1979
2080
  ),
1980
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-amount-presets", children: [
1981
- [25, 50, 75].map((pct) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2081
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-amount-presets", children: [
2082
+ [25, 50, 75].map((pct) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1982
2083
  "button",
1983
2084
  {
1984
2085
  type: "button",
@@ -1992,7 +2093,7 @@ function AmountStep({
1992
2093
  },
1993
2094
  pct
1994
2095
  )),
1995
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2096
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1996
2097
  "button",
1997
2098
  {
1998
2099
  type: "button",
@@ -2003,13 +2104,13 @@ function AmountStep({
2003
2104
  }
2004
2105
  )
2005
2106
  ] }),
2006
- chainMismatch && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-chain-switch", style: { marginTop: 16 }, children: [
2007
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-chain-switch-text", children: [
2107
+ chainMismatch && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-chain-switch", style: { marginTop: 16 }, children: [
2108
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-chain-switch-text", children: [
2008
2109
  "Switch your wallet to ",
2009
2110
  getChainName(asset.chainId),
2010
2111
  " to continue."
2011
2112
  ] }),
2012
- switchChain && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2113
+ switchChain && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2013
2114
  Button,
2014
2115
  {
2015
2116
  variant: "outline",
@@ -2020,8 +2121,8 @@ function AmountStep({
2020
2121
  }
2021
2122
  )
2022
2123
  ] }),
2023
- error && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "rs-amount-error", children: [
2024
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2124
+ error && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-amount-error", children: [
2125
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2025
2126
  "svg",
2026
2127
  {
2027
2128
  viewBox: "0 0 24 24",
@@ -2029,7 +2130,7 @@ function AmountStep({
2029
2130
  stroke: "currentColor",
2030
2131
  strokeWidth: "2",
2031
2132
  style: { width: 16, height: 16, flexShrink: 0 },
2032
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2133
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2033
2134
  "path",
2034
2135
  {
2035
2136
  strokeLinecap: "round",
@@ -2039,10 +2140,10 @@ function AmountStep({
2039
2140
  )
2040
2141
  }
2041
2142
  ),
2042
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: error })
2143
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: error })
2043
2144
  ] })
2044
2145
  ] }),
2045
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2146
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2046
2147
  Button,
2047
2148
  {
2048
2149
  onClick: handleContinue,
@@ -2051,10 +2152,10 @@ function AmountStep({
2051
2152
  children: "Continue"
2052
2153
  }
2053
2154
  ) }),
2054
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PoweredBy, {})
2155
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PoweredBy, {})
2055
2156
  ] });
2056
2157
  }
2057
- var import_react4, import_viem4, import_jsx_runtime8;
2158
+ var import_react4, import_viem4, import_jsx_runtime9;
2058
2159
  var init_AmountStep = __esm({
2059
2160
  "src/components/steps/AmountStep.tsx"() {
2060
2161
  "use strict";
@@ -2065,7 +2166,7 @@ var init_AmountStep = __esm({
2065
2166
  init_deposit_service();
2066
2167
  init_constants();
2067
2168
  init_formatters();
2068
- import_jsx_runtime8 = require("react/jsx-runtime");
2169
+ import_jsx_runtime9 = require("react/jsx-runtime");
2069
2170
  }
2070
2171
  });
2071
2172
 
@@ -2204,19 +2305,19 @@ function ConfirmStep({
2204
2305
  setIsSwitching(false);
2205
2306
  }
2206
2307
  };
2207
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-step", children: [
2208
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { padding: "12px 12px 10px" }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "rs-step-title", children: "Review order" }) }),
2209
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-step-body rs-space-y-3", style: { paddingTop: 0 }, children: [
2210
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-card", children: [
2211
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-card-row", children: [
2212
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-card-label", children: "Source" }),
2213
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2308
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step", children: [
2309
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { padding: "12px 12px 10px" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "rs-step-title", children: "Review order" }) }),
2310
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step-body rs-space-y-3", style: { paddingTop: 0 }, children: [
2311
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card", children: [
2312
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2313
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Source" }),
2314
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2214
2315
  "span",
2215
2316
  {
2216
2317
  className: "rs-card-value",
2217
2318
  style: { display: "flex", alignItems: "center", gap: 8 },
2218
2319
  children: [
2219
- getChainIcon(asset.chainId) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2320
+ getChainIcon(asset.chainId) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2220
2321
  "img",
2221
2322
  {
2222
2323
  src: getChainIcon(asset.chainId),
@@ -2229,15 +2330,15 @@ function ConfirmStep({
2229
2330
  }
2230
2331
  )
2231
2332
  ] }),
2232
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-card-row", children: [
2233
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-card-label", children: "Destination" }),
2234
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2333
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2334
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Destination" }),
2335
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2235
2336
  "span",
2236
2337
  {
2237
2338
  className: "rs-card-value",
2238
2339
  style: { display: "flex", alignItems: "center", gap: 8 },
2239
2340
  children: [
2240
- getChainIcon(targetChain) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2341
+ getChainIcon(targetChain) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2241
2342
  "img",
2242
2343
  {
2243
2344
  src: getChainIcon(targetChain),
@@ -2250,21 +2351,21 @@ function ConfirmStep({
2250
2351
  }
2251
2352
  )
2252
2353
  ] }),
2253
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-card-row", children: [
2254
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-card-label", children: "Estimated time" }),
2255
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-card-value", children: "< 1 min" })
2354
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2355
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Estimated time" }),
2356
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-value", children: "< 1 min" })
2256
2357
  ] })
2257
2358
  ] }),
2258
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-card", children: [
2259
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-card-row", children: [
2260
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-card-label", children: "You send" }),
2261
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2359
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card", children: [
2360
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2361
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "You send" }),
2362
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2262
2363
  "span",
2263
2364
  {
2264
2365
  className: "rs-card-value",
2265
2366
  style: { display: "flex", alignItems: "center", gap: 6 },
2266
2367
  children: [
2267
- getTokenIcon(asset.symbol) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2368
+ getTokenIcon(asset.symbol) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2268
2369
  "img",
2269
2370
  {
2270
2371
  src: getTokenIcon(asset.symbol),
@@ -2279,15 +2380,15 @@ function ConfirmStep({
2279
2380
  }
2280
2381
  )
2281
2382
  ] }),
2282
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-card-row", children: [
2283
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-card-label", children: "You receive" }),
2284
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2383
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2384
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "You receive" }),
2385
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2285
2386
  "span",
2286
2387
  {
2287
2388
  className: "rs-card-value",
2288
2389
  style: { display: "flex", alignItems: "center", gap: 6 },
2289
2390
  children: [
2290
- getTokenIcon(targetSymbol) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2391
+ getTokenIcon(targetSymbol) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2291
2392
  "img",
2292
2393
  {
2293
2394
  src: getTokenIcon(targetSymbol),
@@ -2302,18 +2403,18 @@ function ConfirmStep({
2302
2403
  }
2303
2404
  )
2304
2405
  ] }),
2305
- receiveAmountUsd !== null && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-card-row", children: [
2306
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-card-label", children: "Value" }),
2307
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "rs-card-value", children: currencyFormatter.format(receiveAmountUsd) })
2406
+ receiveAmountUsd !== null && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2407
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Value" }),
2408
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-value", children: currencyFormatter.format(receiveAmountUsd) })
2308
2409
  ] })
2309
2410
  ] }),
2310
- chainMismatch && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-chain-switch", children: [
2311
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-chain-switch-text", children: [
2411
+ chainMismatch && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-chain-switch", children: [
2412
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-chain-switch-text", children: [
2312
2413
  "Switch your wallet to ",
2313
2414
  getChainName(asset.chainId),
2314
2415
  " to sign."
2315
2416
  ] }),
2316
- switchChain && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2417
+ switchChain && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2317
2418
  Button,
2318
2419
  {
2319
2420
  variant: "outline",
@@ -2324,8 +2425,8 @@ function ConfirmStep({
2324
2425
  }
2325
2426
  )
2326
2427
  ] }),
2327
- error && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "rs-alert rs-alert--error", children: [
2328
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2428
+ error && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-alert rs-alert--error", children: [
2429
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2329
2430
  "svg",
2330
2431
  {
2331
2432
  className: "rs-alert-icon",
@@ -2333,7 +2434,7 @@ function ConfirmStep({
2333
2434
  fill: "none",
2334
2435
  stroke: "currentColor",
2335
2436
  strokeWidth: "2",
2336
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2437
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2337
2438
  "path",
2338
2439
  {
2339
2440
  strokeLinecap: "round",
@@ -2343,7 +2444,7 @@ function ConfirmStep({
2343
2444
  )
2344
2445
  }
2345
2446
  ),
2346
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2447
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2347
2448
  "span",
2348
2449
  {
2349
2450
  className: "rs-alert-text",
@@ -2358,7 +2459,7 @@ function ConfirmStep({
2358
2459
  )
2359
2460
  ] })
2360
2461
  ] }),
2361
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2462
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2362
2463
  Button,
2363
2464
  {
2364
2465
  onClick: handleConfirm,
@@ -2368,10 +2469,10 @@ function ConfirmStep({
2368
2469
  children: "Confirm Order"
2369
2470
  }
2370
2471
  ) }),
2371
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PoweredBy, {})
2472
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PoweredBy, {})
2372
2473
  ] });
2373
2474
  }
2374
- var import_react5, import_viem5, import_jsx_runtime9, STABLECOIN_SYMBOLS;
2475
+ var import_react5, import_viem5, import_jsx_runtime10, STABLECOIN_SYMBOLS;
2375
2476
  var init_ConfirmStep = __esm({
2376
2477
  "src/components/steps/ConfirmStep.tsx"() {
2377
2478
  "use strict";
@@ -2382,7 +2483,7 @@ var init_ConfirmStep = __esm({
2382
2483
  init_deposit_service();
2383
2484
  init_constants();
2384
2485
  init_formatters();
2385
- import_jsx_runtime9 = require("react/jsx-runtime");
2486
+ import_jsx_runtime10 = require("react/jsx-runtime");
2386
2487
  STABLECOIN_SYMBOLS = /* @__PURE__ */ new Set(["USDC", "USDT", "DAI"]);
2387
2488
  }
2388
2489
  });
@@ -2615,17 +2716,17 @@ function ProcessingStep({
2615
2716
  }
2616
2717
  })();
2617
2718
  if (isComplete) {
2618
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step", children: [
2619
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step-body rs-space-y-3", children: [
2620
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-success-state", children: [
2621
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "rs-success-checkmark", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2719
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-step", children: [
2720
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-step-body rs-space-y-3", children: [
2721
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-success-state", children: [
2722
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "rs-success-checkmark", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2622
2723
  "svg",
2623
2724
  {
2624
2725
  viewBox: "0 0 24 24",
2625
2726
  fill: "none",
2626
2727
  stroke: "currentColor",
2627
2728
  strokeWidth: "2.5",
2628
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2729
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2629
2730
  "path",
2630
2731
  {
2631
2732
  strokeLinecap: "round",
@@ -2635,13 +2736,13 @@ function ProcessingStep({
2635
2736
  )
2636
2737
  }
2637
2738
  ) }),
2638
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "rs-success-title", children: isEarlyComplete ? `${flowCapitalized} confirmed` : `${flowCapitalized} successful` }),
2639
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "rs-success-subtitle", children: isEarlyComplete ? "Your transfer has been confirmed and funds will arrive shortly." : `Your funds have been successfully bridged.` })
2739
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "rs-success-title", children: isEarlyComplete ? `${flowCapitalized} confirmed` : `${flowCapitalized} successful` }),
2740
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "rs-success-subtitle", children: isEarlyComplete ? "Your transfer has been confirmed and funds will arrive shortly." : `Your funds have been successfully bridged.` })
2640
2741
  ] }),
2641
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card", children: [
2642
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2643
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Status" }),
2644
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2742
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card", children: [
2743
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
2744
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "Status" }),
2745
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2645
2746
  "span",
2646
2747
  {
2647
2748
  className: "rs-card-value",
@@ -2650,29 +2751,29 @@ function ProcessingStep({
2650
2751
  }
2651
2752
  )
2652
2753
  ] }),
2653
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2654
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Total time" }),
2655
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-value", children: formatElapsedTime(elapsedSeconds) })
2754
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
2755
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "Total time" }),
2756
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-value", children: formatElapsedTime(elapsedSeconds) })
2656
2757
  ] }),
2657
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2658
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "You received" }),
2659
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "rs-card-value", children: [
2758
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
2759
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "You received" }),
2760
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "rs-card-value", children: [
2660
2761
  formattedReceivedAmount,
2661
2762
  " ",
2662
2763
  targetSymbol
2663
2764
  ] })
2664
2765
  ] })
2665
2766
  ] }),
2666
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card", children: [
2667
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2668
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Source" }),
2669
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2767
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card", children: [
2768
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
2769
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "Source" }),
2770
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2670
2771
  "span",
2671
2772
  {
2672
2773
  className: "rs-card-value",
2673
2774
  style: { display: "flex", alignItems: "center", gap: 6 },
2674
2775
  children: [
2675
- getChainIcon(sourceChain) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2776
+ getChainIcon(sourceChain) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2676
2777
  "img",
2677
2778
  {
2678
2779
  src: getChainIcon(sourceChain),
@@ -2685,15 +2786,15 @@ function ProcessingStep({
2685
2786
  }
2686
2787
  )
2687
2788
  ] }),
2688
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2689
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Destination" }),
2690
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2789
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
2790
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "Destination" }),
2791
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2691
2792
  "span",
2692
2793
  {
2693
2794
  className: "rs-card-value",
2694
2795
  style: { display: "flex", alignItems: "center", gap: 6 },
2695
2796
  children: [
2696
- getChainIcon(targetChain) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2797
+ getChainIcon(targetChain) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2697
2798
  "img",
2698
2799
  {
2699
2800
  src: getChainIcon(targetChain),
@@ -2706,9 +2807,9 @@ function ProcessingStep({
2706
2807
  }
2707
2808
  )
2708
2809
  ] }),
2709
- sourceExplorerUrl && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2710
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Transaction" }),
2711
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2810
+ sourceExplorerUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
2811
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "Transaction" }),
2812
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2712
2813
  "a",
2713
2814
  {
2714
2815
  href: sourceExplorerUrl,
@@ -2717,7 +2818,7 @@ function ProcessingStep({
2717
2818
  className: "rs-link rs-link-external rs-font-mono rs-text-xs",
2718
2819
  children: [
2719
2820
  truncateHash(txHash),
2720
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2821
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2721
2822
  "svg",
2722
2823
  {
2723
2824
  viewBox: "0 0 24 24",
@@ -2725,7 +2826,7 @@ function ProcessingStep({
2725
2826
  stroke: "currentColor",
2726
2827
  strokeWidth: "2.5",
2727
2828
  style: { width: 12, height: 12 },
2728
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2829
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2729
2830
  "path",
2730
2831
  {
2731
2832
  strokeLinecap: "round",
@@ -2739,9 +2840,9 @@ function ProcessingStep({
2739
2840
  }
2740
2841
  )
2741
2842
  ] }),
2742
- destinationTxHash && destExplorerUrl && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2743
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Destination tx" }),
2744
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2843
+ destinationTxHash && destExplorerUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
2844
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "Destination tx" }),
2845
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2745
2846
  "a",
2746
2847
  {
2747
2848
  href: destExplorerUrl,
@@ -2750,7 +2851,7 @@ function ProcessingStep({
2750
2851
  className: "rs-link rs-link-external rs-font-mono rs-text-xs",
2751
2852
  children: [
2752
2853
  truncateHash(destinationTxHash),
2753
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2854
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2754
2855
  "svg",
2755
2856
  {
2756
2857
  viewBox: "0 0 24 24",
@@ -2758,7 +2859,7 @@ function ProcessingStep({
2758
2859
  stroke: "currentColor",
2759
2860
  strokeWidth: "2.5",
2760
2861
  style: { width: 12, height: 12 },
2761
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2862
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2762
2863
  "path",
2763
2864
  {
2764
2865
  strokeLinecap: "round",
@@ -2774,31 +2875,31 @@ function ProcessingStep({
2774
2875
  ] })
2775
2876
  ] })
2776
2877
  ] }),
2777
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step-footer", style: { gap: 8, display: "flex" }, children: [
2778
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Close" }),
2779
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Button, { onClick: onNewDeposit, fullWidth: true, children: [
2878
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-step-footer", style: { gap: 8, display: "flex" }, children: [
2879
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Close" }),
2880
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Button, { onClick: onNewDeposit, fullWidth: true, children: [
2780
2881
  "New ",
2781
2882
  flowNoun
2782
2883
  ] })
2783
2884
  ] }),
2784
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PoweredBy, {})
2885
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PoweredBy, {})
2785
2886
  ] });
2786
2887
  }
2787
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step", children: [
2788
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step-header", children: [
2789
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step-header-row", children: [
2790
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2888
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-step", children: [
2889
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-step-header", children: [
2890
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-step-header-row", children: [
2891
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2791
2892
  "div",
2792
2893
  {
2793
2894
  className: `rs-step-icon ${isError ? "rs-step-icon--error" : "rs-step-icon--accent"}`,
2794
- children: isError ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2895
+ children: isError ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2795
2896
  "svg",
2796
2897
  {
2797
2898
  viewBox: "0 0 24 24",
2798
2899
  fill: "none",
2799
2900
  stroke: "currentColor",
2800
2901
  strokeWidth: "2",
2801
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2902
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2802
2903
  "path",
2803
2904
  {
2804
2905
  strokeLinecap: "round",
@@ -2807,10 +2908,10 @@ function ProcessingStep({
2807
2908
  }
2808
2909
  )
2809
2910
  }
2810
- ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Spinner, {})
2911
+ ) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Spinner, {})
2811
2912
  }
2812
2913
  ),
2813
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2914
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2814
2915
  "div",
2815
2916
  {
2816
2917
  className: `rs-step-title ${isError ? "rs-step-title--error" : ""}`,
@@ -2818,7 +2919,7 @@ function ProcessingStep({
2818
2919
  }
2819
2920
  )
2820
2921
  ] }),
2821
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2922
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2822
2923
  "div",
2823
2924
  {
2824
2925
  className: `rs-step-description ${isError ? "rs-text-error" : "rs-text-secondary"}`,
@@ -2830,11 +2931,11 @@ function ProcessingStep({
2830
2931
  }
2831
2932
  )
2832
2933
  ] }),
2833
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step-body rs-space-y-3", children: [
2834
- isProcessing && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
2835
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "rs-progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "rs-progress-bar-fill rs-progress-bar-fill--indeterminate" }) }),
2836
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-alert rs-alert--info", children: [
2837
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2934
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-step-body rs-space-y-3", children: [
2935
+ isProcessing && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
2936
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "rs-progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "rs-progress-bar-fill rs-progress-bar-fill--indeterminate" }) }),
2937
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-alert rs-alert--info", children: [
2938
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2838
2939
  "svg",
2839
2940
  {
2840
2941
  className: "rs-alert-icon",
@@ -2842,7 +2943,7 @@ function ProcessingStep({
2842
2943
  fill: "none",
2843
2944
  stroke: "currentColor",
2844
2945
  strokeWidth: "2",
2845
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2946
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2846
2947
  "path",
2847
2948
  {
2848
2949
  strokeLinecap: "round",
@@ -2852,13 +2953,13 @@ function ProcessingStep({
2852
2953
  )
2853
2954
  }
2854
2955
  ),
2855
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "rs-alert-text", children: [
2956
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "rs-alert-text", children: [
2856
2957
  "You can safely close this window. Your ",
2857
2958
  flowNoun,
2858
2959
  " will complete in the background."
2859
2960
  ] })
2860
2961
  ] }),
2861
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2962
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2862
2963
  "div",
2863
2964
  {
2864
2965
  className: "rs-text-sm rs-text-tertiary",
@@ -2870,16 +2971,16 @@ function ProcessingStep({
2870
2971
  }
2871
2972
  )
2872
2973
  ] }),
2873
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card", children: [
2874
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2875
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Source" }),
2876
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2974
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card", children: [
2975
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
2976
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "Source" }),
2977
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2877
2978
  "span",
2878
2979
  {
2879
2980
  className: "rs-card-value",
2880
2981
  style: { display: "flex", alignItems: "center", gap: 8 },
2881
2982
  children: [
2882
- getChainIcon(sourceChain) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2983
+ getChainIcon(sourceChain) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2883
2984
  "img",
2884
2985
  {
2885
2986
  src: getChainIcon(sourceChain),
@@ -2892,15 +2993,15 @@ function ProcessingStep({
2892
2993
  }
2893
2994
  )
2894
2995
  ] }),
2895
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2896
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Destination" }),
2897
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2996
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
2997
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "Destination" }),
2998
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2898
2999
  "span",
2899
3000
  {
2900
3001
  className: "rs-card-value",
2901
3002
  style: { display: "flex", alignItems: "center", gap: 8 },
2902
3003
  children: [
2903
- getChainIcon(targetChain) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3004
+ getChainIcon(targetChain) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2904
3005
  "img",
2905
3006
  {
2906
3007
  src: getChainIcon(targetChain),
@@ -2913,9 +3014,9 @@ function ProcessingStep({
2913
3014
  }
2914
3015
  )
2915
3016
  ] }),
2916
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-card-row", children: [
2917
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-label", children: "Transaction" }),
2918
- sourceExplorerUrl ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3017
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-card-row", children: [
3018
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-label", children: "Transaction" }),
3019
+ sourceExplorerUrl ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2919
3020
  "a",
2920
3021
  {
2921
3022
  href: sourceExplorerUrl,
@@ -2924,14 +3025,14 @@ function ProcessingStep({
2924
3025
  className: "rs-link rs-link-external rs-font-mono rs-text-xs",
2925
3026
  children: [
2926
3027
  truncateHash(txHash),
2927
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3028
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2928
3029
  "svg",
2929
3030
  {
2930
3031
  viewBox: "0 0 24 24",
2931
3032
  fill: "none",
2932
3033
  stroke: "currentColor",
2933
3034
  strokeWidth: "2.5",
2934
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3035
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2935
3036
  "path",
2936
3037
  {
2937
3038
  strokeLinecap: "round",
@@ -2943,18 +3044,18 @@ function ProcessingStep({
2943
3044
  )
2944
3045
  ]
2945
3046
  }
2946
- ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "rs-card-value rs-card-value--mono", children: truncateHash(txHash) })
3047
+ ) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rs-card-value rs-card-value--mono", children: truncateHash(txHash) })
2947
3048
  ] })
2948
3049
  ] })
2949
3050
  ] }),
2950
- isError && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "rs-step-footer", style: { gap: 8, display: "flex" }, children: [
2951
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Close" }),
2952
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { onClick: onNewDeposit, fullWidth: true, children: "Try Again" })
3051
+ isError && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "rs-step-footer", style: { gap: 8, display: "flex" }, children: [
3052
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Close" }),
3053
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { onClick: onNewDeposit, fullWidth: true, children: "Try Again" })
2953
3054
  ] }),
2954
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PoweredBy, {})
3055
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PoweredBy, {})
2955
3056
  ] });
2956
3057
  }
2957
- var import_react6, import_viem6, import_jsx_runtime10, INITIAL_POLL_INTERVAL, MAX_POLL_INTERVAL, BACKOFF_MULTIPLIER, PROCESS_TIMEOUT_MS;
3058
+ var import_react6, import_viem6, import_jsx_runtime11, INITIAL_POLL_INTERVAL, MAX_POLL_INTERVAL, BACKOFF_MULTIPLIER, PROCESS_TIMEOUT_MS;
2958
3059
  var init_ProcessingStep = __esm({
2959
3060
  "src/components/steps/ProcessingStep.tsx"() {
2960
3061
  "use strict";
@@ -2965,7 +3066,7 @@ var init_ProcessingStep = __esm({
2965
3066
  init_Spinner();
2966
3067
  init_webhook();
2967
3068
  init_constants();
2968
- import_jsx_runtime10 = require("react/jsx-runtime");
3069
+ import_jsx_runtime11 = require("react/jsx-runtime");
2969
3070
  INITIAL_POLL_INTERVAL = 3e3;
2970
3071
  MAX_POLL_INTERVAL = 3e4;
2971
3072
  BACKOFF_MULTIPLIER = 1.5;
@@ -3007,7 +3108,7 @@ function QRCode({
3007
3108
  }, [value, size, iconSrc]);
3008
3109
  const iconSize = size * 0.22;
3009
3110
  const iconOffset = (size - iconSize) / 2;
3010
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3111
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3011
3112
  "svg",
3012
3113
  {
3013
3114
  viewBox: `0 0 ${size} ${size}`,
@@ -3017,10 +3118,10 @@ function QRCode({
3017
3118
  role: "img",
3018
3119
  "aria-label": "QR Code",
3019
3120
  children: [
3020
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { width: size, height: size, fill: "white", rx: 4 }),
3021
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: svgContent.paths, fill: "black" }),
3022
- iconSrc && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
3023
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3121
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { width: size, height: size, fill: "white", rx: 4 }),
3122
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: svgContent.paths, fill: "black" }),
3123
+ iconSrc && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
3124
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3024
3125
  "rect",
3025
3126
  {
3026
3127
  x: iconOffset - 4,
@@ -3031,7 +3132,7 @@ function QRCode({
3031
3132
  rx: 8
3032
3133
  }
3033
3134
  ),
3034
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3135
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3035
3136
  "image",
3036
3137
  {
3037
3138
  href: iconSrc,
@@ -3046,13 +3147,13 @@ function QRCode({
3046
3147
  }
3047
3148
  );
3048
3149
  }
3049
- var import_react7, import_qrcode_generator, import_jsx_runtime11;
3150
+ var import_react7, import_qrcode_generator, import_jsx_runtime12;
3050
3151
  var init_QRCode = __esm({
3051
3152
  "src/components/ui/QRCode.tsx"() {
3052
3153
  "use strict";
3053
3154
  import_react7 = require("react");
3054
3155
  import_qrcode_generator = __toESM(require("qrcode-generator"), 1);
3055
- import_jsx_runtime11 = require("react/jsx-runtime");
3156
+ import_jsx_runtime12 = require("react/jsx-runtime");
3056
3157
  QRCode.displayName = "QRCode";
3057
3158
  }
3058
3159
  });
@@ -3198,12 +3299,12 @@ function DepositAddressStep({
3198
3299
  };
3199
3300
  }, [smartAccount, service, onDepositDetected, onError]);
3200
3301
  const chainIconSrc = getChainIcon(sourceChainId);
3201
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "rs-step", children: [
3202
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rs-step-body", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "rs-deposit-address", children: [
3203
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "rs-deposit-address-selectors", children: [
3204
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "rs-deposit-address-dropdown", children: [
3205
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rs-deposit-address-dropdown-label", children: "Supported token" }),
3206
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3302
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rs-step", children: [
3303
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-step-body", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rs-deposit-address", children: [
3304
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rs-deposit-address-selectors", children: [
3305
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rs-deposit-address-dropdown", children: [
3306
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-deposit-address-dropdown-label", children: "Supported token" }),
3307
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3207
3308
  "button",
3208
3309
  {
3209
3310
  type: "button",
@@ -3213,7 +3314,7 @@ function DepositAddressStep({
3213
3314
  setChainDropdownOpen(false);
3214
3315
  },
3215
3316
  children: [
3216
- getTokenIcon(sourceTokenSymbol) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3317
+ getTokenIcon(sourceTokenSymbol) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3217
3318
  "img",
3218
3319
  {
3219
3320
  src: getTokenIcon(sourceTokenSymbol),
@@ -3221,8 +3322,8 @@ function DepositAddressStep({
3221
3322
  className: "rs-deposit-address-dropdown-icon"
3222
3323
  }
3223
3324
  ),
3224
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: sourceTokenSymbol }),
3225
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3325
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: sourceTokenSymbol }),
3326
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3226
3327
  "svg",
3227
3328
  {
3228
3329
  className: "rs-deposit-address-dropdown-chevron",
@@ -3230,7 +3331,7 @@ function DepositAddressStep({
3230
3331
  fill: "none",
3231
3332
  stroke: "currentColor",
3232
3333
  strokeWidth: "2",
3233
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3334
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3234
3335
  "path",
3235
3336
  {
3236
3337
  strokeLinecap: "round",
@@ -3243,7 +3344,7 @@ function DepositAddressStep({
3243
3344
  ]
3244
3345
  }
3245
3346
  ),
3246
- tokenDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rs-deposit-address-dropdown-menu", children: tokensForChain.map((symbol) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3347
+ tokenDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-deposit-address-dropdown-menu", children: tokensForChain.map((symbol) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3247
3348
  "button",
3248
3349
  {
3249
3350
  type: "button",
@@ -3253,7 +3354,7 @@ function DepositAddressStep({
3253
3354
  setTokenDropdownOpen(false);
3254
3355
  },
3255
3356
  children: [
3256
- getTokenIcon(symbol) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3357
+ getTokenIcon(symbol) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3257
3358
  "img",
3258
3359
  {
3259
3360
  src: getTokenIcon(symbol),
@@ -3261,15 +3362,15 @@ function DepositAddressStep({
3261
3362
  className: "rs-deposit-address-dropdown-icon"
3262
3363
  }
3263
3364
  ),
3264
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: symbol })
3365
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: symbol })
3265
3366
  ]
3266
3367
  },
3267
3368
  symbol
3268
3369
  )) })
3269
3370
  ] }),
3270
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "rs-deposit-address-dropdown", children: [
3271
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
3272
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3371
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rs-deposit-address-dropdown", children: [
3372
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
3373
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3273
3374
  "button",
3274
3375
  {
3275
3376
  type: "button",
@@ -3279,7 +3380,7 @@ function DepositAddressStep({
3279
3380
  setTokenDropdownOpen(false);
3280
3381
  },
3281
3382
  children: [
3282
- getChainIcon(sourceChainId) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3383
+ getChainIcon(sourceChainId) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3283
3384
  "img",
3284
3385
  {
3285
3386
  src: getChainIcon(sourceChainId),
@@ -3287,8 +3388,8 @@ function DepositAddressStep({
3287
3388
  className: "rs-deposit-address-dropdown-icon"
3288
3389
  }
3289
3390
  ),
3290
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: getChainName(sourceChainId) }),
3291
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3391
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: getChainName(sourceChainId) }),
3392
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3292
3393
  "svg",
3293
3394
  {
3294
3395
  className: "rs-deposit-address-dropdown-chevron",
@@ -3296,7 +3397,7 @@ function DepositAddressStep({
3296
3397
  fill: "none",
3297
3398
  stroke: "currentColor",
3298
3399
  strokeWidth: "2",
3299
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3400
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3300
3401
  "path",
3301
3402
  {
3302
3403
  strokeLinecap: "round",
@@ -3309,7 +3410,7 @@ function DepositAddressStep({
3309
3410
  ]
3310
3411
  }
3311
3412
  ),
3312
- chainDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rs-deposit-address-dropdown-menu", children: supportedChainIds.map((chainId) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3413
+ chainDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-deposit-address-dropdown-menu", children: supportedChainIds.map((chainId) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3313
3414
  "button",
3314
3415
  {
3315
3416
  type: "button",
@@ -3319,7 +3420,7 @@ function DepositAddressStep({
3319
3420
  setChainDropdownOpen(false);
3320
3421
  },
3321
3422
  children: [
3322
- getChainIcon(chainId) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3423
+ getChainIcon(chainId) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3323
3424
  "img",
3324
3425
  {
3325
3426
  src: getChainIcon(chainId),
@@ -3327,25 +3428,25 @@ function DepositAddressStep({
3327
3428
  className: "rs-deposit-address-dropdown-icon"
3328
3429
  }
3329
3430
  ),
3330
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: getChainName(chainId) })
3431
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: getChainName(chainId) })
3331
3432
  ]
3332
3433
  },
3333
3434
  chainId
3334
3435
  )) })
3335
3436
  ] })
3336
3437
  ] }),
3337
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(QRCode, { value: smartAccount, size: 200, iconSrc: chainIconSrc }) }),
3338
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "rs-deposit-address-info", children: [
3339
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rs-deposit-address-label", children: "Your deposit address" }),
3340
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rs-deposit-address-value", children: smartAccount }),
3341
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3438
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(QRCode, { value: smartAccount, size: 200, iconSrc: chainIconSrc }) }),
3439
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rs-deposit-address-info", children: [
3440
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-deposit-address-label", children: "Your deposit address" }),
3441
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-deposit-address-value", children: smartAccount }),
3442
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3342
3443
  "button",
3343
3444
  {
3344
3445
  type: "button",
3345
3446
  className: "rs-deposit-address-copy",
3346
3447
  onClick: handleCopy,
3347
3448
  children: [
3348
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3449
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3349
3450
  "svg",
3350
3451
  {
3351
3452
  viewBox: "0 0 24 24",
@@ -3353,14 +3454,14 @@ function DepositAddressStep({
3353
3454
  stroke: "currentColor",
3354
3455
  strokeWidth: "2",
3355
3456
  style: { width: 14, height: 14 },
3356
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3457
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3357
3458
  "path",
3358
3459
  {
3359
3460
  strokeLinecap: "round",
3360
3461
  strokeLinejoin: "round",
3361
3462
  d: "M5 12l5 5L20 7"
3362
3463
  }
3363
- ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3464
+ ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3364
3465
  "path",
3365
3466
  {
3366
3467
  strokeLinecap: "round",
@@ -3375,12 +3476,12 @@ function DepositAddressStep({
3375
3476
  }
3376
3477
  )
3377
3478
  ] }),
3378
- pollingError && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rs-deposit-address-error", children: pollingError })
3479
+ pollingError && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-deposit-address-error", children: pollingError })
3379
3480
  ] }) }),
3380
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PoweredBy, {})
3481
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PoweredBy, {})
3381
3482
  ] });
3382
3483
  }
3383
- var import_react8, import_jsx_runtime12, POLL_INTERVAL_MS;
3484
+ var import_react8, import_jsx_runtime13, POLL_INTERVAL_MS;
3384
3485
  var init_DepositAddressStep = __esm({
3385
3486
  "src/components/steps/DepositAddressStep.tsx"() {
3386
3487
  "use strict";
@@ -3389,21 +3490,43 @@ var init_DepositAddressStep = __esm({
3389
3490
  init_PoweredBy();
3390
3491
  init_constants();
3391
3492
  init_webhook();
3392
- import_jsx_runtime12 = require("react/jsx-runtime");
3493
+ import_jsx_runtime13 = require("react/jsx-runtime");
3393
3494
  POLL_INTERVAL_MS = 4e3;
3394
3495
  DepositAddressStep.displayName = "DepositAddressStep";
3395
3496
  }
3396
3497
  });
3397
3498
 
3499
+ // src/core/public-client.ts
3500
+ function getPublicClient(chainId) {
3501
+ let client = clientCache.get(chainId);
3502
+ if (!client) {
3503
+ const chain = CHAIN_BY_ID[chainId];
3504
+ client = (0, import_viem7.createPublicClient)({
3505
+ chain,
3506
+ transport: (0, import_viem7.http)()
3507
+ });
3508
+ clientCache.set(chainId, client);
3509
+ }
3510
+ return client;
3511
+ }
3512
+ var import_viem7, clientCache;
3513
+ var init_public_client = __esm({
3514
+ "src/core/public-client.ts"() {
3515
+ "use strict";
3516
+ import_viem7 = require("viem");
3517
+ init_constants();
3518
+ clientCache = /* @__PURE__ */ new Map();
3519
+ }
3520
+ });
3521
+
3398
3522
  // src/DepositFlow.tsx
3399
3523
  function DepositFlow({
3400
- walletClient,
3401
- publicClient,
3402
- address,
3524
+ dappWalletClient,
3525
+ dappPublicClient,
3526
+ dappAddress,
3403
3527
  targetChain,
3404
3528
  targetToken,
3405
3529
  service,
3406
- switchChain,
3407
3530
  sourceChain: defaultSourceChain,
3408
3531
  sourceToken: defaultSourceToken,
3409
3532
  amount: defaultAmount,
@@ -3412,9 +3535,7 @@ function DepositFlow({
3412
3535
  sessionChainIds,
3413
3536
  forceRegister = false,
3414
3537
  waitForFinalTx = true,
3415
- connectWalletOptions,
3416
- selectedConnectAddress,
3417
- onSelectConnectAddress,
3538
+ reownWallet,
3418
3539
  onConnect,
3419
3540
  onRequestConnect,
3420
3541
  connectButtonLabel,
@@ -3432,9 +3553,93 @@ function DepositFlow({
3432
3553
  const [flowMode, setFlowMode] = (0, import_react9.useState)(null);
3433
3554
  const [totalBalanceUsd, setTotalBalanceUsd] = (0, import_react9.useState)(0);
3434
3555
  const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = (0, import_react9.useState)(false);
3435
- const hasConnectWalletOptions = (connectWalletOptions?.length ?? 0) > 0;
3436
- const hasConnectedWallet = Boolean(walletClient && publicClient && address);
3556
+ const [selectedConnectAddress, setSelectedConnectAddress] = (0, import_react9.useState)(null);
3437
3557
  const targetChainObj = (0, import_react9.useMemo)(() => CHAIN_BY_ID[targetChain], [targetChain]);
3558
+ const dappSwitchChain = (0, import_react9.useMemo)(() => {
3559
+ if (!dappWalletClient?.switchChain) return void 0;
3560
+ return async (chainId) => {
3561
+ await dappWalletClient.switchChain?.({ id: chainId });
3562
+ };
3563
+ }, [dappWalletClient]);
3564
+ const walletOptions = (0, import_react9.useMemo)(() => {
3565
+ const options = [];
3566
+ const seen = /* @__PURE__ */ new Set();
3567
+ if (dappWalletClient?.account && dappAddress) {
3568
+ options.push({
3569
+ address: dappWalletClient.account.address,
3570
+ label: "Connected Wallet",
3571
+ kind: "connected"
3572
+ });
3573
+ seen.add(dappWalletClient.account.address.toLowerCase());
3574
+ }
3575
+ if (reownWallet?.address && reownWallet.isConnected && !seen.has(reownWallet.address.toLowerCase())) {
3576
+ options.push({
3577
+ address: reownWallet.address,
3578
+ label: "External Wallet",
3579
+ kind: "external"
3580
+ });
3581
+ }
3582
+ return options;
3583
+ }, [
3584
+ dappWalletClient,
3585
+ dappAddress,
3586
+ reownWallet?.address,
3587
+ reownWallet?.isConnected
3588
+ ]);
3589
+ const canAutoLock = dappWalletClient?.account && dappAddress && !reownWallet;
3590
+ const hasWalletOptions = walletOptions.length > 0;
3591
+ const showConnectStep = !canAutoLock && !isConnectSelectionConfirmed;
3592
+ const signerContext = (0, import_react9.useMemo)(() => {
3593
+ if (flowMode === "deposit-address") {
3594
+ if (!dappAddress) return null;
3595
+ return {
3596
+ ownerAddress: dappAddress,
3597
+ walletClient: void 0,
3598
+ publicClient: dappPublicClient ?? getPublicClient(targetChain),
3599
+ switchChain: void 0
3600
+ };
3601
+ }
3602
+ if (canAutoLock) {
3603
+ const fallbackChainId = dappWalletClient?.chain?.id ?? targetChain;
3604
+ return {
3605
+ ownerAddress: dappWalletClient.account.address,
3606
+ walletClient: dappWalletClient,
3607
+ publicClient: dappPublicClient ?? getPublicClient(fallbackChainId),
3608
+ switchChain: dappSwitchChain
3609
+ };
3610
+ }
3611
+ if (!isConnectSelectionConfirmed || !selectedConnectAddress) return null;
3612
+ if (dappWalletClient?.account && dappWalletClient.account.address.toLowerCase() === selectedConnectAddress.toLowerCase()) {
3613
+ const fallbackChainId = dappWalletClient?.chain?.id ?? targetChain;
3614
+ return {
3615
+ ownerAddress: dappWalletClient.account.address,
3616
+ walletClient: dappWalletClient,
3617
+ publicClient: dappPublicClient ?? getPublicClient(fallbackChainId),
3618
+ switchChain: dappSwitchChain
3619
+ };
3620
+ }
3621
+ if (reownWallet?.address?.toLowerCase() === selectedConnectAddress.toLowerCase() && reownWallet.walletClient && reownWallet.publicClient) {
3622
+ return {
3623
+ ownerAddress: reownWallet.address,
3624
+ walletClient: reownWallet.walletClient,
3625
+ publicClient: reownWallet.publicClient,
3626
+ switchChain: reownWallet.switchChain
3627
+ };
3628
+ }
3629
+ return null;
3630
+ }, [
3631
+ flowMode,
3632
+ canAutoLock,
3633
+ isConnectSelectionConfirmed,
3634
+ selectedConnectAddress,
3635
+ dappWalletClient,
3636
+ dappPublicClient,
3637
+ dappSwitchChain,
3638
+ dappAddress,
3639
+ reownWallet,
3640
+ targetChain
3641
+ ]);
3642
+ const sessionKeyAddress = dappAddress ?? signerContext?.ownerAddress ?? null;
3438
3643
  const lastTargetRef = (0, import_react9.useRef)(null);
3439
3644
  (0, import_react9.useEffect)(() => {
3440
3645
  const prev = lastTargetRef.current;
@@ -3452,10 +3657,17 @@ function DepositFlow({
3452
3657
  });
3453
3658
  }, []);
3454
3659
  const handleBackFromSelectAsset = (0, import_react9.useCallback)(() => {
3455
- if (hasConnectWalletOptions) {
3660
+ if (hasWalletOptions || reownWallet) {
3456
3661
  setIsConnectSelectionConfirmed(false);
3457
3662
  }
3458
- }, [hasConnectWalletOptions]);
3663
+ }, [hasWalletOptions, reownWallet]);
3664
+ const handleBackFromDepositAddress = (0, import_react9.useCallback)(() => {
3665
+ setFlowMode(null);
3666
+ setStep({ type: "setup" });
3667
+ if (hasWalletOptions || reownWallet) {
3668
+ setIsConnectSelectionConfirmed(false);
3669
+ }
3670
+ }, [hasWalletOptions, reownWallet]);
3459
3671
  const handleBackFromConfirm = (0, import_react9.useCallback)(() => {
3460
3672
  setStep((prev) => {
3461
3673
  if (prev.type !== "confirm") return prev;
@@ -3468,7 +3680,7 @@ function DepositFlow({
3468
3680
  });
3469
3681
  }, []);
3470
3682
  const stepIndex = step.type === "setup" ? 0 : step.type === "deposit-address" ? 1 : step.type === "select-asset" ? 1 : step.type === "amount" ? 2 : step.type === "confirm" ? 3 : 4;
3471
- const currentBackHandler = step.type === "select-asset" && hasConnectedWallet && hasConnectWalletOptions && isConnectSelectionConfirmed ? handleBackFromSelectAsset : step.type === "amount" ? handleBackFromAmount : step.type === "confirm" ? handleBackFromConfirm : void 0;
3683
+ const currentBackHandler = step.type === "deposit-address" ? handleBackFromDepositAddress : step.type === "select-asset" && signerContext && !canAutoLock ? handleBackFromSelectAsset : step.type === "amount" ? handleBackFromAmount : step.type === "confirm" ? handleBackFromConfirm : void 0;
3472
3684
  (0, import_react9.useEffect)(() => {
3473
3685
  onStepChange?.(stepIndex, currentBackHandler);
3474
3686
  }, [stepIndex, currentBackHandler, onStepChange]);
@@ -3593,33 +3805,35 @@ function DepositFlow({
3593
3805
  }, []);
3594
3806
  const selectedConnectAddressEffective = (0, import_react9.useMemo)(() => {
3595
3807
  if (selectedConnectAddress) return selectedConnectAddress;
3596
- if ((connectWalletOptions?.length ?? 0) === 1) {
3597
- return connectWalletOptions?.[0]?.address ?? null;
3808
+ if (walletOptions.length === 1) {
3809
+ return walletOptions[0].address;
3598
3810
  }
3599
3811
  return null;
3600
- }, [selectedConnectAddress, connectWalletOptions]);
3601
- const connectWalletOptionsKey = (0, import_react9.useMemo)(
3602
- () => (connectWalletOptions ?? []).map((option) => option.address.toLowerCase()).join(","),
3603
- [connectWalletOptions]
3812
+ }, [selectedConnectAddress, walletOptions]);
3813
+ const walletOptionsKey = (0, import_react9.useMemo)(
3814
+ () => walletOptions.map((option) => option.address.toLowerCase()).join(","),
3815
+ [walletOptions]
3604
3816
  );
3605
- const showConnectStep = !hasConnectedWallet || hasConnectWalletOptions && !isConnectSelectionConfirmed;
3606
3817
  (0, import_react9.useEffect)(() => {
3607
3818
  setIsConnectSelectionConfirmed(false);
3608
- }, [connectWalletOptionsKey, selectedConnectAddressEffective]);
3819
+ }, [walletOptionsKey, selectedConnectAddressEffective]);
3609
3820
  if (showConnectStep) {
3610
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rs-modal-body", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3821
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "rs-modal-body", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3611
3822
  ConnectStep,
3612
3823
  {
3613
- walletOptions: connectWalletOptions,
3824
+ walletOptions,
3614
3825
  selectedAddress: selectedConnectAddressEffective,
3615
- onSelectAddress: onSelectConnectAddress,
3616
- onSelectTransferCrypto: () => {
3826
+ onSelectAddress: setSelectedConnectAddress,
3827
+ onSelectTransferCrypto: dappAddress ? () => {
3617
3828
  handleSelectTransferCrypto();
3618
3829
  setIsConnectSelectionConfirmed(true);
3619
- },
3830
+ } : void 0,
3620
3831
  onRequestConnect,
3621
3832
  onConnect,
3622
3833
  onContinue: () => {
3834
+ if (selectedConnectAddressEffective) {
3835
+ setSelectedConnectAddress(selectedConnectAddressEffective);
3836
+ }
3623
3837
  handleSelectProvider();
3624
3838
  setIsConnectSelectionConfirmed(true);
3625
3839
  },
@@ -3627,16 +3841,13 @@ function DepositFlow({
3627
3841
  }
3628
3842
  ) });
3629
3843
  }
3630
- if (!walletClient || !publicClient || !address) {
3631
- return null;
3632
- }
3633
3844
  if (isDepositAddressMode) {
3634
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rs-modal-body", children: [
3635
- step.type === "setup" && targetChainObj && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3845
+ if (!dappAddress || !sessionKeyAddress) return null;
3846
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "rs-modal-body", children: [
3847
+ step.type === "setup" && targetChainObj && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3636
3848
  SetupStep,
3637
3849
  {
3638
- walletClient,
3639
- address,
3850
+ address: sessionKeyAddress,
3640
3851
  targetChain,
3641
3852
  targetChainObj,
3642
3853
  targetToken,
@@ -3650,7 +3861,7 @@ function DepositFlow({
3650
3861
  onError: handleError
3651
3862
  }
3652
3863
  ),
3653
- step.type === "deposit-address" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3864
+ step.type === "deposit-address" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3654
3865
  DepositAddressStep,
3655
3866
  {
3656
3867
  smartAccount: step.smartAccount,
@@ -3659,7 +3870,7 @@ function DepositFlow({
3659
3870
  onError: handleError
3660
3871
  }
3661
3872
  ),
3662
- step.type === "processing" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3873
+ step.type === "processing" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3663
3874
  ProcessingStep,
3664
3875
  {
3665
3876
  smartAccount: step.smartAccount,
@@ -3680,12 +3891,23 @@ function DepositFlow({
3680
3891
  )
3681
3892
  ] });
3682
3893
  }
3683
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rs-modal-body", children: [
3684
- step.type === "setup" && targetChainObj && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3894
+ if (!signerContext?.walletClient || !signerContext?.publicClient) {
3895
+ return null;
3896
+ }
3897
+ const ownerAddress = signerContext.ownerAddress;
3898
+ const ownerChainId = signerContext.walletClient?.chain?.id ?? signerContext.publicClient.chain?.id ?? targetChain;
3899
+ const getReadClientForChain = (chainId) => {
3900
+ if (signerContext.publicClient.chain?.id === chainId) {
3901
+ return signerContext.publicClient;
3902
+ }
3903
+ return getPublicClient(chainId);
3904
+ };
3905
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "rs-modal-body", children: [
3906
+ step.type === "setup" && targetChainObj && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3685
3907
  SetupStep,
3686
3908
  {
3687
- walletClient,
3688
- address,
3909
+ walletClient: signerContext.walletClient,
3910
+ address: ownerAddress,
3689
3911
  targetChain,
3690
3912
  targetChainObj,
3691
3913
  targetToken,
@@ -3699,11 +3921,11 @@ function DepositFlow({
3699
3921
  onError: handleError
3700
3922
  }
3701
3923
  ),
3702
- step.type === "select-asset" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3924
+ step.type === "select-asset" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3703
3925
  AssetSelectStep,
3704
3926
  {
3705
- address,
3706
- publicClient,
3927
+ address: ownerAddress,
3928
+ publicClient: getReadClientForChain(ownerChainId),
3707
3929
  defaultSourceChain,
3708
3930
  defaultSourceToken,
3709
3931
  service,
@@ -3711,39 +3933,39 @@ function DepositFlow({
3711
3933
  onTotalBalanceComputed: handleTotalBalanceComputed
3712
3934
  }
3713
3935
  ),
3714
- step.type === "amount" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3936
+ step.type === "amount" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3715
3937
  AmountStep,
3716
3938
  {
3717
- walletClient,
3718
- publicClient,
3719
- address,
3939
+ walletClient: signerContext.walletClient,
3940
+ publicClient: getReadClientForChain(step.asset.chainId),
3941
+ address: ownerAddress,
3720
3942
  asset: step.asset,
3721
3943
  defaultAmount: step.amount ?? defaultAmount,
3722
- switchChain,
3944
+ switchChain: signerContext.switchChain,
3723
3945
  targetChain,
3724
3946
  targetToken,
3725
3947
  uiConfig,
3726
3948
  onContinue: handleAmountContinue
3727
3949
  }
3728
3950
  ),
3729
- step.type === "confirm" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3951
+ step.type === "confirm" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3730
3952
  ConfirmStep,
3731
3953
  {
3732
- walletClient,
3733
- address,
3954
+ walletClient: signerContext.walletClient,
3955
+ address: ownerAddress,
3734
3956
  smartAccount: step.smartAccount,
3735
3957
  asset: step.asset,
3736
3958
  amount: step.amount,
3737
3959
  balance: step.balance,
3738
3960
  targetChain,
3739
3961
  targetToken,
3740
- switchChain,
3962
+ switchChain: signerContext.switchChain,
3741
3963
  onConfirm: handleDepositSubmitted,
3742
3964
  onDepositSubmitted: handleDepositSubmittedCallback,
3743
3965
  onError: handleError
3744
3966
  }
3745
3967
  ),
3746
- step.type === "processing" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3968
+ step.type === "processing" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3747
3969
  ProcessingStep,
3748
3970
  {
3749
3971
  smartAccount: step.smartAccount,
@@ -3764,7 +3986,7 @@ function DepositFlow({
3764
3986
  )
3765
3987
  ] });
3766
3988
  }
3767
- var import_react9, import_jsx_runtime13;
3989
+ var import_react9, import_jsx_runtime14;
3768
3990
  var init_DepositFlow = __esm({
3769
3991
  "src/DepositFlow.tsx"() {
3770
3992
  "use strict";
@@ -3777,7 +3999,8 @@ var init_DepositFlow = __esm({
3777
3999
  init_ProcessingStep();
3778
4000
  init_DepositAddressStep();
3779
4001
  init_constants();
3780
- import_jsx_runtime13 = require("react/jsx-runtime");
4002
+ init_public_client();
4003
+ import_jsx_runtime14 = require("react/jsx-runtime");
3781
4004
  }
3782
4005
  });
3783
4006
 
@@ -3866,7 +4089,7 @@ function ReownWalletProvider({
3866
4089
  const [queryClient] = (0, import_react10.useState)(() => new import_react_query.QueryClient());
3867
4090
  const adapter = getOrCreateAdapter(projectId, theme);
3868
4091
  const config = adapter.wagmiConfig;
3869
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_wagmi.WagmiProvider, { config, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_query.QueryClientProvider, { client: queryClient, children }) });
4092
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_wagmi.WagmiProvider, { config, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_query.QueryClientProvider, { client: queryClient, children }) });
3870
4093
  }
3871
4094
  function useReownWallet() {
3872
4095
  const { open } = (0, import_react11.useAppKit)();
@@ -3887,73 +4110,7 @@ function useReownWallet() {
3887
4110
  }
3888
4111
  };
3889
4112
  }
3890
- function useResolvedWallet(host, reown) {
3891
- const [selectedAddress, setSelectedAddress] = (0, import_react10.useState)(null);
3892
- const walletOptions = (0, import_react10.useMemo)(() => {
3893
- const options = [];
3894
- const seen = /* @__PURE__ */ new Set();
3895
- if (host.address) {
3896
- options.push({
3897
- address: host.address,
3898
- label: "Connected Wallet",
3899
- kind: "connected"
3900
- });
3901
- seen.add(host.address.toLowerCase());
3902
- }
3903
- if (reown.address && !seen.has(reown.address.toLowerCase())) {
3904
- options.push({
3905
- address: reown.address,
3906
- label: "External Wallet",
3907
- kind: "external"
3908
- });
3909
- }
3910
- return options;
3911
- }, [host.address, reown.address]);
3912
- const effectiveAddress = (0, import_react10.useMemo)(() => {
3913
- if (walletOptions.length === 0) return null;
3914
- if (walletOptions.length === 1) return walletOptions[0].address;
3915
- if (selectedAddress) {
3916
- const valid = walletOptions.some(
3917
- (opt) => opt.address.toLowerCase() === selectedAddress.toLowerCase()
3918
- );
3919
- if (valid) return selectedAddress;
3920
- }
3921
- return null;
3922
- }, [walletOptions, selectedAddress]);
3923
- let walletClient;
3924
- let publicClient;
3925
- if (effectiveAddress) {
3926
- const key = effectiveAddress.toLowerCase();
3927
- if (host.address?.toLowerCase() === key && host.walletClient && host.publicClient) {
3928
- walletClient = host.walletClient;
3929
- publicClient = host.publicClient;
3930
- } else if (reown.address?.toLowerCase() === key && reown.walletClient && reown.publicClient) {
3931
- walletClient = reown.walletClient;
3932
- publicClient = reown.publicClient;
3933
- }
3934
- }
3935
- const handleSwitchChain = (0, import_react10.useCallback)(
3936
- async (chainId) => {
3937
- if (host.switchChain && effectiveAddress?.toLowerCase() === host.address?.toLowerCase()) {
3938
- await host.switchChain(chainId);
3939
- } else {
3940
- await reown.switchChain(chainId);
3941
- }
3942
- },
3943
- [host.switchChain, host.address, reown.switchChain, effectiveAddress]
3944
- );
3945
- return {
3946
- walletClient,
3947
- publicClient,
3948
- address: effectiveAddress ?? void 0,
3949
- walletOptions,
3950
- selectedAddress: effectiveAddress,
3951
- onSelectAddress: setSelectedAddress,
3952
- openConnect: reown.openConnect,
3953
- switchChain: handleSwitchChain
3954
- };
3955
- }
3956
- var import_react10, import_react_query, import_appkit_adapter_wagmi, import_wagmi, import_react11, import_networks, import_wagmi2, import_jsx_runtime14, NETWORKS, cachedAdapter, cachedProjectId;
4113
+ var import_react10, import_react_query, import_appkit_adapter_wagmi, import_wagmi, import_react11, import_networks, import_wagmi2, import_jsx_runtime15, NETWORKS, cachedAdapter, cachedProjectId;
3957
4114
  var init_reown = __esm({
3958
4115
  "src/core/reown.tsx"() {
3959
4116
  "use strict";
@@ -3964,7 +4121,7 @@ var init_reown = __esm({
3964
4121
  import_react11 = require("@reown/appkit/react");
3965
4122
  import_networks = require("@reown/appkit/networks");
3966
4123
  import_wagmi2 = require("wagmi");
3967
- import_jsx_runtime14 = require("react/jsx-runtime");
4124
+ import_jsx_runtime15 = require("react/jsx-runtime");
3968
4125
  NETWORKS = [
3969
4126
  import_networks.mainnet,
3970
4127
  import_networks.base,
@@ -3985,45 +4142,29 @@ __export(DepositModalReown_exports, {
3985
4142
  });
3986
4143
  function DepositModalWithReown(props) {
3987
4144
  const reown = useReownWallet();
3988
- const resolved = useResolvedWallet(
3989
- {
3990
- walletClient: props.walletClient,
3991
- publicClient: props.publicClient,
3992
- address: props.address,
3993
- switchChain: props.switchChain
3994
- },
3995
- reown
3996
- );
3997
4145
  const handleConnect = (0, import_react12.useCallback)(() => {
3998
4146
  reown.openConnect();
3999
4147
  }, [reown.openConnect]);
4000
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4148
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4001
4149
  DepositModalInner,
4002
4150
  {
4003
4151
  ...props,
4004
- walletClient: resolved.walletClient,
4005
- publicClient: resolved.publicClient,
4006
- address: resolved.address,
4007
- switchChain: resolved.switchChain,
4008
- connectWalletOptions: resolved.walletOptions,
4009
- selectedConnectAddress: resolved.selectedAddress,
4010
- onSelectConnectAddress: resolved.onSelectAddress,
4011
- onConnect: handleConnect,
4012
- onRequestConnect: props.onRequestConnect
4152
+ reownWallet: reown,
4153
+ onConnect: handleConnect
4013
4154
  }
4014
4155
  );
4015
4156
  }
4016
4157
  function DepositModalReown(props) {
4017
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DepositModalWithReown, { ...props }) });
4158
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DepositModalWithReown, { ...props }) });
4018
4159
  }
4019
- var import_react12, import_jsx_runtime15;
4160
+ var import_react12, import_jsx_runtime16;
4020
4161
  var init_DepositModalReown = __esm({
4021
4162
  "src/DepositModalReown.tsx"() {
4022
4163
  "use strict";
4023
4164
  import_react12 = require("react");
4024
4165
  init_reown();
4025
4166
  init_DepositModal();
4026
- import_jsx_runtime15 = require("react/jsx-runtime");
4167
+ import_jsx_runtime16 = require("react/jsx-runtime");
4027
4168
  }
4028
4169
  });
4029
4170
 
@@ -4031,20 +4172,19 @@ var init_DepositModalReown = __esm({
4031
4172
  function DepositModal(props) {
4032
4173
  const needsReown = !!props.reownAppId;
4033
4174
  if (needsReown) {
4034
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ReownDepositInner, { ...props }) });
4175
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react13.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ReownDepositInner, { ...props }) });
4035
4176
  }
4036
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DepositModalInner, { ...props });
4177
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DepositModalInner, { ...props });
4037
4178
  }
4038
4179
  function DepositModalInner({
4039
- walletClient,
4040
- publicClient,
4041
- address,
4180
+ dappWalletClient,
4181
+ dappPublicClient,
4182
+ dappAddress,
4042
4183
  targetChain: targetChainProp,
4043
4184
  targetToken,
4044
4185
  isOpen,
4045
4186
  onClose,
4046
4187
  inline,
4047
- switchChain,
4048
4188
  sourceChain: sourceChainProp,
4049
4189
  sourceToken,
4050
4190
  defaultAmount,
@@ -4054,9 +4194,7 @@ function DepositModalInner({
4054
4194
  sessionChainIds,
4055
4195
  forceRegister = false,
4056
4196
  waitForFinalTx = true,
4057
- connectWalletOptions,
4058
- selectedConnectAddress,
4059
- onSelectConnectAddress,
4197
+ reownWallet,
4060
4198
  onConnect,
4061
4199
  onRequestConnect,
4062
4200
  connectButtonLabel,
@@ -4115,30 +4253,30 @@ function DepositModalInner({
4115
4253
  const logoUrl = branding?.logoUrl ?? "https://github.com/rhinestonewtf.png";
4116
4254
  const title = branding?.title ?? "Deposit";
4117
4255
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
4118
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4256
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4119
4257
  Modal,
4120
4258
  {
4121
4259
  isOpen,
4122
4260
  onClose,
4123
4261
  className,
4124
4262
  inline,
4125
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { ref: modalRef, className: "rs-modal", children: [
4126
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "rs-modal-header--redesigned", children: [
4127
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4263
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: modalRef, className: "rs-modal", children: [
4264
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-modal-header--redesigned", children: [
4265
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4128
4266
  "button",
4129
4267
  {
4130
4268
  type: "button",
4131
4269
  className: "rs-modal-header-back",
4132
4270
  "aria-label": "Go back",
4133
4271
  onClick: handleBack,
4134
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4272
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4135
4273
  "svg",
4136
4274
  {
4137
4275
  viewBox: "0 0 24 24",
4138
4276
  fill: "none",
4139
4277
  stroke: "currentColor",
4140
4278
  strokeWidth: "2",
4141
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4279
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4142
4280
  "path",
4143
4281
  {
4144
4282
  strokeLinecap: "round",
@@ -4150,9 +4288,9 @@ function DepositModalInner({
4150
4288
  )
4151
4289
  }
4152
4290
  ) }),
4153
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "rs-modal-header-nav-center", children: [
4154
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "rs-modal-header-title-row", children: [
4155
- showLogo && logoUrl && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4291
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-modal-header-nav-center", children: [
4292
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-modal-header-title-row", children: [
4293
+ showLogo && logoUrl && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4156
4294
  "img",
4157
4295
  {
4158
4296
  src: logoUrl,
@@ -4163,8 +4301,8 @@ function DepositModalInner({
4163
4301
  }
4164
4302
  }
4165
4303
  ),
4166
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "rs-modal-header-title", children: title }),
4167
- showStepper && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "rs-modal-progress", style: { marginLeft: 8 }, children: [0, 1, 2, 3, 4].map((i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4304
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "rs-modal-header-title", children: title }),
4305
+ showStepper && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "rs-modal-progress", style: { marginLeft: 8 }, children: [0, 1, 2, 3, 4].map((i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4168
4306
  "div",
4169
4307
  {
4170
4308
  className: `rs-modal-progress-dot ${i <= currentStepIndex ? "rs-modal-progress-dot--active" : "rs-modal-progress-dot--inactive"}`
@@ -4172,29 +4310,29 @@ function DepositModalInner({
4172
4310
  i
4173
4311
  )) })
4174
4312
  ] }),
4175
- balanceTitle && totalBalanceUsd !== null && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "rs-modal-header-balance", children: [
4176
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
4313
+ balanceTitle && totalBalanceUsd !== null && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-modal-header-balance", children: [
4314
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
4177
4315
  balanceTitle,
4178
4316
  ":"
4179
4317
  ] }),
4180
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "rs-modal-header-balance-value", children: currencyFormatter.format(totalBalanceUsd) })
4318
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "rs-modal-header-balance-value", children: currencyFormatter.format(totalBalanceUsd) })
4181
4319
  ] })
4182
4320
  ] }),
4183
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4321
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4184
4322
  "button",
4185
4323
  {
4186
4324
  type: "button",
4187
4325
  onClick: onClose,
4188
4326
  className: "rs-modal-close",
4189
4327
  "aria-label": "Close",
4190
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4328
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4191
4329
  "svg",
4192
4330
  {
4193
4331
  viewBox: "0 0 24 24",
4194
4332
  fill: "none",
4195
4333
  stroke: "currentColor",
4196
4334
  strokeWidth: "2",
4197
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4335
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4198
4336
  "path",
4199
4337
  {
4200
4338
  strokeLinecap: "round",
@@ -4207,16 +4345,15 @@ function DepositModalInner({
4207
4345
  }
4208
4346
  ) })
4209
4347
  ] }),
4210
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4348
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4211
4349
  DepositFlow,
4212
4350
  {
4213
- walletClient,
4214
- publicClient,
4215
- address,
4351
+ dappWalletClient,
4352
+ dappPublicClient,
4353
+ dappAddress,
4216
4354
  targetChain,
4217
4355
  targetToken,
4218
4356
  service,
4219
- switchChain,
4220
4357
  sourceChain,
4221
4358
  sourceToken,
4222
4359
  amount: defaultAmount,
@@ -4225,9 +4362,7 @@ function DepositModalInner({
4225
4362
  sessionChainIds,
4226
4363
  forceRegister,
4227
4364
  waitForFinalTx,
4228
- connectWalletOptions,
4229
- selectedConnectAddress,
4230
- onSelectConnectAddress,
4365
+ reownWallet,
4231
4366
  onConnect,
4232
4367
  onRequestConnect,
4233
4368
  connectButtonLabel,
@@ -4246,7 +4381,7 @@ function DepositModalInner({
4246
4381
  }
4247
4382
  );
4248
4383
  }
4249
- var import_react13, import_jsx_runtime16, ReownDepositInner;
4384
+ var import_react13, import_jsx_runtime17, ReownDepositInner;
4250
4385
  var init_DepositModal = __esm({
4251
4386
  "src/DepositModal.tsx"() {
4252
4387
  "use strict";
@@ -4257,7 +4392,7 @@ var init_DepositModal = __esm({
4257
4392
  init_constants();
4258
4393
  init_formatters();
4259
4394
  init_theme();
4260
- import_jsx_runtime16 = require("react/jsx-runtime");
4395
+ import_jsx_runtime17 = require("react/jsx-runtime");
4261
4396
  ReownDepositInner = (0, import_react13.lazy)(
4262
4397
  () => Promise.resolve().then(() => (init_DepositModalReown(), DepositModalReown_exports)).then((m) => ({ default: m.DepositModalReown }))
4263
4398
  );
@@ -4346,7 +4481,7 @@ function WithdrawFormStep({
4346
4481
  try {
4347
4482
  const bal = isNativeAsset(asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
4348
4483
  address: asset.token,
4349
- abi: import_viem7.erc20Abi,
4484
+ abi: import_viem8.erc20Abi,
4350
4485
  functionName: "balanceOf",
4351
4486
  args: [safeAddress]
4352
4487
  });
@@ -4374,7 +4509,7 @@ function WithdrawFormStep({
4374
4509
  const formattedBalance = (0, import_react14.useMemo)(() => {
4375
4510
  if (balance === null) return "...";
4376
4511
  try {
4377
- const raw = (0, import_viem7.formatUnits)(balance, asset.decimals);
4512
+ const raw = (0, import_viem8.formatUnits)(balance, asset.decimals);
4378
4513
  const numeric = Number(raw);
4379
4514
  if (!Number.isFinite(numeric)) return raw;
4380
4515
  return new Intl.NumberFormat("en-US", {
@@ -4389,7 +4524,7 @@ function WithdrawFormStep({
4389
4524
  const sym = asset.symbol.toUpperCase();
4390
4525
  if (sym !== "USDC" && sym !== "USDT") return;
4391
4526
  try {
4392
- const raw = (0, import_viem7.formatUnits)(balance, asset.decimals);
4527
+ const raw = (0, import_viem8.formatUnits)(balance, asset.decimals);
4393
4528
  const numeric = Number(raw);
4394
4529
  if (!Number.isFinite(numeric)) return;
4395
4530
  onBalanceUsdChange?.(numeric);
@@ -4409,7 +4544,7 @@ function WithdrawFormStep({
4409
4544
  }, [amount, asset.symbol]);
4410
4545
  const handleMaxClick = (0, import_react14.useCallback)(() => {
4411
4546
  if (balance === null) return;
4412
- const maxAmount = (0, import_viem7.formatUnits)(balance, asset.decimals);
4547
+ const maxAmount = (0, import_viem8.formatUnits)(balance, asset.decimals);
4413
4548
  setAmount(maxAmount);
4414
4549
  setError(null);
4415
4550
  }, [balance, asset.decimals]);
@@ -4430,7 +4565,7 @@ function WithdrawFormStep({
4430
4565
  }
4431
4566
  if (balance !== null) {
4432
4567
  try {
4433
- const amountInUnits = (0, import_viem7.parseUnits)(amount, asset.decimals);
4568
+ const amountInUnits = (0, import_viem8.parseUnits)(amount, asset.decimals);
4434
4569
  if (amountInUnits > balance) {
4435
4570
  setError("Insufficient balance");
4436
4571
  return;
@@ -4463,12 +4598,12 @@ function WithdrawFormStep({
4463
4598
  setIsSwitching(false);
4464
4599
  }
4465
4600
  };
4466
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-step", children: [
4467
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-step-body rs-withdraw-form", children: [
4468
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-section", children: [
4469
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { className: "rs-withdraw-label", children: "Recipient" }),
4470
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-input-row", children: [
4471
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4601
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-step", children: [
4602
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-step-body rs-withdraw-form", children: [
4603
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-section", children: [
4604
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "rs-withdraw-label", children: "Recipient" }),
4605
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-input-row", children: [
4606
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4472
4607
  "input",
4473
4608
  {
4474
4609
  type: "text",
@@ -4481,7 +4616,7 @@ function WithdrawFormStep({
4481
4616
  }
4482
4617
  }
4483
4618
  ),
4484
- address && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4619
+ address && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
4485
4620
  "button",
4486
4621
  {
4487
4622
  type: "button",
@@ -4489,7 +4624,7 @@ function WithdrawFormStep({
4489
4624
  onClick: handleUseConnected,
4490
4625
  title: isRecipientConnected ? "Using connected wallet" : "Use connected wallet",
4491
4626
  children: [
4492
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4627
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4493
4628
  "svg",
4494
4629
  {
4495
4630
  viewBox: "0 0 24 24",
@@ -4497,7 +4632,7 @@ function WithdrawFormStep({
4497
4632
  stroke: "currentColor",
4498
4633
  strokeWidth: "2",
4499
4634
  className: "rs-withdraw-use-connected-icon",
4500
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4635
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4501
4636
  "path",
4502
4637
  {
4503
4638
  strokeLinecap: "round",
@@ -4513,10 +4648,10 @@ function WithdrawFormStep({
4513
4648
  )
4514
4649
  ] })
4515
4650
  ] }),
4516
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-section", children: [
4517
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { className: "rs-withdraw-label", children: "Amount" }),
4518
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-input-row", children: [
4519
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4651
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-section", children: [
4652
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "rs-withdraw-label", children: "Amount" }),
4653
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-input-row", children: [
4654
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4520
4655
  "input",
4521
4656
  {
4522
4657
  type: "text",
@@ -4533,9 +4668,9 @@ function WithdrawFormStep({
4533
4668
  }
4534
4669
  }
4535
4670
  ),
4536
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-amount-right", children: [
4537
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "rs-withdraw-token-label", children: asset.symbol }),
4538
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4671
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-amount-right", children: [
4672
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "rs-withdraw-token-label", children: asset.symbol }),
4673
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4539
4674
  "button",
4540
4675
  {
4541
4676
  type: "button",
@@ -4547,25 +4682,25 @@ function WithdrawFormStep({
4547
4682
  )
4548
4683
  ] })
4549
4684
  ] }),
4550
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-amount-info", children: [
4551
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "rs-withdraw-usd", children: amountUsd !== null ? currencyFormatter.format(amountUsd) : "$0.00" }),
4552
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "rs-withdraw-balance", children: [
4685
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-amount-info", children: [
4686
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "rs-withdraw-usd", children: amountUsd !== null ? currencyFormatter.format(amountUsd) : "$0.00" }),
4687
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "rs-withdraw-balance", children: [
4553
4688
  formattedBalance,
4554
4689
  " ",
4555
4690
  asset.symbol
4556
4691
  ] })
4557
4692
  ] })
4558
4693
  ] }),
4559
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-receive-row", children: [
4560
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-receive-col", children: [
4561
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { className: "rs-withdraw-label", children: "Receive" }),
4562
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4694
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-receive-row", children: [
4695
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-receive-col", children: [
4696
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "rs-withdraw-label", children: "Receive" }),
4697
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
4563
4698
  "div",
4564
4699
  {
4565
4700
  className: "rs-withdraw-dropdown-container",
4566
4701
  ref: tokenDropdownRef,
4567
4702
  children: [
4568
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4703
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
4569
4704
  "button",
4570
4705
  {
4571
4706
  type: "button",
@@ -4575,8 +4710,8 @@ function WithdrawFormStep({
4575
4710
  setShowChainDropdown(false);
4576
4711
  },
4577
4712
  children: [
4578
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-dropdown-value", children: [
4579
- getTokenIcon(targetSymbol) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4713
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-dropdown-value", children: [
4714
+ getTokenIcon(targetSymbol) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4580
4715
  "img",
4581
4716
  {
4582
4717
  src: getTokenIcon(targetSymbol),
@@ -4584,9 +4719,9 @@ function WithdrawFormStep({
4584
4719
  className: "rs-withdraw-dropdown-icon"
4585
4720
  }
4586
4721
  ),
4587
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: targetSymbol })
4722
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: targetSymbol })
4588
4723
  ] }),
4589
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4724
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4590
4725
  "svg",
4591
4726
  {
4592
4727
  viewBox: "0 0 24 24",
@@ -4597,7 +4732,7 @@ function WithdrawFormStep({
4597
4732
  style: {
4598
4733
  transform: showTokenDropdown ? "rotate(180deg)" : void 0
4599
4734
  },
4600
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4735
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4601
4736
  "path",
4602
4737
  {
4603
4738
  strokeLinecap: "round",
@@ -4610,7 +4745,7 @@ function WithdrawFormStep({
4610
4745
  ]
4611
4746
  }
4612
4747
  ),
4613
- showTokenDropdown && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "rs-withdraw-dropdown-menu", children: targetTokenOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4748
+ showTokenDropdown && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "rs-withdraw-dropdown-menu", children: targetTokenOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
4614
4749
  "button",
4615
4750
  {
4616
4751
  type: "button",
@@ -4620,7 +4755,7 @@ function WithdrawFormStep({
4620
4755
  setShowTokenDropdown(false);
4621
4756
  },
4622
4757
  children: [
4623
- getTokenIcon(option.symbol) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4758
+ getTokenIcon(option.symbol) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4624
4759
  "img",
4625
4760
  {
4626
4761
  src: getTokenIcon(option.symbol),
@@ -4628,7 +4763,7 @@ function WithdrawFormStep({
4628
4763
  className: "rs-withdraw-dropdown-icon"
4629
4764
  }
4630
4765
  ),
4631
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: option.symbol })
4766
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: option.symbol })
4632
4767
  ]
4633
4768
  },
4634
4769
  option.address
@@ -4637,15 +4772,15 @@ function WithdrawFormStep({
4637
4772
  }
4638
4773
  )
4639
4774
  ] }),
4640
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-receive-col", children: [
4641
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { className: "rs-withdraw-label", children: "Chain" }),
4642
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4775
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-receive-col", children: [
4776
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "rs-withdraw-label", children: "Chain" }),
4777
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
4643
4778
  "div",
4644
4779
  {
4645
4780
  className: "rs-withdraw-dropdown-container",
4646
4781
  ref: chainDropdownRef,
4647
4782
  children: [
4648
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4783
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
4649
4784
  "button",
4650
4785
  {
4651
4786
  type: "button",
@@ -4655,8 +4790,8 @@ function WithdrawFormStep({
4655
4790
  setShowTokenDropdown(false);
4656
4791
  },
4657
4792
  children: [
4658
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-dropdown-value", children: [
4659
- getChainIcon(targetChain) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4793
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-dropdown-value", children: [
4794
+ getChainIcon(targetChain) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4660
4795
  "img",
4661
4796
  {
4662
4797
  src: getChainIcon(targetChain),
@@ -4664,9 +4799,9 @@ function WithdrawFormStep({
4664
4799
  className: "rs-withdraw-dropdown-icon"
4665
4800
  }
4666
4801
  ),
4667
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: targetChainName })
4802
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: targetChainName })
4668
4803
  ] }),
4669
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4804
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4670
4805
  "svg",
4671
4806
  {
4672
4807
  viewBox: "0 0 24 24",
@@ -4677,7 +4812,7 @@ function WithdrawFormStep({
4677
4812
  style: {
4678
4813
  transform: showChainDropdown ? "rotate(180deg)" : void 0
4679
4814
  },
4680
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4815
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4681
4816
  "path",
4682
4817
  {
4683
4818
  strokeLinecap: "round",
@@ -4690,7 +4825,7 @@ function WithdrawFormStep({
4690
4825
  ]
4691
4826
  }
4692
4827
  ),
4693
- showChainDropdown && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "rs-withdraw-dropdown-menu", children: targetChains.map((chain) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4828
+ showChainDropdown && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "rs-withdraw-dropdown-menu", children: targetChains.map((chain) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
4694
4829
  "button",
4695
4830
  {
4696
4831
  type: "button",
@@ -4700,7 +4835,7 @@ function WithdrawFormStep({
4700
4835
  setShowChainDropdown(false);
4701
4836
  },
4702
4837
  children: [
4703
- getChainIcon(chain.id) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4838
+ getChainIcon(chain.id) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4704
4839
  "img",
4705
4840
  {
4706
4841
  src: getChainIcon(chain.id),
@@ -4708,7 +4843,7 @@ function WithdrawFormStep({
4708
4843
  className: "rs-withdraw-dropdown-icon"
4709
4844
  }
4710
4845
  ),
4711
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: chain.name })
4846
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: chain.name })
4712
4847
  ]
4713
4848
  },
4714
4849
  chain.id
@@ -4718,13 +4853,13 @@ function WithdrawFormStep({
4718
4853
  )
4719
4854
  ] })
4720
4855
  ] }),
4721
- chainMismatch && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-chain-switch", children: [
4722
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-chain-switch-text", children: [
4856
+ chainMismatch && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-chain-switch", children: [
4857
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-chain-switch-text", children: [
4723
4858
  "Switch to ",
4724
4859
  getChainName(asset.chainId),
4725
4860
  " to continue."
4726
4861
  ] }),
4727
- switchChain && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4862
+ switchChain && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4728
4863
  Button,
4729
4864
  {
4730
4865
  variant: "outline",
@@ -4735,15 +4870,15 @@ function WithdrawFormStep({
4735
4870
  }
4736
4871
  )
4737
4872
  ] }),
4738
- error && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "rs-withdraw-error", children: [
4739
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4873
+ error && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-withdraw-error", children: [
4874
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4740
4875
  "svg",
4741
4876
  {
4742
4877
  viewBox: "0 0 24 24",
4743
4878
  fill: "none",
4744
4879
  stroke: "currentColor",
4745
4880
  strokeWidth: "2",
4746
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4881
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4747
4882
  "path",
4748
4883
  {
4749
4884
  strokeLinecap: "round",
@@ -4753,10 +4888,10 @@ function WithdrawFormStep({
4753
4888
  )
4754
4889
  }
4755
4890
  ),
4756
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: error })
4891
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: error })
4757
4892
  ] })
4758
4893
  ] }),
4759
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4894
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "rs-step-footer", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4760
4895
  Button,
4761
4896
  {
4762
4897
  onClick: handleWithdraw,
@@ -4766,21 +4901,21 @@ function WithdrawFormStep({
4766
4901
  children: isBusy ? "Preparing..." : "Withdraw"
4767
4902
  }
4768
4903
  ) }),
4769
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PoweredBy, {})
4904
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PoweredBy, {})
4770
4905
  ] });
4771
4906
  }
4772
- var import_react14, import_viem7, import_jsx_runtime17;
4907
+ var import_react14, import_viem8, import_jsx_runtime18;
4773
4908
  var init_WithdrawFormStep = __esm({
4774
4909
  "src/components/steps/WithdrawFormStep.tsx"() {
4775
4910
  "use strict";
4776
4911
  import_react14 = require("react");
4777
- import_viem7 = require("viem");
4912
+ import_viem8 = require("viem");
4778
4913
  init_Button();
4779
4914
  init_PoweredBy();
4780
4915
  init_deposit_service();
4781
4916
  init_constants();
4782
4917
  init_formatters();
4783
- import_jsx_runtime17 = require("react/jsx-runtime");
4918
+ import_jsx_runtime18 = require("react/jsx-runtime");
4784
4919
  WithdrawFormStep.displayName = "WithdrawFormStep";
4785
4920
  }
4786
4921
  });
@@ -4820,13 +4955,13 @@ async function executeSafeEthTransfer(params) {
4820
4955
  safeTxGas: 0n,
4821
4956
  baseGas: 0n,
4822
4957
  gasPrice: 0n,
4823
- gasToken: import_viem8.zeroAddress,
4824
- refundReceiver: import_viem8.zeroAddress
4958
+ gasToken: import_viem9.zeroAddress,
4959
+ refundReceiver: import_viem9.zeroAddress
4825
4960
  };
4826
- const signature = (0, import_viem8.concat)([
4827
- (0, import_viem8.pad)(account.address, { size: 32 }),
4828
- (0, import_viem8.pad)((0, import_viem8.toHex)(0), { size: 32 }),
4829
- (0, import_viem8.toHex)(1, { size: 1 })
4961
+ const signature = (0, import_viem9.concat)([
4962
+ (0, import_viem9.pad)(account.address, { size: 32 }),
4963
+ (0, import_viem9.pad)((0, import_viem9.toHex)(0), { size: 32 }),
4964
+ (0, import_viem9.toHex)(1, { size: 1 })
4830
4965
  ]);
4831
4966
  const txHash = await walletClient.writeContract({
4832
4967
  account,
@@ -4853,7 +4988,7 @@ async function executeSafeEthTransfer(params) {
4853
4988
  const safeLogs = receipt.logs.filter(
4854
4989
  (log) => log.address.toLowerCase() === safeAddress.toLowerCase()
4855
4990
  );
4856
- const parsed = (0, import_viem8.parseEventLogs)({
4991
+ const parsed = (0, import_viem9.parseEventLogs)({
4857
4992
  abi: SAFE_ABI,
4858
4993
  logs: safeLogs,
4859
4994
  strict: false
@@ -4895,8 +5030,8 @@ async function executeSafeErc20Transfer(params) {
4895
5030
  if (!isOwner) {
4896
5031
  throw new Error("Connected wallet is not a Safe owner");
4897
5032
  }
4898
- const data = (0, import_viem8.encodeFunctionData)({
4899
- abi: import_viem8.erc20Abi,
5033
+ const data = (0, import_viem9.encodeFunctionData)({
5034
+ abi: import_viem9.erc20Abi,
4900
5035
  functionName: "transfer",
4901
5036
  args: [recipient, amount]
4902
5037
  });
@@ -4908,13 +5043,13 @@ async function executeSafeErc20Transfer(params) {
4908
5043
  safeTxGas: 0n,
4909
5044
  baseGas: 0n,
4910
5045
  gasPrice: 0n,
4911
- gasToken: import_viem8.zeroAddress,
4912
- refundReceiver: import_viem8.zeroAddress
5046
+ gasToken: import_viem9.zeroAddress,
5047
+ refundReceiver: import_viem9.zeroAddress
4913
5048
  };
4914
- const signature = (0, import_viem8.concat)([
4915
- (0, import_viem8.pad)(account.address, { size: 32 }),
4916
- (0, import_viem8.pad)((0, import_viem8.toHex)(0), { size: 32 }),
4917
- (0, import_viem8.toHex)(1, { size: 1 })
5049
+ const signature = (0, import_viem9.concat)([
5050
+ (0, import_viem9.pad)(account.address, { size: 32 }),
5051
+ (0, import_viem9.pad)((0, import_viem9.toHex)(0), { size: 32 }),
5052
+ (0, import_viem9.toHex)(1, { size: 1 })
4918
5053
  ]);
4919
5054
  const txHash = await walletClient.writeContract({
4920
5055
  account,
@@ -4941,7 +5076,7 @@ async function executeSafeErc20Transfer(params) {
4941
5076
  const safeLogs = receipt.logs.filter(
4942
5077
  (log) => log.address.toLowerCase() === safeAddress.toLowerCase()
4943
5078
  );
4944
- const parsed = (0, import_viem8.parseEventLogs)({
5079
+ const parsed = (0, import_viem9.parseEventLogs)({
4945
5080
  abi: SAFE_ABI,
4946
5081
  logs: safeLogs,
4947
5082
  strict: false
@@ -4956,11 +5091,11 @@ async function executeSafeErc20Transfer(params) {
4956
5091
  }
4957
5092
  return { txHash };
4958
5093
  }
4959
- var import_viem8, SAFE_ABI;
5094
+ var import_viem9, SAFE_ABI;
4960
5095
  var init_safe = __esm({
4961
5096
  "src/core/safe.ts"() {
4962
5097
  "use strict";
4963
- import_viem8 = require("viem");
5098
+ import_viem9 = require("viem");
4964
5099
  init_constants();
4965
5100
  SAFE_ABI = [
4966
5101
  {
@@ -5012,9 +5147,9 @@ var init_safe = __esm({
5012
5147
 
5013
5148
  // src/WithdrawFlow.tsx
5014
5149
  function WithdrawFlow({
5015
- walletClient,
5016
- publicClient,
5017
- address,
5150
+ dappWalletClient,
5151
+ dappPublicClient,
5152
+ dappAddress,
5018
5153
  safeAddress,
5019
5154
  sourceChain,
5020
5155
  sourceToken,
@@ -5023,14 +5158,11 @@ function WithdrawFlow({
5023
5158
  recipient: defaultRecipient,
5024
5159
  amount: defaultAmount,
5025
5160
  service,
5026
- switchChain,
5027
5161
  signerAddress = DEFAULT_SIGNER_ADDRESS,
5028
5162
  sessionChainIds,
5029
5163
  forceRegister = false,
5030
5164
  waitForFinalTx = true,
5031
- connectWalletOptions,
5032
- selectedConnectAddress,
5033
- onSelectConnectAddress,
5165
+ reownWallet,
5034
5166
  onConnect,
5035
5167
  onWithdrawSign,
5036
5168
  onRequestConnect,
@@ -5055,6 +5187,87 @@ function WithdrawFlow({
5055
5187
  setTargetToken(targetTokenProp);
5056
5188
  }, [targetChainProp, targetTokenProp]);
5057
5189
  const targetChainObj = (0, import_react15.useMemo)(() => CHAIN_BY_ID[targetChain], [targetChain]);
5190
+ const hasCustomSigner = Boolean(dappAddress && onWithdrawSign);
5191
+ const dappSwitchChain = (0, import_react15.useMemo)(() => {
5192
+ if (!dappWalletClient?.switchChain) return void 0;
5193
+ return async (chainId) => {
5194
+ await dappWalletClient.switchChain?.({ id: chainId });
5195
+ };
5196
+ }, [dappWalletClient]);
5197
+ const walletOptions = (0, import_react15.useMemo)(() => {
5198
+ const options = [];
5199
+ const seen = /* @__PURE__ */ new Set();
5200
+ if (dappWalletClient?.account && dappAddress) {
5201
+ options.push({
5202
+ address: dappWalletClient.account.address,
5203
+ label: "Connected Wallet",
5204
+ kind: "connected"
5205
+ });
5206
+ seen.add(dappWalletClient.account.address.toLowerCase());
5207
+ }
5208
+ if (reownWallet?.address && reownWallet.isConnected && !seen.has(reownWallet.address.toLowerCase())) {
5209
+ options.push({
5210
+ address: reownWallet.address,
5211
+ label: "External Wallet",
5212
+ kind: "external"
5213
+ });
5214
+ }
5215
+ return options;
5216
+ }, [
5217
+ dappWalletClient,
5218
+ dappAddress,
5219
+ reownWallet?.address,
5220
+ reownWallet?.isConnected
5221
+ ]);
5222
+ const canAutoLock = (dappWalletClient?.account && dappAddress || hasCustomSigner) && !reownWallet;
5223
+ const [selectedConnectAddress, setSelectedConnectAddress] = (0, import_react15.useState)(null);
5224
+ const signerContext = (0, import_react15.useMemo)(() => {
5225
+ if (canAutoLock) {
5226
+ if (hasCustomSigner) {
5227
+ return {
5228
+ ownerAddress: dappAddress,
5229
+ walletClient: dappWalletClient ?? void 0,
5230
+ publicClient: dappPublicClient ?? getPublicClient(sourceChain),
5231
+ switchChain: dappSwitchChain
5232
+ };
5233
+ }
5234
+ return {
5235
+ ownerAddress: dappWalletClient.account.address,
5236
+ walletClient: dappWalletClient,
5237
+ publicClient: dappPublicClient ?? getPublicClient(sourceChain),
5238
+ switchChain: dappSwitchChain
5239
+ };
5240
+ }
5241
+ if (!isConnectSelectionConfirmed || !selectedConnectAddress) return null;
5242
+ if (dappWalletClient?.account && dappWalletClient.account.address.toLowerCase() === selectedConnectAddress.toLowerCase()) {
5243
+ return {
5244
+ ownerAddress: dappWalletClient.account.address,
5245
+ walletClient: dappWalletClient,
5246
+ publicClient: dappPublicClient ?? getPublicClient(sourceChain),
5247
+ switchChain: dappSwitchChain
5248
+ };
5249
+ }
5250
+ if (reownWallet?.address?.toLowerCase() === selectedConnectAddress.toLowerCase() && reownWallet.walletClient && reownWallet.publicClient) {
5251
+ return {
5252
+ ownerAddress: reownWallet.address,
5253
+ walletClient: reownWallet.walletClient,
5254
+ publicClient: reownWallet.publicClient,
5255
+ switchChain: reownWallet.switchChain
5256
+ };
5257
+ }
5258
+ return null;
5259
+ }, [
5260
+ canAutoLock,
5261
+ hasCustomSigner,
5262
+ isConnectSelectionConfirmed,
5263
+ selectedConnectAddress,
5264
+ dappWalletClient,
5265
+ dappPublicClient,
5266
+ dappSwitchChain,
5267
+ dappAddress,
5268
+ reownWallet,
5269
+ sourceChain
5270
+ ]);
5058
5271
  const asset = (0, import_react15.useMemo)(() => {
5059
5272
  const symbol = getTokenSymbol(sourceToken, sourceChain);
5060
5273
  const decimals = getTokenDecimalsByAddress(sourceToken, sourceChain);
@@ -5105,7 +5318,11 @@ function WithdrawFlow({
5105
5318
  }, []);
5106
5319
  const handleFormSubmit = (0, import_react15.useCallback)(
5107
5320
  async (recipient, amountValue) => {
5108
- if (!walletClient || !publicClient || !address) {
5321
+ const ownerAddress2 = signerContext?.ownerAddress;
5322
+ if (!ownerAddress2) {
5323
+ throw new Error("Wallet not connected");
5324
+ }
5325
+ if (!onWithdrawSign && !signerContext?.walletClient) {
5109
5326
  throw new Error("Wallet not connected");
5110
5327
  }
5111
5328
  if (!targetChainObj) {
@@ -5113,8 +5330,8 @@ function WithdrawFlow({
5113
5330
  }
5114
5331
  setIsSubmitting(true);
5115
5332
  try {
5116
- const signerAccount = (0, import_sdk3.walletClientToAccount)(walletClient);
5117
- const sessionOwner = await resolveSessionOwner2(address);
5333
+ const signerAccount = signerContext?.walletClient ? (0, import_sdk3.walletClientToAccount)(signerContext.walletClient) : createViewOnlyAccount(ownerAddress2);
5334
+ const sessionOwner = await resolveSessionOwner2(ownerAddress2);
5118
5335
  const account = await createSmartAccount(
5119
5336
  signerAccount,
5120
5337
  sessionOwner.account
@@ -5139,7 +5356,7 @@ function WithdrawFlow({
5139
5356
  factoryData: initData.factoryData,
5140
5357
  sessionDetails
5141
5358
  },
5142
- eoaAddress: address,
5359
+ eoaAddress: ownerAddress2,
5143
5360
  sessionOwner: sessionOwner.address,
5144
5361
  target: {
5145
5362
  chain: targetChain,
@@ -5148,8 +5365,9 @@ function WithdrawFlow({
5148
5365
  }
5149
5366
  });
5150
5367
  }
5151
- handleConnected(address, smartAccount);
5152
- const amountUnits = (0, import_viem9.parseUnits)(amountValue, asset.decimals);
5368
+ handleConnected(ownerAddress2, smartAccount);
5369
+ const amountUnits = (0, import_viem10.parseUnits)(amountValue, asset.decimals);
5370
+ const pc = signerContext?.publicClient ?? getPublicClient(sourceChain);
5153
5371
  const result = onWithdrawSign ? await onWithdrawSign({
5154
5372
  safeAddress,
5155
5373
  recipient: smartAccount,
@@ -5158,15 +5376,15 @@ function WithdrawFlow({
5158
5376
  chainId: sourceChain,
5159
5377
  isNative: isSourceNative
5160
5378
  }) : isSourceNative ? await executeSafeEthTransfer({
5161
- walletClient,
5162
- publicClient,
5379
+ walletClient: signerContext.walletClient,
5380
+ publicClient: pc,
5163
5381
  safeAddress,
5164
5382
  recipient: smartAccount,
5165
5383
  amount: amountUnits,
5166
5384
  chainId: sourceChain
5167
5385
  }) : await executeSafeErc20Transfer({
5168
- walletClient,
5169
- publicClient,
5386
+ walletClient: signerContext.walletClient,
5387
+ publicClient: pc,
5170
5388
  safeAddress,
5171
5389
  tokenAddress: sourceToken,
5172
5390
  recipient: smartAccount,
@@ -5196,9 +5414,7 @@ function WithdrawFlow({
5196
5414
  }
5197
5415
  },
5198
5416
  [
5199
- walletClient,
5200
- publicClient,
5201
- address,
5417
+ signerContext,
5202
5418
  targetChainObj,
5203
5419
  resolveSessionOwner2,
5204
5420
  signerAddress,
@@ -5267,50 +5483,54 @@ function WithdrawFlow({
5267
5483
  const handleTargetTokenChange = (0, import_react15.useCallback)((token) => {
5268
5484
  setTargetToken(token);
5269
5485
  }, []);
5270
- const hasConnectWalletOptions = (connectWalletOptions?.length ?? 0) > 0;
5271
5486
  const selectedConnectAddressEffective = (0, import_react15.useMemo)(() => {
5272
5487
  if (selectedConnectAddress) return selectedConnectAddress;
5273
- if ((connectWalletOptions?.length ?? 0) === 1) {
5274
- return connectWalletOptions?.[0]?.address ?? null;
5488
+ if (walletOptions.length === 1) {
5489
+ return walletOptions[0].address;
5275
5490
  }
5276
5491
  return null;
5277
- }, [selectedConnectAddress, connectWalletOptions]);
5278
- const connectWalletOptionsKey = (0, import_react15.useMemo)(
5279
- () => (connectWalletOptions ?? []).map((option) => option.address.toLowerCase()).join(","),
5280
- [connectWalletOptions]
5492
+ }, [selectedConnectAddress, walletOptions]);
5493
+ const walletOptionsKey = (0, import_react15.useMemo)(
5494
+ () => walletOptions.map((option) => option.address.toLowerCase()).join(","),
5495
+ [walletOptions]
5281
5496
  );
5282
- const hasConnectedWallet = Boolean(walletClient && publicClient && address);
5283
- const showConnectStep = !hasConnectedWallet || hasConnectWalletOptions && !isConnectSelectionConfirmed;
5497
+ const showConnectStep = !canAutoLock && !isConnectSelectionConfirmed;
5284
5498
  (0, import_react15.useEffect)(() => {
5285
5499
  setIsConnectSelectionConfirmed(false);
5286
- }, [connectWalletOptionsKey, selectedConnectAddressEffective]);
5500
+ }, [walletOptionsKey, selectedConnectAddressEffective]);
5287
5501
  if (showConnectStep) {
5288
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "rs-modal-body", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5502
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "rs-modal-body", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5289
5503
  ConnectStep,
5290
5504
  {
5291
- walletOptions: connectWalletOptions,
5505
+ walletOptions,
5292
5506
  selectedAddress: selectedConnectAddressEffective,
5293
- onSelectAddress: onSelectConnectAddress,
5507
+ onSelectAddress: setSelectedConnectAddress,
5294
5508
  onRequestConnect,
5295
5509
  onConnect,
5296
- onContinue: () => setIsConnectSelectionConfirmed(true),
5510
+ onContinue: () => {
5511
+ if (selectedConnectAddressEffective) {
5512
+ setSelectedConnectAddress(selectedConnectAddressEffective);
5513
+ }
5514
+ setIsConnectSelectionConfirmed(true);
5515
+ },
5297
5516
  connectButtonLabel
5298
5517
  }
5299
5518
  ) });
5300
5519
  }
5301
- if (!walletClient || !publicClient || !address) {
5302
- return null;
5303
- }
5304
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rs-modal-body", children: [
5305
- step.type === "form" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5520
+ if (!signerContext) return null;
5521
+ if (!onWithdrawSign && !signerContext.walletClient) return null;
5522
+ const ownerAddress = signerContext.ownerAddress;
5523
+ const formPublicClient = signerContext.publicClient ?? getPublicClient(sourceChain);
5524
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "rs-modal-body", children: [
5525
+ step.type === "form" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5306
5526
  WithdrawFormStep,
5307
5527
  {
5308
- walletClient,
5309
- publicClient,
5310
- address,
5528
+ walletClient: signerContext.walletClient,
5529
+ publicClient: formPublicClient,
5530
+ address: ownerAddress,
5311
5531
  safeAddress,
5312
5532
  asset,
5313
- defaultRecipient: defaultRecipient ?? address,
5533
+ defaultRecipient: defaultRecipient ?? ownerAddress,
5314
5534
  defaultAmount,
5315
5535
  targetChain,
5316
5536
  targetToken,
@@ -5318,13 +5538,13 @@ function WithdrawFlow({
5318
5538
  targetTokenOptions,
5319
5539
  onTargetChainChange: handleTargetChainChange,
5320
5540
  onTargetTokenChange: handleTargetTokenChange,
5321
- switchChain,
5541
+ switchChain: signerContext.switchChain,
5322
5542
  submitting: isSubmitting,
5323
5543
  onSubmit: handleFormSubmit,
5324
5544
  onBalanceUsdChange: setTotalBalanceUsd
5325
5545
  }
5326
5546
  ),
5327
- step.type === "processing" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5547
+ step.type === "processing" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5328
5548
  ProcessingStep,
5329
5549
  {
5330
5550
  smartAccount: step.smartAccount,
@@ -5346,12 +5566,13 @@ function WithdrawFlow({
5346
5566
  )
5347
5567
  ] });
5348
5568
  }
5349
- var import_react15, import_sdk3, import_viem9, import_jsx_runtime18;
5569
+ var import_react15, import_sdk3, import_viem10, import_jsx_runtime19;
5350
5570
  var init_WithdrawFlow = __esm({
5351
5571
  "src/WithdrawFlow.tsx"() {
5352
5572
  "use strict";
5353
5573
  import_react15 = require("react");
5354
5574
  init_ConnectStep();
5575
+ init_public_client();
5355
5576
  init_WithdrawFormStep();
5356
5577
  init_ProcessingStep();
5357
5578
  init_constants();
@@ -5360,8 +5581,8 @@ var init_WithdrawFlow = __esm({
5360
5581
  init_account();
5361
5582
  init_session_owner();
5362
5583
  init_safe();
5363
- import_viem9 = require("viem");
5364
- import_jsx_runtime18 = require("react/jsx-runtime");
5584
+ import_viem10 = require("viem");
5585
+ import_jsx_runtime19 = require("react/jsx-runtime");
5365
5586
  }
5366
5587
  });
5367
5588
 
@@ -5372,45 +5593,29 @@ __export(WithdrawModalReown_exports, {
5372
5593
  });
5373
5594
  function WithdrawModalWithReown(props) {
5374
5595
  const reown = useReownWallet();
5375
- const resolved = useResolvedWallet(
5376
- {
5377
- walletClient: props.walletClient,
5378
- publicClient: props.publicClient,
5379
- address: props.address,
5380
- switchChain: props.switchChain
5381
- },
5382
- reown
5383
- );
5384
5596
  const handleConnect = (0, import_react16.useCallback)(() => {
5385
5597
  reown.openConnect();
5386
5598
  }, [reown.openConnect]);
5387
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5599
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5388
5600
  WithdrawModalInner,
5389
5601
  {
5390
5602
  ...props,
5391
- walletClient: resolved.walletClient,
5392
- publicClient: resolved.publicClient,
5393
- address: resolved.address,
5394
- switchChain: resolved.switchChain,
5395
- connectWalletOptions: resolved.walletOptions,
5396
- selectedConnectAddress: resolved.selectedAddress,
5397
- onSelectConnectAddress: resolved.onSelectAddress,
5398
- onConnect: handleConnect,
5399
- onRequestConnect: props.onRequestConnect
5603
+ reownWallet: reown,
5604
+ onConnect: handleConnect
5400
5605
  }
5401
5606
  );
5402
5607
  }
5403
5608
  function WithdrawModalReown(props) {
5404
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WithdrawModalWithReown, { ...props }) });
5609
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(WithdrawModalWithReown, { ...props }) });
5405
5610
  }
5406
- var import_react16, import_jsx_runtime19;
5611
+ var import_react16, import_jsx_runtime20;
5407
5612
  var init_WithdrawModalReown = __esm({
5408
5613
  "src/WithdrawModalReown.tsx"() {
5409
5614
  "use strict";
5410
5615
  import_react16 = require("react");
5411
5616
  init_reown();
5412
5617
  init_WithdrawModal();
5413
- import_jsx_runtime19 = require("react/jsx-runtime");
5618
+ import_jsx_runtime20 = require("react/jsx-runtime");
5414
5619
  }
5415
5620
  });
5416
5621
 
@@ -5418,14 +5623,14 @@ var init_WithdrawModalReown = __esm({
5418
5623
  function WithdrawModal(props) {
5419
5624
  const needsReown = !!props.reownAppId;
5420
5625
  if (needsReown) {
5421
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react17.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ReownWithdrawInner, { ...props }) });
5626
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react17.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ReownWithdrawInner, { ...props }) });
5422
5627
  }
5423
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(WithdrawModalInner, { ...props });
5628
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(WithdrawModalInner, { ...props });
5424
5629
  }
5425
5630
  function WithdrawModalInner({
5426
- walletClient,
5427
- publicClient,
5428
- address,
5631
+ dappWalletClient,
5632
+ dappPublicClient,
5633
+ dappAddress,
5429
5634
  safeAddress,
5430
5635
  sourceChain: sourceChainProp,
5431
5636
  sourceToken,
@@ -5436,15 +5641,12 @@ function WithdrawModalInner({
5436
5641
  isOpen,
5437
5642
  onClose,
5438
5643
  inline,
5439
- switchChain,
5440
5644
  backendUrl = DEFAULT_BACKEND_URL,
5441
5645
  signerAddress = DEFAULT_SIGNER_ADDRESS,
5442
5646
  sessionChainIds,
5443
5647
  forceRegister = false,
5444
5648
  waitForFinalTx = true,
5445
- connectWalletOptions,
5446
- selectedConnectAddress,
5447
- onSelectConnectAddress,
5649
+ reownWallet,
5448
5650
  onConnect,
5449
5651
  onWithdrawSign,
5450
5652
  onRequestConnect,
@@ -5504,30 +5706,30 @@ function WithdrawModalInner({
5504
5706
  const logoUrl = branding?.logoUrl ?? "https://github.com/rhinestonewtf.png";
5505
5707
  const title = branding?.title ?? "Withdraw";
5506
5708
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 3 && backHandlerRef.current;
5507
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5709
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5508
5710
  Modal,
5509
5711
  {
5510
5712
  isOpen,
5511
5713
  onClose,
5512
5714
  className,
5513
5715
  inline,
5514
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { ref: modalRef, className: "rs-modal", children: [
5515
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "rs-modal-header--redesigned", children: [
5516
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5716
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { ref: modalRef, className: "rs-modal", children: [
5717
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "rs-modal-header--redesigned", children: [
5718
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5517
5719
  "button",
5518
5720
  {
5519
5721
  type: "button",
5520
5722
  className: "rs-modal-header-back",
5521
5723
  "aria-label": "Go back",
5522
5724
  onClick: handleBack,
5523
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5725
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5524
5726
  "svg",
5525
5727
  {
5526
5728
  viewBox: "0 0 24 24",
5527
5729
  fill: "none",
5528
5730
  stroke: "currentColor",
5529
5731
  strokeWidth: "2",
5530
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5732
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5531
5733
  "path",
5532
5734
  {
5533
5735
  strokeLinecap: "round",
@@ -5539,9 +5741,9 @@ function WithdrawModalInner({
5539
5741
  )
5540
5742
  }
5541
5743
  ) }),
5542
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "rs-modal-header-nav-center", children: [
5543
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "rs-modal-header-title-row", children: [
5544
- showLogo && logoUrl && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5744
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "rs-modal-header-nav-center", children: [
5745
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "rs-modal-header-title-row", children: [
5746
+ showLogo && logoUrl && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5545
5747
  "img",
5546
5748
  {
5547
5749
  src: logoUrl,
@@ -5552,8 +5754,8 @@ function WithdrawModalInner({
5552
5754
  }
5553
5755
  }
5554
5756
  ),
5555
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "rs-modal-header-title", children: title }),
5556
- showStepper && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "rs-modal-progress", style: { marginLeft: 8 }, children: [0, 1].map((i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5757
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "rs-modal-header-title", children: title }),
5758
+ showStepper && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "rs-modal-progress", style: { marginLeft: 8 }, children: [0, 1].map((i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5557
5759
  "div",
5558
5760
  {
5559
5761
  className: `rs-modal-progress-dot ${i <= currentStepIndex ? "rs-modal-progress-dot--active" : "rs-modal-progress-dot--inactive"}`
@@ -5561,26 +5763,26 @@ function WithdrawModalInner({
5561
5763
  i
5562
5764
  )) })
5563
5765
  ] }),
5564
- balanceTitle && totalBalanceUsd !== null && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "rs-modal-header-balance", children: [
5565
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "rs-modal-header-balance-label", children: balanceTitle }),
5566
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "rs-modal-header-balance-value", children: currencyFormatter.format(totalBalanceUsd) })
5766
+ balanceTitle && totalBalanceUsd !== null && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "rs-modal-header-balance", children: [
5767
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "rs-modal-header-balance-label", children: balanceTitle }),
5768
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "rs-modal-header-balance-value", children: currencyFormatter.format(totalBalanceUsd) })
5567
5769
  ] })
5568
5770
  ] }),
5569
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5771
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5570
5772
  "button",
5571
5773
  {
5572
5774
  type: "button",
5573
5775
  onClick: onClose,
5574
5776
  className: "rs-modal-close",
5575
5777
  "aria-label": "Close",
5576
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5778
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5577
5779
  "svg",
5578
5780
  {
5579
5781
  viewBox: "0 0 24 24",
5580
5782
  fill: "none",
5581
5783
  stroke: "currentColor",
5582
5784
  strokeWidth: "2",
5583
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5785
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5584
5786
  "path",
5585
5787
  {
5586
5788
  strokeLinecap: "round",
@@ -5593,12 +5795,12 @@ function WithdrawModalInner({
5593
5795
  }
5594
5796
  ) })
5595
5797
  ] }),
5596
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5798
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5597
5799
  WithdrawFlow,
5598
5800
  {
5599
- walletClient,
5600
- publicClient,
5601
- address,
5801
+ dappWalletClient,
5802
+ dappPublicClient,
5803
+ dappAddress,
5602
5804
  safeAddress,
5603
5805
  sourceChain,
5604
5806
  sourceToken,
@@ -5607,14 +5809,11 @@ function WithdrawModalInner({
5607
5809
  recipient,
5608
5810
  amount: defaultAmount,
5609
5811
  service,
5610
- switchChain,
5611
5812
  signerAddress,
5612
5813
  sessionChainIds,
5613
5814
  forceRegister,
5614
5815
  waitForFinalTx,
5615
- connectWalletOptions,
5616
- selectedConnectAddress,
5617
- onSelectConnectAddress,
5816
+ reownWallet,
5618
5817
  onConnect,
5619
5818
  onWithdrawSign,
5620
5819
  onRequestConnect,
@@ -5633,7 +5832,7 @@ function WithdrawModalInner({
5633
5832
  }
5634
5833
  );
5635
5834
  }
5636
- var import_react17, import_jsx_runtime20, ReownWithdrawInner;
5835
+ var import_react17, import_jsx_runtime21, ReownWithdrawInner;
5637
5836
  var init_WithdrawModal = __esm({
5638
5837
  "src/WithdrawModal.tsx"() {
5639
5838
  "use strict";
@@ -5644,7 +5843,7 @@ var init_WithdrawModal = __esm({
5644
5843
  init_constants();
5645
5844
  init_theme();
5646
5845
  init_formatters();
5647
- import_jsx_runtime20 = require("react/jsx-runtime");
5846
+ import_jsx_runtime21 = require("react/jsx-runtime");
5648
5847
  ReownWithdrawInner = (0, import_react17.lazy)(
5649
5848
  () => Promise.resolve().then(() => (init_WithdrawModalReown(), WithdrawModalReown_exports)).then((m) => ({
5650
5849
  default: m.WithdrawModalReown