@rhinestone/deposit-modal 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +179 -48
  2. package/dist/BankOnrampStep-JG32OCM2.mjs +435 -0
  3. package/dist/BankOnrampStep-NPGXAA7U.cjs +435 -0
  4. package/dist/{DepositModalReown-VCY65DJX.mjs → DepositModalReown-3FGTPER6.mjs} +6 -5
  5. package/dist/{DepositModalReown-TVO3ZQQK.cjs → DepositModalReown-ALVWADG7.cjs} +21 -20
  6. package/dist/WithdrawModal-5YWFJSYY.cjs +12 -0
  7. package/dist/WithdrawModal-LL4Z5WZP.mjs +12 -0
  8. package/dist/{bearer-transport-CVHNBgoV.d.cts → bearer-transport-DZyeDG64.d.cts} +5 -1
  9. package/dist/{bearer-transport-CVHNBgoV.d.ts → bearer-transport-DZyeDG64.d.ts} +5 -1
  10. package/dist/{caip-BMi-9t09.d.cts → caip-nwFFL46o.d.cts} +2 -2
  11. package/dist/{caip-BMi-9t09.d.ts → caip-nwFFL46o.d.ts} +2 -2
  12. package/dist/{chunk-EKC2IRQG.mjs → chunk-247GJH57.mjs} +687 -299
  13. package/dist/{chunk-FTWKAJGN.mjs → chunk-2FOPO4N5.mjs} +1 -1
  14. package/dist/{chunk-AIZKGFVA.mjs → chunk-32ERBFMO.mjs} +1499 -978
  15. package/dist/chunk-5QUWEFD4.mjs +19 -0
  16. package/dist/chunk-6CTJFR3T.mjs +113 -0
  17. package/dist/{chunk-3TEVMP76.mjs → chunk-B2LZQIGB.mjs} +1 -1
  18. package/dist/{chunk-34JVJZEZ.cjs → chunk-BTEG2VNZ.cjs} +171 -130
  19. package/dist/{chunk-N3AAT6BS.cjs → chunk-CXRH5MKO.cjs} +1556 -1035
  20. package/dist/chunk-E7IMWVMN.mjs +346 -0
  21. package/dist/{chunk-N6JJG57R.cjs → chunk-EKFXUF5A.cjs} +1 -1
  22. package/dist/chunk-FKJ6EJHH.cjs +346 -0
  23. package/dist/chunk-FMUSY563.cjs +19 -0
  24. package/dist/{chunk-LVCD6RHF.cjs → chunk-FVJKUTHF.cjs} +2 -2
  25. package/dist/chunk-G264OM23.cjs +224 -0
  26. package/dist/{chunk-R2B6VD4E.mjs → chunk-HP7S7AD6.mjs} +73 -32
  27. package/dist/{chunk-O4JZKKCZ.cjs → chunk-OPT5EW6L.cjs} +10 -5
  28. package/dist/chunk-PYRXOP2Y.cjs +113 -0
  29. package/dist/{chunk-X4EUXBHJ.mjs → chunk-XBJCZYBX.mjs} +8 -3
  30. package/dist/chunk-YY4ZOAH5.mjs +224 -0
  31. package/dist/{chunk-JV5OGG53.cjs → chunk-Z4RBTNKX.cjs} +1202 -814
  32. package/dist/compliance.cjs +4 -7
  33. package/dist/compliance.d.cts +26 -3
  34. package/dist/compliance.d.ts +26 -3
  35. package/dist/compliance.mjs +6 -9
  36. package/dist/constants-BQDxVNgr.d.cts +29 -0
  37. package/dist/constants-DjGQW5N5.d.ts +29 -0
  38. package/dist/constants.cjs +3 -37
  39. package/dist/constants.d.cts +4 -20
  40. package/dist/constants.d.ts +4 -20
  41. package/dist/constants.mjs +4 -38
  42. package/dist/deposit.cjs +7 -6
  43. package/dist/deposit.d.cts +5 -3
  44. package/dist/deposit.d.ts +5 -3
  45. package/dist/deposit.mjs +6 -5
  46. package/dist/embed.cjs +21 -20
  47. package/dist/embed.d.cts +3 -2
  48. package/dist/embed.d.ts +3 -2
  49. package/dist/embed.mjs +7 -6
  50. package/dist/index.cjs +8 -35
  51. package/dist/index.d.cts +5 -3
  52. package/dist/index.d.ts +5 -3
  53. package/dist/index.mjs +9 -36
  54. package/dist/onramp.cjs +4 -20
  55. package/dist/onramp.d.cts +59 -23
  56. package/dist/onramp.d.ts +59 -23
  57. package/dist/onramp.mjs +5 -21
  58. package/dist/polymarket.cjs +6 -6
  59. package/dist/polymarket.mjs +2 -2
  60. package/dist/ramp-types-HYWd7CW0.d.cts +108 -0
  61. package/dist/ramp-types-HYWd7CW0.d.ts +108 -0
  62. package/dist/styles.css +280 -0
  63. package/dist/{types-CbUs4boj.d.cts → types-BxSrazbq.d.ts} +56 -3
  64. package/dist/{types-CZYypODQ.d.ts → types-CixUBhrM.d.cts} +56 -3
  65. package/dist/withdraw.cjs +6 -5
  66. package/dist/withdraw.d.cts +4 -3
  67. package/dist/withdraw.d.ts +4 -3
  68. package/dist/withdraw.mjs +5 -4
  69. package/package.json +9 -17
  70. package/dist/WithdrawModal-GR3HLYXU.cjs +0 -11
  71. package/dist/WithdrawModal-RMCYJJ4S.mjs +0 -11
  72. package/dist/chunk-ADEWTBSN.cjs +0 -19
  73. package/dist/chunk-EAGMY3QE.mjs +0 -962
  74. package/dist/chunk-OY5N3E6L.cjs +0 -962
  75. package/dist/chunk-PP4QE32S.mjs +0 -19
  76. package/dist/constants-BT4ctuHo.d.cts +0 -64
  77. package/dist/constants-D21ZdNOP.d.ts +0 -64
  78. package/dist/offramp.cjs +0 -25
  79. package/dist/offramp.d.cts +0 -28
  80. package/dist/offramp.d.ts +0 -28
  81. package/dist/offramp.mjs +0 -25
  82. package/dist/ramp-types-C6aUz4SZ.d.cts +0 -43
  83. package/dist/ramp-types-C6aUz4SZ.d.ts +0 -43
@@ -9,45 +9,30 @@ import {
9
9
  executePolymarketSafeTransfer,
10
10
  fetchPolymarketProxyWallet,
11
11
  readPolymarketBalances
12
- } from "./chunk-FTWKAJGN.mjs";
12
+ } from "./chunk-2FOPO4N5.mjs";
13
13
  import {
14
14
  AnalyticsSession,
15
- AppleIcon,
16
- BankIcon,
17
- BodyHeader,
15
+ AssetMetadataProvider,
18
16
  Button,
19
17
  Callout,
20
- CardIcon,
21
18
  CdnIcon,
22
19
  ChainCatalogProvider,
23
- CheckIcon,
24
- ChevronDownIcon,
25
- ChevronLeftIcon,
26
- CloseIcon,
27
- CopyIcon,
28
- ExternalLinkIcon,
29
- HandCoinsIcon,
30
20
  HistoryEntryButton,
31
21
  HistoryOverlay,
32
- InfoIcon,
33
22
  ListRow,
34
- MigrateAssetsIcon,
35
23
  Modal,
36
24
  PermitDepositSubmitError,
37
25
  PoweredBy,
38
26
  ProcessingStep,
39
27
  RpcUrlsProvider,
28
+ SOLANA_TOKENS,
40
29
  SUPPORTED_CONNECT_EXCHANGE_COUNT,
41
30
  SetupError,
42
- Spinner,
43
- SwappedConnectFeeChangedError,
44
31
  TokenIcon,
45
32
  Tooltip,
46
- TransferCryptoIcon,
47
- UnplugIcon,
48
- WalletIcon,
49
33
  analyticsTargetProperties,
50
34
  applyTheme,
35
+ assetIdFor,
51
36
  catalogKeyForChain,
52
37
  chainIdsByValue,
53
38
  checkBackendUrl,
@@ -62,7 +47,6 @@ import {
62
47
  depositBoundsViolation,
63
48
  describePolicyRefusal,
64
49
  failureMessageForEvent,
65
- fetchTokenPriceUsd,
66
50
  formatExpectedDuration,
67
51
  formatQuotedReceive,
68
52
  formatReceiveEstimate,
@@ -80,16 +64,19 @@ import {
80
64
  isFailedEvent,
81
65
  isHistoryEntryVisible,
82
66
  isNativeAsset,
83
- isRecognizedToken,
67
+ isNativeSol,
84
68
  isSubmissionUncertain,
85
69
  portfolioToAssets,
86
70
  quoteFeeRow,
87
71
  readDedupedAccountSetupResult,
88
72
  resolveAppFeeBps,
73
+ resolveCuratedToken,
74
+ resolveSolanaToken,
89
75
  rpcUrlFor,
90
76
  runAccountSetupDeduped,
91
77
  tokenFormatter,
92
78
  txRefsMatch,
79
+ useAssetStore,
93
80
  useCatalogChain,
94
81
  useChainCatalog,
95
82
  useChainName,
@@ -100,38 +87,54 @@ import {
100
87
  useExplorerTxUrl,
101
88
  useHistoryPanel,
102
89
  useIsDepositChain,
103
- useLatestRef,
90
+ useIsRecognizedToken,
104
91
  useRestrictedListExclusion,
105
92
  useRpcUrls,
106
93
  useStableRpcUrls,
94
+ useTokenDisplay,
95
+ useTokenDisplays,
107
96
  warnRemovedProps
108
- } from "./chunk-AIZKGFVA.mjs";
97
+ } from "./chunk-32ERBFMO.mjs";
98
+ import {
99
+ AppleIcon,
100
+ BankIcon,
101
+ BodyHeader,
102
+ CardIcon,
103
+ CheckIcon,
104
+ ChevronDownIcon,
105
+ ChevronLeftIcon,
106
+ CloseIcon,
107
+ CopyIcon,
108
+ ExternalLinkIcon,
109
+ HandCoinsIcon,
110
+ InfoIcon,
111
+ MigrateAssetsIcon,
112
+ Spinner,
113
+ TransferCryptoIcon,
114
+ UnplugIcon,
115
+ WalletIcon,
116
+ useLatestRef
117
+ } from "./chunk-YY4ZOAH5.mjs";
109
118
  import {
110
119
  HYPERCORE_CHAIN_ID,
111
120
  HYPERCORE_MIN_DEPOSIT_USD,
112
121
  HYPERCORE_SPOT_CAIP2,
113
122
  NATIVE_TOKEN_ADDRESS,
114
123
  SOLANA_MAINNET_CAIP2,
115
- SOLANA_TOKENS,
116
124
  SUPPORTED_CHAIN_IDS,
117
125
  cdnIconUrl,
118
- findTokenDecimals,
119
126
  getChainBadge,
120
127
  getChainIcon,
121
128
  getChainId,
122
129
  getChainName,
123
- getNativeSymbol,
124
130
  getSupportedChainIds,
125
- getTargetTokenSymbol,
126
- getTargetTokenSymbolsForChain,
127
131
  isHyperCoreDestination,
128
- isNativeSol,
129
132
  isStablecoinSymbol,
130
133
  isVirtualDestination,
131
134
  parseEvmChainId,
132
135
  targetChainToChainId,
133
136
  toEvmCaip2
134
- } from "./chunk-EAGMY3QE.mjs";
137
+ } from "./chunk-E7IMWVMN.mjs";
135
138
 
136
139
  // src/core/reown-dependencies.ts
137
140
  var dependencies;
@@ -164,12 +167,12 @@ function getReownDependencies() {
164
167
  // src/DepositModal.tsx
165
168
  import {
166
169
  useMemo as useMemo9,
167
- useEffect as useEffect14,
168
- useRef as useRef10,
169
- useState as useState14,
170
- useCallback as useCallback8,
171
- lazy as lazy2,
172
- Suspense as Suspense2
170
+ useEffect as useEffect15,
171
+ useRef as useRef11,
172
+ useState as useState15,
173
+ useCallback as useCallback9,
174
+ lazy as lazy3,
175
+ Suspense as Suspense3
173
176
  } from "react";
174
177
 
175
178
  // src/DepositFlow.tsx
@@ -179,7 +182,9 @@ import {
179
182
  useMemo as useMemo8,
180
183
  useEffect as useEffect13,
181
184
  useLayoutEffect as useLayoutEffect2,
182
- useRef as useRef9
185
+ useRef as useRef9,
186
+ lazy as lazy2,
187
+ Suspense as Suspense2
183
188
  } from "react";
184
189
 
185
190
  // src/components/steps/ConnectStep.tsx
@@ -508,6 +513,7 @@ function ConnectStep({
508
513
  transferCryptoErrorReason,
509
514
  fiatPaymentMethods,
510
515
  fiatLoading,
516
+ fiatNotice,
511
517
  onSelectFiatMethod,
512
518
  onPrefetchFiatMethod,
513
519
  recommendedMethod,
@@ -685,6 +691,7 @@ function ConnectStep({
685
691
  ) : void 0
686
692
  }
687
693
  ),
694
+ fiatNotice && (activeTab === "cash" || !hasCash) && /* @__PURE__ */ jsx5(Callout, { variant: "warning", children: fiatNotice }),
688
695
  /* @__PURE__ */ jsx5(
689
696
  "div",
690
697
  {
@@ -801,7 +808,7 @@ function AssetSelectStep({
801
808
  isDepositChain,
802
809
  catalog
803
810
  ]);
804
- const rows = useMemo(() => {
811
+ const filteredRows = useMemo(() => {
805
812
  return assets.filter((a) => {
806
813
  if (!isDepositChain(a.chainId)) return false;
807
814
  try {
@@ -827,6 +834,20 @@ function AssetSelectStep({
827
834
  return 0;
828
835
  });
829
836
  }, [assets, isDepositChain, isExcludedByRestrictedList]);
837
+ const displays = useTokenDisplays(
838
+ filteredRows.map((asset) => ({
839
+ chain: asset.chainId,
840
+ address: asset.token,
841
+ fallback: { symbol: asset.symbol, decimals: asset.decimals }
842
+ }))
843
+ );
844
+ const rows = useMemo(
845
+ () => filteredRows.map((asset, i) => {
846
+ const symbol = displays[i]?.symbol ?? asset.symbol;
847
+ return symbol === asset.symbol ? asset : { ...asset, symbol, name: symbol };
848
+ }),
849
+ [filteredRows, displays]
850
+ );
830
851
  useEffect2(() => {
831
852
  if (!defaultAssetId || selectedAssetId) return;
832
853
  if (rows.some((asset) => asset.id === defaultAssetId)) {
@@ -896,6 +917,7 @@ function AssetSelectStep({
896
917
  /* @__PURE__ */ jsx6("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx6(
897
918
  TokenIcon,
898
919
  {
920
+ token: { chain: asset.chainId, address: asset.token },
899
921
  symbol: asset.symbol,
900
922
  fallback: asset.symbol.slice(0, 4)
901
923
  }
@@ -958,7 +980,7 @@ async function fetchNativeAssets(address, publicClient, existing, isDepositChain
958
980
  if (existingIds.has(id)) return [];
959
981
  try {
960
982
  const balance = await publicClient.getBalance({ address });
961
- const nativeSymbol = catalogChain?.nativeToken.symbol ?? getNativeSymbol(connectedChainId);
983
+ const nativeSymbol = catalogChain?.nativeToken.symbol ?? "Token";
962
984
  const nativeDecimals = catalogChain?.nativeToken.decimals ?? 18;
963
985
  return [
964
986
  {
@@ -1083,6 +1105,16 @@ function AnimatedAmountInput({
1083
1105
 
1084
1106
  // src/components/steps/AmountStep.tsx
1085
1107
  import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1108
+ function requiredSourceAmount(quote, decimals) {
1109
+ const raw = quote?.input?.amount;
1110
+ if (raw === void 0) return null;
1111
+ try {
1112
+ return formatUnits2(BigInt(raw), decimals);
1113
+ } catch {
1114
+ return null;
1115
+ }
1116
+ }
1117
+ var PAYMENT_QUOTE_REFRESH_MS = 3e4;
1086
1118
  var PRESETS = [
1087
1119
  { value: 25, label: "25%" },
1088
1120
  { value: 50, label: "50%" },
@@ -1113,6 +1145,8 @@ function AmountStep({
1113
1145
  sourcePriceUnavailable = false,
1114
1146
  appBalanceUsd,
1115
1147
  title = "Wallet deposit",
1148
+ payment,
1149
+ account,
1116
1150
  onContinue,
1117
1151
  onCtaClick,
1118
1152
  service
@@ -1120,6 +1154,7 @@ function AmountStep({
1120
1154
  const [amount, setAmount] = useState3("");
1121
1155
  const [balance, setBalance] = useState3(null);
1122
1156
  const [error, setError] = useState3(null);
1157
+ const [paymentQuote, setPaymentQuote] = useState3("loading");
1123
1158
  const hasAttemptedSwitch = useRef2(false);
1124
1159
  const hasAppliedDefaultRef = useRef2(false);
1125
1160
  const isMaxDefault = defaultAmount?.trim().toLowerCase() === "max";
@@ -1127,7 +1162,7 @@ function AmountStep({
1127
1162
  walletClient?.chain?.id && walletClient.chain.id !== asset.chainId
1128
1163
  );
1129
1164
  const targetChainId = targetChainToChainId(targetChain);
1130
- const targetSymbol = getTargetTokenSymbol(targetToken, targetChainId);
1165
+ const targetSymbol = useTokenDisplay(targetChainId, targetToken).symbol;
1131
1166
  const isSourceStablecoin = isStablecoinSymbol(asset.symbol);
1132
1167
  const derivedPriceUsd = useMemo2(() => {
1133
1168
  if (tokenPriceUsdOverride !== void 0 && tokenPriceUsdOverride > 0)
@@ -1241,7 +1276,15 @@ function AmountStep({
1241
1276
  return Number.isFinite(parsed) && parsed > 0 ? parsed : 0;
1242
1277
  }, [amount]);
1243
1278
  const amountUsd = numericAmount;
1279
+ const lockedAmount = payment && typeof paymentQuote !== "string" ? requiredSourceAmount(paymentQuote, asset.decimals) : null;
1244
1280
  const sourceAmountUnits = useMemo2(() => {
1281
+ if (lockedAmount !== null) {
1282
+ try {
1283
+ return parseUnits(lockedAmount, asset.decimals);
1284
+ } catch {
1285
+ return null;
1286
+ }
1287
+ }
1245
1288
  if (numericAmount <= 0) return null;
1246
1289
  const raw = isSourceStablecoin || !hasPricing ? numericAmount : numericAmount / (tokenPriceUsd ?? 1);
1247
1290
  try {
@@ -1249,7 +1292,14 @@ function AmountStep({
1249
1292
  } catch {
1250
1293
  return null;
1251
1294
  }
1252
- }, [numericAmount, isSourceStablecoin, hasPricing, tokenPriceUsd, asset.decimals]);
1295
+ }, [
1296
+ lockedAmount,
1297
+ numericAmount,
1298
+ isSourceStablecoin,
1299
+ hasPricing,
1300
+ tokenPriceUsd,
1301
+ asset.decimals
1302
+ ]);
1253
1303
  const minDepositUsd = isHyperCoreDestination(targetChain) ? Math.max(HYPERCORE_MIN_DEPOSIT_USD, uiConfig?.minDepositUsd ?? 0) : uiConfig?.minDepositUsd ?? null;
1254
1304
  const maxDepositUsd = uiConfig?.maxDepositUsd ?? null;
1255
1305
  const isBelowMin = minDepositUsd !== null && numericAmount > 0 && amountUsd < minDepositUsd;
@@ -1263,6 +1313,36 @@ function AmountStep({
1263
1313
  sourceAmountUnits
1264
1314
  );
1265
1315
  const balanceAfterUsd = appBalanceUsd !== void 0 ? appBalanceUsd + numericAmount : null;
1316
+ useEffect3(() => {
1317
+ if (!payment || !account) return;
1318
+ let active = true;
1319
+ setPaymentQuote("loading");
1320
+ const load = async () => {
1321
+ const result = await service.getQuotePreview({
1322
+ account,
1323
+ sourceChainId: asset.chainId,
1324
+ sourceToken: asset.token,
1325
+ direction: "exactOut",
1326
+ amountOut: payment.amount
1327
+ });
1328
+ if (!active) return;
1329
+ setPaymentQuote(
1330
+ result && "output" in result && result.input ? result : "unavailable"
1331
+ );
1332
+ };
1333
+ void load();
1334
+ const timer = setInterval(load, PAYMENT_QUOTE_REFRESH_MS);
1335
+ return () => {
1336
+ active = false;
1337
+ clearInterval(timer);
1338
+ };
1339
+ }, [
1340
+ payment,
1341
+ account,
1342
+ asset.chainId,
1343
+ asset.token,
1344
+ service
1345
+ ]);
1266
1346
  const handlePresetClick = (percentage) => {
1267
1347
  if (balance === null) return;
1268
1348
  onCtaClick?.(percentage === 100 ? "Max" : `${percentage}%`);
@@ -1286,6 +1366,19 @@ function AmountStep({
1286
1366
  };
1287
1367
  const handleContinue = async () => {
1288
1368
  if (chainMismatch || boundViolation) return;
1369
+ if (payment) {
1370
+ if (!lockedAmount) return;
1371
+ if (balance !== null && parseUnits(lockedAmount, asset.decimals) > balance) {
1372
+ setError("Insufficient balance");
1373
+ return;
1374
+ }
1375
+ setError(null);
1376
+ onCtaClick?.("continue");
1377
+ const lockedUnits = Number(lockedAmount);
1378
+ const usd = isSourceStablecoin || !hasPricing ? lockedUnits : lockedUnits * (tokenPriceUsd ?? 1);
1379
+ onContinue(lockedAmount, usd.toString(), balance ?? void 0);
1380
+ return;
1381
+ }
1289
1382
  let effectiveAmount = numericAmount;
1290
1383
  if (isBelowMin && minDepositUsd !== null) {
1291
1384
  effectiveAmount = minDepositUsd;
@@ -1323,7 +1416,13 @@ function AmountStep({
1323
1416
  const knowsBalance = address !== void 0;
1324
1417
  const needsPricing = !knowsBalance && !isSourceStablecoin;
1325
1418
  const blockedOnPricing = needsPricing && !hasPricing;
1326
- const continueDisabled = chainMismatch || exceedsBalance || boundViolation !== null || blockedOnPricing || numericAmount === 0 && !isBelowMin || knowsBalance && balance === null;
1419
+ const continueDisabled = payment ? (
1420
+ // No input to validate — only whether the quote resolved and whether the
1421
+ // payer can cover it. Bounds still apply: they are the project's ingest
1422
+ // limits, so an invoice under a chain's minimum genuinely cannot be paid
1423
+ // that way and the payer has to be told, not left on a dead button.
1424
+ chainMismatch || lockedAmount === null || exceedsBalance || boundViolation !== null || knowsBalance && balance === null
1425
+ ) : chainMismatch || exceedsBalance || boundViolation !== null || blockedOnPricing || numericAmount === 0 && !isBelowMin || knowsBalance && balance === null;
1327
1426
  const chainName = useChainName();
1328
1427
  const sourceChainName = chainName(asset.chainId);
1329
1428
  const targetChainName = chainName(targetChainId);
@@ -1332,7 +1431,7 @@ function AmountStep({
1332
1431
  /* @__PURE__ */ jsx8(BodyHeader, { icon: /* @__PURE__ */ jsx8(WalletIcon, {}), title }),
1333
1432
  /* @__PURE__ */ jsxs6("div", { className: "rs-amount-section", children: [
1334
1433
  /* @__PURE__ */ jsxs6("div", { className: "rs-amount-display", children: [
1335
- /* @__PURE__ */ jsx8(
1434
+ payment ? /* @__PURE__ */ jsx8("div", { className: "rs-amount-fixed", "aria-label": "Amount to pay", children: lockedAmount ? `${tokenFormatter.format(Number(lockedAmount))} ${asset.symbol}` : "\u2014" }) : /* @__PURE__ */ jsx8(
1336
1435
  AnimatedAmountInput,
1337
1436
  {
1338
1437
  value: amount,
@@ -1359,7 +1458,7 @@ function AmountStep({
1359
1458
  ] })
1360
1459
  ] })
1361
1460
  ] }),
1362
- knowsBalance && /* @__PURE__ */ jsx8("div", { className: "rs-amount-presets", children: PRESETS.map((preset) => /* @__PURE__ */ jsx8(
1461
+ knowsBalance && !payment && /* @__PURE__ */ jsx8("div", { className: "rs-amount-presets", children: PRESETS.map((preset) => /* @__PURE__ */ jsx8(
1363
1462
  "button",
1364
1463
  {
1365
1464
  type: "button",
@@ -1380,7 +1479,13 @@ function AmountStep({
1380
1479
  " ",
1381
1480
  asset.symbol
1382
1481
  ] }),
1383
- /* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx8(TokenIcon, { symbol: asset.symbol }) })
1482
+ /* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx8(
1483
+ TokenIcon,
1484
+ {
1485
+ token: { chain: asset.chainId, address: asset.token },
1486
+ symbol: asset.symbol
1487
+ }
1488
+ ) })
1384
1489
  ] })
1385
1490
  ] }),
1386
1491
  /* @__PURE__ */ jsxs6("div", { className: "rs-amount-detail-row", children: [
@@ -1391,7 +1496,13 @@ function AmountStep({
1391
1496
  " ",
1392
1497
  targetSymbol
1393
1498
  ] }),
1394
- /* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx8(TokenIcon, { symbol: targetSymbol }) })
1499
+ /* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx8(
1500
+ TokenIcon,
1501
+ {
1502
+ token: { chain: targetChainId, address: targetToken },
1503
+ symbol: targetSymbol
1504
+ }
1505
+ ) })
1395
1506
  ] })
1396
1507
  ] }),
1397
1508
  balanceAfterUsd !== null && /* @__PURE__ */ jsxs6("div", { className: "rs-amount-detail-row", children: [
@@ -1399,6 +1510,14 @@ function AmountStep({
1399
1510
  /* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-value", children: currencyFormatter.format(balanceAfterUsd) })
1400
1511
  ] })
1401
1512
  ] }),
1513
+ payment && paymentQuote === "unavailable" && /* @__PURE__ */ jsxs6(Callout, { variant: "error", children: [
1514
+ "This payment can't be priced from ",
1515
+ asset.symbol,
1516
+ " on",
1517
+ " ",
1518
+ sourceChainName,
1519
+ " right now. Try another asset."
1520
+ ] }),
1402
1521
  blockedOnPricing && sourcePriceUnavailable && /* @__PURE__ */ jsxs6(Callout, { variant: "error", children: [
1403
1522
  asset.symbol,
1404
1523
  " can't be priced right now, so this deposit can't be estimated. You can still send any amount to the deposit address."
@@ -1432,8 +1551,10 @@ function ReviewDetails({
1432
1551
  estimatedTime,
1433
1552
  sendAmount,
1434
1553
  sendSymbol,
1554
+ sendToken,
1435
1555
  receiveDisplay,
1436
1556
  receiveSymbol,
1557
+ receiveToken,
1437
1558
  fee
1438
1559
  }) {
1439
1560
  return /* @__PURE__ */ jsxs7("div", { className: "rs-review-details", children: [
@@ -1463,14 +1584,14 @@ function ReviewDetails({
1463
1584
  " ",
1464
1585
  sendSymbol
1465
1586
  ] }),
1466
- /* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(TokenIcon, { symbol: sendSymbol }) })
1587
+ /* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(TokenIcon, { token: sendToken, symbol: sendSymbol }) })
1467
1588
  ] })
1468
1589
  ] }),
1469
1590
  /* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
1470
1591
  /* @__PURE__ */ jsx9("span", { children: "Receive" }),
1471
1592
  /* @__PURE__ */ jsxs7("span", { className: "rs-review-detail-value", children: [
1472
1593
  /* @__PURE__ */ jsx9("span", { children: receiveDisplay }),
1473
- /* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(TokenIcon, { symbol: receiveSymbol }) })
1594
+ /* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(TokenIcon, { token: receiveToken, symbol: receiveSymbol }) })
1474
1595
  ] })
1475
1596
  ] }),
1476
1597
  /* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
@@ -1656,7 +1777,9 @@ function ConfirmStep({
1656
1777
  onError,
1657
1778
  onDepositSubmitted,
1658
1779
  onSubmittingChange,
1659
- executeTransfer
1780
+ executeTransfer,
1781
+ title = "Review deposit",
1782
+ routeThroughAccount = false
1660
1783
  }) {
1661
1784
  const [isSubmitting, setIsSubmitting] = useState4(false);
1662
1785
  const [error, setError] = useState4(null);
@@ -1698,7 +1821,9 @@ function ConfirmStep({
1698
1821
  ]);
1699
1822
  const quote = setupReady && quoteResult?.requestKey === quoteRequestKey ? quoteResult.quote : null;
1700
1823
  const targetChainId = targetChainToChainId(targetChain);
1701
- const targetSymbol = sameRoute ? asset.symbol : getTargetTokenSymbol(targetToken, targetChainId);
1824
+ const resolvedTargetSymbol = useTokenDisplay(targetChainId, targetToken).symbol;
1825
+ const targetSymbol = sameRoute ? asset.symbol : resolvedTargetSymbol;
1826
+ const sourceTrusted = useIsRecognizedToken(asset.chainId, asset.token);
1702
1827
  const sourceChainName = getChainName(asset.chainId);
1703
1828
  const targetChainName = getChainName(targetChainId);
1704
1829
  const sourceChainIcon = getChainIcon(asset.chainId);
@@ -1712,7 +1837,7 @@ function ConfirmStep({
1712
1837
  const { display: feeDisplay, struck: feesFullySponsored } = quoteFeeRow(
1713
1838
  quote?.fees
1714
1839
  );
1715
- const directTransfer = sameRoute && !mustHaveQuote && !executeTransfer;
1840
+ const directTransfer = sameRoute && !mustHaveQuote && !executeTransfer && !routeThroughAccount;
1716
1841
  const permitEligible = enableGaslessDeposit && !isNativeAsset(asset) && !isDappImportAsset(asset) && !executeTransfer && !directTransfer && asset.chainId !== HYPERCORE_CHAIN_ID;
1717
1842
  const permitRequestKey = JSON.stringify([
1718
1843
  smartAccount.toLowerCase(),
@@ -1751,7 +1876,7 @@ function ConfirmStep({
1751
1876
  sourceSymbol: asset.symbol,
1752
1877
  targetSymbol,
1753
1878
  sourceAmountUsd,
1754
- sourceTrusted: isRecognizedToken(asset.token, asset.chainId),
1879
+ sourceTrusted,
1755
1880
  // The target is the curated deposit destination, so a stablecoin target
1756
1881
  // estimates at $1 when unquoted (DepositFlow skips fetching stablecoin
1757
1882
  // target prices). Not applied to the source — that can be a held token.
@@ -2045,7 +2170,7 @@ function ConfirmStep({
2045
2170
  };
2046
2171
  return /* @__PURE__ */ jsxs8("div", { className: "rs-screen", children: [
2047
2172
  /* @__PURE__ */ jsxs8("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
2048
- /* @__PURE__ */ jsx10(BodyHeader, { icon: /* @__PURE__ */ jsx10(WalletIcon, {}), title: "Review deposit" }),
2173
+ /* @__PURE__ */ jsx10(BodyHeader, { icon: /* @__PURE__ */ jsx10(WalletIcon, {}), title }),
2049
2174
  /* @__PURE__ */ jsx10(
2050
2175
  ReviewDetails,
2051
2176
  {
@@ -2056,8 +2181,10 @@ function ConfirmStep({
2056
2181
  estimatedTime: estimatedTimeDisplay,
2057
2182
  sendAmount: formattedSendAmount,
2058
2183
  sendSymbol: asset.symbol,
2184
+ sendToken: { chain: asset.chainId, address: asset.token },
2059
2185
  receiveDisplay,
2060
2186
  receiveSymbol: targetSymbol,
2187
+ receiveToken: sameRoute ? { chain: asset.chainId, address: asset.token } : { chain: targetChainId, address: targetToken },
2061
2188
  fee: { display: feeDisplay, struck: feesFullySponsored }
2062
2189
  }
2063
2190
  ),
@@ -2113,7 +2240,8 @@ function QrReviewStep({
2113
2240
  }) {
2114
2241
  const [quote, setQuote] = useState5({ state: "loading", value: null });
2115
2242
  const targetChainId = targetChainToChainId(targetChain);
2116
- const targetSymbol = getTargetTokenSymbol(targetToken, targetChainId);
2243
+ const targetSymbol = useTokenDisplay(targetChainId, targetToken).symbol;
2244
+ const sourceTrusted = useIsRecognizedToken(asset.chainId, asset.token);
2117
2245
  const boundsFor = useDepositBounds();
2118
2246
  useEffect5(() => {
2119
2247
  let cancelled = false;
@@ -2166,7 +2294,7 @@ function QrReviewStep({
2166
2294
  sourceSymbol: asset.symbol,
2167
2295
  targetSymbol,
2168
2296
  sourceAmountUsd: Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0,
2169
- sourceTrusted: isRecognizedToken(asset.token, asset.chainId),
2297
+ sourceTrusted,
2170
2298
  prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : isDisplayStablecoinSymbol(targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
2171
2299
  });
2172
2300
  return estimate ?? targetSymbol;
@@ -2188,8 +2316,10 @@ function QrReviewStep({
2188
2316
  estimatedTime,
2189
2317
  sendAmount: formattedSendAmount,
2190
2318
  sendSymbol: asset.symbol,
2319
+ sendToken: { chain: asset.chainId, address: asset.token },
2191
2320
  receiveDisplay,
2192
2321
  receiveSymbol: targetSymbol,
2322
+ receiveToken: { chain: targetChainId, address: targetToken },
2193
2323
  fee: { display: feeDisplay, struck }
2194
2324
  }
2195
2325
  ),
@@ -2214,6 +2344,7 @@ import {
2214
2344
  lazy,
2215
2345
  Suspense
2216
2346
  } from "react";
2347
+ import { formatUnits as formatUnits3 } from "viem";
2217
2348
 
2218
2349
  // src/components/steps/DepositAddressSkeleton.tsx
2219
2350
  import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
@@ -2223,8 +2354,7 @@ function DepositAddressSkeleton({
2223
2354
  }) {
2224
2355
  const evmChainIds = getSupportedChainIds();
2225
2356
  const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
2226
- const tokensForChain = getTargetTokenSymbolsForChain(defaultChainId);
2227
- const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
2357
+ const defaultToken = "USDC";
2228
2358
  const chainName = getChainName(defaultChainId);
2229
2359
  const chainIcon = getChainIcon(defaultChainId);
2230
2360
  return /* @__PURE__ */ jsxs10("div", { className: "rs-screen", "aria-busy": "true", children: [
@@ -2263,10 +2393,10 @@ function DepositAddressSkeleton({
2263
2393
  ] }),
2264
2394
  /* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-dropdown-trigger", children: [
2265
2395
  /* @__PURE__ */ jsx12(
2266
- TokenIcon,
2396
+ "span",
2267
2397
  {
2268
- symbol: defaultToken,
2269
- className: "rs-deposit-address-dropdown-icon"
2398
+ className: "rs-token-icon rs-deposit-address-dropdown-icon",
2399
+ "data-loading": ""
2270
2400
  }
2271
2401
  ),
2272
2402
  /* @__PURE__ */ jsx12("span", { children: defaultToken }),
@@ -2411,7 +2541,7 @@ function DepositNotification({
2411
2541
  const onCompleteRef = useLatestRef(onComplete);
2412
2542
  const onFailedRef = useLatestRef(onFailed);
2413
2543
  const handleComplete = useCallback(
2414
- (destTxHash) => {
2544
+ (destTxHash, destAmount) => {
2415
2545
  if (completedRef.current) return;
2416
2546
  completedRef.current = true;
2417
2547
  setDestinationTxHash(destTxHash ?? null);
@@ -2424,7 +2554,8 @@ function DepositNotification({
2424
2554
  sourceToken: context.sourceToken,
2425
2555
  sourceDecimals: context.sourceDecimals,
2426
2556
  targetChain: context.targetChain,
2427
- targetToken: context.targetToken
2557
+ targetToken: context.targetToken,
2558
+ destinationAmount: destAmount
2428
2559
  });
2429
2560
  },
2430
2561
  [depositContextRef, onCompleteRef, txHash]
@@ -2453,8 +2584,11 @@ function DepositNotification({
2453
2584
  const lastEvent = data.lastEvent;
2454
2585
  const eventForTx = isEventForTx(lastEvent, txHash) ? lastEvent : void 0;
2455
2586
  if (eventForTx?.type === "bridge-complete") {
2456
- const destTx = eventForTx.data?.destination?.transactionHash;
2457
- handleComplete(destTx);
2587
+ const destination = eventForTx.data?.destination;
2588
+ handleComplete(
2589
+ destination?.transactionHash,
2590
+ typeof destination?.amount === "string" ? destination.amount : void 0
2591
+ );
2458
2592
  return;
2459
2593
  }
2460
2594
  if (eventForTx?.type === "bridge-failed") {
@@ -2622,6 +2756,15 @@ function DepositNotification({
2622
2756
  );
2623
2757
  }
2624
2758
 
2759
+ // src/core/payment-uri.ts
2760
+ function paymentRequestUri(input) {
2761
+ const { to, chainId, token, amount } = input;
2762
+ if (token.toLowerCase() === NATIVE_TOKEN_ADDRESS.toLowerCase() || token.toLowerCase() === "0x0") {
2763
+ return `ethereum:${to}@${chainId}?value=${amount}`;
2764
+ }
2765
+ return `ethereum:${token}@${chainId}/transfer?address=${to}&uint256=${amount}`;
2766
+ }
2767
+
2625
2768
  // src/core/deposit-source-identity.ts
2626
2769
  var SOLANA_NATIVE_MINT = "11111111111111111111111111111111";
2627
2770
  var EVM_ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
@@ -2643,6 +2786,7 @@ function resolveSourceTokenIdentity(input) {
2643
2786
  const isNative = raw.toLowerCase() === "native" || raw.toLowerCase() === EVM_ZERO_ADDRESS;
2644
2787
  return isNative ? SOLANA_NATIVE_MINT : raw;
2645
2788
  }
2789
+ if (raw.toLowerCase() === "0x0") return EVM_ZERO_ADDRESS;
2646
2790
  return raw.toLowerCase();
2647
2791
  }
2648
2792
 
@@ -2652,6 +2796,7 @@ var QRCode = lazy(
2652
2796
  () => import("./QRCode-5RGIZZHL.mjs").then((m) => ({ default: m.QRCode }))
2653
2797
  );
2654
2798
  var POLL_INTERVAL_MS = 4e3;
2799
+ var PAYMENT_QUOTE_REFRESH_MS2 = 3e4;
2655
2800
  function isRecord(value) {
2656
2801
  return typeof value === "object" && value !== null;
2657
2802
  }
@@ -2683,18 +2828,8 @@ function asString(value) {
2683
2828
  return typeof value === "string" ? value : void 0;
2684
2829
  }
2685
2830
  function resolveSolanaTokenMeta(token) {
2686
- if (!token) return {};
2687
- const normalized = token.toLowerCase();
2688
- const matched = SOLANA_TOKENS.find(
2689
- (entry) => entry.mint.toLowerCase() === normalized
2690
- );
2691
- if (matched) {
2692
- return { sourceSymbol: matched.symbol, sourceDecimals: matched.decimals };
2693
- }
2694
- if (normalized === "native" || normalized === "11111111111111111111111111111111" || normalized === "so11111111111111111111111111111111111111112") {
2695
- return { sourceSymbol: "SOL", sourceDecimals: 9 };
2696
- }
2697
- return {};
2831
+ const matched = token ? resolveSolanaToken(token) : void 0;
2832
+ return matched ? { sourceSymbol: matched.symbol, sourceDecimals: matched.decimals } : {};
2698
2833
  }
2699
2834
  function getDepositEventDetails(event) {
2700
2835
  if (!event?.type || !isRecord(event.data)) return {};
@@ -2752,10 +2887,11 @@ function selectionAsAsset(chainId, symbol, offer, catalogChain) {
2752
2887
  decimals
2753
2888
  };
2754
2889
  }
2755
- function TokenGlyph({ symbol }) {
2890
+ function TokenGlyph({ symbol, token }) {
2756
2891
  return /* @__PURE__ */ jsx14(
2757
2892
  TokenIcon,
2758
2893
  {
2894
+ token,
2759
2895
  symbol,
2760
2896
  className: "rs-deposit-address-dropdown-icon",
2761
2897
  fallback: /* @__PURE__ */ jsx14("span", { className: "rs-deposit-address-dropdown-icon rs-deposit-address-dropdown-icon--fallback", children: symbol.slice(0, 3) })
@@ -2779,6 +2915,7 @@ function DepositAddressStep({
2779
2915
  onDepositComplete,
2780
2916
  onDepositFailed,
2781
2917
  onAddressShown,
2918
+ payment,
2782
2919
  onCopyAddress,
2783
2920
  onReviewDeposit,
2784
2921
  onError
@@ -2864,6 +3001,7 @@ function DepositAddressStep({
2864
3001
  const baselineTxHashRef = useRef5(void 0);
2865
3002
  const notificationIdRef = useRef5(0);
2866
3003
  const displayAddress = isSolana && solanaDepositAddress ? solanaDepositAddress : smartAccount;
3004
+ const [paymentUnits, setPaymentUnits] = useState7("loading");
2867
3005
  const sourceTokenIdentity = useMemo3(
2868
3006
  () => resolveSourceTokenIdentity({
2869
3007
  chain: sourceChainId,
@@ -2873,6 +3011,59 @@ function DepositAddressStep({
2873
3011
  }),
2874
3012
  [sourceChainId, sourceTokenSymbol, shortlist, offer.restricted, catalogFor]
2875
3013
  );
3014
+ useEffect7(() => {
3015
+ if (!payment) return;
3016
+ if (typeof sourceChainId !== "number" || !sourceTokenIdentity) {
3017
+ setPaymentUnits("unavailable");
3018
+ return;
3019
+ }
3020
+ setPaymentUnits("loading");
3021
+ let active = true;
3022
+ const load = async () => {
3023
+ const quote = await service.getQuotePreview({
3024
+ account: smartAccount,
3025
+ sourceChainId,
3026
+ sourceToken: sourceTokenIdentity,
3027
+ direction: "exactOut",
3028
+ amountOut: payment.amount
3029
+ });
3030
+ if (!active) return;
3031
+ const answered = quote && "output" in quote ? quote.input?.amount : void 0;
3032
+ setPaymentUnits(answered ?? "unavailable");
3033
+ };
3034
+ void load();
3035
+ const timer = setInterval(load, PAYMENT_QUOTE_REFRESH_MS2);
3036
+ return () => {
3037
+ active = false;
3038
+ clearInterval(timer);
3039
+ };
3040
+ }, [payment, sourceChainId, sourceTokenIdentity, smartAccount, service]);
3041
+ const tokenRefFor = (symbol) => {
3042
+ const address = resolveSourceTokenIdentity({
3043
+ chain: sourceChainId,
3044
+ symbol,
3045
+ shortlist,
3046
+ catalogTokens: offer.restricted ? void 0 : catalogFor(sourceChainId)?.supportedTokens
3047
+ });
3048
+ return address ? { chain: sourceChainId, address } : void 0;
3049
+ };
3050
+ const assetStore = useAssetStore();
3051
+ const assetStoreRef = useRef5(assetStore);
3052
+ assetStoreRef.current = assetStore;
3053
+ const paymentDecimals = useTokenDisplay(
3054
+ typeof sourceChainId === "number" ? sourceChainId : void 0,
3055
+ sourceTokenIdentity
3056
+ ).decimals;
3057
+ const paymentAmountUnits = payment && paymentUnits !== "loading" && paymentUnits !== "unavailable" ? paymentUnits : null;
3058
+ const paymentDisplay = paymentAmountUnits !== null && paymentDecimals !== void 0 ? formatUnits3(BigInt(paymentAmountUnits), paymentDecimals) : null;
3059
+ const qrValue = paymentAmountUnits !== null && typeof sourceChainId === "number" && sourceTokenIdentity ? paymentRequestUri({
3060
+ to: displayAddress,
3061
+ chainId: sourceChainId,
3062
+ token: sourceTokenIdentity,
3063
+ amount: paymentAmountUnits
3064
+ }) : displayAddress;
3065
+ const withholdPaymentQr = Boolean(payment) && paymentAmountUnits === null;
3066
+ const paymentUnquotable = Boolean(payment) && paymentUnits === "unavailable";
2876
3067
  const pendingChain = pendingChainRef.current;
2877
3068
  const sourceSelectionSettled = !catalogLoading && offer.status === "ready" && chainOptions.length > 0 && (pendingChain === void 0 || pendingChain === sourceChainId) && (chainChosenByUser.current ? chainOptions.includes(sourceChainId) : sourceChainId === preferredChainId(chainOptions));
2878
3069
  useEffect7(() => {
@@ -3008,10 +3199,10 @@ function DepositAddressStep({
3008
3199
  baselineTxHashRef.current = eventTxHash;
3009
3200
  isTrackingRef.current = true;
3010
3201
  const isEvmToken = token ? /^0x[a-fA-F0-9]{40}$/.test(token) : false;
3011
- const sourceDecimals = details.sourceDecimals ?? (isEvmToken ? findTokenDecimals(
3012
- token,
3013
- typeof chainId === "number" ? chainId : void 0
3014
- ) : void 0);
3202
+ const knownChain = chainId === "unknown" ? void 0 : chainId;
3203
+ const sourceDecimals = details.sourceDecimals ?? (token && knownChain !== void 0 ? resolveCuratedToken(token, knownChain)?.decimals ?? (knownChain === "hypercore" ? void 0 : assetStoreRef.current?.peekMeta(
3204
+ assetIdFor(knownChain, token) ?? ""
3205
+ )?.decimals) : void 0);
3015
3206
  const directTransfer = typeof chainId === "number" && isEvmToken && isSameRoute(
3016
3207
  chainId,
3017
3208
  token,
@@ -3171,7 +3362,13 @@ function DepositAddressStep({
3171
3362
  setChainDropdownOpen(false);
3172
3363
  },
3173
3364
  children: [
3174
- /* @__PURE__ */ jsx14(TokenGlyph, { symbol: sourceTokenSymbol }),
3365
+ /* @__PURE__ */ jsx14(
3366
+ TokenGlyph,
3367
+ {
3368
+ symbol: sourceTokenSymbol,
3369
+ token: tokenRefFor(sourceTokenSymbol)
3370
+ }
3371
+ ),
3175
3372
  /* @__PURE__ */ jsx14("span", { children: sourceTokenSymbol }),
3176
3373
  /* @__PURE__ */ jsx14(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
3177
3374
  ]
@@ -3187,7 +3384,7 @@ function DepositAddressStep({
3187
3384
  setTokenDropdownOpen(false);
3188
3385
  },
3189
3386
  children: [
3190
- /* @__PURE__ */ jsx14(TokenGlyph, { symbol }),
3387
+ /* @__PURE__ */ jsx14(TokenGlyph, { symbol, token: tokenRefFor(symbol) }),
3191
3388
  /* @__PURE__ */ jsx14("span", { children: symbol })
3192
3389
  ]
3193
3390
  },
@@ -3201,14 +3398,34 @@ function DepositAddressStep({
3201
3398
  style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
3202
3399
  children: [
3203
3400
  /* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-well", children: [
3204
- /* @__PURE__ */ jsx14("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx14(
3401
+ /* @__PURE__ */ jsx14("div", { className: "rs-deposit-address-qr", children: withholdPaymentQr ? /* @__PURE__ */ jsx14("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) : /* @__PURE__ */ jsx14(
3205
3402
  Suspense,
3206
3403
  {
3207
- fallback: /* @__PURE__ */ jsx14("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }),
3208
- children: /* @__PURE__ */ jsx14(QRCode, { value: displayAddress, size: 190, iconSrc: qrIconSrc })
3404
+ fallback: /* @__PURE__ */ jsx14(
3405
+ "div",
3406
+ {
3407
+ className: "rs-skeleton rs-skeleton-qr",
3408
+ "aria-hidden": "true"
3409
+ }
3410
+ ),
3411
+ children: /* @__PURE__ */ jsx14(QRCode, { value: qrValue, size: 190, iconSrc: qrIconSrc })
3209
3412
  }
3210
3413
  ) }),
3211
- /* @__PURE__ */ jsx14("div", { className: "rs-deposit-address-value", children: displayAddress })
3414
+ payment && paymentDisplay && /* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-amount", children: [
3415
+ "Send exactly ",
3416
+ paymentDisplay,
3417
+ " ",
3418
+ sourceTokenSymbol
3419
+ ] }),
3420
+ !withholdPaymentQr && /* @__PURE__ */ jsx14("div", { className: "rs-deposit-address-value", children: displayAddress })
3421
+ ] }),
3422
+ paymentUnquotable && /* @__PURE__ */ jsxs12(Callout, { variant: "error", children: [
3423
+ "This payment can't be priced from ",
3424
+ sourceTokenSymbol,
3425
+ " on",
3426
+ " ",
3427
+ chainLabel(sourceChainId, catalogFor(sourceChainId)),
3428
+ " right now. Pick another chain or token."
3212
3429
  ] }),
3213
3430
  /* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-actions", children: [
3214
3431
  /* @__PURE__ */ jsxs12(
@@ -3217,6 +3434,7 @@ function DepositAddressStep({
3217
3434
  type: "button",
3218
3435
  className: "rs-deposit-address-copy",
3219
3436
  onClick: handleCopy,
3437
+ disabled: withholdPaymentQr,
3220
3438
  children: [
3221
3439
  copied ? /* @__PURE__ */ jsx14(CheckIcon, {}) : /* @__PURE__ */ jsx14(CopyIcon, {}),
3222
3440
  copied ? "Copied!" : "Copy address"
@@ -3447,6 +3665,10 @@ function isSwappedGoBackMessage(raw) {
3447
3665
  const obj = data;
3448
3666
  return obj.key === SWAPPED_GO_BACK_KEY || obj.type === SWAPPED_GO_BACK_KEY;
3449
3667
  }
3668
+ function assetSymbol(currencyCode) {
3669
+ const separator = currencyCode?.indexOf("_") ?? -1;
3670
+ return separator > 0 ? currencyCode.slice(0, separator) : currencyCode;
3671
+ }
3450
3672
  function parseSwappedIframeMessage(raw) {
3451
3673
  let data = raw;
3452
3674
  if (typeof data === "string") {
@@ -3468,7 +3690,9 @@ function parseSwappedIframeMessage(raw) {
3468
3690
  status: rawStatus,
3469
3691
  orderId: asString2(inner.order_id) ?? asString2(obj.orderId),
3470
3692
  externalCustomerId: asString2(inner.external_customer_id) ?? asString2(obj.external_customer_id) ?? asString2(inner.externalCustomerId) ?? asString2(obj.externalCustomerId),
3471
- orderCrypto: asString2(inner.order_crypto) ?? asString2(obj.orderCrypto),
3693
+ orderCrypto: assetSymbol(
3694
+ asString2(inner.order_crypto) ?? asString2(obj.orderCrypto)
3695
+ ),
3472
3696
  orderCryptoAmount: asString2(inner.order_crypto_amount) ?? asString2(obj.orderCryptoAmount),
3473
3697
  transactionId: asString2(inner.transaction_id) ?? asString2(obj.transactionId)
3474
3698
  };
@@ -3569,8 +3793,7 @@ function SwappedProviderStep({
3569
3793
  setWidgetUrl(res.url);
3570
3794
  expectedExternalCustomerIdRef.current = res.externalCustomerId;
3571
3795
  onAttemptConsumed?.(res.externalCustomerId);
3572
- const sep = res.externalCustomerId.indexOf(":");
3573
- expectedOrderUuidRef.current = sep >= 0 ? res.externalCustomerId.slice(sep + 1) : null;
3796
+ expectedOrderUuidRef.current = res.orderId;
3574
3797
  }).catch((err) => {
3575
3798
  if (cancelled) return;
3576
3799
  const message = err instanceof Error ? err.message : loadErrorFallback;
@@ -3633,9 +3856,10 @@ function SwappedProviderStep({
3633
3856
  async function poll() {
3634
3857
  if (cancelled) return;
3635
3858
  try {
3636
- const res = await service.fetchSwappedOrderStatus(smartAccount);
3859
+ const orderId = expectedOrderUuidRef.current;
3860
+ const res = orderId ? await service.fetchSwappedOrder(orderId) : null;
3637
3861
  if (cancelled) return;
3638
- const isCurrentOrder = res !== null && expectedOrderUuidRef.current !== null && res.orderId === expectedOrderUuidRef.current;
3862
+ const isCurrentOrder = res !== null && res.orderId === expectedOrderUuidRef.current;
3639
3863
  if (isCurrentOrder) {
3640
3864
  setOrderState(res);
3641
3865
  }
@@ -4141,9 +4365,6 @@ function ExchangeLogo({ exchange }) {
4141
4365
  }
4142
4366
  );
4143
4367
  }
4144
- function formatFeeRate(bps) {
4145
- return `${(bps / 100).toFixed(2).replace(/\.?0+$/, "")}%`;
4146
- }
4147
4368
  function ExchangeSelectStep({
4148
4369
  service,
4149
4370
  onSelectExchange,
@@ -4153,7 +4374,6 @@ function ExchangeSelectStep({
4153
4374
  const [loading, setLoading] = useState9(true);
4154
4375
  const [error, setError] = useState9(null);
4155
4376
  const [retryToken, setRetryToken] = useState9(0);
4156
- const [exchangeFeeBps, setExchangeFeeBps] = useState9(0);
4157
4377
  const [selectingConnection, setSelectingConnection] = useState9(
4158
4378
  null
4159
4379
  );
@@ -4168,12 +4388,10 @@ function ExchangeSelectStep({
4168
4388
  service.getSwappedConnectExchanges().then((res) => {
4169
4389
  if (cancelled) return;
4170
4390
  setExchanges(res.exchanges);
4171
- setExchangeFeeBps(res.exchangeFeeBps ?? 0);
4172
4391
  }).catch((err) => {
4173
4392
  if (cancelled) return;
4174
4393
  const message = err instanceof Error ? err.message : "Failed to load exchanges";
4175
4394
  setExchanges([]);
4176
- setExchangeFeeBps(0);
4177
4395
  setError(message);
4178
4396
  onError?.(message, "SWAPPED_CONNECT_EXCHANGES_FAILED");
4179
4397
  }).finally(() => {
@@ -4188,16 +4406,7 @@ function ExchangeSelectStep({
4188
4406
  setSelectingConnection(connection);
4189
4407
  setSelectionNotice(null);
4190
4408
  try {
4191
- const actualFeeBps = await onSelectExchange(
4192
- connection,
4193
- exchangeFeeBps
4194
- );
4195
- if (actualFeeBps !== exchangeFeeBps) {
4196
- setExchangeFeeBps(actualFeeBps);
4197
- setSelectionNotice(
4198
- "The Exchange Fee changed. Review the updated rate and select your exchange again."
4199
- );
4200
- }
4409
+ await onSelectExchange(connection);
4201
4410
  } catch (err) {
4202
4411
  const message = err instanceof Error ? err.message : "Failed to prepare Connect";
4203
4412
  setSelectionNotice(message);
@@ -4206,7 +4415,7 @@ function ExchangeSelectStep({
4206
4415
  setSelectingConnection(null);
4207
4416
  }
4208
4417
  },
4209
- [exchangeFeeBps, onError, onSelectExchange]
4418
+ [onError, onSelectExchange]
4210
4419
  );
4211
4420
  return /* @__PURE__ */ jsxs16("div", { className: "rs-screen rs-exchange-select", children: [
4212
4421
  /* @__PURE__ */ jsxs16("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
@@ -4270,11 +4479,6 @@ function ExchangeSelectStep({
4270
4479
  }) })
4271
4480
  ] }),
4272
4481
  /* @__PURE__ */ jsx20(PoweredBy, {}),
4273
- exchangeFeeBps > 0 && /* @__PURE__ */ jsxs16("p", { className: "rs-exchange-select-fee-note", children: [
4274
- "A ",
4275
- formatFeeRate(exchangeFeeBps),
4276
- " Exchange Fee applies to your deposit."
4277
- ] }),
4278
4482
  selectionNotice && /* @__PURE__ */ jsx20("p", { className: "rs-exchange-select-fee-note", role: "status", children: selectionNotice })
4279
4483
  ] });
4280
4484
  }
@@ -4282,7 +4486,7 @@ ExchangeSelectStep.displayName = "ExchangeSelectStep";
4282
4486
 
4283
4487
  // src/components/steps/SolanaTokenSelectStep.tsx
4284
4488
  import { useState as useState10, useEffect as useEffect10, useMemo as useMemo5 } from "react";
4285
- import { formatUnits as formatUnits3 } from "viem";
4489
+ import { formatUnits as formatUnits4 } from "viem";
4286
4490
  import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
4287
4491
  function SolanaTokenSelectStep({
4288
4492
  solanaAddress,
@@ -4379,7 +4583,7 @@ function SolanaTokenSelectStep({
4379
4583
  const selectedEntry = selectedSymbol ? rows.find((r) => r.token.symbol === selectedSymbol) : null;
4380
4584
  const formatBalance = (entry) => {
4381
4585
  try {
4382
- const raw = formatUnits3(entry.balance, entry.token.decimals);
4586
+ const raw = formatUnits4(entry.balance, entry.token.decimals);
4383
4587
  const numeric = Number(raw);
4384
4588
  if (!Number.isFinite(numeric)) return raw;
4385
4589
  return tokenFormatter.format(numeric);
@@ -4438,6 +4642,7 @@ function SolanaTokenSelectStep({
4438
4642
  /* @__PURE__ */ jsx21("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx21(
4439
4643
  TokenIcon,
4440
4644
  {
4645
+ token: { chain: "solana", address: entry.token.mint },
4441
4646
  symbol: entry.token.symbol,
4442
4647
  fallback: entry.token.symbol.slice(0, 4)
4443
4648
  }
@@ -4485,7 +4690,7 @@ function SolanaTokenSelectStep({
4485
4690
 
4486
4691
  // src/components/steps/SolanaAmountStep.tsx
4487
4692
  import { useCallback as useCallback6, useEffect as useEffect11, useMemo as useMemo6, useRef as useRef7, useState as useState11 } from "react";
4488
- import { formatUnits as formatUnits4, parseUnits as parseUnits4 } from "viem";
4693
+ import { formatUnits as formatUnits5, parseUnits as parseUnits4 } from "viem";
4489
4694
  import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
4490
4695
  var SOL_FEE_RESERVE_LAMPORTS = 1000000n;
4491
4696
  var PRESETS2 = [
@@ -4503,6 +4708,7 @@ function SolanaAmountStep({
4503
4708
  targetChain,
4504
4709
  targetChainName,
4505
4710
  targetTokenSymbol,
4711
+ targetToken,
4506
4712
  appBalanceUsd,
4507
4713
  onContinue,
4508
4714
  debug
@@ -4515,7 +4721,7 @@ function SolanaAmountStep({
4515
4721
  const tokenPriceUsd = useMemo6(() => {
4516
4722
  if (isSourceStablecoin) return 1;
4517
4723
  try {
4518
- const balanceUnits = Number(formatUnits4(balance, token.decimals));
4724
+ const balanceUnits = Number(formatUnits5(balance, token.decimals));
4519
4725
  if (!Number.isFinite(balanceUnits) || balanceUnits <= 0 || balanceUsd <= 0) {
4520
4726
  return null;
4521
4727
  }
@@ -4528,7 +4734,7 @@ function SolanaAmountStep({
4528
4734
  const hasPricing = tokenPriceUsd !== null;
4529
4735
  const formattedBalance = useMemo6(() => {
4530
4736
  try {
4531
- const raw = formatUnits4(balance, token.decimals);
4737
+ const raw = formatUnits5(balance, token.decimals);
4532
4738
  const numeric = Number(raw);
4533
4739
  if (!Number.isFinite(numeric)) return raw;
4534
4740
  return tokenFormatter.format(numeric);
@@ -4538,7 +4744,7 @@ function SolanaAmountStep({
4538
4744
  }, [balance, token.decimals]);
4539
4745
  const computedBalanceUsd = useMemo6(() => {
4540
4746
  try {
4541
- const balanceUnits = Number(formatUnits4(balance, token.decimals));
4747
+ const balanceUnits = Number(formatUnits5(balance, token.decimals));
4542
4748
  if (!Number.isFinite(balanceUnits) || balanceUnits < 0) return null;
4543
4749
  if (tokenPriceUsd !== null) return balanceUnits * tokenPriceUsd;
4544
4750
  if (Number.isFinite(balanceUsd) && balanceUsd > 0) return balanceUsd;
@@ -4553,7 +4759,7 @@ function SolanaAmountStep({
4553
4759
  }, [balance, token]);
4554
4760
  const spendableBalanceUsd = useMemo6(() => {
4555
4761
  try {
4556
- const spendableUnits = Number(formatUnits4(spendableBalance, token.decimals));
4762
+ const spendableUnits = Number(formatUnits5(spendableBalance, token.decimals));
4557
4763
  if (!Number.isFinite(spendableUnits) || spendableUnits < 0) return null;
4558
4764
  if (tokenPriceUsd !== null) return spendableUnits * tokenPriceUsd;
4559
4765
  return null;
@@ -4565,7 +4771,7 @@ function SolanaAmountStep({
4565
4771
  (percentage) => {
4566
4772
  try {
4567
4773
  const spendableUnits = Number(
4568
- formatUnits4(spendableBalance, token.decimals)
4774
+ formatUnits5(spendableBalance, token.decimals)
4569
4775
  );
4570
4776
  if (!Number.isFinite(spendableUnits) || spendableUnits <= 0) return "";
4571
4777
  const value = isSourceStablecoin || !hasPricing ? spendableUnits * percentage / 100 : (spendableBalanceUsd ?? 0) * percentage / 100;
@@ -4742,7 +4948,13 @@ function SolanaAmountStep({
4742
4948
  "Solana ",
4743
4949
  token.symbol
4744
4950
  ] }),
4745
- /* @__PURE__ */ jsx22("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx22(TokenIcon, { symbol: token.symbol }) })
4951
+ /* @__PURE__ */ jsx22("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx22(
4952
+ TokenIcon,
4953
+ {
4954
+ token: { chain: "solana", address: token.mint },
4955
+ symbol: token.symbol
4956
+ }
4957
+ ) })
4746
4958
  ] })
4747
4959
  ] }),
4748
4960
  targetChainName && targetTokenSymbol && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
@@ -4753,7 +4965,7 @@ function SolanaAmountStep({
4753
4965
  " ",
4754
4966
  targetTokenSymbol
4755
4967
  ] }),
4756
- /* @__PURE__ */ jsx22("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx22(TokenIcon, { symbol: targetTokenSymbol }) })
4968
+ /* @__PURE__ */ jsx22("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx22(TokenIcon, { token: targetToken, symbol: targetTokenSymbol }) })
4757
4969
  ] })
4758
4970
  ] }),
4759
4971
  balanceAfterUsd !== null && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
@@ -4922,7 +5134,7 @@ function SolanaConfirmStep({
4922
5134
  return () => onSubmittingChangeRef.current?.(false);
4923
5135
  }, [isSubmitting]);
4924
5136
  const targetChainId = targetChainToChainId(targetChain);
4925
- const targetSymbol = getTargetTokenSymbol(targetToken, targetChainId);
5137
+ const targetSymbol = useTokenDisplay(targetChainId, targetToken).symbol;
4926
5138
  const sourceChainName = getChainName("solana");
4927
5139
  const targetChainName = getChainName(targetChainId);
4928
5140
  const sourceChainIcon = getChainIcon("solana");
@@ -4938,7 +5150,8 @@ function SolanaConfirmStep({
4938
5150
  sourceSymbol: token.symbol,
4939
5151
  targetSymbol,
4940
5152
  sourceAmountUsd,
4941
- sourceTrusted: isRecognizedToken(token.mint, "solana"),
5153
+ // The wallet flow only offers the allowlist, so this is the check.
5154
+ sourceTrusted: resolveSolanaToken(token.mint) !== void 0,
4942
5155
  // Curated stablecoin target estimates at $1 when unquoted; never applied
4943
5156
  // to the source (a held token). See ConfirmStep for the rationale.
4944
5157
  prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : isDisplayStablecoinSymbol(targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
@@ -5053,8 +5266,10 @@ function SolanaConfirmStep({
5053
5266
  estimatedTime,
5054
5267
  sendAmount: formattedAmount,
5055
5268
  sendSymbol: token.symbol,
5269
+ sendToken: { chain: "solana", address: token.mint },
5056
5270
  receiveDisplay,
5057
5271
  receiveSymbol: targetSymbol,
5272
+ receiveToken: { chain: targetChainId, address: targetToken },
5058
5273
  fee: { display: "$0.04", struck: feeSponsored, tooltip: feeTooltip }
5059
5274
  }
5060
5275
  ),
@@ -5114,6 +5329,7 @@ function DappImportAssetSelectStep({
5114
5329
  /* @__PURE__ */ jsx24("span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ jsx24(CdnIcon, { src: assetIcon, alt: asset.symbol }) : /* @__PURE__ */ jsx24(
5115
5330
  TokenIcon,
5116
5331
  {
5332
+ token: { chain: asset.chainId, address: asset.token },
5117
5333
  symbol: asset.symbol,
5118
5334
  fallback: asset.symbol.slice(0, 4)
5119
5335
  }
@@ -5530,7 +5746,7 @@ function withdrawableUsd(position) {
5530
5746
  }
5531
5747
 
5532
5748
  // src/core/dapp-imports/polymarket/index.ts
5533
- import { formatUnits as formatUnits5 } from "viem";
5749
+ import { formatUnits as formatUnits6 } from "viem";
5534
5750
 
5535
5751
  // src/core/dapp-imports/polymarket/deposit-wallet.ts
5536
5752
  import {
@@ -5789,7 +6005,7 @@ function buildAsset2(params) {
5789
6005
  const isPusd = tokenKind === "pusd";
5790
6006
  const tokenAddress = isPusd ? POLYMARKET_PUSD_ADDRESS : POLYMARKET_USDCE_ADDRESS;
5791
6007
  const symbol = isPusd ? "pUSD" : "USDC.e";
5792
- const balanceUsd = Number(formatUnits5(balance, 6));
6008
+ const balanceUsd = Number(formatUnits6(balance, 6));
5793
6009
  const metadata = { proxyWallet, tokenKind, walletKind };
5794
6010
  return {
5795
6011
  id: `polymarket:${tokenKind}`,
@@ -7235,6 +7451,10 @@ function useDepositStore(selector) {
7235
7451
 
7236
7452
  // src/DepositFlow.tsx
7237
7453
  import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
7454
+ var BankOnrampStep = lazy2(async () => {
7455
+ const module = await import("./BankOnrampStep-JG32OCM2.mjs");
7456
+ return { default: module.BankOnrampStep };
7457
+ });
7238
7458
  function swappedWidgetPrefetchKey(method, methodSelectionSource) {
7239
7459
  return JSON.stringify([methodSelectionSource ?? null, method ?? null]);
7240
7460
  }
@@ -7496,6 +7716,7 @@ function DepositFlow({
7496
7716
  sourceToken: defaultSourceToken,
7497
7717
  amount: defaultAmount,
7498
7718
  recipient,
7719
+ payment,
7499
7720
  appBalanceUsd,
7500
7721
  outputTokenRules,
7501
7722
  rejectUnmapped,
@@ -7504,6 +7725,9 @@ function DepositFlow({
7504
7725
  initialAssetMigration,
7505
7726
  enableWallet = true,
7506
7727
  enableFiatOnramp = false,
7728
+ bankOnramp,
7729
+ onBankJourney,
7730
+ backendUrl,
7507
7731
  enableQrTransfer = true,
7508
7732
  enableGaslessDeposit = false,
7509
7733
  fiatMethods,
@@ -7557,7 +7781,15 @@ function DepositFlow({
7557
7781
  },
7558
7782
  [debug]
7559
7783
  );
7560
- const enableSwappedPreconnect = enableFiatOnramp || enableExchangeConnect;
7784
+ const bankOnrampEnabled = Boolean(
7785
+ bankOnramp && (fiatMethods === void 0 || fiatMethods["bank-transfer"] === true)
7786
+ );
7787
+ const hasSwappedFiatMethod = Boolean(
7788
+ enableFiatOnramp && (!fiatMethods || Object.entries(fiatMethods).some(
7789
+ ([method, enabled]) => enabled && !(bankOnrampEnabled && method === "bank-transfer")
7790
+ ))
7791
+ );
7792
+ const enableSwappedPreconnect = hasSwappedFiatMethod || enableExchangeConnect;
7561
7793
  useEffect13(() => {
7562
7794
  if (!enableSwappedPreconnect) return;
7563
7795
  if (typeof document === "undefined") return;
@@ -7632,11 +7864,14 @@ function DepositFlow({
7632
7864
  walletSession?.solanaAddress,
7633
7865
  walletSession?.caipAddress
7634
7866
  ]);
7635
- const offeredFiatMethods = useMemo8(
7636
- () => fiatMethods ? FIAT_ONRAMP_METHODS.filter((m) => fiatMethods[m.method]) : FIAT_ONRAMP_METHODS,
7867
+ const configuredFiatMethods = useMemo8(
7868
+ () => fiatMethods ? FIAT_ONRAMP_METHODS.filter(
7869
+ (m) => fiatMethods[m.method]
7870
+ ) : FIAT_ONRAMP_METHODS,
7637
7871
  [fiatMethods]
7638
7872
  );
7639
- const fiatEnabled = enableFiatOnramp && offeredFiatMethods.length > 0;
7873
+ const swappedFiatEnabled = enableFiatOnramp && configuredFiatMethods.length > 0;
7874
+ const fiatEnabled = bankOnrampEnabled || swappedFiatEnabled;
7640
7875
  const enabledAssetMigrationIds = useMemo8(
7641
7876
  () => Object.entries(assetMigrations ?? {}).filter(([, on]) => on).map(([id]) => id),
7642
7877
  [assetMigrations]
@@ -7676,27 +7911,23 @@ function DepositFlow({
7676
7911
  ]);
7677
7912
  const setupChainId = typeof targetChain === "number" && !isVirtualDestination(targetChain) ? targetChain : typeof defaultSourceChain === "number" ? defaultSourceChain : DEFAULT_SETUP_CHAIN_ID;
7678
7913
  const targetChainId = targetChainToChainId(targetChain);
7679
- const targetSymbol = getTargetTokenSymbol(targetToken, targetChainId);
7914
+ const targetDisplay = useTokenDisplay(targetChainId, targetToken);
7915
+ const targetSymbol = targetDisplay.symbol;
7680
7916
  const isTargetStablecoin = isStablecoinSymbol(targetSymbol);
7917
+ const assetStore = useAssetStore();
7681
7918
  const targetMarketPriceRef = useRef9(null);
7682
7919
  useEffect13(() => {
7683
7920
  targetMarketPriceRef.current = null;
7684
- if (isTargetStablecoin || targetSymbol === "Token") {
7685
- return;
7686
- }
7921
+ if (isTargetStablecoin || !assetStore) return;
7687
7922
  let cancelled = false;
7688
- fetchTokenPriceUsd(service, {
7689
- chainId: targetChainId,
7690
- address: targetToken,
7691
- symbol: targetSymbol
7692
- }).then((price) => {
7923
+ assetStore.resolvePrice({ chain: targetChainId, address: targetToken }).then((price) => {
7693
7924
  if (cancelled) return;
7694
7925
  targetMarketPriceRef.current = price;
7695
7926
  });
7696
7927
  return () => {
7697
7928
  cancelled = true;
7698
7929
  };
7699
- }, [service, targetSymbol, isTargetStablecoin, targetChain, targetToken]);
7930
+ }, [assetStore, isTargetStablecoin, targetChainId, targetToken]);
7700
7931
  const walletSignerContext = useMemo8(() => {
7701
7932
  if (flowMode === "deposit-address") {
7702
7933
  return null;
@@ -7951,11 +8182,14 @@ function DepositFlow({
7951
8182
  useEffect13(() => {
7952
8183
  setQrSourcePrice({ resolved: false, usd: null });
7953
8184
  if (!qrSourceAsset) return;
8185
+ if (!assetStore) {
8186
+ setQrSourcePrice({ resolved: true, usd: null });
8187
+ return;
8188
+ }
7954
8189
  let cancelled = false;
7955
- fetchTokenPriceUsd(service, {
7956
- chainId: qrSourceAsset.chainId,
7957
- address: qrSourceAsset.token,
7958
- symbol: qrSourceAsset.symbol
8190
+ assetStore.resolvePrice({
8191
+ chain: qrSourceAsset.chainId,
8192
+ address: qrSourceAsset.token
7959
8193
  }).then((usd) => {
7960
8194
  if (!cancelled) setQrSourcePrice({ resolved: true, usd });
7961
8195
  }).catch(() => {
@@ -7964,7 +8198,7 @@ function DepositFlow({
7964
8198
  return () => {
7965
8199
  cancelled = true;
7966
8200
  };
7967
- }, [service, qrSourceKey]);
8201
+ }, [assetStore, qrSourceKey]);
7968
8202
  const canGoBackFromHere = effectiveStep.type === "deposit-address" || effectiveStep.type === "solana-token-select" || effectiveStep.type === "solana-amount" || effectiveStep.type === "solana-confirm" || effectiveStep.type === "amount" || effectiveStep.type === "confirm" || // Without these the QR detour has no exit but the modal's close button,
7969
8203
  // which drops the user out of the deposit entirely rather than back to
7970
8204
  // the address they came from.
@@ -8086,7 +8320,9 @@ function DepositFlow({
8086
8320
  [assetMigrationsKey, isSolanaWalletConnected]
8087
8321
  );
8088
8322
  const initialAssetMigrationProvider = useMemo8(
8089
- () => initialAssetMigration ? enabledDappImportProviders.find((p) => p.id === initialAssetMigration) ?? null : null,
8323
+ () => initialAssetMigration ? enabledDappImportProviders.find(
8324
+ (p) => p.id === initialAssetMigration
8325
+ ) ?? null : null,
8090
8326
  [initialAssetMigration, enabledDappImportProviders]
8091
8327
  );
8092
8328
  const handleSelectDappImport = useCallback7(
@@ -8334,10 +8570,7 @@ function DepositFlow({
8334
8570
  storeApi
8335
8571
  ]);
8336
8572
  const handleBootRetry = useCallback7(() => {
8337
- analytics.retry(
8338
- "migration_availability_failed",
8339
- "migration_boot_resolve"
8340
- );
8573
+ analytics.retry("migration_availability_failed", "migration_boot_resolve");
8341
8574
  const snapshot = storeApi.getState();
8342
8575
  const providerId = snapshot.dappImport.activeProviderId;
8343
8576
  if (!providerId) return;
@@ -8379,9 +8612,12 @@ function DepositFlow({
8379
8612
  storeApi.dispatch({ type: "connect/exchange-selected" });
8380
8613
  }, [analytics, storeApi]);
8381
8614
  const swappedAnalyticsCorrelatorRef = useRef9(null);
8382
- const handleSwappedAttemptConsumed = useCallback7((externalCustomerId) => {
8383
- swappedAnalyticsCorrelatorRef.current = externalCustomerId;
8384
- }, []);
8615
+ const handleSwappedAttemptConsumed = useCallback7(
8616
+ (externalCustomerId) => {
8617
+ swappedAnalyticsCorrelatorRef.current = externalCustomerId;
8618
+ },
8619
+ []
8620
+ );
8385
8621
  const handleSwappedProviderHandoff = useCallback7(() => {
8386
8622
  const externalCustomerId = swappedAnalyticsCorrelatorRef.current;
8387
8623
  if (!externalCustomerId) return;
@@ -8399,45 +8635,27 @@ function DepositFlow({
8399
8635
  swappedAnalyticsCorrelatorRef.current = null;
8400
8636
  }, [analytics, flowMode]);
8401
8637
  const swappedConnectUrlRef = useRef9(/* @__PURE__ */ new Map());
8402
- const acknowledgedConnectFeeRef = useRef9(/* @__PURE__ */ new Map());
8403
8638
  const handleSelectExchangeConnection = useCallback7(
8404
- async (connection, disclosedFeeBps) => {
8639
+ async (connection) => {
8405
8640
  if (setupSlice.status !== "ready" || !setupSlice.smartAccount) {
8406
8641
  throw new Error("Deposit account is not ready");
8407
8642
  }
8408
8643
  const smartAccount = setupSlice.smartAccount;
8409
8644
  const owner = smartAccount.toLowerCase();
8410
8645
  const key = `${owner}:${connection}`;
8411
- let entry = swappedConnectUrlRef.current.get(key);
8412
- if (!entry) {
8413
- let response;
8414
- try {
8415
- response = await service.getSwappedConnectUrl({
8416
- smartAccount,
8417
- connection,
8418
- acceptedExchangeFeeBps: disclosedFeeBps
8419
- });
8420
- } catch (error) {
8421
- if (error instanceof SwappedConnectFeeChangedError) {
8422
- return error.exchangeFeeBps;
8423
- }
8424
- throw error;
8425
- }
8426
- entry = { smartAccount: owner, response };
8427
- }
8646
+ const entry = swappedConnectUrlRef.current.get(key) ?? {
8647
+ smartAccount: owner,
8648
+ response: await service.getSwappedConnectUrl({
8649
+ smartAccount,
8650
+ connection
8651
+ })
8652
+ };
8428
8653
  const currentAccount = storeApi.getState().setup.smartAccount;
8429
8654
  if (currentAccount?.toLowerCase() !== owner) {
8430
8655
  swappedConnectUrlRef.current.delete(key);
8431
8656
  throw new Error("Deposit account changed. Select your exchange again.");
8432
8657
  }
8433
- const actualFeeBps = entry.response.exchangeFeeBps ?? 0;
8434
- if (actualFeeBps !== disclosedFeeBps) {
8435
- swappedConnectUrlRef.current.delete(key);
8436
- acknowledgedConnectFeeRef.current.delete(key);
8437
- return actualFeeBps;
8438
- }
8439
8658
  swappedConnectUrlRef.current.set(key, entry);
8440
- acknowledgedConnectFeeRef.current.set(key, actualFeeBps);
8441
8659
  analytics.selectMethod("exchange_connect", "user", {
8442
8660
  exchange: connection
8443
8661
  });
@@ -8445,7 +8663,6 @@ function DepositFlow({
8445
8663
  type: "exchange/connection-selected",
8446
8664
  connection
8447
8665
  });
8448
- return actualFeeBps;
8449
8666
  },
8450
8667
  [analytics, service, setupSlice.status, setupSlice.smartAccount, storeApi]
8451
8668
  );
@@ -8453,25 +8670,8 @@ function DepositFlow({
8453
8670
  async (smartAccount, connection) => {
8454
8671
  const key = `${smartAccount.toLowerCase()}:${connection}`;
8455
8672
  const entry = swappedConnectUrlRef.current.get(key);
8456
- const expectedFeeBps = acknowledgedConnectFeeRef.current.get(key);
8457
- if (expectedFeeBps === void 0) {
8458
- throw new Error(
8459
- "The Exchange Fee changed. Go back and select your exchange again."
8460
- );
8461
- }
8462
8673
  swappedConnectUrlRef.current.delete(key);
8463
- const response = entry?.smartAccount === smartAccount.toLowerCase() ? entry.response : await service.getSwappedConnectUrl({
8464
- smartAccount,
8465
- connection,
8466
- acceptedExchangeFeeBps: expectedFeeBps
8467
- });
8468
- const actualFeeBps = response.exchangeFeeBps ?? 0;
8469
- if (actualFeeBps !== expectedFeeBps) {
8470
- throw new Error(
8471
- "The Exchange Fee changed. Go back and select your exchange again."
8472
- );
8473
- }
8474
- return response;
8674
+ return entry?.smartAccount === smartAccount.toLowerCase() ? entry.response : service.getSwappedConnectUrl({ smartAccount, connection });
8475
8675
  },
8476
8676
  [service]
8477
8677
  );
@@ -8530,7 +8730,6 @@ function DepositFlow({
8530
8730
  useEffect13(() => {
8531
8731
  swappedUrlPrefetchRef.current.clear();
8532
8732
  swappedConnectUrlRef.current.clear();
8533
- acknowledgedConnectFeeRef.current.clear();
8534
8733
  }, [setupSlice.smartAccount]);
8535
8734
  const hasConfiguredFiatMethods = fiatMethods !== void 0;
8536
8735
  const [regionalMethods, setRegionalMethods] = useState13({
@@ -8540,7 +8739,7 @@ function DepositFlow({
8540
8739
  recommendedMethod: null
8541
8740
  });
8542
8741
  useEffect13(() => {
8543
- if (!fiatEnabled || hasConfiguredFiatMethods) return;
8742
+ if (!enableFiatOnramp || hasConfiguredFiatMethods) return;
8544
8743
  let cancelled = false;
8545
8744
  setRegionalMethods({
8546
8745
  status: "loading",
@@ -8578,25 +8777,47 @@ function DepositFlow({
8578
8777
  cancelled = true;
8579
8778
  clearTimeout(timeoutTimer);
8580
8779
  };
8581
- }, [analytics, fiatEnabled, hasConfiguredFiatMethods, service]);
8780
+ }, [analytics, enableFiatOnramp, hasConfiguredFiatMethods, service]);
8781
+ const swappedCashDisplay = useMemo8(
8782
+ () => !enableFiatOnramp ? { kind: "hidden" } : hasConfiguredFiatMethods ? {
8783
+ kind: "list",
8784
+ methods: configuredFiatMethods,
8785
+ recommendedMethod: configuredFiatMethods[0]?.method ?? "bank-transfer",
8786
+ country: null,
8787
+ source: "configured"
8788
+ } : composeFiatMethods(regionalMethods, FIAT_ONRAMP_METHODS),
8789
+ [
8790
+ configuredFiatMethods,
8791
+ enableFiatOnramp,
8792
+ hasConfiguredFiatMethods,
8793
+ regionalMethods
8794
+ ]
8795
+ );
8796
+ const swappedOffersBank = swappedCashDisplay.kind === "list" && swappedCashDisplay.methods.some(({ method }) => method === "bank-transfer");
8797
+ const [bankOnrampUnavailable, setBankOnrampUnavailable] = useState13(false);
8798
+ const bankRowOffered = bankOnrampEnabled && !bankOnrampUnavailable;
8799
+ const swappedRefusesBank = hasConfiguredFiatMethods ? !configuredFiatMethods.some(({ method }) => method === "bank-transfer") : regionalMethods.status === "ready" && regionalMethods.country !== null && !regionalMethods.methods.some(({ method }) => method === "bank-transfer");
8800
+ const handleBankOnrampUnavailable = useCallback7(() => {
8801
+ setBankOnrampUnavailable(true);
8802
+ if (swappedRefusesBank) handleProviderBack();
8803
+ }, [handleProviderBack, swappedRefusesBank]);
8582
8804
  const cashDisplay = useMemo8(() => {
8583
- if (!fiatEnabled) return { kind: "hidden" };
8584
- if (hasConfiguredFiatMethods) {
8585
- return {
8586
- kind: "list",
8587
- methods: offeredFiatMethods,
8588
- recommendedMethod: offeredFiatMethods[0].method,
8589
- country: null,
8590
- source: "configured"
8591
- };
8805
+ const swappedDisplay = swappedCashDisplay;
8806
+ if (!bankRowOffered || swappedDisplay.kind === "loading") {
8807
+ return swappedDisplay;
8592
8808
  }
8593
- return composeFiatMethods(regionalMethods, FIAT_ONRAMP_METHODS);
8594
- }, [
8595
- fiatEnabled,
8596
- hasConfiguredFiatMethods,
8597
- offeredFiatMethods,
8598
- regionalMethods
8599
- ]);
8809
+ if (swappedOffersBank) return swappedDisplay;
8810
+ const bankTransfer = FIAT_ONRAMP_METHODS.find(
8811
+ ({ method }) => method === "bank-transfer"
8812
+ );
8813
+ return {
8814
+ kind: "list",
8815
+ methods: swappedDisplay.kind === "list" ? [...swappedDisplay.methods, bankTransfer] : [bankTransfer],
8816
+ recommendedMethod: swappedDisplay.kind === "list" ? swappedDisplay.recommendedMethod : bankTransfer.method,
8817
+ country: swappedDisplay.kind === "list" ? swappedDisplay.country : null,
8818
+ source: swappedDisplay.kind === "list" ? swappedDisplay.source : "configured"
8819
+ };
8820
+ }, [bankRowOffered, swappedCashDisplay, swappedOffersBank]);
8600
8821
  useEffect13(() => {
8601
8822
  if (cashDisplay.kind === "hidden" && fiatEnabled) {
8602
8823
  analytics.friction(
@@ -8621,9 +8842,10 @@ function DepositFlow({
8621
8842
  const handlePrefetchDisplayedFiatMethod = useCallback7(
8622
8843
  (method) => {
8623
8844
  if (!displayedFiatSource) return;
8845
+ if (bankRowOffered && method === "bank-transfer") return;
8624
8846
  handlePrefetchFiatMethod(method, displayedFiatSource);
8625
8847
  },
8626
- [displayedFiatSource, handlePrefetchFiatMethod]
8848
+ [bankRowOffered, displayedFiatSource, handlePrefetchFiatMethod]
8627
8849
  );
8628
8850
  const handleNewDeposit = useCallback7(() => {
8629
8851
  analytics.completeStep();
@@ -8638,7 +8860,6 @@ function DepositFlow({
8638
8860
  stableWalletSelectionKeyRef.current = null;
8639
8861
  swappedUrlPrefetchRef.current.clear();
8640
8862
  swappedConnectUrlRef.current.clear();
8641
- acknowledgedConnectFeeRef.current.clear();
8642
8863
  lastSmartAccountLifecycleKeyRef.current = null;
8643
8864
  }, [analytics, onLifecycleRef, storeApi]);
8644
8865
  const setupInput = useMemo8(
@@ -8648,7 +8869,8 @@ function DepositFlow({
8648
8869
  recipient,
8649
8870
  outputTokenRules,
8650
8871
  rejectUnmapped,
8651
- forceRegister
8872
+ forceRegister,
8873
+ ...payment ? { salt: payment.salt } : {}
8652
8874
  }),
8653
8875
  [
8654
8876
  targetChain,
@@ -8656,7 +8878,8 @@ function DepositFlow({
8656
8878
  recipient,
8657
8879
  outputTokenRules,
8658
8880
  rejectUnmapped,
8659
- forceRegister
8881
+ forceRegister,
8882
+ payment
8660
8883
  ]
8661
8884
  );
8662
8885
  const desiredSetupRequestKey = computeRequestKey(setupInput);
@@ -8802,14 +9025,12 @@ function DepositFlow({
8802
9025
  );
8803
9026
  const handleSolanaAmountContinue = useCallback7(
8804
9027
  (token, sourceAmount, inputAmountUsd) => {
8805
- const targetSym = getTargetTokenSymbol(targetToken, targetChainId);
8806
- const isTargetStable = isStablecoinSymbol(targetSym);
8807
- const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
9028
+ const targetTokenPriceUsd = isTargetStablecoin ? 1 : targetMarketPriceRef.current;
8808
9029
  logFlow("solana:amount:continue", {
8809
9030
  token: token.symbol,
8810
9031
  sourceAmount,
8811
9032
  inputAmountUsd,
8812
- targetSymbol: targetSym,
9033
+ targetSymbol,
8813
9034
  targetTokenPriceUsd
8814
9035
  });
8815
9036
  storeApi.dispatch({
@@ -8820,7 +9041,7 @@ function DepositFlow({
8820
9041
  targetTokenPriceUsd
8821
9042
  });
8822
9043
  },
8823
- [targetToken, targetChain, logFlow, storeApi]
9044
+ [isTargetStablecoin, targetSymbol, logFlow, storeApi]
8824
9045
  );
8825
9046
  const handleSolanaConfirmed = useCallback7(
8826
9047
  (txHash, amountUnits, routed) => {
@@ -8878,9 +9099,7 @@ function DepositFlow({
8878
9099
  (amount, targetAmount, balance) => {
8879
9100
  const entry = storeApi.getState().setup;
8880
9101
  if (entry.status !== "ready") return;
8881
- const targetSym = getTargetTokenSymbol(targetToken, targetChainId);
8882
- const isTargetStable = isStablecoinSymbol(targetSym);
8883
- const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
9102
+ const targetTokenPriceUsd = isTargetStablecoin ? 1 : targetMarketPriceRef.current;
8884
9103
  storeApi.dispatch({
8885
9104
  type: "amount/entered",
8886
9105
  amount,
@@ -8889,7 +9108,7 @@ function DepositFlow({
8889
9108
  balance
8890
9109
  });
8891
9110
  },
8892
- [targetToken, targetChain, storeApi, activeOwner]
9111
+ [isTargetStablecoin, storeApi, activeOwner]
8893
9112
  );
8894
9113
  const handleQrReviewRequested = useCallback7(
8895
9114
  (asset) => {
@@ -8899,8 +9118,7 @@ function DepositFlow({
8899
9118
  );
8900
9119
  const handleQrAmountContinue = useCallback7(
8901
9120
  (amount, targetAmount) => {
8902
- const targetSym = getTargetTokenSymbol(targetToken, targetChainId);
8903
- const targetTokenPriceUsd = isStablecoinSymbol(targetSym) ? 1 : targetMarketPriceRef.current;
9121
+ const targetTokenPriceUsd = isTargetStablecoin ? 1 : targetMarketPriceRef.current;
8904
9122
  storeApi.dispatch({
8905
9123
  type: "qr/amount-entered",
8906
9124
  amount,
@@ -8908,7 +9126,7 @@ function DepositFlow({
8908
9126
  targetTokenPriceUsd
8909
9127
  });
8910
9128
  },
8911
- [targetToken, targetChainId, storeApi]
9129
+ [isTargetStablecoin, storeApi]
8912
9130
  );
8913
9131
  const handleDepositSubmitted = useCallback7(
8914
9132
  (txHash, chainId, amount, token, quote, routed) => {
@@ -9061,10 +9279,7 @@ function DepositFlow({
9061
9279
  if (code === "PROCESS_TIMEOUT") {
9062
9280
  analytics.friction("processor_status_poll_failed");
9063
9281
  } else {
9064
- const reason = failureReasonForCode(
9065
- code,
9066
- `${message} ${cause ?? ""}`
9067
- );
9282
+ const reason = failureReasonForCode(code, `${message} ${cause ?? ""}`);
9068
9283
  const failureStep = code === "SWAPPED_URL_FAILED" ? "fiat_provider_mint" : code === "SWAPPED_CONNECT_URL_FAILED" ? "exchange_provider_mint" : void 0;
9069
9284
  analytics.failure(
9070
9285
  reason,
@@ -9072,7 +9287,11 @@ function DepositFlow({
9072
9287
  failureStep
9073
9288
  );
9074
9289
  }
9075
- onErrorRef.current?.({ message, code, cause });
9290
+ onErrorRef.current?.({
9291
+ message,
9292
+ code,
9293
+ ...cause === void 0 ? {} : { cause }
9294
+ });
9076
9295
  },
9077
9296
  [analytics, logFlowError, onErrorRef]
9078
9297
  );
@@ -9137,6 +9356,7 @@ function DepositFlow({
9137
9356
  return /* @__PURE__ */ jsx28("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx28(
9138
9357
  ConnectStep,
9139
9358
  {
9359
+ title: payment ? "Pay" : void 0,
9140
9360
  walletRows,
9141
9361
  defaultMethodTab: flowSlice.methodTab,
9142
9362
  onMethodTabChange: (tab) => storeApi.dispatch({ type: "connect/method-tab-changed", tab }),
@@ -9155,6 +9375,7 @@ function DepositFlow({
9155
9375
  ),
9156
9376
  fiatPaymentMethods: cashDisplay.kind === "list" ? cashDisplay.methods : void 0,
9157
9377
  fiatLoading: cashDisplay.kind === "loading",
9378
+ fiatNotice: bankOnrampUnavailable && swappedRefusesBank ? "Bank transfer isn't available in your region." : void 0,
9158
9379
  recommendedMethod: cashDisplay.kind === "list" ? cashDisplay.recommendedMethod : void 0,
9159
9380
  onSelectFiatMethod: cashDisplay.kind === "list" ? handleSelectDisplayedFiatMethod : void 0,
9160
9381
  onPrefetchFiatMethod: cashDisplay.kind === "list" ? handlePrefetchDisplayedFiatMethod : void 0,
@@ -9197,15 +9418,11 @@ function DepositFlow({
9197
9418
  errorMessage: activeEntry.message ?? void 0,
9198
9419
  onRetry: () => handleRetrySetup()
9199
9420
  }
9200
- ) : /* @__PURE__ */ jsx28(
9201
- DepositAddressSkeleton,
9202
- {
9203
- uiConfig
9204
- }
9205
- )),
9421
+ ) : /* @__PURE__ */ jsx28(DepositAddressSkeleton, { uiConfig })),
9206
9422
  effectiveStep.type === "deposit-address" && /* @__PURE__ */ jsx28(
9207
9423
  DepositAddressStep,
9208
9424
  {
9425
+ payment,
9209
9426
  smartAccount: effectiveStep.smartAccount,
9210
9427
  solanaDepositAddress: effectiveStep.solanaDepositAddress,
9211
9428
  service,
@@ -9280,6 +9497,29 @@ function DepositFlow({
9280
9497
  ] });
9281
9498
  }
9282
9499
  if (isFiatOnrampMode) {
9500
+ const swappedStep = step.type === "fiat-onramp" ? /* @__PURE__ */ jsx28(
9501
+ FiatOnrampStep,
9502
+ {
9503
+ smartAccount: step.smartAccount,
9504
+ service,
9505
+ paymentMethod: step.paymentMethod,
9506
+ methodSelectionSource: step.methodSelectionSource,
9507
+ consumePrefetchedUrl: consumeSwappedWidgetUrlPrefetch,
9508
+ onSwappedComplete: handleSwappedComplete,
9509
+ onSwappedFailed: handleDepositFailed,
9510
+ onClose: () => onClose?.(
9511
+ openExternally ? "native_dismiss_request" : "header_button"
9512
+ ),
9513
+ onGoBack: handleProviderBack,
9514
+ onError: handleError,
9515
+ onAttemptConsumed: handleSwappedAttemptConsumed,
9516
+ onProviderHandoff: handleSwappedProviderHandoff,
9517
+ onRetry: handleSwappedRetry,
9518
+ onCancelled: () => analytics.outcome("cancelled"),
9519
+ onImmersiveChange: onSwappedImmersiveChange,
9520
+ openExternally
9521
+ }
9522
+ ) : null;
9283
9523
  return /* @__PURE__ */ jsxs23(
9284
9524
  "div",
9285
9525
  {
@@ -9294,32 +9534,25 @@ function DepositFlow({
9294
9534
  onRetry: activeEntry.status === "error" ? () => handleRetrySetup() : void 0
9295
9535
  }
9296
9536
  ),
9297
- step.type === "fiat-onramp" && /* @__PURE__ */ jsx28(
9298
- FiatOnrampStep,
9537
+ step.type === "fiat-onramp" && bankRowOffered && bankOnramp && step.paymentMethod === "bank-transfer" && /* @__PURE__ */ jsx28(Suspense2, { fallback: /* @__PURE__ */ jsx28(AccountPreparingSkeleton, {}), children: /* @__PURE__ */ jsx28(
9538
+ BankOnrampStep,
9299
9539
  {
9540
+ backendUrl,
9300
9541
  smartAccount: step.smartAccount,
9301
- service,
9302
- paymentMethod: step.paymentMethod,
9303
- methodSelectionSource: step.methodSelectionSource,
9304
- consumePrefetchedUrl: consumeSwappedWidgetUrlPrefetch,
9305
- onSwappedComplete: handleSwappedComplete,
9306
- onSwappedFailed: handleDepositFailed,
9307
- onClose: () => onClose?.(
9308
- openExternally ? "native_dismiss_request" : "header_button"
9309
- ),
9542
+ bankOnramp,
9543
+ onJourney: onBankJourney,
9310
9544
  onGoBack: handleProviderBack,
9311
9545
  onError: handleError,
9312
- onAttemptConsumed: handleSwappedAttemptConsumed,
9313
- onProviderHandoff: handleSwappedProviderHandoff,
9314
- onRetry: handleSwappedRetry,
9315
- onCancelled: () => analytics.outcome("cancelled"),
9316
- onImmersiveChange: onSwappedImmersiveChange,
9317
- openExternally
9318
- }
9319
- ),
9546
+ openExternally,
9547
+ onUnavailable: handleBankOnrampUnavailable
9548
+ },
9549
+ `${backendUrl}:${step.smartAccount}`
9550
+ ) }),
9551
+ step.type === "fiat-onramp" && (!bankRowOffered || step.paymentMethod !== "bank-transfer") && swappedStep,
9320
9552
  step.type === "processing" && /* @__PURE__ */ jsx28(
9321
9553
  ProcessingStep,
9322
9554
  {
9555
+ flowLabel: payment ? "payment" : void 0,
9323
9556
  smartAccount: step.smartAccount,
9324
9557
  solanaDepositAddress: step.solanaDepositAddress,
9325
9558
  txHash: step.txHash,
@@ -9400,6 +9633,7 @@ function DepositFlow({
9400
9633
  step.type === "processing" && /* @__PURE__ */ jsx28(
9401
9634
  ProcessingStep,
9402
9635
  {
9636
+ flowLabel: payment ? "payment" : void 0,
9403
9637
  smartAccount: step.smartAccount,
9404
9638
  solanaDepositAddress: step.solanaDepositAddress,
9405
9639
  txHash: step.txHash,
@@ -9464,7 +9698,8 @@ function DepositFlow({
9464
9698
  uiConfig,
9465
9699
  targetChain,
9466
9700
  targetChainName: getChainName(targetChainId),
9467
- targetTokenSymbol: getTargetTokenSymbol(targetToken, targetChainId),
9701
+ targetTokenSymbol: targetSymbol,
9702
+ targetToken: { chain: targetChainId, address: targetToken },
9468
9703
  appBalanceUsd,
9469
9704
  onContinue: handleSolanaAmountContinue,
9470
9705
  debug
@@ -9529,6 +9764,7 @@ function DepositFlow({
9529
9764
  effectiveStep.type === "processing" && /* @__PURE__ */ jsx28(
9530
9765
  ProcessingStep,
9531
9766
  {
9767
+ flowLabel: payment ? "payment" : void 0,
9532
9768
  smartAccount: effectiveStep.smartAccount,
9533
9769
  solanaDepositAddress: effectiveStep.solanaDepositAddress,
9534
9770
  txHash: effectiveStep.txHash,
@@ -9663,6 +9899,9 @@ function DepositFlow({
9663
9899
  uiConfig,
9664
9900
  appBalanceUsd,
9665
9901
  service,
9902
+ payment,
9903
+ account: effectiveStep.smartAccount,
9904
+ title: payment ? "Amount to pay" : void 0,
9666
9905
  onContinue: handleAmountContinue,
9667
9906
  onCtaClick: (ctaName) => {
9668
9907
  if (ctaName === "continue") analytics.completeStep();
@@ -9678,6 +9917,8 @@ function DepositFlow({
9678
9917
  recipient,
9679
9918
  asset: effectiveStep.asset,
9680
9919
  amount: effectiveStep.amount,
9920
+ title: payment ? "Review payment" : void 0,
9921
+ routeThroughAccount: Boolean(payment),
9681
9922
  targetAmount: effectiveStep.targetAmount,
9682
9923
  targetTokenPriceUsd: effectiveStep.targetTokenPriceUsd,
9683
9924
  balance: effectiveStep.balance,
@@ -9721,6 +9962,7 @@ function DepositFlow({
9721
9962
  effectiveStep.type === "processing" && /* @__PURE__ */ jsx28(
9722
9963
  ProcessingStep,
9723
9964
  {
9965
+ flowLabel: payment ? "payment" : void 0,
9724
9966
  smartAccount: effectiveStep.smartAccount,
9725
9967
  solanaDepositAddress: effectiveStep.solanaDepositAddress,
9726
9968
  txHash: effectiveStep.txHash,
@@ -9755,11 +9997,115 @@ function DepositFlow({
9755
9997
  ] });
9756
9998
  }
9757
9999
 
10000
+ // src/components/history/useBankHistory.ts
10001
+ import { useCallback as useCallback8, useEffect as useEffect14, useRef as useRef10, useState as useState14 } from "react";
10002
+ function useBankHistory(source, open, panelOpen) {
10003
+ const [orders, setOrders] = useState14([]);
10004
+ const [unread, setUnread] = useState14(false);
10005
+ const [loading, setLoading] = useState14(false);
10006
+ const [error, setError] = useState14(null);
10007
+ const [cursor, setCursor] = useState14(null);
10008
+ const generation = useRef10(0);
10009
+ const busy = useRef10(false);
10010
+ const seen = useRef10(/* @__PURE__ */ new Map());
10011
+ const baselined = useRef10(false);
10012
+ const paged = useRef10(false);
10013
+ const panel = useRef10(panelOpen);
10014
+ panel.current = panelOpen;
10015
+ const load = useCallback8(
10016
+ async (next) => {
10017
+ if (!source || !open || busy.current || document.visibilityState === "hidden")
10018
+ return;
10019
+ const current = generation.current;
10020
+ busy.current = true;
10021
+ setLoading(true);
10022
+ try {
10023
+ const page = await source.listOrders({
10024
+ limit: 20,
10025
+ ...next ? { cursor: next } : {}
10026
+ });
10027
+ if (current !== generation.current) return;
10028
+ const bank = page.items.filter((order) => order.provider === "noah");
10029
+ let changed = false;
10030
+ for (const order of bank) {
10031
+ const fingerprint = JSON.stringify(order.stages);
10032
+ if (!next && seen.current.get(order.id) !== fingerprint)
10033
+ changed = true;
10034
+ seen.current.set(order.id, fingerprint);
10035
+ }
10036
+ if (baselined.current && changed && !panel.current) setUnread(true);
10037
+ if (!next) baselined.current = true;
10038
+ setOrders((previous) => {
10039
+ const merged = new Map(previous.map((order) => [order.id, order]));
10040
+ for (const order of bank) merged.set(order.id, order);
10041
+ return [...merged.values()].sort(
10042
+ (a, b) => b.createdAt.localeCompare(a.createdAt)
10043
+ );
10044
+ });
10045
+ if (next) paged.current = true;
10046
+ if (next || !paged.current) setCursor(page.nextCursor);
10047
+ setError(null);
10048
+ } catch {
10049
+ if (current === generation.current)
10050
+ setError("Bank transfer history is unavailable. Try again shortly.");
10051
+ } finally {
10052
+ if (current === generation.current) {
10053
+ busy.current = false;
10054
+ setLoading(false);
10055
+ }
10056
+ }
10057
+ },
10058
+ [source, open]
10059
+ );
10060
+ useEffect14(() => {
10061
+ generation.current += 1;
10062
+ busy.current = false;
10063
+ seen.current = /* @__PURE__ */ new Map();
10064
+ baselined.current = false;
10065
+ paged.current = false;
10066
+ setOrders([]);
10067
+ setUnread(false);
10068
+ setCursor(null);
10069
+ setError(null);
10070
+ setLoading(false);
10071
+ if (!open || !source) return;
10072
+ void load();
10073
+ const refresh = () => {
10074
+ void load();
10075
+ };
10076
+ const timer = setInterval(refresh, 3e4);
10077
+ window.addEventListener("focus", refresh);
10078
+ document.addEventListener("visibilitychange", refresh);
10079
+ return () => {
10080
+ generation.current += 1;
10081
+ clearInterval(timer);
10082
+ window.removeEventListener("focus", refresh);
10083
+ document.removeEventListener("visibilitychange", refresh);
10084
+ };
10085
+ }, [source, open, load]);
10086
+ useEffect14(() => {
10087
+ if (panelOpen) {
10088
+ setUnread(false);
10089
+ void load();
10090
+ }
10091
+ }, [panelOpen, load]);
10092
+ return {
10093
+ orders,
10094
+ unread,
10095
+ loading,
10096
+ error,
10097
+ hasMore: cursor !== null,
10098
+ loadMore: () => {
10099
+ if (cursor) void load(cursor);
10100
+ }
10101
+ };
10102
+ }
10103
+
9758
10104
  // src/DepositModal.tsx
9759
10105
  import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
9760
- var ReownDepositInner = lazy2(async () => {
10106
+ var ReownDepositInner = lazy3(async () => {
9761
10107
  await loadReownDependencies();
9762
- const module = await import("./DepositModalReown-VCY65DJX.mjs");
10108
+ const module = await import("./DepositModalReown-3FGTPER6.mjs");
9763
10109
  return { default: module.DepositModalReown };
9764
10110
  });
9765
10111
  function buildDepositAnalyticsSessionProperties({
@@ -9776,6 +10122,7 @@ function buildDepositAnalyticsSessionProperties({
9776
10122
  sourceChain,
9777
10123
  sourceToken,
9778
10124
  defaultAmount,
10125
+ bankOnrampEnabled = false,
9779
10126
  walletIntegration,
9780
10127
  targetChain,
9781
10128
  targetToken
@@ -9788,7 +10135,7 @@ function buildDepositAnalyticsSessionProperties({
9788
10135
  enabledFundingMethods.push("wallet");
9789
10136
  }
9790
10137
  if (enableQrTransfer) enabledFundingMethods.push("transfer");
9791
- if (enableFiatOnramp && configuredFiatIdentifiers?.length !== 0) {
10138
+ if (bankOnrampEnabled || enableFiatOnramp && configuredFiatIdentifiers?.length !== 0) {
9792
10139
  enabledFundingMethods.push("fiat_onramp");
9793
10140
  }
9794
10141
  if (enableExchangeConnect) enabledFundingMethods.push("exchange_connect");
@@ -9821,7 +10168,7 @@ function DepositModal(props) {
9821
10168
  const needsReown = !!props.reownAppId;
9822
10169
  const hasWalletClientProp = hasSuppliedWalletClient(props);
9823
10170
  if (needsReown) {
9824
- return /* @__PURE__ */ jsx29(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx29(
10171
+ return /* @__PURE__ */ jsx29(Suspense3, { fallback: null, children: /* @__PURE__ */ jsx29(
9825
10172
  ReownDepositInner,
9826
10173
  {
9827
10174
  ...props,
@@ -9852,6 +10199,7 @@ function DepositModalInner({
9852
10199
  sourceToken,
9853
10200
  defaultAmount,
9854
10201
  recipient,
10202
+ payment,
9855
10203
  appBalanceUsd,
9856
10204
  backendUrl,
9857
10205
  rpcUrls: rpcUrlsProp,
@@ -9859,6 +10207,7 @@ function DepositModalInner({
9859
10207
  assetMigrations,
9860
10208
  initialAssetMigration,
9861
10209
  enableFiatOnramp = false,
10210
+ bankOnramp,
9862
10211
  enableQrTransfer = true,
9863
10212
  enableGaslessDeposit = false,
9864
10213
  fiatMethods,
@@ -9885,24 +10234,41 @@ function DepositModalInner({
9885
10234
  signRecovery,
9886
10235
  debug
9887
10236
  }) {
9888
- const modalRef = useRef10(null);
9889
- const analyticsControllerRef = useRef10(null);
9890
- const analyticsSessionIdRef = useRef10(null);
9891
- const previousOpenRef = useRef10(isOpen);
10237
+ const modalRef = useRef11(null);
10238
+ const analyticsControllerRef = useRef11(null);
10239
+ const analyticsSessionIdRef = useRef11(null);
10240
+ const previousOpenRef = useRef11(isOpen);
9892
10241
  const onReadyRef = useLatestRef(onReady);
9893
10242
  const onUiStateRef = useLatestRef(onUiState);
9894
- const [currentScreen, setCurrentScreen] = useState14("connect");
9895
- const [swappedImmersive, setSwappedImmersive] = useState14(false);
9896
- const [submitting, setSubmitting] = useState14(false);
9897
- const [backHandler, setBackHandler] = useState14(
10243
+ const [currentScreen, setCurrentScreen] = useState15("connect");
10244
+ const bankScope = `${backendUrl}:${recipient}:${typeof targetChainProp === "string" ? targetChainProp : getChainId(targetChainProp)}:${targetToken}`;
10245
+ const [bankSession, setBankSession] = useState15(null);
10246
+ const [bankJourneyVisible, setBankJourneyVisible] = useState15(false);
10247
+ const onBankJourney = useCallback9((journey) => {
10248
+ setBankJourneyVisible(Boolean(journey));
10249
+ if (journey)
10250
+ setBankSession(
10251
+ journey.source ? { source: journey.source, scope: bankScope } : null
10252
+ );
10253
+ }, [bankScope]);
10254
+ const bankSource = bankSession?.scope === bankScope ? bankSession.source : null;
10255
+ useEffect15(() => {
10256
+ if (!isOpen) {
10257
+ setBankSession(null);
10258
+ setBankJourneyVisible(false);
10259
+ }
10260
+ }, [isOpen]);
10261
+ const [swappedImmersive, setSwappedImmersive] = useState15(false);
10262
+ const [submitting, setSubmitting] = useState15(false);
10263
+ const [backHandler, setBackHandler] = useState15(
9898
10264
  void 0
9899
10265
  );
9900
- const [processingSettled, setProcessingSettled] = useState14(false);
9901
- const historyButtonVisible = isHistoryEntryVisible({
10266
+ const [processingSettled, setProcessingSettled] = useState15(false);
10267
+ const historyButtonVisible = !payment && (bankJourneyVisible || isHistoryEntryVisible({
9902
10268
  screen: currentScreen,
9903
10269
  submitting,
9904
10270
  settled: processingSettled
9905
- });
10271
+ }));
9906
10272
  const targetChain = typeof targetChainProp === "string" ? targetChainProp : getChainId(targetChainProp);
9907
10273
  const sourceChain = sourceChainProp ? getChainId(sourceChainProp) : void 0;
9908
10274
  const rpcUrls = useStableRpcUrls(rpcUrlsProp);
@@ -9922,21 +10288,33 @@ function DepositModalInner({
9922
10288
  []
9923
10289
  );
9924
10290
  const history = useHistoryPanel({
9925
- isOpen,
10291
+ isOpen: isOpen && !payment,
9926
10292
  recipient,
9927
10293
  service,
9928
10294
  canRecover: Boolean(signRecovery),
9929
10295
  analytics: historyAnalytics
9930
10296
  });
10297
+ const bankOrders = useBankHistory(bankSource, isOpen && !payment, history.isPanelOpen);
10298
+ const bankHistory = bankJourneyVisible && !bankSource ? { ...bankOrders, loading: true } : bankOrders;
10299
+ const historyDepositsRef = useLatestRef(history.deposits);
10300
+ useEffect15(() => {
10301
+ const waitingForSettlement = bankHistory.orders.some((order) => {
10302
+ if (order.stages.delivery.status !== "completed") return false;
10303
+ const { depositId } = order.stages.delivery;
10304
+ const deposit = historyDepositsRef.current.find((item) => item.id === depositId);
10305
+ return !deposit || deposit.status === "pending" || deposit.status === "processing";
10306
+ });
10307
+ if (waitingForSettlement) history.markStale();
10308
+ }, [bankHistory.orders, history.markStale, historyDepositsRef]);
9931
10309
  const {
9932
10310
  markStale: markHistoryStale,
9933
10311
  invalidate: invalidateHistory,
9934
10312
  recoverySubmitting
9935
10313
  } = history;
9936
- const [clientSetup, setClientSetup] = useState14(
10314
+ const [clientSetup, setClientSetup] = useState15(
9937
10315
  null
9938
10316
  );
9939
- useEffect14(() => {
10317
+ useEffect15(() => {
9940
10318
  if (!isOpen) return;
9941
10319
  let active = true;
9942
10320
  service.getSetup().then((config) => {
@@ -9946,7 +10324,7 @@ function DepositModalInner({
9946
10324
  active = false;
9947
10325
  };
9948
10326
  }, [isOpen, service]);
9949
- useEffect14(() => {
10327
+ useEffect15(() => {
9950
10328
  if (debug && clientSetup) {
9951
10329
  console.debug("[deposit] client setup config (not shown yet)", clientSetup);
9952
10330
  }
@@ -9956,19 +10334,19 @@ function DepositModalInner({
9956
10334
  // eslint-disable-next-line react-hooks/exhaustive-deps
9957
10335
  []
9958
10336
  );
9959
- useEffect14(() => {
10337
+ useEffect15(() => {
9960
10338
  store.dispatch({ type: "target/changed", targetChain, targetToken });
9961
10339
  }, [store, targetChain, targetToken]);
9962
- useEffect14(() => {
10340
+ useEffect15(() => {
9963
10341
  if (!isOpen || !modalRef.current) return;
9964
10342
  return applyTheme(modalRef.current, theme);
9965
10343
  }, [isOpen, theme]);
9966
- useEffect14(() => {
10344
+ useEffect15(() => {
9967
10345
  if (isOpen) {
9968
10346
  onReadyRef.current?.();
9969
10347
  }
9970
10348
  }, [isOpen, onReadyRef]);
9971
- useEffect14(() => {
10349
+ useEffect15(() => {
9972
10350
  onUiStateRef.current?.({
9973
10351
  screen: currentScreen,
9974
10352
  back: backHandler,
@@ -9983,7 +10361,7 @@ function DepositModalInner({
9983
10361
  recoverySubmitting,
9984
10362
  onUiStateRef
9985
10363
  ]);
9986
- const handleStepChange = useCallback8(
10364
+ const handleStepChange = useCallback9(
9987
10365
  (onBack, screen) => {
9988
10366
  setBackHandler(() => onBack);
9989
10367
  if (screen) setCurrentScreen(screen);
@@ -9991,7 +10369,7 @@ function DepositModalInner({
9991
10369
  []
9992
10370
  );
9993
10371
  const onLifecycleRef = useLatestRef(onLifecycle);
9994
- const handleLifecycle = useCallback8(
10372
+ const handleLifecycle = useCallback9(
9995
10373
  (event) => {
9996
10374
  onLifecycleRef.current?.(event);
9997
10375
  if (event.type === "smart-account-changed" && !event.evm && !event.solana) {
@@ -10003,7 +10381,7 @@ function DepositModalInner({
10003
10381
  },
10004
10382
  [onLifecycleRef, markHistoryStale, invalidateHistory]
10005
10383
  );
10006
- const closeWithSource = useCallback8(
10384
+ const closeWithSource = useCallback9(
10007
10385
  (source) => {
10008
10386
  if (recoverySubmitting) return;
10009
10387
  const analytics = analyticsControllerRef.current;
@@ -10013,7 +10391,7 @@ function DepositModalInner({
10013
10391
  },
10014
10392
  [onClose, recoverySubmitting]
10015
10393
  );
10016
- const handleModalDismiss = useCallback8(
10394
+ const handleModalDismiss = useCallback9(
10017
10395
  (reason) => {
10018
10396
  closeWithSource(
10019
10397
  reason === "escape" ? "escape" : reason === "overlay" ? "overlay" : "header_button"
@@ -10021,7 +10399,7 @@ function DepositModalInner({
10021
10399
  },
10022
10400
  [closeWithSource]
10023
10401
  );
10024
- useEffect14(() => {
10402
+ useEffect15(() => {
10025
10403
  if (previousOpenRef.current && !isOpen) {
10026
10404
  const analytics = analyticsControllerRef.current;
10027
10405
  analytics?.abandon("modal_close");
@@ -10029,7 +10407,7 @@ function DepositModalInner({
10029
10407
  }
10030
10408
  previousOpenRef.current = isOpen;
10031
10409
  }, [isOpen]);
10032
- useEffect14(() => {
10410
+ useEffect15(() => {
10033
10411
  if (!isOpen) {
10034
10412
  setCurrentScreen("connect");
10035
10413
  setBackHandler(void 0);
@@ -10038,7 +10416,7 @@ function DepositModalInner({
10038
10416
  setProcessingSettled(false);
10039
10417
  }
10040
10418
  }, [isOpen]);
10041
- useEffect14(() => {
10419
+ useEffect15(() => {
10042
10420
  if (!isOpen) {
10043
10421
  store.dispatch({ type: "flow/reset" });
10044
10422
  }
@@ -10058,6 +10436,9 @@ function DepositModalInner({
10058
10436
  sourceChain: sourceChainProp,
10059
10437
  sourceToken,
10060
10438
  defaultAmount,
10439
+ bankOnrampEnabled: Boolean(
10440
+ bankOnramp && (fiatMethods === void 0 || fiatMethods["bank-transfer"] === true)
10441
+ ),
10061
10442
  walletIntegration,
10062
10443
  targetChain,
10063
10444
  targetToken
@@ -10066,7 +10447,7 @@ function DepositModalInner({
10066
10447
  const canGoBack = backHandler !== void 0;
10067
10448
  const hideHeaderChrome = swappedImmersive;
10068
10449
  const modalClassName = `rs-modal${hideHeaderChrome ? " rs-modal--swapped-iframe" : ""}`;
10069
- return /* @__PURE__ */ jsx29(RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ jsx29(ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ jsx29(DepositStoreProvider, { store, children: /* @__PURE__ */ jsx29(
10450
+ return /* @__PURE__ */ jsx29(RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ jsx29(ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ jsx29(AssetMetadataProvider, { service, children: /* @__PURE__ */ jsx29(DepositStoreProvider, { store, children: /* @__PURE__ */ jsx29(
10070
10451
  Modal,
10071
10452
  {
10072
10453
  isOpen,
@@ -10105,7 +10486,8 @@ function DepositModalInner({
10105
10486
  historyButtonVisible && /* @__PURE__ */ jsx29(
10106
10487
  HistoryEntryButton,
10107
10488
  {
10108
- badge: history.badge,
10489
+ badge: bankJourneyVisible ? null : history.badge,
10490
+ unread: bankHistory.unread,
10109
10491
  onClick: history.openPanel,
10110
10492
  disabled: !recipient
10111
10493
  }
@@ -10135,6 +10517,7 @@ function DepositModalInner({
10135
10517
  sourceToken,
10136
10518
  amount: defaultAmount,
10137
10519
  recipient,
10520
+ payment,
10138
10521
  appBalanceUsd,
10139
10522
  outputTokenRules,
10140
10523
  rejectUnmapped,
@@ -10142,6 +10525,9 @@ function DepositModalInner({
10142
10525
  assetMigrations,
10143
10526
  initialAssetMigration,
10144
10527
  enableFiatOnramp,
10528
+ bankOnramp,
10529
+ onBankJourney,
10530
+ backendUrl,
10145
10531
  enableQrTransfer,
10146
10532
  enableGaslessDeposit,
10147
10533
  fiatMethods,
@@ -10170,6 +10556,8 @@ function DepositModalInner({
10170
10556
  HistoryOverlay,
10171
10557
  {
10172
10558
  controller: history,
10559
+ bankHistory,
10560
+ bankSupportUrl: bankOnramp?.supportUrl,
10173
10561
  backLabel: "Deposit",
10174
10562
  recipient,
10175
10563
  backendUrl,
@@ -10191,7 +10579,7 @@ function DepositModalInner({
10191
10579
  }
10192
10580
  )
10193
10581
  }
10194
- ) }) }) });
10582
+ ) }) }) }) });
10195
10583
  }
10196
10584
 
10197
10585
  export {