@funkit/connect 12.12.0 → 12.13.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 (33) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/clients/{chunk-GPI6LBBB.js → chunk-5GX6G7JR.js} +1 -1
  3. package/dist/clients/{chunk-PK7BKCPR.js → chunk-I75AI3N7.js} +2 -2
  4. package/dist/clients/{chunk-JN52EBYV.js → chunk-P6UM36G5.js} +64 -0
  5. package/dist/clients/{chunk-RBMOSICG.js → chunk-YMBIRJQF.js} +1 -1
  6. package/dist/clients/{chunk-WXHSEFYH.js → chunk-ZOQQL2QX.js} +1 -1
  7. package/dist/clients/fanatics.js +2 -2
  8. package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
  9. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  10. package/dist/clients/internal/nado/withdrawalForm.js +3 -3
  11. package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
  12. package/dist/clients/lighter.js +3 -3
  13. package/dist/clients/mallard.js +2 -2
  14. package/dist/clients/nado.js +3 -3
  15. package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +6 -1
  16. package/dist/components/LargeAmountInput/LargeAmountInput.css.d.ts +8 -0
  17. package/dist/components/LargeAmountInput/LargeAmountInput.d.ts +26 -0
  18. package/dist/components/SwapDirectionButton/SwapDirectionButton.d.ts +12 -0
  19. package/dist/components/TokenSwapWidget/AmountUnitToggle/AmountUnitToggle.d.ts +13 -0
  20. package/dist/components/TokenSwapWidget/AmountUnitToggle/useAmountUnitToggle.d.ts +46 -0
  21. package/dist/components/TokenSwapWidget/TokenSelectButton/TokenSelectButton.d.ts +17 -0
  22. package/dist/components/TokenSwapWidget/TokenSwapCard/TokenSwapCard.d.ts +24 -0
  23. package/dist/components/TokenSwapWidget/TokenSwapWidget.css.d.ts +5 -0
  24. package/dist/components/TokenSwapWidget/TokenSwapWidget.d.ts +36 -0
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +589 -394
  27. package/dist/modals/CheckoutModal/isSourceChangeLike.d.ts +3 -0
  28. package/dist/modals/ProfileDetails/FunProfileViews/Home/index.d.ts +3 -0
  29. package/dist/modals/WithdrawalModal/useWithdrawalExtraFeeItems.d.ts +8 -0
  30. package/dist/providers/FunkitCheckoutContext/types.d.ts +29 -0
  31. package/dist/providers/FunkitQuoteContext.d.ts +2 -1
  32. package/dist/wallets/walletConnectors/index.js +30 -30
  33. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -113,7 +113,7 @@ function setFunkitConnectVersion({ version }) {
113
113
  localStorage.setItem(storageKey, version);
114
114
  }
115
115
  function getCurrentSdkVersion() {
116
- return "12.12.0";
116
+ return "12.13.0";
117
117
  }
118
118
  function useFingerprint() {
119
119
  const fingerprint = useCallback(() => {
@@ -1340,6 +1340,14 @@ var en_default = {
1340
1340
  belowMinimum: "{{amount}} minimum transfer",
1341
1341
  pending: "Transfer pending"
1342
1342
  },
1343
+ tokenSwap: {
1344
+ from: "From",
1345
+ to: "To",
1346
+ switchDirection: "Switch direction",
1347
+ switchUnit: "Switch between USD and token amount",
1348
+ selectToken: "Select token, {{symbol}} selected",
1349
+ balance: "Balance: {{amount}}"
1350
+ },
1343
1351
  errorFallback: {
1344
1352
  title: "Something went wrong",
1345
1353
  description: "Close this window and try again.",
@@ -1946,6 +1954,14 @@ var es_default = {
1946
1954
  belowMinimum: "{{amount}} transferencia m\xEDnima",
1947
1955
  pending: "Transferencia pendiente"
1948
1956
  },
1957
+ tokenSwap: {
1958
+ from: "Desde",
1959
+ to: "A",
1960
+ switchDirection: "Cambiar direcci\xF3n",
1961
+ switchUnit: "Cambiar entre monto en USD y en token",
1962
+ selectToken: "Seleccionar token, {{symbol}} seleccionado",
1963
+ balance: "Saldo: {{amount}}"
1964
+ },
1949
1965
  errorFallback: {
1950
1966
  title: "Algo sali\xF3 mal",
1951
1967
  description: "Cierra esta ventana e int\xE9ntalo de nuevo.",
@@ -2552,6 +2568,14 @@ var fr_default = {
2552
2568
  belowMinimum: "Transfert minimum de {{amount}}",
2553
2569
  pending: "Transfert en attente"
2554
2570
  },
2571
+ tokenSwap: {
2572
+ from: "De",
2573
+ to: "Vers",
2574
+ switchDirection: "Inverser le sens",
2575
+ switchUnit: "Basculer entre le montant en USD et en jeton",
2576
+ selectToken: "S\xE9lectionner un jeton, {{symbol}} s\xE9lectionn\xE9",
2577
+ balance: "Solde : {{amount}}"
2578
+ },
2555
2579
  errorFallback: {
2556
2580
  title: "Un probl\xE8me est survenu",
2557
2581
  description: "Fermez cette fen\xEAtre et r\xE9essayez.",
@@ -3158,6 +3182,14 @@ var ja_default = {
3158
3182
  belowMinimum: "{{amount}} \u6700\u5C0F\u9001\u91D1\u984D",
3159
3183
  pending: "\u9001\u91D1\u4FDD\u7559\u4E2D"
3160
3184
  },
3185
+ tokenSwap: {
3186
+ from: "\u9001\u4FE1\u5143",
3187
+ to: "\u9001\u4FE1\u5148",
3188
+ switchDirection: "\u65B9\u5411\u3092\u5207\u308A\u66FF\u3048\u308B",
3189
+ switchUnit: "USD\u3068\u30C8\u30FC\u30AF\u30F3\u306E\u91D1\u984D\u3092\u5207\u308A\u66FF\u3048\u308B",
3190
+ selectToken: "\u30C8\u30FC\u30AF\u30F3\u3092\u9078\u629E\uFF08{{symbol}}\u3092\u9078\u629E\u4E2D\uFF09",
3191
+ balance: "\u6B8B\u9AD8\uFF1A{{amount}}"
3192
+ },
3161
3193
  errorFallback: {
3162
3194
  title: "\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F",
3163
3195
  description: "\u3053\u306E\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u9589\u3058\u3066\u3001\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
@@ -3764,6 +3796,14 @@ var ko_default = {
3764
3796
  belowMinimum: "{{amount}} \uCD5C\uC18C \uC804\uC1A1 \uAE08\uC561",
3765
3797
  pending: "\uC774\uCCB4 \uB300\uAE30 \uC911"
3766
3798
  },
3799
+ tokenSwap: {
3800
+ from: "\uBCF4\uB0B4\uB294 \uC790\uC0B0",
3801
+ to: "\uBC1B\uB294 \uC790\uC0B0",
3802
+ switchDirection: "\uBC29\uD5A5 \uC804\uD658",
3803
+ switchUnit: "USD\uC640 \uD1A0\uD070 \uAE08\uC561 \uC804\uD658",
3804
+ selectToken: "\uD1A0\uD070 \uC120\uD0DD, {{symbol}} \uC120\uD0DD\uB428",
3805
+ balance: "\uC794\uC561: {{amount}}"
3806
+ },
3767
3807
  errorFallback: {
3768
3808
  title: "\uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4",
3769
3809
  description: "\uC774 \uCC3D\uC744 \uB2EB\uACE0 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",
@@ -4370,6 +4410,14 @@ var ru_default = {
4370
4410
  belowMinimum: "{{amount}} \u043C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u0435\u0440\u0435\u0432\u043E\u0434",
4371
4411
  pending: "\u041F\u0435\u0440\u0435\u0432\u043E\u0434 \u0432 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0435"
4372
4412
  },
4413
+ tokenSwap: {
4414
+ from: "\u0418\u0437",
4415
+ to: "\u0412",
4416
+ switchDirection: "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435",
4417
+ switchUnit: "\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043C\u0435\u0436\u0434\u0443 \u0441\u0443\u043C\u043C\u043E\u0439 \u0432 USD \u0438 \u0432 \u0442\u043E\u043A\u0435\u043D\u0430\u0445",
4418
+ selectToken: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u043E\u043A\u0435\u043D, \u0432\u044B\u0431\u0440\u0430\u043D {{symbol}}",
4419
+ balance: "\u0411\u0430\u043B\u0430\u043D\u0441: {{amount}}"
4420
+ },
4373
4421
  errorFallback: {
4374
4422
  title: "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A",
4375
4423
  description: "\u0417\u0430\u043A\u0440\u043E\u0439\u0442\u0435 \u044D\u0442\u043E \u043E\u043A\u043D\u043E \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.",
@@ -4976,6 +5024,14 @@ var tr_default = {
4976
5024
  belowMinimum: "{{amount}} minimum transfer",
4977
5025
  pending: "Transfer beklemede"
4978
5026
  },
5027
+ tokenSwap: {
5028
+ from: "Kaynak",
5029
+ to: "Hedef",
5030
+ switchDirection: "Y\xF6n\xFC de\u011Fi\u015Ftir",
5031
+ switchUnit: "USD ve token tutar\u0131 aras\u0131nda ge\xE7i\u015F yap",
5032
+ selectToken: "Token se\xE7, {{symbol}} se\xE7ili",
5033
+ balance: "Bakiye: {{amount}}"
5034
+ },
4979
5035
  errorFallback: {
4980
5036
  title: "Bir \u015Feyler yanl\u0131\u015F gitti",
4981
5037
  description: "Bu pencereyi kapat\u0131p tekrar deneyin.",
@@ -5582,6 +5638,14 @@ var zh_default = {
5582
5638
  belowMinimum: "{{amount}} \u6700\u5C0F\u8F6C\u8D26",
5583
5639
  pending: "\u8F6C\u8D26\u5904\u7406\u4E2D"
5584
5640
  },
5641
+ tokenSwap: {
5642
+ from: "\u4ECE",
5643
+ to: "\u81F3",
5644
+ switchDirection: "\u5207\u6362\u65B9\u5411",
5645
+ switchUnit: "\u5728\u7F8E\u5143\u548C\u4EE3\u5E01\u91D1\u989D\u4E4B\u95F4\u5207\u6362",
5646
+ selectToken: "\u9009\u62E9\u4EE3\u5E01\uFF0C\u5DF2\u9009 {{symbol}}",
5647
+ balance: "\u4F59\u989D\uFF1A{{amount}}"
5648
+ },
5585
5649
  errorFallback: {
5586
5650
  title: "\u51FA\u73B0\u95EE\u9898",
5587
5651
  description: "\u8BF7\u5173\u95ED\u6B64\u7A97\u53E3\u540E\u91CD\u8BD5\u3002",
@@ -5986,7 +6050,7 @@ import {
5986
6050
  keepPreviousData as keepPreviousData4,
5987
6051
  useQueries
5988
6052
  } from "@tanstack/react-query";
5989
- import { useMemo as useMemo75 } from "react";
6053
+ import { useMemo as useMemo76 } from "react";
5990
6054
  import { arbitrum as arbitrum6, polygon as polygon9 } from "viem/chains";
5991
6055
 
5992
6056
  // src/domains/asset.ts
@@ -7156,7 +7220,7 @@ import React325, {
7156
7220
  useCallback as useCallback72,
7157
7221
  useContext as useContext23,
7158
7222
  useEffect as useEffect102,
7159
- useMemo as useMemo74,
7223
+ useMemo as useMemo75,
7160
7224
  useRef as useRef61,
7161
7225
  useState as useState95
7162
7226
  } from "react";
@@ -8003,7 +8067,7 @@ function useFiatExchangeRates(enabled = true) {
8003
8067
  }
8004
8068
 
8005
8069
  // src/hooks/useSwappedTheme.ts
8006
- import { useMemo as useMemo73 } from "react";
8070
+ import { useMemo as useMemo74 } from "react";
8007
8071
 
8008
8072
  // src/providers/FunkitProvider.tsx
8009
8073
  import { useLogOnce as useLogOnce5 } from "@funkit/connect-core";
@@ -8017,7 +8081,7 @@ import React324, {
8017
8081
  createContext as createContext22,
8018
8082
  useContext as useContext22,
8019
8083
  useEffect as useEffect100,
8020
- useMemo as useMemo72,
8084
+ useMemo as useMemo73,
8021
8085
  useRef as useRef60,
8022
8086
  useState as useState93
8023
8087
  } from "react";
@@ -8906,7 +8970,7 @@ import { safeParseJson as safeParseJson3 } from "@funkit/utils";
8906
8970
  import React322, {
8907
8971
  useContext as useContext21,
8908
8972
  useEffect as useEffect96,
8909
- useMemo as useMemo71,
8973
+ useMemo as useMemo72,
8910
8974
  useState as useState92
8911
8975
  } from "react";
8912
8976
  import { createContext as createContext21 } from "react";
@@ -8940,7 +9004,7 @@ import {
8940
9004
  getMinTransferValueForChain,
8941
9005
  getMinTransferValueUsd
8942
9006
  } from "@funkit/connect-core";
8943
- import { useMemo as useMemo70 } from "react";
9007
+ import { useMemo as useMemo71 } from "react";
8944
9008
  import { arbitrum as arbitrum4, polygon as polygon8 } from "viem/chains";
8945
9009
 
8946
9010
  // src/hooks/useIsStablecoin.ts
@@ -8972,7 +9036,7 @@ import React321, {
8972
9036
  useCallback as useCallback70,
8973
9037
  useContext as useContext19,
8974
9038
  useEffect as useEffect95,
8975
- useMemo as useMemo69,
9039
+ useMemo as useMemo70,
8976
9040
  useRef as useRef58,
8977
9041
  useState as useState91
8978
9042
  } from "react";
@@ -10281,7 +10345,7 @@ import React320, {
10281
10345
  useCallback as useCallback69,
10282
10346
  useContext as useContext18,
10283
10347
  useEffect as useEffect94,
10284
- useMemo as useMemo68,
10348
+ useMemo as useMemo69,
10285
10349
  useState as useState90
10286
10350
  } from "react";
10287
10351
 
@@ -16048,21 +16112,6 @@ var FunInput = forwardRef4(function FunInputWithRef({
16048
16112
  };
16049
16113
  const isFocused = alwaysFocused || focused;
16050
16114
  const isValidDecimalColor = !!decimalsColor && activeTheme.colors?.[decimalsColor] !== "none";
16051
- const getBorderColor2 = () => {
16052
- if (error) {
16053
- return { base: "error" };
16054
- }
16055
- if (inputProps.disabled) {
16056
- return { base: "inputBorderBase" };
16057
- }
16058
- if (isFocused) {
16059
- return { base: "secondaryText" };
16060
- }
16061
- return {
16062
- base: "inputBorderBase",
16063
- hover: "inputBorderHover"
16064
- };
16065
- };
16066
16115
  const textareaRef = React73.useRef(null);
16067
16116
  useEffect28(() => {
16068
16117
  if (allowMultiline) {
@@ -16102,7 +16151,7 @@ var FunInput = forwardRef4(function FunInputWithRef({
16102
16151
  e.currentTarget.blur();
16103
16152
  },
16104
16153
  className: clsx11(
16105
- error ? ignoreBaseTransitions ? inputClassErrorNoTransition : inputClassError : inputProps.disabled ? ignoreBaseTransitions ? inputClassDisabledNoTransition : inputClassDisabled : ignoreBaseTransitions ? inputClassNoTransition : inputClass,
16154
+ getInputClassName(error, inputProps, ignoreBaseTransitions),
16106
16155
  numberInputResetStyle,
16107
16156
  inputClassName
16108
16157
  ),
@@ -16165,28 +16214,15 @@ var FunInput = forwardRef4(function FunInputWithRef({
16165
16214
  }
16166
16215
  );
16167
16216
  if (shouldColorDecimals) {
16168
- return /* @__PURE__ */ React73.createElement(Box, { style: { position: "relative", display: "flex", flex: 1 } }, /* @__PURE__ */ React73.createElement(
16169
- Box,
16217
+ return /* @__PURE__ */ React73.createElement(
16218
+ DecimalOverlay,
16170
16219
  {
16171
- color: "primaryText",
16172
- style: {
16173
- position: "absolute",
16174
- left: 0,
16175
- top: 0,
16176
- pointerEvents: "none",
16177
- fontFamily: "inherit",
16178
- fontSize: "inherit",
16179
- fontWeight: "inherit",
16180
- lineHeight: "inherit",
16181
- whiteSpace: "nowrap",
16182
- display: "flex",
16183
- alignItems: "center",
16184
- height: "100%"
16185
- }
16220
+ integerPart,
16221
+ decimalPart,
16222
+ decimalsColor
16186
16223
  },
16187
- /* @__PURE__ */ React73.createElement("span", { style: { color: "inherit" } }, integerPart),
16188
- /* @__PURE__ */ React73.createElement(DecimalSpan, { decimalsColor }, decimalPart)
16189
- ), inputElement);
16224
+ inputElement
16225
+ );
16190
16226
  }
16191
16227
  return inputElement;
16192
16228
  };
@@ -16210,7 +16246,7 @@ var FunInput = forwardRef4(function FunInputWithRef({
16210
16246
  display: "flex",
16211
16247
  alignItems: allowMultiline ? "flex-start" : "center",
16212
16248
  color: adornmentColor,
16213
- borderColor: getBorderColor2(),
16249
+ borderColor: getBorderColor2(error, inputProps, isFocused),
16214
16250
  borderWidth: overrideBorderWidth ?? "1",
16215
16251
  borderStyle: "solid",
16216
16252
  fontSize: ignoreFontSize ? "inherit" : "inputValue",
@@ -16221,33 +16257,15 @@ var FunInput = forwardRef4(function FunInputWithRef({
16221
16257
  hover: "inputBackgroundHover"
16222
16258
  }
16223
16259
  },
16224
- prefix && /* @__PURE__ */ React73.createElement(
16225
- Box,
16226
- {
16227
- display: "flex",
16228
- alignItems: "center",
16229
- paddingLeft: "12",
16230
- height: "max"
16231
- },
16232
- prefix
16233
- ),
16234
- prefixIcon === "SearchIcon" && /* @__PURE__ */ React73.createElement(
16235
- Box,
16236
- {
16237
- display: "flex",
16238
- paddingLeft: "12",
16239
- height: "max",
16240
- alignItems: "center",
16241
- color: isFocused ? "primaryText" : "secondaryText"
16242
- },
16243
- /* @__PURE__ */ React73.createElement(SearchIcon, null)
16244
- ),
16245
- prefixIcon === "$" && /* @__PURE__ */ React73.createElement(Box, { display: "flex", alignItems: "center", paddingLeft: "32" }, /* @__PURE__ */ React73.createElement(
16246
- DollarTextIcon,
16260
+ /* @__PURE__ */ React73.createElement(
16261
+ PrefixAdornments,
16247
16262
  {
16248
- fontSize: inputStyle.fontSize || DEFAULT_ICON_FONT_SIZE
16263
+ prefix,
16264
+ prefixIcon,
16265
+ isFocused,
16266
+ inputStyle
16249
16267
  }
16250
- )),
16268
+ ),
16251
16269
  renderInputOrTextarea(),
16252
16270
  suffix && /* @__PURE__ */ React73.createElement(
16253
16271
  Box,
@@ -16269,6 +16287,70 @@ var FunInput = forwardRef4(function FunInputWithRef({
16269
16287
  error && typeof error === "string" && /* @__PURE__ */ React73.createElement(Text, { color: "error", size: "10" }, error)
16270
16288
  );
16271
16289
  });
16290
+ var getBorderColor2 = (error, inputProps, isFocused) => {
16291
+ if (error) {
16292
+ return { base: "error" };
16293
+ }
16294
+ if (inputProps.disabled) {
16295
+ return { base: "inputBorderBase" };
16296
+ }
16297
+ if (isFocused) {
16298
+ return { base: "secondaryText" };
16299
+ }
16300
+ return {
16301
+ base: "inputBorderBase",
16302
+ hover: "inputBorderHover"
16303
+ };
16304
+ };
16305
+ var getInputClassName = (error, inputProps, ignoreBaseTransitions) => error ? ignoreBaseTransitions ? inputClassErrorNoTransition : inputClassError : inputProps.disabled ? ignoreBaseTransitions ? inputClassDisabledNoTransition : inputClassDisabled : ignoreBaseTransitions ? inputClassNoTransition : inputClass;
16306
+ var PrefixAdornments = ({
16307
+ prefix,
16308
+ prefixIcon,
16309
+ isFocused,
16310
+ inputStyle
16311
+ }) => /* @__PURE__ */ React73.createElement(React73.Fragment, null, prefix && /* @__PURE__ */ React73.createElement(Box, { display: "flex", alignItems: "center", paddingLeft: "12", height: "max" }, prefix), prefixIcon === "SearchIcon" && /* @__PURE__ */ React73.createElement(
16312
+ Box,
16313
+ {
16314
+ display: "flex",
16315
+ paddingLeft: "12",
16316
+ height: "max",
16317
+ alignItems: "center",
16318
+ color: isFocused ? "primaryText" : "secondaryText"
16319
+ },
16320
+ /* @__PURE__ */ React73.createElement(SearchIcon, null)
16321
+ ), prefixIcon === "$" && /* @__PURE__ */ React73.createElement(Box, { display: "flex", alignItems: "center", paddingLeft: "32" }, /* @__PURE__ */ React73.createElement(
16322
+ DollarTextIcon,
16323
+ {
16324
+ fontSize: inputStyle.fontSize || DEFAULT_ICON_FONT_SIZE
16325
+ }
16326
+ )));
16327
+ var DecimalOverlay = ({
16328
+ integerPart,
16329
+ decimalPart,
16330
+ decimalsColor,
16331
+ children
16332
+ }) => /* @__PURE__ */ React73.createElement(Box, { style: { position: "relative", display: "flex", flex: 1 } }, /* @__PURE__ */ React73.createElement(
16333
+ Box,
16334
+ {
16335
+ color: "primaryText",
16336
+ style: {
16337
+ position: "absolute",
16338
+ left: 0,
16339
+ top: 0,
16340
+ pointerEvents: "none",
16341
+ fontFamily: "inherit",
16342
+ fontSize: "inherit",
16343
+ fontWeight: "inherit",
16344
+ lineHeight: "inherit",
16345
+ whiteSpace: "nowrap",
16346
+ display: "flex",
16347
+ alignItems: "center",
16348
+ height: "100%"
16349
+ }
16350
+ },
16351
+ /* @__PURE__ */ React73.createElement("span", { style: { color: "inherit" } }, integerPart),
16352
+ /* @__PURE__ */ React73.createElement(DecimalSpan, { decimalsColor }, decimalPart)
16353
+ ), children);
16272
16354
  var adjustTextareaHeight = (textarea) => {
16273
16355
  if (textarea) {
16274
16356
  textarea.style.height = "auto";
@@ -17072,7 +17154,8 @@ function PaymentFeesSummary({
17072
17154
  isWithdrawal,
17073
17155
  valuesNotAvailable = false,
17074
17156
  extraSourceChainGasUsd = 0,
17075
- step
17157
+ step,
17158
+ extraFeeItems
17076
17159
  }) {
17077
17160
  const { t } = useFunkitTranslation();
17078
17161
  const controls = useAnimationControls2();
@@ -17226,7 +17309,7 @@ function PaymentFeesSummary({
17226
17309
  exit: "collapsed",
17227
17310
  animate: controls
17228
17311
  },
17229
- /* @__PURE__ */ React80.createElement(Box, { display: "flex", flexDirection: "column", gap: "12", paddingTop: "12" }, expandedItems.map((feeItem) => /* @__PURE__ */ React80.createElement(
17312
+ /* @__PURE__ */ React80.createElement(Box, { display: "flex", flexDirection: "column", gap: "12", paddingTop: "12" }, extraFeeItems?.map((feeItem) => /* @__PURE__ */ React80.createElement(FeeLineItem, { key: feeItem.testId ?? feeItem.label, ...feeItem })), expandedItems.map((feeItem) => /* @__PURE__ */ React80.createElement(
17230
17313
  FeeLineItem,
17231
17314
  {
17232
17315
  key: feeItem.label,
@@ -23510,7 +23593,7 @@ import {
23510
23593
  formatCryptoAndStringify as formatCryptoAndStringify5,
23511
23594
  formatCurrencyAndStringify as formatCurrencyAndStringify6
23512
23595
  } from "@funkit/utils";
23513
- import React147, { useCallback as useCallback33, useEffect as useEffect44, useMemo as useMemo39, useState as useState44 } from "react";
23596
+ import React147, { useCallback as useCallback33, useEffect as useEffect44, useMemo as useMemo40, useState as useState44 } from "react";
23514
23597
  import { createPortal as createPortal6 } from "react-dom";
23515
23598
  import { useDebounce } from "use-debounce";
23516
23599
  import { isAddress as isAddress2 } from "viem";
@@ -24174,77 +24257,14 @@ function BaseDropdown({
24174
24257
  prefixIcon: "SearchIcon"
24175
24258
  }
24176
24259
  )), organizedOptions.length === 0 ? /* @__PURE__ */ React135.createElement(FunNoResults, { text: t("common.noResultsFound") }) : /* @__PURE__ */ React135.createElement(
24177
- Box,
24260
+ DropdownOptionList,
24178
24261
  {
24179
- as: "ul",
24180
- display: "flex",
24181
- flexDirection: "column",
24182
- paddingY: size === "compact" ? "dropdownCompactPaddingY" : "dropdownPaddingY"
24183
- },
24184
- organizedGroups.map(
24185
- ({
24186
- key: groupKey,
24187
- label: groupLabel,
24188
- options: optionsInGroup
24189
- }, groupIndex) => /* @__PURE__ */ React135.createElement(React135.Fragment, { key: groupKey }, groupIndex > 0 && /* @__PURE__ */ React135.createElement(
24190
- Box,
24191
- {
24192
- height: "1",
24193
- background: "lightStroke",
24194
- marginY: "dropdownGroupDividerMarginY"
24195
- }
24196
- ), groupLabel && /* @__PURE__ */ React135.createElement(
24197
- Box,
24198
- {
24199
- paddingX: size === "compact" ? "dropdownCompactPaddingX" : "dropdownPaddingX"
24200
- },
24201
- /* @__PURE__ */ React135.createElement(
24202
- Box,
24203
- {
24204
- paddingX: "dropdownItemPaddingX",
24205
- paddingY: "dropdownItemPaddingY"
24206
- },
24207
- /* @__PURE__ */ React135.createElement(
24208
- Text,
24209
- {
24210
- color: "dropdownGroupHeader",
24211
- font: "dropdownGroupHeader",
24212
- size: "dropdownGroupHeader",
24213
- weight: "dropdownGroupHeader"
24214
- },
24215
- groupLabel
24216
- )
24217
- )
24218
- ), optionsInGroup.map((singleOption) => {
24219
- const isSelected = singleOption.value === selectedOption?.value;
24220
- return /* @__PURE__ */ React135.createElement(
24221
- Box,
24222
- {
24223
- key: singleOption.value,
24224
- paddingX: size === "compact" ? "dropdownCompactPaddingX" : "dropdownPaddingX"
24225
- },
24226
- /* @__PURE__ */ React135.createElement(
24227
- Box,
24228
- {
24229
- id: `${singleOption.value}-dropdown-item`,
24230
- as: "li",
24231
- background: {
24232
- base: isSelected ? "selectedDropdownItemBackground" : "transparent",
24233
- hover: "offBackground"
24234
- },
24235
- className: baseDropdownItemWrapperStyles,
24236
- onClick: () => {
24237
- onOptionSelected?.(singleOption);
24238
- }
24239
- },
24240
- renderDropdownOption(
24241
- singleOption,
24242
- isSelected
24243
- )
24244
- )
24245
- );
24246
- }))
24247
- )
24262
+ organizedGroups,
24263
+ size,
24264
+ selectedOption,
24265
+ onOptionSelected,
24266
+ renderDropdownOption
24267
+ }
24248
24268
  ))
24249
24269
  )
24250
24270
  ))
@@ -24261,6 +24281,80 @@ function BaseDropdown({
24261
24281
  )
24262
24282
  ));
24263
24283
  }
24284
+ function DropdownOptionList({
24285
+ organizedGroups,
24286
+ size,
24287
+ selectedOption,
24288
+ onOptionSelected,
24289
+ renderDropdownOption
24290
+ }) {
24291
+ return /* @__PURE__ */ React135.createElement(
24292
+ Box,
24293
+ {
24294
+ as: "ul",
24295
+ display: "flex",
24296
+ flexDirection: "column",
24297
+ paddingY: size === "compact" ? "dropdownCompactPaddingY" : "dropdownPaddingY"
24298
+ },
24299
+ organizedGroups.map(
24300
+ ({ key: groupKey, label: groupLabel, options: optionsInGroup }, groupIndex) => /* @__PURE__ */ React135.createElement(React135.Fragment, { key: groupKey }, groupIndex > 0 && /* @__PURE__ */ React135.createElement(
24301
+ Box,
24302
+ {
24303
+ height: "1",
24304
+ background: "lightStroke",
24305
+ marginY: "dropdownGroupDividerMarginY"
24306
+ }
24307
+ ), groupLabel && /* @__PURE__ */ React135.createElement(
24308
+ Box,
24309
+ {
24310
+ paddingX: size === "compact" ? "dropdownCompactPaddingX" : "dropdownPaddingX"
24311
+ },
24312
+ /* @__PURE__ */ React135.createElement(
24313
+ Box,
24314
+ {
24315
+ paddingX: "dropdownItemPaddingX",
24316
+ paddingY: "dropdownItemPaddingY"
24317
+ },
24318
+ /* @__PURE__ */ React135.createElement(
24319
+ Text,
24320
+ {
24321
+ color: "dropdownGroupHeader",
24322
+ font: "dropdownGroupHeader",
24323
+ size: "dropdownGroupHeader",
24324
+ weight: "dropdownGroupHeader"
24325
+ },
24326
+ groupLabel
24327
+ )
24328
+ )
24329
+ ), optionsInGroup.map((singleOption) => {
24330
+ const isSelected = singleOption.value === selectedOption?.value;
24331
+ return /* @__PURE__ */ React135.createElement(
24332
+ Box,
24333
+ {
24334
+ key: singleOption.value,
24335
+ paddingX: size === "compact" ? "dropdownCompactPaddingX" : "dropdownPaddingX"
24336
+ },
24337
+ /* @__PURE__ */ React135.createElement(
24338
+ Box,
24339
+ {
24340
+ id: `${singleOption.value}-dropdown-item`,
24341
+ as: "li",
24342
+ background: {
24343
+ base: isSelected ? "selectedDropdownItemBackground" : "transparent",
24344
+ hover: "offBackground"
24345
+ },
24346
+ className: baseDropdownItemWrapperStyles,
24347
+ onClick: () => {
24348
+ onOptionSelected?.(singleOption);
24349
+ }
24350
+ },
24351
+ renderDropdownOption(singleOption, isSelected)
24352
+ )
24353
+ );
24354
+ }))
24355
+ )
24356
+ );
24357
+ }
24264
24358
  var BaseDropdown_default = BaseDropdown;
24265
24359
 
24266
24360
  // src/components/Dropdown/BaseDropdownItem.tsx
@@ -25974,6 +26068,15 @@ function getRecipientAddressPlaceholder(selectedChainId, t) {
25974
26068
  return "0x...";
25975
26069
  }
25976
26070
  var MIN_RECIPIENT_ADDRESS_FONT_SIZE = 8;
26071
+ function getConnectedAddressInputStyle(connectedAddressFontSize) {
26072
+ return {
26073
+ fontSize: connectedAddressFontSize === void 0 ? void 0 : `${connectedAddressFontSize}px`,
26074
+ lineHeight: "16px",
26075
+ textOverflow: "ellipsis",
26076
+ overflow: "hidden",
26077
+ whiteSpace: "nowrap"
26078
+ };
26079
+ }
25977
26080
  function WithdrawRecipientAddress({
25978
26081
  config,
25979
26082
  recipientAddress,
@@ -26079,13 +26182,7 @@ function WithdrawRecipientAddress({
26079
26182
  allowMultiline: !isShowingConnectedAddress,
26080
26183
  borderRadius: "withdrawalInput",
26081
26184
  inputProps: { spellCheck: false },
26082
- inputStyle: isShowingConnectedAddress ? {
26083
- fontSize: connectedAddressFontSize === void 0 ? void 0 : `${connectedAddressFontSize}px`,
26084
- lineHeight: "16px",
26085
- textOverflow: "ellipsis",
26086
- overflow: "hidden",
26087
- whiteSpace: "nowrap"
26088
- } : void 0,
26185
+ inputStyle: isShowingConnectedAddress ? getConnectedAddressInputStyle(connectedAddressFontSize) : void 0,
26089
26186
  value: recipientAddress,
26090
26187
  onChange: handleAddressChange,
26091
26188
  onFocus: () => {
@@ -27346,6 +27443,57 @@ function useSavedWithdrawalChain(config) {
27346
27443
  };
27347
27444
  }
27348
27445
 
27446
+ // src/modals/WithdrawalModal/useWithdrawalExtraFeeItems.ts
27447
+ import { useMemo as useMemo39 } from "react";
27448
+ var MAX_WITHDRAWAL_FEE_ITEMS = 3;
27449
+ function useWithdrawalExtraFeeItems(resolveWithdrawalFeeItems, ctx) {
27450
+ const {
27451
+ sourceAmount,
27452
+ sourceTokenSymbol,
27453
+ sourceChainId,
27454
+ receiveAmount,
27455
+ receiveTokenSymbol,
27456
+ destinationChainId
27457
+ } = ctx;
27458
+ const feeItems = useMemo39(() => {
27459
+ if (!resolveWithdrawalFeeItems || !sourceAmount) {
27460
+ return void 0;
27461
+ }
27462
+ try {
27463
+ const items = resolveWithdrawalFeeItems({
27464
+ sourceAmount,
27465
+ sourceTokenSymbol,
27466
+ sourceChainId,
27467
+ receiveAmount,
27468
+ receiveTokenSymbol,
27469
+ destinationChainId
27470
+ });
27471
+ return items?.slice(0, MAX_WITHDRAWAL_FEE_ITEMS).map(({ id, label, value, tooltip }) => ({
27472
+ testId: id,
27473
+ label,
27474
+ value,
27475
+ tooltipText: tooltip
27476
+ }));
27477
+ } catch (err) {
27478
+ logger.warn("withdrawal:extraFeeItemsResolverFailed", {
27479
+ errorMessage: err instanceof Error ? err.message : String(err),
27480
+ sourceChainId,
27481
+ sourceTokenSymbol
27482
+ });
27483
+ return void 0;
27484
+ }
27485
+ }, [
27486
+ resolveWithdrawalFeeItems,
27487
+ sourceAmount,
27488
+ sourceTokenSymbol,
27489
+ sourceChainId,
27490
+ receiveAmount,
27491
+ receiveTokenSymbol,
27492
+ destinationChainId
27493
+ ]);
27494
+ return feeItems;
27495
+ }
27496
+
27349
27497
  // src/modals/WithdrawalModal/WithdrawalContent.tsx
27350
27498
  import { isSolanaChainId as isSolanaChainId4 } from "@funkit/chains";
27351
27499
  var PRICE_REFRESH_INTERVAL = 6e4;
@@ -28024,7 +28172,7 @@ function usePostClientCommonWithdrawalFlow({
28024
28172
  selectedChainName,
28025
28173
  t
28026
28174
  });
28027
- const errorNotification = useMemo39(
28175
+ const errorNotification = useMemo40(
28028
28176
  () => getErrorNotification({
28029
28177
  quoteErrorObject,
28030
28178
  withdrawalError,
@@ -28104,7 +28252,7 @@ var WithdrawContent = ({
28104
28252
  bottomBarId = "withdrawal",
28105
28253
  disableSubmit = false
28106
28254
  }) => {
28107
- const { updateSourceAsset } = useCheckoutContext();
28255
+ const { updateSourceAsset, checkoutItem } = useCheckoutContext();
28108
28256
  const commonFlow = useCommonWithdrawalFlow({ config, withdrawalItem });
28109
28257
  const {
28110
28258
  t,
@@ -28202,6 +28350,17 @@ var WithdrawContent = ({
28202
28350
  bottomBarId,
28203
28351
  disableSubmit
28204
28352
  });
28353
+ const extraFeeItems = useWithdrawalExtraFeeItems(
28354
+ config.resolveWithdrawalFeeItems,
28355
+ {
28356
+ sourceAmount: checkoutItem?.sourceAssetAmount ?? "",
28357
+ sourceTokenSymbol: selectedSourceToken,
28358
+ sourceChainId: selectedOption?.asset?.tokenChainId ?? config.sourceChainId,
28359
+ receiveAmount: feesSummaryQuote && !isQuoteLoading ? String(receiveAmountCrypto) : null,
28360
+ receiveTokenSymbol: selectedToken ?? null,
28361
+ destinationChainId: selectedChainId?.toString() ?? null
28362
+ }
28363
+ );
28205
28364
  useTrackErrorShown({
28206
28365
  error: topNotification,
28207
28366
  flow: "withdraw",
@@ -28461,7 +28620,8 @@ var WithdrawContent = ({
28461
28620
  valuesNotAvailable: feesSummaryUnavailable,
28462
28621
  isWithdrawal: true,
28463
28622
  extraSourceChainGasUsd: clientSourceChainGasUsd,
28464
- step: "ENTER_AMOUNT" /* ENTER_AMOUNT */
28623
+ step: "ENTER_AMOUNT" /* ENTER_AMOUNT */,
28624
+ extraFeeItems
28465
28625
  }
28466
28626
  ), showBannerSection && /* @__PURE__ */ React147.createElement(Box, { display: "flex", flexDirection: "column", gap: "4" }, isUsdceSelected && /* @__PURE__ */ React147.createElement(InfoBanner, { message: t("withdrawal.usdceWarning"), type: "warning" }), /* @__PURE__ */ React147.createElement(FunInfoBanner, { configName: "withdrawalinfobanner" })), bottomSectionRef && createPortal6(
28467
28627
  /* @__PURE__ */ React147.createElement(
@@ -28535,7 +28695,7 @@ var DollarIcon = ({ size = 12 }) => {
28535
28695
  // src/hooks/queries/useWithdrawFops.ts
28536
28696
  import { RailConfigType as RailConfigType2, getFops as getFops2 } from "@funkit/api-base";
28537
28697
  import { useQuery as useQuery15 } from "@tanstack/react-query";
28538
- import { useMemo as useMemo40 } from "react";
28698
+ import { useMemo as useMemo41 } from "react";
28539
28699
  import {
28540
28700
  buildSwappedSellLimits,
28541
28701
  buildSwappedThirdPartyPaymentConfigs,
@@ -28552,7 +28712,7 @@ var useWithdrawFops = (params) => {
28552
28712
  } = useSwappedDefaultCurrency();
28553
28713
  const fopPriority = useDynamicConfig("foppriority");
28554
28714
  const sourceOverrides = useDynamicConfig("swappedwithdrawalsourceoverrides");
28555
- const sourceOverride = useMemo40(
28715
+ const sourceOverride = useMemo41(
28556
28716
  () => findSwappedSourceOverride(sourceOverrides, {
28557
28717
  chainId: params.sourceChainId,
28558
28718
  tokenAddress: params.sourceTokenAddress
@@ -29876,7 +30036,7 @@ import React158 from "react";
29876
30036
  import React157, { useEffect as useEffect50 } from "react";
29877
30037
 
29878
30038
  // src/components/FunCheckoutHistory/FunCheckoutHistoryDetail.tsx
29879
- import React156, { useCallback as useCallback34, useMemo as useMemo41, useState as useState46 } from "react";
30039
+ import React156, { useCallback as useCallback34, useMemo as useMemo42, useState as useState46 } from "react";
29880
30040
  import { createPortal as createPortal7 } from "react-dom";
29881
30041
 
29882
30042
  // src/hooks/useFunListeners.ts
@@ -29940,7 +30100,7 @@ function FunCheckoutHistoryDetail({
29940
30100
  isActiveCheckout
29941
30101
  ]
29942
30102
  );
29943
- const primaryButtonProps = useMemo41(() => {
30103
+ const primaryButtonProps = useMemo42(() => {
29944
30104
  if (!isCheckoutLoaded) {
29945
30105
  return void 0;
29946
30106
  }
@@ -30619,7 +30779,7 @@ import React161, {
30619
30779
  createContext as createContext14,
30620
30780
  useCallback as useCallback37,
30621
30781
  useContext as useContext14,
30622
- useMemo as useMemo42,
30782
+ useMemo as useMemo43,
30623
30783
  useState as useState48
30624
30784
  } from "react";
30625
30785
  var ActivityTraversalContext = createContext14({
@@ -30662,7 +30822,7 @@ var ActivityTraversalProvider = ({
30662
30822
  setSelectedPurchaseInitView(void 0);
30663
30823
  setReturnView(void 0);
30664
30824
  }, []);
30665
- const contextValue = useMemo42(
30825
+ const contextValue = useMemo43(
30666
30826
  () => ({
30667
30827
  selectedPurchaseId,
30668
30828
  selectedPurchaseInitView,
@@ -30747,7 +30907,7 @@ function useCheckoutModalTitle(depositAddress, defaultTitle) {
30747
30907
  import { IN_PROGRESS_CHECKOUT_STATES as IN_PROGRESS_CHECKOUT_STATES2 } from "@funkit/api-base";
30748
30908
  import { formatTimestampToDate, fullMonthNames } from "@funkit/utils";
30749
30909
  import clsx20 from "clsx";
30750
- import React171, { useEffect as useEffect54, useMemo as useMemo43, useRef as useRef35, useState as useState50 } from "react";
30910
+ import React171, { useEffect as useEffect54, useMemo as useMemo44, useRef as useRef35, useState as useState50 } from "react";
30751
30911
  import { Virtuoso } from "react-virtuoso";
30752
30912
 
30753
30913
  // src/consts/layout.ts
@@ -31278,6 +31438,37 @@ var EmptyTabAlert = () => {
31278
31438
  }
31279
31439
  ));
31280
31440
  };
31441
+ function groupCheckoutsByDay(checkouts) {
31442
+ const segmentedCheckoutHistoryListByDays = Object.entries(
31443
+ checkouts.reduce(
31444
+ (acc, checkoutHistoryItem) => {
31445
+ const date = new Date(checkoutHistoryItem.createdTimeMs);
31446
+ const dateKey = `${date.getFullYear()}-${fullMonthNames[date.getMonth()]}-${date.getDate()}`;
31447
+ if (!acc[dateKey]) {
31448
+ acc[dateKey] = [];
31449
+ }
31450
+ acc[dateKey].push(checkoutHistoryItem);
31451
+ return acc;
31452
+ },
31453
+ {}
31454
+ )
31455
+ );
31456
+ segmentedCheckoutHistoryListByDays.sort(
31457
+ ([dateKeyA], [dateKeyB]) => new Date(dateKeyB).getTime() - new Date(dateKeyA).getTime()
31458
+ );
31459
+ const hasMultipleYearsOfCheckoutData = segmentedCheckoutHistoryListByDays.some(([dateKey]) => {
31460
+ return new Date(dateKey).getFullYear() !== (/* @__PURE__ */ new Date()).getFullYear();
31461
+ });
31462
+ return segmentedCheckoutHistoryListByDays.map(
31463
+ ([dateKey, dayCheckouts]) => [
31464
+ formatTimestampToDate(new Date(dateKey), {
31465
+ year: hasMultipleYearsOfCheckoutData ? "full" : "none",
31466
+ month: "short"
31467
+ }),
31468
+ dayCheckouts
31469
+ ]
31470
+ );
31471
+ }
31281
31472
  function Home({
31282
31473
  onClose,
31283
31474
  onChangeView,
@@ -31301,7 +31492,7 @@ function Home({
31301
31492
  const virtuosoDiv = virtuosoParentRef.current?.firstChild;
31302
31493
  virtuosoDiv?.classList.add(animateVirtuosoInClass);
31303
31494
  }, []);
31304
- const AssetsList = useMemo43(() => {
31495
+ const AssetsList = useMemo44(() => {
31305
31496
  if (walletAssets && !Object.keys(walletAssets).length) {
31306
31497
  return /* @__PURE__ */ React171.createElement(EmptyTabAlert, null);
31307
31498
  }
@@ -31328,7 +31519,7 @@ function Home({
31328
31519
  }
31329
31520
  ));
31330
31521
  }, [walletAssets]);
31331
- const CheckoutsList = useMemo43(() => {
31522
+ const CheckoutsList = useMemo44(() => {
31332
31523
  if (checkoutHistoryList.length === 0 && isCheckoutHistoryInited) {
31333
31524
  return /* @__PURE__ */ React171.createElement(EmptyTabAlert, null);
31334
31525
  }
@@ -31338,26 +31529,6 @@ function Home({
31338
31529
  const nonProcessingCheckouts = checkoutHistoryList.filter(
31339
31530
  (checkoutHistoryItem) => !IN_PROGRESS_CHECKOUT_STATES2.includes(checkoutHistoryItem.state)
31340
31531
  );
31341
- const segmentedCheckoutHistoryListByDays = Object.entries(
31342
- nonProcessingCheckouts.reduce(
31343
- (acc, checkoutHistoryItem) => {
31344
- const date = new Date(checkoutHistoryItem.createdTimeMs);
31345
- const dateKey = `${date.getFullYear()}-${fullMonthNames[date.getMonth()]}-${date.getDate()}`;
31346
- if (!acc[dateKey]) {
31347
- acc[dateKey] = [];
31348
- }
31349
- acc[dateKey].push(checkoutHistoryItem);
31350
- return acc;
31351
- },
31352
- {}
31353
- )
31354
- );
31355
- segmentedCheckoutHistoryListByDays.sort(
31356
- ([dateKeyA], [dateKeyB]) => new Date(dateKeyB).getTime() - new Date(dateKeyA).getTime()
31357
- );
31358
- const hasMultipleYearsOfCheckoutData = segmentedCheckoutHistoryListByDays.some(([dateKey]) => {
31359
- return new Date(dateKey).getFullYear() !== (/* @__PURE__ */ new Date()).getFullYear();
31360
- });
31361
31532
  const handleCheckoutSelect = (checkoutId, initialPage) => {
31362
31533
  checkoutsListRef.current?.getState((scrollState) => {
31363
31534
  onSelectActivity({
@@ -31371,15 +31542,7 @@ function Home({
31371
31542
  });
31372
31543
  });
31373
31544
  };
31374
- const groups = segmentedCheckoutHistoryListByDays.map(
31375
- ([dateKey, checkouts]) => [
31376
- formatTimestampToDate(new Date(dateKey), {
31377
- year: hasMultipleYearsOfCheckoutData ? "full" : "none",
31378
- month: "short"
31379
- }),
31380
- checkouts
31381
- ]
31382
- );
31545
+ const groups = groupCheckoutsByDay(nonProcessingCheckouts);
31383
31546
  if (processingCheckouts.length > 0) {
31384
31547
  groups.unshift([t("checkoutHistory.processing"), processingCheckouts]);
31385
31548
  }
@@ -32051,7 +32214,7 @@ function ChainModal({ onClose, open }) {
32051
32214
  import React318, { useEffect as useEffect93, useLayoutEffect as useLayoutEffect3, useRef as useRef57 } from "react";
32052
32215
 
32053
32216
  // src/components/FunConnectOptions/FunConnectOptions.tsx
32054
- import React189, { useCallback as useCallback41, useMemo as useMemo45, useState as useState55 } from "react";
32217
+ import React189, { useCallback as useCallback41, useMemo as useMemo46, useState as useState55 } from "react";
32055
32218
 
32056
32219
  // src/wallets/useWalletConnectors.ts
32057
32220
  import { indexBy } from "@funkit/utils";
@@ -32385,7 +32548,7 @@ var FunMessage = ({
32385
32548
 
32386
32549
  // src/components/QRCode/QRCode.tsx
32387
32550
  import QRCodeUtil from "qrcode";
32388
- import React183, { useMemo as useMemo44 } from "react";
32551
+ import React183, { useMemo as useMemo45 } from "react";
32389
32552
  var generateMatrix = (value, errorCorrectionLevel) => {
32390
32553
  const { data } = QRCodeUtil.create(value, { errorCorrectionLevel }).modules;
32391
32554
  const sqrt = Math.sqrt(data.length);
@@ -32413,7 +32576,7 @@ function QRCode({
32413
32576
  }) {
32414
32577
  const { activeTheme } = useActiveTheme();
32415
32578
  const size = sizeProp - Number.parseInt(outsidePadding, 10) * 2;
32416
- const dots = useMemo44(() => {
32579
+ const dots = useMemo45(() => {
32417
32580
  const dots2 = [];
32418
32581
  const matrix = generateMatrix(uri, ecl);
32419
32582
  const cellSize = size / matrix.length;
@@ -32999,7 +33162,7 @@ function FunConnectOptions({
32999
33162
  }
33000
33163
  }
33001
33164
  };
33002
- const stepComponent = useMemo45(() => {
33165
+ const stepComponent = useMemo46(() => {
33003
33166
  switch (step) {
33004
33167
  case 0 /* SIGNIN_PRIMARY */:
33005
33168
  return /* @__PURE__ */ React189.createElement(
@@ -33312,7 +33475,7 @@ var FunCheckoutBlocked = ({ reason }) => {
33312
33475
  import React195, { useEffect as useEffect61 } from "react";
33313
33476
 
33314
33477
  // src/modals/PolymarketPerpsTransfer/PolymarketPerpsPrefetch.tsx
33315
- import React191, { useEffect as useEffect58, useMemo as useMemo46 } from "react";
33478
+ import React191, { useEffect as useEffect58, useMemo as useMemo47 } from "react";
33316
33479
 
33317
33480
  // src/domains/polymarketPerps.ts
33318
33481
  import { getAddress as getAddress4 } from "viem";
@@ -33355,7 +33518,7 @@ function InactiveAccountQueries({ routingId }) {
33355
33518
  function PolymarketPerpsPrefetch() {
33356
33519
  const { checkoutItem } = useCheckoutContext();
33357
33520
  const config = checkoutItem?.initSettings.config;
33358
- const inactiveConfig = useMemo46(
33521
+ const inactiveConfig = useMemo47(
33359
33522
  () => config ? resolveInactivePolymarketAccountConfig(config) : void 0,
33360
33523
  [config]
33361
33524
  );
@@ -33557,7 +33720,7 @@ import React193, {
33557
33720
  createContext as createContext15,
33558
33721
  useContext as useContext15,
33559
33722
  useEffect as useEffect59,
33560
- useMemo as useMemo47,
33723
+ useMemo as useMemo48,
33561
33724
  useRef as useRef36
33562
33725
  } from "react";
33563
33726
  var QuoteModeContext = createContext15(
@@ -33573,7 +33736,7 @@ function QuoteModeProvider({ children }) {
33573
33736
  const isStablecoin = useIsStablecoin();
33574
33737
  const config = checkoutItem?.initSettings.config;
33575
33738
  const hasPostAction = config ? isCheckoutPostActionRequired(config) : void 0;
33576
- const resolveQuoteBuilderParams = useMemo47(
33739
+ const resolveQuoteBuilderParams = useMemo48(
33577
33740
  () => ({
33578
33741
  hasPostAction,
33579
33742
  isExactInEnabled,
@@ -33589,7 +33752,7 @@ function QuoteModeProvider({ children }) {
33589
33752
  walletFlowEnableExactInputWithActions
33590
33753
  ]
33591
33754
  );
33592
- const builder = useMemo47(
33755
+ const builder = useMemo48(
33593
33756
  () => resolveQuoteBuilder(resolveQuoteBuilderParams),
33594
33757
  [resolveQuoteBuilderParams]
33595
33758
  );
@@ -33679,6 +33842,84 @@ function shouldShowApprovalMethodToggle({
33679
33842
  }
33680
33843
  return isPermitToggleGateOn;
33681
33844
  }
33845
+ function getIsAaveNativeSupplyFlow(checkoutItem, apiKey) {
33846
+ const sourceAssetInfo = checkoutItem?.selectedSourceAssetInfo;
33847
+ return checkoutItem != null && sourceAssetInfo?.address != null && isAaveNativeSupplyContext({
33848
+ apiKey,
33849
+ sourceAsset: {
33850
+ chainId: sourceAssetInfo.chainId,
33851
+ address: sourceAssetInfo.address
33852
+ },
33853
+ checkoutConfig: checkoutItem.initSettings.config
33854
+ });
33855
+ }
33856
+ function assertCheckedAmountWithinLimits(checkedAmount, t) {
33857
+ const QUOTE_CUSTOM_ERROR_DISPLAY_INFO = getQuoteCustomErrorDisplayInfo(t);
33858
+ if (checkedAmount.isAboveMaximum) {
33859
+ throw new Error(
33860
+ QUOTE_CUSTOM_ERROR_DISPLAY_INFO[2 /* INSUFFICIENT_BALANCE_POST_CHECK */].check
33861
+ );
33862
+ }
33863
+ if (checkedAmount.isBelowMinimum) {
33864
+ throw new Error(
33865
+ QUOTE_CUSTOM_ERROR_DISPLAY_INFO[3 /* INSUFFICIENT_AMOUNT_POST_CHECK */].check
33866
+ );
33867
+ }
33868
+ }
33869
+ function getProviderQuoteStepMessage(paymentMethodInfo, loginType, t) {
33870
+ const PENDING_QUOTE_MESSAGE_GENERATOR = getPendingQuoteMessageGenerator(t);
33871
+ return paymentMethodInfo.paymentMethod === PaymentMethod.ACCOUNT_BALANCE && loginType === "web3" /* Web3 */ ? PENDING_QUOTE_MESSAGE_GENERATOR[2 /* ESTIMATING_GAS */]() : PENDING_QUOTE_MESSAGE_GENERATOR[1 /* VERIFYING_PROVIDER */](
33872
+ paymentMethodInfo.title
33873
+ );
33874
+ }
33875
+ function getQuoteErrorResponse(error, checkedAmount, newCheckoutItem, quoteState) {
33876
+ if (checkedAmount?.isAboveMaximum) {
33877
+ const { maxTargetAssetAmount, minTargetAssetAmount } = checkedAmount;
33878
+ return {
33879
+ error: {
33880
+ maxTargetAssetAmount,
33881
+ minTargetAssetAmount,
33882
+ reason: "insufficientBalance"
33883
+ },
33884
+ shellCheckoutItemWithNextQuote: newCheckoutItem,
33885
+ quoteState,
33886
+ success: false
33887
+ };
33888
+ }
33889
+ if (checkedAmount?.isBelowMinimum) {
33890
+ const { maxTargetAssetAmount, minTargetAssetAmount } = checkedAmount;
33891
+ return {
33892
+ error: {
33893
+ maxTargetAssetAmount,
33894
+ minTargetAssetAmount,
33895
+ reason: "insufficientAmount"
33896
+ },
33897
+ shellCheckoutItemWithNextQuote: newCheckoutItem,
33898
+ quoteState,
33899
+ success: false
33900
+ };
33901
+ }
33902
+ const insufficientAmountMatch = error.message.match(
33903
+ /target token must be at least \$(\d+(\.\d+)?)/i
33904
+ );
33905
+ if (insufficientAmountMatch?.[1]) {
33906
+ return {
33907
+ error: {
33908
+ minTargetUsdAmount: Number.parseFloat(insufficientAmountMatch[1]),
33909
+ reason: "insufficientAmount"
33910
+ },
33911
+ shellCheckoutItemWithNextQuote: newCheckoutItem,
33912
+ quoteState,
33913
+ success: false
33914
+ };
33915
+ }
33916
+ return {
33917
+ error: { originalError: error, reason: "internal" },
33918
+ shellCheckoutItemWithNextQuote: newCheckoutItem,
33919
+ quoteState,
33920
+ success: false
33921
+ };
33922
+ }
33682
33923
  function FunkitQuoteProvider({ children }) {
33683
33924
  const { t } = useFunkitTranslation();
33684
33925
  const { logMeasuredEvent, startMeasuredEvent } = useTrack();
@@ -33701,15 +33942,10 @@ function FunkitQuoteProvider({ children }) {
33701
33942
  const paymentMethod = checkoutItem?.selectedPaymentMethodInfo?.paymentMethod;
33702
33943
  const supplyAmountBaseUnits = checkoutItem?.inputTokenAmountBaseUnits ?? null;
33703
33944
  const targetAssetAllowanceCoversAmount = targetAssetPoolAllowance !== void 0 && supplyAmountBaseUnits !== null && supplyAmountBaseUnits > 0n && targetAssetPoolAllowance >= supplyAmountBaseUnits;
33704
- const sourceAssetInfo = checkoutItem?.selectedSourceAssetInfo;
33705
- const isAaveNativeSupplyFlow = checkoutItem != null && sourceAssetInfo?.address != null && isAaveNativeSupplyContext({
33706
- apiKey: funkitConfig.apiKey,
33707
- sourceAsset: {
33708
- chainId: sourceAssetInfo.chainId,
33709
- address: sourceAssetInfo.address
33710
- },
33711
- checkoutConfig: checkoutItem.initSettings.config
33712
- });
33945
+ const isAaveNativeSupplyFlow = getIsAaveNativeSupplyFlow(
33946
+ checkoutItem,
33947
+ funkitConfig.apiKey
33948
+ );
33713
33949
  const showApprovalMethodToggle = shouldShowApprovalMethodToggle({
33714
33950
  isPermitToggleGateOn,
33715
33951
  isAccountBalancePayment: paymentMethod === PaymentMethod.ACCOUNT_BALANCE,
@@ -33788,9 +34024,8 @@ function FunkitQuoteProvider({ children }) {
33788
34024
  );
33789
34025
  logMeasuredEvent(baseQuoteEvent);
33790
34026
  if (!disableInformationStreaming) {
33791
- const PENDING_QUOTE_MESSAGE_GENERATOR2 = getPendingQuoteMessageGenerator(t);
33792
34027
  setQuoteStepMessage(
33793
- paymentMethodInfo.paymentMethod === PaymentMethod.ACCOUNT_BALANCE && loginType === "web3" /* Web3 */ ? PENDING_QUOTE_MESSAGE_GENERATOR2[2 /* ESTIMATING_GAS */]() : PENDING_QUOTE_MESSAGE_GENERATOR2[1 /* VERIFYING_PROVIDER */](paymentMethodInfo.title)
34028
+ getProviderQuoteStepMessage(paymentMethodInfo, loginType, t)
33794
34029
  );
33795
34030
  }
33796
34031
  const newFinalDollarValue = baseQuote.estSubtotalUsd;
@@ -33830,18 +34065,7 @@ function FunkitQuoteProvider({ children }) {
33830
34065
  walletAddress,
33831
34066
  brokerage
33832
34067
  );
33833
- const QUOTE_CUSTOM_ERROR_DISPLAY_INFO = getQuoteCustomErrorDisplayInfo(t);
33834
- if (checkedAmount.isAboveMaximum) {
33835
- throw new Error(
33836
- QUOTE_CUSTOM_ERROR_DISPLAY_INFO[2 /* INSUFFICIENT_BALANCE_POST_CHECK */].check
33837
- );
33838
- }
33839
- if (checkedAmount.isBelowMinimum) {
33840
- throw new Error(
33841
- QUOTE_CUSTOM_ERROR_DISPLAY_INFO[3 /* INSUFFICIENT_AMOUNT_POST_CHECK */].check
33842
- );
33843
- }
33844
- const PENDING_QUOTE_MESSAGE_GENERATOR = getPendingQuoteMessageGenerator(t);
34068
+ assertCheckedAmountWithinLimits(checkedAmount, t);
33845
34069
  return {
33846
34070
  shellCheckoutItemWithNextQuote: {
33847
34071
  ...newCheckoutItem,
@@ -33850,7 +34074,7 @@ function FunkitQuoteProvider({ children }) {
33850
34074
  quoteState: {
33851
34075
  latestQuote: finalEstimation,
33852
34076
  isQuoting: false,
33853
- quoteStepMessage: !disableInformationStreaming ? paymentMethodInfo.paymentMethod === PaymentMethod.ACCOUNT_BALANCE && loginType === "web3" /* Web3 */ ? PENDING_QUOTE_MESSAGE_GENERATOR[2 /* ESTIMATING_GAS */]() : PENDING_QUOTE_MESSAGE_GENERATOR[1 /* VERIFYING_PROVIDER */](paymentMethodInfo.title) : "",
34077
+ quoteStepMessage: !disableInformationStreaming ? getProviderQuoteStepMessage(paymentMethodInfo, loginType, t) : "",
33854
34078
  quoteError: null
33855
34079
  },
33856
34080
  success: true
@@ -33874,52 +34098,12 @@ function FunkitQuoteProvider({ children }) {
33874
34098
  setQuoteProgress({ isQuoting: isQuoting2, quoteError: quoteError3, quoteStepMessage: quoteStepMessage2 });
33875
34099
  setLatestQuote(quoteState.latestQuote);
33876
34100
  }
33877
- if (checkedAmount?.isAboveMaximum) {
33878
- const { maxTargetAssetAmount, minTargetAssetAmount } = checkedAmount;
33879
- return {
33880
- error: {
33881
- maxTargetAssetAmount,
33882
- minTargetAssetAmount,
33883
- reason: "insufficientBalance"
33884
- },
33885
- shellCheckoutItemWithNextQuote: newCheckoutItem,
33886
- quoteState,
33887
- success: false
33888
- };
33889
- }
33890
- if (checkedAmount?.isBelowMinimum) {
33891
- const { maxTargetAssetAmount, minTargetAssetAmount } = checkedAmount;
33892
- return {
33893
- error: {
33894
- maxTargetAssetAmount,
33895
- minTargetAssetAmount,
33896
- reason: "insufficientAmount"
33897
- },
33898
- shellCheckoutItemWithNextQuote: newCheckoutItem,
33899
- quoteState,
33900
- success: false
33901
- };
33902
- }
33903
- const insufficientAmountMatch = error.message.match(
33904
- /target token must be at least \$(\d+(\.\d+)?)/i
34101
+ return getQuoteErrorResponse(
34102
+ error,
34103
+ checkedAmount,
34104
+ newCheckoutItem,
34105
+ quoteState
33905
34106
  );
33906
- if (insufficientAmountMatch?.[1]) {
33907
- return {
33908
- error: {
33909
- minTargetUsdAmount: Number.parseFloat(insufficientAmountMatch[1]),
33910
- reason: "insufficientAmount"
33911
- },
33912
- shellCheckoutItemWithNextQuote: newCheckoutItem,
33913
- quoteState,
33914
- success: false
33915
- };
33916
- }
33917
- return {
33918
- error: { originalError: error, reason: "internal" },
33919
- shellCheckoutItemWithNextQuote: newCheckoutItem,
33920
- quoteState,
33921
- success: false
33922
- };
33923
34107
  }
33924
34108
  }
33925
34109
  );
@@ -34441,7 +34625,7 @@ function CheckoutModalPrefetchedHooks() {
34441
34625
 
34442
34626
  // src/modals/CheckoutModal/TransferToken/CheckoutNotifications.tsx
34443
34627
  import clsx23 from "clsx";
34444
- import React201, { useCallback as useCallback48, useEffect as useEffect67, useMemo as useMemo48, useState as useState60 } from "react";
34628
+ import React201, { useCallback as useCallback48, useEffect as useEffect67, useMemo as useMemo49, useState as useState60 } from "react";
34445
34629
 
34446
34630
  // src/components/FunNotificationBanner/FunNotificationShowMoreButton.tsx
34447
34631
  import React196 from "react";
@@ -34863,6 +35047,38 @@ var statusIconMap = {
34863
35047
  failed: pendingIcon,
34864
35048
  expired: errorIcon
34865
35049
  };
35050
+ var StatusIconWrapper = ({
35051
+ statusRef
35052
+ }) => /* @__PURE__ */ React197.createElement(
35053
+ Box,
35054
+ {
35055
+ className: clsx21(
35056
+ statusIconWrapper,
35057
+ generateAnimationPrefixClassName("icon-wrapper")
35058
+ ),
35059
+ width: "20",
35060
+ height: "20"
35061
+ },
35062
+ /* @__PURE__ */ React197.createElement(Box, { className: clsx21(statusIcon) }, Object.entries(statusIconMap).map(([key, value]) => /* @__PURE__ */ React197.createElement(
35063
+ "div",
35064
+ {
35065
+ key,
35066
+ className: generateAnimationPrefixClassName(`icon-wrapper-${key}`),
35067
+ style: {
35068
+ // referencing status in the ref rather than the prop to keep the status in the ref for the whole lifecycle
35069
+ opacity: statusRef.current === key ? 1 : 0,
35070
+ position: "absolute",
35071
+ top: 0,
35072
+ bottom: 0,
35073
+ left: 0,
35074
+ right: 0,
35075
+ width: "100%",
35076
+ height: "100%"
35077
+ }
35078
+ },
35079
+ value
35080
+ )))
35081
+ );
34866
35082
  var FunNotificationBannerIcon = ({
34867
35083
  status,
34868
35084
  iconUrl,
@@ -35096,38 +35312,7 @@ var FunNotificationBannerIcon = ({
35096
35312
  src: iconUrl ?? void 0,
35097
35313
  fallbackSrc: fallbackIconUrl
35098
35314
  }
35099
- )), statusRef.current && /* @__PURE__ */ React197.createElement(
35100
- Box,
35101
- {
35102
- className: clsx21(
35103
- statusIconWrapper,
35104
- generateAnimationPrefixClassName("icon-wrapper")
35105
- ),
35106
- width: "20",
35107
- height: "20"
35108
- },
35109
- /* @__PURE__ */ React197.createElement(Box, { className: clsx21(statusIcon) }, Object.entries(statusIconMap).map(([key, value]) => /* @__PURE__ */ React197.createElement(
35110
- "div",
35111
- {
35112
- key,
35113
- className: generateAnimationPrefixClassName(
35114
- `icon-wrapper-${key}`
35115
- ),
35116
- style: {
35117
- // referencing status in the ref rather than the prop to keep the status in the ref for the whole lifecycle
35118
- opacity: statusRef.current === key ? 1 : 0,
35119
- position: "absolute",
35120
- top: 0,
35121
- bottom: 0,
35122
- left: 0,
35123
- right: 0,
35124
- width: "100%",
35125
- height: "100%"
35126
- }
35127
- },
35128
- value
35129
- )))
35130
- ));
35315
+ )), statusRef.current && /* @__PURE__ */ React197.createElement(StatusIconWrapper, { statusRef }));
35131
35316
  };
35132
35317
 
35133
35318
  // src/components/FunNotificationBanner/FunNotificationBanner.tsx
@@ -36523,7 +36708,7 @@ var CheckoutNotifications = ({
36523
36708
  const [closedNotifications, setClosedNotifications] = useState60([]);
36524
36709
  const { data: checkouts } = useRecentCheckouts({ isVisible });
36525
36710
  const { data: directExecutions } = useRecentDeposits({ isVisible });
36526
- const mergedDirectExecutions = useMemo48(
36711
+ const mergedDirectExecutions = useMemo49(
36527
36712
  () => processRecentDepositsForNotifications(directExecutions, {
36528
36713
  variant
36529
36714
  }),
@@ -36541,7 +36726,7 @@ var CheckoutNotifications = ({
36541
36726
  }
36542
36727
  setInitialDirectExecutions(directExecutions);
36543
36728
  }, [initialDirectExecutions, directExecutions]);
36544
- const displayedDirectExecutions = useMemo48(() => {
36729
+ const displayedDirectExecutions = useMemo49(() => {
36545
36730
  if (!mergedDirectExecutions || !initialDirectExecutions) {
36546
36731
  return [];
36547
36732
  }
@@ -36553,13 +36738,13 @@ var CheckoutNotifications = ({
36553
36738
  return !closedNotifications.includes(notificationKey);
36554
36739
  }).slice(0, MAX_COUNT);
36555
36740
  }, [initialDirectExecutions, mergedDirectExecutions, closedNotifications]);
36556
- const displayedCheckouts = useMemo48(() => {
36741
+ const displayedCheckouts = useMemo49(() => {
36557
36742
  if (!checkouts || !initialCheckouts) {
36558
36743
  return [];
36559
36744
  }
36560
36745
  return getUpdatedCheckouts(checkouts, initialCheckouts).filter(({ depositAddr }) => !closedNotifications.includes(depositAddr)).slice(0, MAX_COUNT);
36561
36746
  }, [initialCheckouts, checkouts, closedNotifications]);
36562
- const combinedNotifications = useMemo48(() => {
36747
+ const combinedNotifications = useMemo49(() => {
36563
36748
  return [
36564
36749
  ...displayedDirectExecutions.map(
36565
36750
  (item) => ({ ...item, isDirectExecution: true })
@@ -36582,7 +36767,7 @@ var CheckoutNotifications = ({
36582
36767
  );
36583
36768
  }
36584
36769
  }, [checkoutItem, combinedNotifications, isVisible]);
36585
- const displayedNotifications = useMemo48(() => {
36770
+ const displayedNotifications = useMemo49(() => {
36586
36771
  return isExpanded ? combinedNotifications : combinedNotifications.slice(0, COLLAPSED_COUNT);
36587
36772
  }, [isExpanded, combinedNotifications]);
36588
36773
  const handleNotificationClose = (id) => setClosedNotifications((prev) => [...prev, id]);
@@ -36958,6 +37143,11 @@ function PerpsHeaderTabs({
36958
37143
  return /* @__PURE__ */ React203.createElement(PerpsHeaderTabsView, { ...tabsState });
36959
37144
  }
36960
37145
 
37146
+ // src/modals/CheckoutModal/isSourceChangeLike.ts
37147
+ function isSourceChangeLike({ step }, startingStep) {
37148
+ return step === "source_change" /* SOURCE_CHANGE */ || step === "loading_account" /* LOADING_ACCOUNT */ && startingStep !== "confirmation" /* CONFIRMATION */ && startingStep !== "select_asset" /* SELECT_ASSET */;
37149
+ }
37150
+
36961
37151
  // src/modals/CheckoutModal/isWithdrawalStep.ts
36962
37152
  function isWithdrawalStep(modalState) {
36963
37153
  return modalState.step === "withdrawal_enter_amount" /* WITHDRAWAL_ENTER_AMOUNT */ || modalState.step === "withdrawal_complete" /* WITHDRAWAL_COMPLETE */ || modalState.step === "source_change" /* SOURCE_CHANGE */ && modalState.paymentMethodTypeFilter === "withdraw" && !!modalState.withdrawalConfig;
@@ -36991,11 +37181,11 @@ import {
36991
37181
  } from "react";
36992
37182
 
36993
37183
  // src/hooks/useCheckoutQuoteNotification.ts
36994
- import { useMemo as useMemo49 } from "react";
37184
+ import { useMemo as useMemo50 } from "react";
36995
37185
  function useCheckoutQuoteNotification() {
36996
37186
  const { clearCheckoutQuoteMessages } = useQuoteContext();
36997
37187
  const { quoteError, quoteStepMessage } = useQuoteContext();
36998
- const quoteNotification = useMemo49(() => {
37188
+ const quoteNotification = useMemo50(() => {
36999
37189
  if (quoteError) {
37000
37190
  return {
37001
37191
  messageType: "error",
@@ -39416,7 +39606,7 @@ import React234 from "react";
39416
39606
 
39417
39607
  // src/modals/CheckoutModal/Brokerage/components/BrokerageSuccess.tsx
39418
39608
  import { capitalizeFirstLetter } from "@funkit/utils";
39419
- import React233, { useMemo as useMemo50 } from "react";
39609
+ import React233, { useMemo as useMemo51 } from "react";
39420
39610
  var BrokerageSuccess = ({
39421
39611
  bottomBarId,
39422
39612
  onClose,
@@ -39424,7 +39614,7 @@ var BrokerageSuccess = ({
39424
39614
  }) => {
39425
39615
  const { t } = useFunkitTranslation();
39426
39616
  const { exchangeType } = useBluvo();
39427
- const customTextConfigSteps = useMemo50(() => {
39617
+ const customTextConfigSteps = useMemo51(() => {
39428
39618
  if (exchangeType) {
39429
39619
  return {
39430
39620
  ...getDefaultTextConfigSteps(t),
@@ -39624,7 +39814,7 @@ var FunTwoFaInput = ({
39624
39814
  inputRefs.current[focusIndex]?.focus();
39625
39815
  ensureFocus(focusIndex);
39626
39816
  };
39627
- const getBorderColor2 = () => {
39817
+ const getBorderColor3 = () => {
39628
39818
  if (hasError) {
39629
39819
  return { base: "error" };
39630
39820
  }
@@ -39644,7 +39834,7 @@ var FunTwoFaInput = ({
39644
39834
  fontWeight: "medium",
39645
39835
  borderStyle: "solid",
39646
39836
  borderWidth: "1",
39647
- borderColor: getBorderColor2(),
39837
+ borderColor: getBorderColor3(),
39648
39838
  borderRadius: "10",
39649
39839
  cursor: isFocused ? "default" : "pointer",
39650
39840
  style: { overflowX: "auto" },
@@ -40724,7 +40914,7 @@ function CheckoutComplete({
40724
40914
 
40725
40915
  // src/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.tsx
40726
40916
  import * as dnum9 from "dnum";
40727
- import React258, { useEffect as useEffect77, useMemo as useMemo55, useState as useState78 } from "react";
40917
+ import React258, { useEffect as useEffect77, useMemo as useMemo56, useState as useState78 } from "react";
40728
40918
  import { createPortal as createPortal16 } from "react-dom";
40729
40919
 
40730
40920
  // src/providers/UserPresenceContext.tsx
@@ -40795,7 +40985,7 @@ import {
40795
40985
  } from "@funkit/utils";
40796
40986
  import NumberFlow from "@number-flow/react";
40797
40987
  import { motion as motion15 } from "motion/react";
40798
- import React246, { useMemo as useMemo51 } from "react";
40988
+ import React246, { useMemo as useMemo52 } from "react";
40799
40989
  import { LIGHTER_CHAIN_ID } from "@funkit/chains";
40800
40990
 
40801
40991
  // src/consts/design.ts
@@ -40860,7 +41050,7 @@ function PaymentAmountSummary({
40860
41050
  const feeBreakdown = quote?.baseQuote.metadata?.feeBreakdown;
40861
41051
  return checkoutConfig?.generateActionsParams ? feeBreakdown?.swapImpact || 0 : 0;
40862
41052
  })();
40863
- const receiveTokenUsdAmount = useMemo51(() => {
41053
+ const receiveTokenUsdAmount = useMemo52(() => {
40864
41054
  if (!quote) {
40865
41055
  return void 0;
40866
41056
  }
@@ -41501,11 +41691,11 @@ import React253 from "react";
41501
41691
 
41502
41692
  // src/components/AnimatedDollarValue/AnimatedDollarValue.tsx
41503
41693
  import NumberFlow2 from "@number-flow/react";
41504
- import React251, { forwardRef as forwardRef5, useMemo as useMemo52 } from "react";
41694
+ import React251, { forwardRef as forwardRef5, useMemo as useMemo53 } from "react";
41505
41695
  var AnimatedDollarValue = forwardRef5((props, ref) => {
41506
41696
  const { value, dynamicMinFractionDigits, ...restProps } = props;
41507
41697
  const minimumFractionDigits = typeof value === "number" && !Number.isInteger(value) || !dynamicMinFractionDigits ? 2 : 0;
41508
- const formatOptions = useMemo52(
41698
+ const formatOptions = useMemo53(
41509
41699
  () => ({
41510
41700
  style: "currency",
41511
41701
  currency: "USD",
@@ -41645,7 +41835,7 @@ function CheckoutPrimaryInfo({
41645
41835
  }
41646
41836
 
41647
41837
  // src/modals/CheckoutModal/ConfirmationStep/DisclaimerText.tsx
41648
- import React254, { useMemo as useMemo53 } from "react";
41838
+ import React254, { useMemo as useMemo54 } from "react";
41649
41839
  var FunLinkButtonComponent = ({
41650
41840
  children,
41651
41841
  href
@@ -41691,7 +41881,7 @@ var DisclaimerText = ({
41691
41881
  };
41692
41882
  function useCardDisclaimer(checkoutItem, finalConvertedAssetName) {
41693
41883
  const { t } = useFunkitTranslation();
41694
- const cardDisclaimer = useMemo53(() => {
41884
+ const cardDisclaimer = useMemo54(() => {
41695
41885
  if (!checkoutItem || !finalConvertedAssetName) {
41696
41886
  return null;
41697
41887
  }
@@ -42259,7 +42449,7 @@ function usePostCheckout({
42259
42449
  }
42260
42450
 
42261
42451
  // src/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.ts
42262
- import { useCallback as useCallback59, useEffect as useEffect75, useMemo as useMemo54, useRef as useRef46, useState as useState77 } from "react";
42452
+ import { useCallback as useCallback59, useEffect as useEffect75, useMemo as useMemo55, useRef as useRef46, useState as useState77 } from "react";
42263
42453
 
42264
42454
  // src/hooks/useCountdown.tsx
42265
42455
  import React257 from "react";
@@ -42546,7 +42736,7 @@ function useQuoteRefresh({
42546
42736
  },
42547
42737
  [isOnHold, restartCountdown, setCheckoutQuote, triggerAssetConfirm]
42548
42738
  );
42549
- const quoteError = useMemo54(() => {
42739
+ const quoteError = useMemo55(() => {
42550
42740
  if (contextQuoteError && !isQuoting) {
42551
42741
  return {
42552
42742
  ...contextQuoteError,
@@ -42855,7 +43045,7 @@ function ConfirmationStep({
42855
43045
  flow: "deposit",
42856
43046
  step: "confirmation" /* CONFIRMATION */
42857
43047
  });
42858
- const stepMessage = useMemo55(() => {
43048
+ const stepMessage = useMemo56(() => {
42859
43049
  if (initialQuoteStep) {
42860
43050
  return initialQuoteStep;
42861
43051
  }
@@ -42976,7 +43166,7 @@ function ConfirmationStep({
42976
43166
  };
42977
43167
  const isStepLoading = isInitialQuoting || isContinuing || isRefreshing || aaveSupply.isPending || nadoDirectTransfer.isPending;
42978
43168
  const customRecipient = checkoutItem?.initSettings.config.customRecipient;
42979
- const displayAmounts = useMemo55(() => {
43169
+ const displayAmounts = useMemo56(() => {
42980
43170
  if (!latestQuote || !checkoutConfig?.targetAssetAmount) {
42981
43171
  return null;
42982
43172
  }
@@ -42992,7 +43182,7 @@ function ConfirmationStep({
42992
43182
  quoteBuilder
42993
43183
  ]);
42994
43184
  const supplyHumanAmount = displayAmounts?.receiveAmount ?? (checkoutConfig?.targetAssetAmount != null ? String(checkoutConfig.targetAssetAmount) : null);
42995
- const resolveHealthFactor = useMemo55(
43185
+ const resolveHealthFactor = useMemo56(
42996
43186
  () => wrapResolveHealthFactor(checkoutConfig?.resolveHealthFactor),
42997
43187
  [checkoutConfig?.resolveHealthFactor]
42998
43188
  );
@@ -43006,7 +43196,7 @@ function ConfirmationStep({
43006
43196
  const resolveDestinationLineItems = checkoutConfig?.resolveDestinationLineItems;
43007
43197
  const targetHumanAmount = displayAmounts?.receiveAmount ?? (isExactIn ? null : supplyHumanAmount);
43008
43198
  const sourceAssetInfo = checkoutItem?.selectedSourceAssetInfo;
43009
- const destinationLineItems = useMemo55(() => {
43199
+ const destinationLineItems = useMemo56(() => {
43010
43200
  if (!resolveDestinationLineItems || !targetHumanAmount) {
43011
43201
  return null;
43012
43202
  }
@@ -43372,7 +43562,7 @@ import {
43372
43562
  } from "@funkit/utils";
43373
43563
  import * as dnum11 from "dnum";
43374
43564
  import { motion as motion17 } from "motion/react";
43375
- import React271, { useEffect as useEffect80, useMemo as useMemo59, useState as useState80 } from "react";
43565
+ import React271, { useEffect as useEffect80, useMemo as useMemo60, useState as useState80 } from "react";
43376
43566
 
43377
43567
  // src/components/AnimatedWidthWrapper/AnimatedWidthWrapper.tsx
43378
43568
  import { motion as motion16 } from "motion/react";
@@ -43415,7 +43605,7 @@ function AnimatedWidthWrapper({ children }) {
43415
43605
  }
43416
43606
 
43417
43607
  // src/components/ApprovalMethodToggle/ApprovalMethodToggle.tsx
43418
- import React260, { useCallback as useCallback61, useMemo as useMemo56, useRef as useRef49 } from "react";
43608
+ import React260, { useCallback as useCallback61, useMemo as useMemo57, useRef as useRef49 } from "react";
43419
43609
  function ApprovalMethodToggle({
43420
43610
  value,
43421
43611
  onChange,
@@ -43424,7 +43614,7 @@ function ApprovalMethodToggle({
43424
43614
  }) {
43425
43615
  const { t } = useFunkitTranslation();
43426
43616
  const tooltipAnchorRef = useRef49(null);
43427
- const options = useMemo56(
43617
+ const options = useMemo57(
43428
43618
  () => [
43429
43619
  { label: t("approvalMethodToggle.signedMessage"), value: "sign" },
43430
43620
  {
@@ -44664,7 +44854,7 @@ var useCheckoutAmountLimits = ({
44664
44854
  };
44665
44855
 
44666
44856
  // src/modals/CheckoutModal/InputAmount/useAmountInput.ts
44667
- import { useCallback as useCallback62, useMemo as useMemo57, useReducer as useReducer3, useRef as useRef50 } from "react";
44857
+ import { useCallback as useCallback62, useMemo as useMemo58, useReducer as useReducer3, useRef as useRef50 } from "react";
44668
44858
 
44669
44859
  // src/modals/CheckoutModal/InputAmount/state.ts
44670
44860
  import { isTokenEquivalent as isTokenEquivalent11, round as round3 } from "@funkit/utils";
@@ -45444,7 +45634,7 @@ function useAmountInput(options) {
45444
45634
  quickOptions,
45445
45635
  paymentMethodInfo
45446
45636
  } = options;
45447
- const derivedState = useMemo57(
45637
+ const derivedState = useMemo58(
45448
45638
  () => getDerivedState(state, checkoutConfig.targetAssetTicker),
45449
45639
  [state, checkoutConfig]
45450
45640
  );
@@ -45856,7 +46046,7 @@ import {
45856
46046
  useQuery as useQuery22,
45857
46047
  useQueryClient as useQueryClient5
45858
46048
  } from "@tanstack/react-query";
45859
- import { useEffect as useEffect79, useMemo as useMemo58 } from "react";
46049
+ import { useEffect as useEffect79, useMemo as useMemo59 } from "react";
45860
46050
  import { useDebounce as useDebounce2 } from "use-debounce";
45861
46051
  var DEBOUNCE_DELAY = 500;
45862
46052
  var COUNTDOWN_INTERVAL_SEC = 60;
@@ -45872,7 +46062,7 @@ var useMeldQuotes = (sourceAmount, fiatCurrency, meldEnabled = true) => {
45872
46062
  const checkoutId = checkoutItem?.id ?? null;
45873
46063
  const destinationCurrencyCode = useMeldCryptoCurrencyCode();
45874
46064
  const sourceCurrencyCode = fiatCurrency || "USD";
45875
- const queryKey = useMemo58(
46065
+ const queryKey = useMemo59(
45876
46066
  () => [
45877
46067
  "meld",
45878
46068
  "quotes",
@@ -46252,7 +46442,7 @@ function InputAmountLoaded({
46252
46442
  fiatCurrency,
46253
46443
  onNext
46254
46444
  });
46255
- const error = useMemo59(() => {
46445
+ const error = useMemo60(() => {
46256
46446
  if (isCardCheckout) {
46257
46447
  const meldError = getMeldError();
46258
46448
  if (meldError) {
@@ -46751,7 +46941,7 @@ function YouPayYouReceiveWrapper({
46751
46941
 
46752
46942
  // src/modals/CheckoutModal/InputAmount/InputAmountLoading.tsx
46753
46943
  import { formatCryptoAndStringify as formatCryptoAndStringify9 } from "@funkit/utils";
46754
- import React272, { useMemo as useMemo60 } from "react";
46944
+ import React272, { useMemo as useMemo61 } from "react";
46755
46945
  function InputAmountLoading({
46756
46946
  modalState,
46757
46947
  sourceHoldingError,
@@ -46774,7 +46964,7 @@ function InputAmountLoading({
46774
46964
  isExactIn,
46775
46965
  sourceTokenSymbol: sourceAsset?.symbol
46776
46966
  });
46777
- const error = useMemo60(() => {
46967
+ const error = useMemo61(() => {
46778
46968
  if (sourceHoldingError) {
46779
46969
  return {
46780
46970
  code: "BALANCE_UNAVAILABLE",
@@ -46886,7 +47076,7 @@ function getLoadingAmountOptions(paymentMethod) {
46886
47076
  }
46887
47077
 
46888
47078
  // src/modals/CheckoutModal/InputAmount/useAvailableBalanceForCheckout.ts
46889
- import { useMemo as useMemo61 } from "react";
47079
+ import { useMemo as useMemo62 } from "react";
46890
47080
  function useAvailableBalanceForCheckout(paymentMethodInfo, targetChainId, assetChainId, assetSymbol) {
46891
47081
  const paymentMethod = paymentMethodInfo.paymentMethod;
46892
47082
  const isBrokerage = paymentMethod === PaymentMethod.BROKERAGE;
@@ -46903,7 +47093,7 @@ function useAvailableBalanceForCheckout(paymentMethodInfo, targetChainId, assetC
46903
47093
  [PaymentMethod.VIRTUAL_BANK]: null
46904
47094
  }[paymentMethod];
46905
47095
  const isLoading = isBrokerage ? isLoadingBrokerageBalance : isLoadingWalletAssetHoldings;
46906
- const holdingItem = useMemo61(() => {
47096
+ const holdingItem = useMemo62(() => {
46907
47097
  if (!assetSymbol || !holdings) {
46908
47098
  return;
46909
47099
  }
@@ -47772,7 +47962,7 @@ var CheckoutTopAnnouncementBanner = () => {
47772
47962
  };
47773
47963
 
47774
47964
  // src/hooks/usePaymentMethodTabs.ts
47775
- import { useMemo as useMemo62 } from "react";
47965
+ import { useMemo as useMemo63 } from "react";
47776
47966
  function usePaymentMethodTabs({
47777
47967
  isCashier
47778
47968
  }) {
@@ -47782,7 +47972,7 @@ function usePaymentMethodTabs({
47782
47972
  );
47783
47973
  const isWithdrawalTabEnabled = useDynamicConfig("enablecashierformfactor") && isCashier;
47784
47974
  const defaultTab = isSavedCardDefaultsToFiatTabEnabled && hasSavedFops ? "fiat" : "crypto";
47785
- const tabOrder = useMemo62(() => {
47975
+ const tabOrder = useMemo63(() => {
47786
47976
  const tabs2 = [];
47787
47977
  if (defaultTab === "fiat") {
47788
47978
  tabs2.push("fiat", "crypto");
@@ -48366,7 +48556,7 @@ function LoadingAccount({
48366
48556
 
48367
48557
  // src/modals/CheckoutModal/MeldCurrencySelect/MeldCurrencySelect.tsx
48368
48558
  import clsx26 from "clsx";
48369
- import React286, { useMemo as useMemo63, useState as useState83 } from "react";
48559
+ import React286, { useMemo as useMemo64, useState as useState83 } from "react";
48370
48560
 
48371
48561
  // src/modals/CheckoutModal/MeldCurrencySelect/currenciesWithMultipleCountries.ts
48372
48562
  var currenciesWithMultipleCountries = {
@@ -48427,7 +48617,7 @@ function MeldCurrencySelect({
48427
48617
  const [selectedCurrency, setSelectedCurrency] = useState83(
48428
48618
  defaultCurrency
48429
48619
  );
48430
- const filteredOptions = useMemo63(() => {
48620
+ const filteredOptions = useMemo64(() => {
48431
48621
  const newOptions = data?.filter(
48432
48622
  ({ name, currencyCode }) => currencyCode.toLowerCase().includes(query.toLowerCase()) || name.toLowerCase().includes(query.toLowerCase())
48433
48623
  ) ?? [];
@@ -48632,14 +48822,14 @@ import { isTokenEquivalent as isTokenEquivalent13 } from "@funkit/utils";
48632
48822
  import React292, {
48633
48823
  useEffect as useEffect85,
48634
48824
  useLayoutEffect as useLayoutEffect2,
48635
- useMemo as useMemo65,
48825
+ useMemo as useMemo66,
48636
48826
  useState as useState84
48637
48827
  } from "react";
48638
48828
  import { createPortal as createPortal21 } from "react-dom";
48639
48829
  import { mainnet as mainnet13 } from "viem/chains";
48640
48830
 
48641
48831
  // src/hooks/useDynamicRoutes.ts
48642
- import { useMemo as useMemo64 } from "react";
48832
+ import { useMemo as useMemo65 } from "react";
48643
48833
  import { DYNAMIC_ROUTES, initDynamicRouting } from "@funkit/fun-relay";
48644
48834
  var toMutable = (obj) => {
48645
48835
  return obj;
@@ -48649,7 +48839,7 @@ var useDynamicRoutes = (_dynamicRoutingId) => {
48649
48839
  const { checkoutItem } = useCheckoutContext();
48650
48840
  const config = checkoutItem?.initSettings.config;
48651
48841
  const dynamicRoutingId = _dynamicRoutingId || config?.dynamicRoutingId;
48652
- const findPath = useMemo64(() => {
48842
+ const findPath = useMemo65(() => {
48653
48843
  if (!dynamicRoutingId) {
48654
48844
  return () => null;
48655
48845
  }
@@ -48895,7 +49085,7 @@ function useEnrichedAccountHoldings({
48895
49085
  const minTransferLimits = useDynamicConfig("mintokentransfervalue");
48896
49086
  const isDynamicRoutingEnabled = useIsDynamicRoutingEnabled();
48897
49087
  const isNadoDirectTransferSource = useIsNadoDirectTransferSource();
48898
- const enrichedAccountHoldings = useMemo65(() => {
49088
+ const enrichedAccountHoldings = useMemo66(() => {
48899
49089
  if (!checkoutConfig) {
48900
49090
  return [];
48901
49091
  }
@@ -48958,7 +49148,7 @@ function useAssetOptions({
48958
49148
  const { t } = useFunkitTranslation();
48959
49149
  const { findPath } = useDynamicRoutes();
48960
49150
  const isNadoDirectTransferSource = useIsNadoDirectTransferSource();
48961
- const assetOptions = useMemo65(() => {
49151
+ const assetOptions = useMemo66(() => {
48962
49152
  return enrichedAccountHoldings.map(({ asset, usableForCheckout }) => {
48963
49153
  const { isUsable, reason } = usableForCheckout;
48964
49154
  const isKnown = isKnownAsset(asset);
@@ -49023,6 +49213,22 @@ function useAssetOptions({
49023
49213
  ]);
49024
49214
  return assetOptions;
49025
49215
  }
49216
+ function getDefaultChainTokenSymbol(assetOptions, selectedSourceAssetInfo) {
49217
+ if (selectedSourceAssetInfo?.symbol) {
49218
+ const key = combineChainSymbolOrAddress({
49219
+ chainId: selectedSourceAssetInfo.chainId,
49220
+ symbolOrAddress: selectedSourceAssetInfo.symbol
49221
+ });
49222
+ const option = assetOptions.find(
49223
+ (option2) => option2.asset.chainSymbolKey === key
49224
+ );
49225
+ if (option && !option.isDisabled) {
49226
+ return key;
49227
+ }
49228
+ }
49229
+ const usableOptions = assetOptions.filter((option) => !option.isDisabled);
49230
+ return usableOptions[0]?.asset.chainSymbolKey;
49231
+ }
49026
49232
  function useScrollToSelectedAsset(selectedChainTokenSymbol) {
49027
49233
  const rootNode = useRootNode();
49028
49234
  useEffect85(() => {
@@ -49067,7 +49273,7 @@ function AccountSelectAsset({
49067
49273
  const { setSelectedBrokerageAsset } = useFunkitBrokerageContext();
49068
49274
  const [explicitlySelectedChainTokenSymbol, setSelectedChainTokenSymbol] = useState84("");
49069
49275
  const checkoutConfig = checkoutItem?.initSettings.config;
49070
- const defaultTargetAsset = useMemo65(
49276
+ const defaultTargetAsset = useMemo66(
49071
49277
  () => getDefaultDynamicTargetAsset(checkoutConfig),
49072
49278
  [checkoutConfig]
49073
49279
  );
@@ -49172,23 +49378,12 @@ function AccountSelectAsset({
49172
49378
  });
49173
49379
  onFinish();
49174
49380
  });
49175
- const defaultSelectedChainTokenSymbol = useMemo65(() => {
49176
- if (checkoutItem?.selectedSourceAssetInfo.symbol) {
49177
- const key = combineChainSymbolOrAddress({
49178
- chainId: checkoutItem.selectedSourceAssetInfo.chainId,
49179
- symbolOrAddress: checkoutItem.selectedSourceAssetInfo.symbol
49180
- });
49181
- const option = assetOptions.find(
49182
- (option2) => option2.asset.chainSymbolKey === key
49183
- );
49184
- if (option && !option.isDisabled) {
49185
- return key;
49186
- }
49187
- }
49188
- const usableOptions = assetOptions.filter((option) => !option.isDisabled);
49189
- return usableOptions[0]?.asset.chainSymbolKey;
49190
- }, [assetOptions, checkoutItem?.selectedSourceAssetInfo]);
49191
- const selectedChainTokenSymbol = useMemo65(() => {
49381
+ const selectedSourceAssetInfo = checkoutItem?.selectedSourceAssetInfo;
49382
+ const defaultSelectedChainTokenSymbol = useMemo66(
49383
+ () => getDefaultChainTokenSymbol(assetOptions, selectedSourceAssetInfo),
49384
+ [assetOptions, selectedSourceAssetInfo]
49385
+ );
49386
+ const selectedChainTokenSymbol = useMemo66(() => {
49192
49387
  if (explicitlySelectedChainTokenSymbol) {
49193
49388
  const assetExists = assetOptions.some(
49194
49389
  ({ asset }) => asset.chainSymbolKey === explicitlySelectedChainTokenSymbol
@@ -49387,7 +49582,7 @@ import {
49387
49582
  resolveWithdrawalSourceTokenBalance as resolveWithdrawalSourceTokenBalance4
49388
49583
  } from "@funkit/connect-core";
49389
49584
  import { isTokenEquivalent as isTokenEquivalent14, noop as noop6 } from "@funkit/utils";
49390
- import React301, { useEffect as useEffect88, useMemo as useMemo66, useRef as useRef53, useState as useState85 } from "react";
49585
+ import React301, { useEffect as useEffect88, useMemo as useMemo67, useRef as useRef53, useState as useState85 } from "react";
49391
49586
  import { createPortal as createPortal22 } from "react-dom";
49392
49587
 
49393
49588
  // src/components/Dropdown/ReceiveTokenDropdown.tsx
@@ -50072,7 +50267,7 @@ function SourceChange({
50072
50267
  const { isUnifiedTradingMode: isLighterUnifiedAccount } = useLighterAccounts({
50073
50268
  address: walletAddress
50074
50269
  });
50075
- const dynamicTargetAssets = useMemo66(() => {
50270
+ const dynamicTargetAssets = useMemo67(() => {
50076
50271
  const candidates = checkoutConfig?.dynamicTargetAssetCandidates;
50077
50272
  if (!candidates || !isLighterUnifiedAccount) {
50078
50273
  return candidates;
@@ -50135,7 +50330,7 @@ function SourceChange({
50135
50330
  });
50136
50331
  }
50137
50332
  const [connectedSource, setConnectedSource] = useState85(paymentMethodInfo);
50138
- const syntheticFops = useMemo66(
50333
+ const syntheticFops = useMemo67(
50139
50334
  () => isCashAppLightningEnabled ? [createSyntheticFop(PaymentMethod.CASH_APP_LIGHTNING)] : [],
50140
50335
  [isCashAppLightningEnabled]
50141
50336
  );
@@ -50160,7 +50355,7 @@ function SourceChange({
50160
50355
  const { trackTabSwitched } = useTrackSourceChangeEvents({
50161
50356
  tab: paymentMethodTab
50162
50357
  });
50163
- const nativeHolding = useMemo66(() => {
50358
+ const nativeHolding = useMemo67(() => {
50164
50359
  if (!checkoutConfig || !walletHoldings || !isCustomerNativeFastPathEnabled(apiKey)) {
50165
50360
  return void 0;
50166
50361
  }
@@ -50174,7 +50369,7 @@ function SourceChange({
50174
50369
  );
50175
50370
  return holding && holding.usdAmount != null && holding.usdAmount > 0 ? holding : void 0;
50176
50371
  }, [apiKey, walletHoldings, checkoutConfig]);
50177
- const connectedWallet = useMemo66(
50372
+ const connectedWallet = useMemo67(
50178
50373
  () => preferred.find(
50179
50374
  (s) => isConnectablePaymentMethodInfo(s) && s.paymentMethod === PaymentMethod.ACCOUNT_BALANCE
50180
50375
  ),
@@ -52153,7 +52348,7 @@ var FiatAccountDetail = {
52153
52348
 
52154
52349
  // src/modals/CheckoutModal/VirtualFiatAccount/KycIframe.tsx
52155
52350
  import { BridgeCustomerStatus as BridgeCustomerStatus7 } from "@funkit/api-base";
52156
- import React315, { useCallback as useCallback67, useEffect as useEffect90, useMemo as useMemo67, useState as useState88 } from "react";
52351
+ import React315, { useCallback as useCallback67, useEffect as useEffect90, useMemo as useMemo68, useState as useState88 } from "react";
52157
52352
  function useIframeListener(listeners, expectedOrigin) {
52158
52353
  const handleMessage = useCallback67(
52159
52354
  (event) => {
@@ -52210,14 +52405,14 @@ function KycIframe({
52210
52405
  const { clearVirtualFiatAccounts } = useClearFrogAccountsCache();
52211
52406
  const { data: kycLink, isLoading: isLinkLoading } = useLoadKycLink(modalState);
52212
52407
  const [iframeLoading, setIframeLoading] = useState88(true);
52213
- const kycOrigin = useMemo67(() => {
52408
+ const kycOrigin = useMemo68(() => {
52214
52409
  try {
52215
52410
  return kycLink ? new URL(kycLink).origin : null;
52216
52411
  } catch {
52217
52412
  return null;
52218
52413
  }
52219
52414
  }, [kycLink]);
52220
- const listeners = useMemo67(
52415
+ const listeners = useMemo68(
52221
52416
  () => ({
52222
52417
  load: () => {
52223
52418
  logger.info("KYC iframe loaded");
@@ -52974,7 +53169,7 @@ function FunCheckoutModalInner({
52974
53169
  const shouldSkipExtraContentTopPadding = getSwappedExtraPaddingExcludedSteps(startingStep).includes(
52975
53170
  modalState.step
52976
53171
  ) && isSwappedEnabled;
52977
- const isSourceChangeLikeStep = modalState.step === "source_change" /* SOURCE_CHANGE */ || modalState.step === "loading_account" /* LOADING_ACCOUNT */ && startingStep !== "confirmation" /* CONFIRMATION */ && startingStep !== "select_asset" /* SELECT_ASSET */;
53172
+ const isSourceChangeLikeStep = isSourceChangeLike(modalState, startingStep);
52978
53173
  return /* @__PURE__ */ React318.createElement(
52979
53174
  Dialog,
52980
53175
  {
@@ -53193,7 +53388,7 @@ function ModalProvider({ children }) {
53193
53388
  return /* @__PURE__ */ React320.createElement(
53194
53389
  ModalContext.Provider,
53195
53390
  {
53196
- value: useMemo68(
53391
+ value: useMemo69(
53197
53392
  () => ({
53198
53393
  accountModalOpen,
53199
53394
  accountModalTab,
@@ -54123,7 +54318,7 @@ function CheckoutConfigOverride({
54123
54318
  }) {
54124
54319
  const parent = useContext19(FunkitCheckoutContext);
54125
54320
  const { checkoutItem } = parent;
54126
- const value = useMemo69(() => {
54321
+ const value = useMemo70(() => {
54127
54322
  if (!checkoutItem) {
54128
54323
  return null;
54129
54324
  }
@@ -54417,7 +54612,7 @@ var useMinTransferValueEur = (selectedChainId) => {
54417
54612
  };
54418
54613
  var useMinTransferValues = (chainIds) => {
54419
54614
  const limits = useDynamicConfig("mintokentransfervalue");
54420
- return useMemo70(() => {
54615
+ return useMemo71(() => {
54421
54616
  return chainIds.reduce(
54422
54617
  (acc, id) => {
54423
54618
  acc[id] = getMinTransferValueUsd(id, limits);
@@ -54774,7 +54969,7 @@ var FunkitBrokerageProvider = ({
54774
54969
  setSelectedBrokerageAsset(null);
54775
54970
  }
54776
54971
  }, [bluvoClient.withdrawal?.status]);
54777
- const brokerageMinMax = useMemo71(() => {
54972
+ const brokerageMinMax = useMemo72(() => {
54778
54973
  if (!selectedBrokerageAsset || !isBrokerageAsset(selectedBrokerageAsset)) {
54779
54974
  return null;
54780
54975
  }
@@ -54992,7 +55187,7 @@ function FunkitProvider(props) {
54992
55187
  const existingWagmiConfig = useContext22(WagmiContext);
54993
55188
  const existingQueryClient = useContext22(QueryClientContext);
54994
55189
  const shouldSelfMount = !!props.solanaWalletOnly && !props.wagmiConfig && !existingWagmiConfig;
54995
- const selfMounted = useMemo72(
55190
+ const selfMounted = useMemo73(
54996
55191
  () => shouldSelfMount ? {
54997
55192
  wagmiConfig: createConnectorlessWagmiConfig(),
54998
55193
  queryClient: existingQueryClient ?? new QueryClient()
@@ -55000,7 +55195,7 @@ function FunkitProvider(props) {
55000
55195
  [shouldSelfMount, existingQueryClient]
55001
55196
  );
55002
55197
  const initialChainId = getInitialChainIdFromFunkitProviderProps(props);
55003
- const finalWagmiConfig = useMemo72(() => {
55198
+ const finalWagmiConfig = useMemo73(() => {
55004
55199
  if (!props.wagmiConfig || !initialChainId) {
55005
55200
  return void 0;
55006
55201
  }
@@ -55020,7 +55215,7 @@ function FunkitProvider(props) {
55020
55215
  adoptWallet
55021
55216
  ]);
55022
55217
  const finalQueryClient = props.queryClient;
55023
- const sdkVersion = useMemo72(() => getCurrentSdkVersion(), []);
55218
+ const sdkVersion = useMemo73(() => getCurrentSdkVersion(), []);
55024
55219
  useEffect100(() => {
55025
55220
  logger.configure(
55026
55221
  props.funkitConfig.apiKey,
@@ -55131,10 +55326,10 @@ function FunkitProviderInner({
55131
55326
  useAccountEffect({ onDisconnect: clearWalletConnectDeepLink });
55132
55327
  useInitializeRelayClient(funkitConfig.source);
55133
55328
  const { activeTheme } = useActiveTheme();
55134
- const selector = useMemo72(() => createThemeRootSelector(id), [id]);
55135
- const themeRootProps = useMemo72(() => createThemeRootProps(id), [id]);
55329
+ const selector = useMemo73(() => createThemeRootSelector(id), [id]);
55330
+ const themeRootProps = useMemo73(() => createThemeRootProps(id), [id]);
55136
55331
  const [themeRootElement, setThemeRootElement] = useState93(null);
55137
- const themeRoot = useMemo72(
55332
+ const themeRoot = useMemo73(
55138
55333
  () => ({ id, element: themeRootElement }),
55139
55334
  [id, themeRootElement]
55140
55335
  );
@@ -55174,7 +55369,7 @@ function FunkitProviderInner({
55174
55369
  var useSwappedThemeQueryParams = () => {
55175
55370
  const { activeTheme } = useActiveTheme();
55176
55371
  const themeRootElement = useThemeRootElement();
55177
- return useMemo73(
55372
+ return useMemo74(
55178
55373
  () => buildSwappedThemeQueryParams(
55179
55374
  resolveObjectCssVars(activeTheme, themeRootElement)
55180
55375
  ),
@@ -55186,7 +55381,7 @@ var useSwappedIframeTheme = () => {
55186
55381
  const { uiCustomizations } = useFunkitConfig();
55187
55382
  const themeRootElement = useThemeRootElement();
55188
55383
  const isDarkMode = activeTheme === darkTheme2;
55189
- return useMemo73(() => {
55384
+ return useMemo74(() => {
55190
55385
  const customFontFamily = uiCustomizations.customFontFamily;
55191
55386
  const theme = { ...activeTheme, customFontFamily };
55192
55387
  return buildSwappedTheme(
@@ -55645,7 +55840,7 @@ function GeneralWalletProvider({ children }) {
55645
55840
  identityAddress,
55646
55841
  externalUserId
55647
55842
  );
55648
- const userInfo = useMemo74(
55843
+ const userInfo = useMemo75(
55649
55844
  () => buildUserInfo({
55650
55845
  address: evmAddress2,
55651
55846
  solanaAddress,
@@ -55734,7 +55929,7 @@ function GeneralWalletProvider({ children }) {
55734
55929
  const connectorIcon = getConnectorIcon(connector);
55735
55930
  const solanaName = solanaWallet?.name;
55736
55931
  const solanaIcon = solanaWallet?.icon ?? getWalletIconByName(solanaName);
55737
- const payerWallets = useMemo74(
55932
+ const payerWallets = useMemo75(
55738
55933
  () => ({
55739
55934
  evmWallet: {
55740
55935
  address: evmAddress2 ?? "",
@@ -55951,7 +56146,7 @@ var useWalletAssets = ({
55951
56146
  const { apiKey } = useFunkitConfig();
55952
56147
  const { address, isConnected } = useAccount();
55953
56148
  const { payerWallets } = useGeneralWallet();
55954
- const addresses = useMemo75(
56149
+ const addresses = useMemo76(
55955
56150
  () => [
55956
56151
  isConnected ? address : void 0,
55957
56152
  payerWallets.solanaWallet?.address
@@ -56856,7 +57051,7 @@ import { toValidatedSolanaAddress as toValidatedSolanaAddress2, useLogOnce as us
56856
57051
  import {
56857
57052
  createSolanaWithdrawalClient
56858
57053
  } from "@funkit/connect-core/clients/solana";
56859
- import { useMemo as useMemo76 } from "react";
57054
+ import { useMemo as useMemo77 } from "react";
56860
57055
  function useSolanaWithdrawalConfig(params) {
56861
57056
  const signer = params?.signer;
56862
57057
  const address = toValidatedSolanaAddress2(signer?.address);
@@ -56868,7 +57063,7 @@ function useSolanaWithdrawalConfig(params) {
56868
57063
  });
56869
57064
  }
56870
57065
  );
56871
- return useMemo76(() => {
57066
+ return useMemo77(() => {
56872
57067
  if (!params || !signer || !address) {
56873
57068
  return null;
56874
57069
  }
@@ -56892,7 +57087,7 @@ import { useLogOnce as useLogOnce7 } from "@funkit/connect-core";
56892
57087
  import {
56893
57088
  createHypercoreAdaptedWallet
56894
57089
  } from "@funkit/connect-core/clients/hypercore";
56895
- import { useMemo as useMemo77 } from "react";
57090
+ import { useMemo as useMemo78 } from "react";
56896
57091
  import { getAddress as getAddress5, isAddress as isAddress4 } from "viem";
56897
57092
  function unsupported(member) {
56898
57093
  throw new Error(`HypercoreWithdrawalClient does not support ${member}`);
@@ -56921,7 +57116,7 @@ function useHypercoreWithdrawalConfig(options) {
56921
57116
  });
56922
57117
  }
56923
57118
  );
56924
- return useMemo77(() => {
57119
+ return useMemo78(() => {
56925
57120
  if (!options || !signer || !address) {
56926
57121
  return null;
56927
57122
  }