@funkit/connect 7.1.0-next.16 → 7.1.0-next.18

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 (45) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/__generated__/default_configs.d.ts +117 -12
  3. package/dist/components/Dropdown/ReceiveTokenDropdown.d.ts +3 -1
  4. package/dist/hooks/usePaymentSources.d.ts +1 -0
  5. package/dist/index.js +369 -83
  6. package/dist/utils/flags/config.d.ts +2 -2
  7. package/dist/utils/lighter.d.ts +5 -0
  8. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  9. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  10. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  11. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  12. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  13. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  14. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  15. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  16. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  17. package/dist/wallets/walletConnectors/index.js +28 -28
  18. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  19. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  20. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  21. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  22. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  23. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  24. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  25. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  26. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  27. package/package.json +3 -3
  28. package/dist/wallets/walletConnectors/{chunk-FT5BX7TL.js → chunk-2E4PDCEJ.js} +3 -3
  29. package/dist/wallets/walletConnectors/{chunk-LGT6IAXI.js → chunk-47QF6EET.js} +3 -3
  30. package/dist/wallets/walletConnectors/{chunk-5AV2NSL3.js → chunk-5EAOMOTO.js} +3 -3
  31. package/dist/wallets/walletConnectors/{chunk-4SC3PZVM.js → chunk-77UTBHGP.js} +3 -3
  32. package/dist/wallets/walletConnectors/{chunk-GXTI2PZD.js → chunk-CZYUE3AR.js} +3 -3
  33. package/dist/wallets/walletConnectors/{chunk-O6YFVGVQ.js → chunk-FA5DTT5R.js} +3 -3
  34. package/dist/wallets/walletConnectors/{chunk-PRGCIJ7Y.js → chunk-HPHADOYD.js} +3 -3
  35. package/dist/wallets/walletConnectors/{chunk-GEMN6DM5.js → chunk-JFHP4YJG.js} +3 -3
  36. package/dist/wallets/walletConnectors/{chunk-75A4Q5E5.js → chunk-MRRZOQGZ.js} +3 -3
  37. package/dist/wallets/walletConnectors/{chunk-6677RKVT.js → chunk-R6Y36CMA.js} +3 -3
  38. package/dist/wallets/walletConnectors/{chunk-5FWURLPF.js → chunk-RA7MCWF4.js} +3 -3
  39. package/dist/wallets/walletConnectors/{chunk-TLOROKED.js → chunk-RLRQYUYC.js} +3 -3
  40. package/dist/wallets/walletConnectors/{chunk-3ZWIUCOI.js → chunk-T5KHVUFR.js} +3 -3
  41. package/dist/wallets/walletConnectors/{chunk-ENLR4LXN.js → chunk-U5QP7MI5.js} +3 -3
  42. package/dist/wallets/walletConnectors/{chunk-OCM5YHT5.js → chunk-UOTQQJJD.js} +3 -3
  43. package/dist/wallets/walletConnectors/{chunk-RNIMZDHW.js → chunk-VYNVAGSV.js} +3 -3
  44. package/dist/wallets/walletConnectors/{chunk-N7475PGA.js → chunk-W7Y6I22Y.js} +3 -3
  45. package/dist/wallets/walletConnectors/{chunk-WNQ3NPHX.js → chunk-YLJDPTYF.js} +3 -3
package/dist/index.js CHANGED
@@ -779,7 +779,7 @@ var getRemoteImageStyles = (isRemoteImage, isRemoteImageLoaded, src) => {
779
779
  };
780
780
 
781
781
  // src/components/ConnectButton/ConnectButtonRenderer.tsx
782
- import { formatCurrencyAndStringify as formatCurrencyAndStringify15, isMobile as isMobile14, noop as noop9 } from "@funkit/utils";
782
+ import { formatCurrencyAndStringify as formatCurrencyAndStringify15, isMobile as isMobile14, noop as noop10 } from "@funkit/utils";
783
783
  import React240 from "react";
784
784
  import { useAccount as useAccount12, useBalance, useConfig as useConfig8 } from "wagmi";
785
785
 
@@ -859,7 +859,7 @@ import {
859
859
  isTokenEquivalent as isTokenEquivalent7,
860
860
  round as round4
861
861
  } from "@funkit/utils";
862
- import { arbitrum as arbitrum5, base as base7, mainnet as mainnet12, optimism, polygon as polygon6 } from "viem/chains";
862
+ import { arbitrum as arbitrum5, base as base7, mainnet as mainnet13, optimism, polygon as polygon6 } from "viem/chains";
863
863
 
864
864
  // src/modals/CheckoutModal/InputAmount/utils.ts
865
865
  import { formatCurrencyAndStringify } from "@funkit/utils";
@@ -1055,8 +1055,8 @@ import {
1055
1055
  isTokenEquivalent as isTokenEquivalent6,
1056
1056
  round as round3
1057
1057
  } from "@funkit/utils";
1058
- import { getBalance, readContract } from "@wagmi/core";
1059
- import { erc20Abi as erc20Abi3, isAddress as isAddress3 } from "viem";
1058
+ import { getBalance, readContract as readContract2 } from "@wagmi/core";
1059
+ import { erc20Abi as erc20Abi4, isAddress as isAddress3 } from "viem";
1060
1060
 
1061
1061
  // src/providers/FunkitCheckoutContext/index.tsx
1062
1062
  import {
@@ -1427,7 +1427,7 @@ function setFunkitConnectVersion({ version }) {
1427
1427
  localStorage.setItem(storageKey, version);
1428
1428
  }
1429
1429
  function getCurrentSdkVersion() {
1430
- return "7.1.0-next.16";
1430
+ return "7.1.0-next.18";
1431
1431
  }
1432
1432
  function useFingerprint() {
1433
1433
  const fingerprint = useCallback3(() => {
@@ -1701,8 +1701,10 @@ var useTrack = () => {
1701
1701
 
1702
1702
  // src/hooks/useCheckoutDirectExecution.ts
1703
1703
  import { DirectExecutionType, getCheckoutQuoteV2 } from "@funkit/api-base";
1704
- import { executeRelayQuote } from "@funkit/fun-relay";
1704
+ import { executeRelayQuote, shouldResetApproval } from "@funkit/fun-relay";
1705
1705
  import { useCallback as useCallback7 } from "react";
1706
+ import { decodeFunctionData, erc20Abi, getAddress } from "viem";
1707
+ import { readContract } from "viem/actions";
1706
1708
  import { useWalletClient } from "wagmi";
1707
1709
 
1708
1710
  // src/consts/checkout.ts
@@ -2461,6 +2463,111 @@ var default_configs_default = {
2461
2463
  }
2462
2464
  }
2463
2465
  ]
2466
+ },
2467
+ {
2468
+ routeId: "LIGHTER_LINK_SPOT_NEW_USER",
2469
+ rules: [
2470
+ {
2471
+ when: {
2472
+ chainId: "1",
2473
+ tokenAddress: "0x514910771AF9Ca656af840dff83E8264EcF986CA"
2474
+ },
2475
+ use: {
2476
+ path: "FUN_MAINNET_DEPOSIT",
2477
+ badge: "NATIVE"
2478
+ }
2479
+ },
2480
+ {
2481
+ when: "*",
2482
+ use: {
2483
+ path: "FUN_MAINNET_DEPOSIT"
2484
+ }
2485
+ }
2486
+ ]
2487
+ },
2488
+ {
2489
+ routeId: "LIGHTER_UNI_SPOT_NEW_USER",
2490
+ rules: [
2491
+ {
2492
+ when: {
2493
+ chainId: "1",
2494
+ tokenAddress: "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"
2495
+ },
2496
+ use: {
2497
+ path: "FUN_MAINNET_DEPOSIT",
2498
+ badge: "NATIVE"
2499
+ }
2500
+ },
2501
+ {
2502
+ when: "*",
2503
+ use: {
2504
+ path: "FUN_MAINNET_DEPOSIT"
2505
+ }
2506
+ }
2507
+ ]
2508
+ },
2509
+ {
2510
+ routeId: "LIGHTER_AAVE_SPOT_NEW_USER",
2511
+ rules: [
2512
+ {
2513
+ when: {
2514
+ chainId: "1",
2515
+ tokenAddress: "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9"
2516
+ },
2517
+ use: {
2518
+ path: "FUN_MAINNET_DEPOSIT",
2519
+ badge: "NATIVE"
2520
+ }
2521
+ },
2522
+ {
2523
+ when: "*",
2524
+ use: {
2525
+ path: "FUN_MAINNET_DEPOSIT"
2526
+ }
2527
+ }
2528
+ ]
2529
+ },
2530
+ {
2531
+ routeId: "LIGHTER_SKY_SPOT_NEW_USER",
2532
+ rules: [
2533
+ {
2534
+ when: {
2535
+ chainId: "1",
2536
+ tokenAddress: "0x56072C95FAA701256059aa122697B133aDEd9279"
2537
+ },
2538
+ use: {
2539
+ path: "FUN_MAINNET_DEPOSIT",
2540
+ badge: "NATIVE"
2541
+ }
2542
+ },
2543
+ {
2544
+ when: "*",
2545
+ use: {
2546
+ path: "FUN_MAINNET_DEPOSIT"
2547
+ }
2548
+ }
2549
+ ]
2550
+ },
2551
+ {
2552
+ routeId: "LIGHTER_LDO_SPOT_NEW_USER",
2553
+ rules: [
2554
+ {
2555
+ when: {
2556
+ chainId: "1",
2557
+ tokenAddress: "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32"
2558
+ },
2559
+ use: {
2560
+ path: "FUN_MAINNET_DEPOSIT",
2561
+ badge: "NATIVE"
2562
+ }
2563
+ },
2564
+ {
2565
+ when: "*",
2566
+ use: {
2567
+ path: "FUN_MAINNET_DEPOSIT"
2568
+ }
2569
+ }
2570
+ ]
2464
2571
  }
2465
2572
  ]
2466
2573
  },
@@ -2471,6 +2578,15 @@ var default_configs_default = {
2471
2578
  value: false
2472
2579
  },
2473
2580
  enablefiatdeposit: {
2581
+ variants: [
2582
+ {
2583
+ condition: {
2584
+ type: "country",
2585
+ countryCodes: ["US"]
2586
+ },
2587
+ value: false
2588
+ }
2589
+ ],
2474
2590
  value: true
2475
2591
  },
2476
2592
  enablemeldpayment: {
@@ -2479,22 +2595,6 @@ var default_configs_default = {
2479
2595
  enabletokentransfer: {
2480
2596
  value: true
2481
2597
  },
2482
- enabletokentransfertest: {
2483
- variants: [
2484
- {
2485
- conditions: {
2486
- all: [
2487
- {
2488
- type: "allowedCountries",
2489
- countries: ["SG", "DE"]
2490
- }
2491
- ]
2492
- },
2493
- value: true
2494
- }
2495
- ],
2496
- value: false
2497
- },
2498
2598
  ismexico: {
2499
2599
  value: {
2500
2600
  mexico: false
@@ -2522,6 +2622,34 @@ var default_configs_default = {
2522
2622
  SGD: [130, 645, 1285]
2523
2623
  }
2524
2624
  },
2625
+ mintokentransfervalue: {
2626
+ variants: [
2627
+ {
2628
+ condition: {
2629
+ type: "country",
2630
+ countryCodes: ["CA"]
2631
+ },
2632
+ value: {
2633
+ mainnet: 15,
2634
+ nonMainnet: 3
2635
+ }
2636
+ },
2637
+ {
2638
+ condition: {
2639
+ type: "country",
2640
+ countryCodes: ["AU"]
2641
+ },
2642
+ value: {
2643
+ mainnet: 15,
2644
+ nonMainnet: 3
2645
+ }
2646
+ }
2647
+ ],
2648
+ value: {
2649
+ mainnet: 10,
2650
+ nonMainnet: 2.5
2651
+ }
2652
+ },
2525
2653
  showinfobanner: {
2526
2654
  value: {
2527
2655
  message: "",
@@ -2617,15 +2745,18 @@ import {
2617
2745
  AVANTIS_API_KEY as AVANTIS_API_KEY2,
2618
2746
  BANKR_API_KEY as BANKR_API_KEY2,
2619
2747
  BASED_API_KEY as BASED_API_KEY2,
2748
+ BENTO_API_KEY,
2620
2749
  BULLPEN_API_KEY,
2621
2750
  ETHEREAL_API_KEY as ETHEREAL_API_KEY3,
2622
2751
  FELIX_API_KEY,
2752
+ GINZA_API_KEY,
2623
2753
  HYENA_API_KEY as HYENA_API_KEY2,
2624
2754
  HYPERBEAT_API_KEY as HYPERBEAT_API_KEY2,
2625
2755
  HYPERDASH_API_KEY as HYPERDASH_API_KEY2,
2626
2756
  HYPEREDGE_API_KEY,
2627
2757
  HYPERSWAP_API_KEY,
2628
2758
  KATANA_API_KEY as KATANA_API_KEY2,
2759
+ KURU_API_KEY,
2629
2760
  LIGHTERXYZ_API_KEY as LIGHTERXYZ_API_KEY2,
2630
2761
  MEGAPOT_API_KEY,
2631
2762
  MONAD_API_KEY as MONAD_API_KEY2,
@@ -2636,9 +2767,9 @@ import {
2636
2767
  SUSHI_API_KEY,
2637
2768
  VENTUALS_API_KEY
2638
2769
  } from "@funkit/api-base";
2639
- import { MONAD_CHAIN_ID, bitcoinChain } from "@funkit/chains";
2770
+ import { MONAD_CHAIN_ID } from "@funkit/chains";
2640
2771
  import { FlagKey } from "@funkit/utils";
2641
- import { arbitrum, base as base3, polygon } from "viem/chains";
2772
+ import { arbitrum, base as base3, mainnet as mainnet5, polygon } from "viem/chains";
2642
2773
  var FUN_INTERNAL_USERS = [
2643
2774
  "0x6ec0c2f25d323e7779925Cc20c3740101f990d9F",
2644
2775
  // Chloe
@@ -2738,8 +2869,9 @@ var QR_CODE_WITH_SOLANA = {
2738
2869
  1151111081099710: ["SOL", "USDC", "USDT", "TRUMP", "USDe"]
2739
2870
  };
2740
2871
  var QR_CODE_WITH_BITCOIN = {
2741
- ...QR_CODE_WITH_SOLANA,
2742
- [bitcoinChain.id]: ["BTC"]
2872
+ ...QR_CODE_WITH_SOLANA
2873
+ // uncomment to re-enable bitcoin
2874
+ // [bitcoinChain.id]: ['BTC'],
2743
2875
  };
2744
2876
  var QR_CODE_WITH_MONAD = {
2745
2877
  ...QR_CODE_WITH_BITCOIN,
@@ -3002,7 +3134,7 @@ var flagConfig = {
3002
3134
  values: [POLYMARKET_API_KEY2]
3003
3135
  }
3004
3136
  ],
3005
- value: bitcoinChain.id.toString()
3137
+ value: mainnet5.id.toString()
3006
3138
  }
3007
3139
  ]
3008
3140
  },
@@ -3189,13 +3321,16 @@ var flagConfig = {
3189
3321
  values: [
3190
3322
  AVANTIS_API_KEY2,
3191
3323
  BASED_API_KEY2,
3324
+ BENTO_API_KEY,
3192
3325
  BULLPEN_API_KEY,
3193
3326
  ETHEREAL_API_KEY3,
3194
3327
  FELIX_API_KEY,
3328
+ GINZA_API_KEY,
3195
3329
  HYENA_API_KEY2,
3196
3330
  HYPERBEAT_API_KEY2,
3197
3331
  HYPEREDGE_API_KEY,
3198
3332
  HYPERSWAP_API_KEY,
3333
+ KURU_API_KEY,
3199
3334
  LIGHTERXYZ_API_KEY2,
3200
3335
  MEGAPOT_API_KEY,
3201
3336
  MONAD_API_KEY2,
@@ -3293,7 +3428,7 @@ var flagConfig = {
3293
3428
  },
3294
3429
  [FlagKey.EnableBitcoin]: {
3295
3430
  type: "boolean",
3296
- default_value: true,
3431
+ default_value: false,
3297
3432
  overrides: [
3298
3433
  // Actually disable bitcoin for Ethereal
3299
3434
  {
@@ -3836,6 +3971,120 @@ function useCheckoutDirectExecution() {
3836
3971
  },
3837
3972
  [t, connector, switchChainAsync]
3838
3973
  );
3974
+ const resetApproval = useCallback7(
3975
+ async ({
3976
+ tokenAddress,
3977
+ spenderAddress
3978
+ }) => {
3979
+ const walletClient = _walletClient;
3980
+ if (!walletClient) {
3981
+ throw new Error("Viem wallet client is not defined");
3982
+ }
3983
+ const logPrefix3 = "resetApproval";
3984
+ const logData = { tokenAddress, spenderAddress };
3985
+ logger.info(logPrefix3, logData);
3986
+ const txHash = await walletClient.writeContract({
3987
+ address: tokenAddress,
3988
+ abi: erc20Abi,
3989
+ functionName: "approve",
3990
+ args: [spenderAddress, BigInt(0)]
3991
+ });
3992
+ logData.txHash = txHash;
3993
+ logger.info(`${logPrefix3}:success`, logData);
3994
+ return txHash;
3995
+ },
3996
+ [_walletClient]
3997
+ );
3998
+ const checkAllowance = useCallback7(
3999
+ async ({
4000
+ tokenAddress,
4001
+ ownerAddress,
4002
+ spenderAddress
4003
+ }) => {
4004
+ const walletClient = _walletClient;
4005
+ if (!walletClient) {
4006
+ throw new Error("Viem wallet client is not defined");
4007
+ }
4008
+ const logPrefix3 = "checkAllowance";
4009
+ const logData = {
4010
+ tokenAddress,
4011
+ ownerAddress,
4012
+ spenderAddress
4013
+ };
4014
+ logger.info(logPrefix3, logData);
4015
+ const allowance = await readContract(walletClient, {
4016
+ address: tokenAddress,
4017
+ abi: erc20Abi,
4018
+ functionName: "allowance",
4019
+ args: [ownerAddress, spenderAddress]
4020
+ });
4021
+ logData.allowance = allowance;
4022
+ logger.info(`${logPrefix3}:success`, logData);
4023
+ return allowance;
4024
+ },
4025
+ [_walletClient]
4026
+ );
4027
+ const resetApprovalIfNeeded = useCallback7(
4028
+ async (relayQuote) => {
4029
+ try {
4030
+ const currencyInMetadata = relayQuote.details?.currencyIn?.currency;
4031
+ const currencyInAddress = currencyInMetadata?.address ? getAddress(currencyInMetadata.address) : void 0;
4032
+ const approveAction = relayQuote.steps.find(
4033
+ (step) => currencyInAddress && step.id === "approve" && step.items[0]?.data && step.items[0].data.to.toLowerCase() === currencyInAddress.toLowerCase()
4034
+ );
4035
+ const approveActionItem = approveAction?.items[0];
4036
+ const resetApprovalNeeded = approveActionItem && currencyInAddress && shouldResetApproval(currencyInAddress);
4037
+ const logPrefix3 = "resetApprovalIfNeeded";
4038
+ const logData = {
4039
+ approveAction,
4040
+ approveActionItem,
4041
+ currencyInMetadata,
4042
+ currencyInAddress,
4043
+ resetApprovalNeeded
4044
+ };
4045
+ logger.info(logPrefix3, logData);
4046
+ if (!resetApprovalNeeded) {
4047
+ return;
4048
+ }
4049
+ const decodedFunctionData = decodeFunctionData({
4050
+ abi: erc20Abi,
4051
+ data: approveActionItem.data.data
4052
+ });
4053
+ logData.decodedFunctionData = decodedFunctionData;
4054
+ if (!decodedFunctionData) {
4055
+ logger.error(`${logPrefix3}:error:noData`, logData);
4056
+ return;
4057
+ }
4058
+ const spenderAddress = decodedFunctionData.args[0];
4059
+ logData.spenderAddress = spenderAddress;
4060
+ if (!spenderAddress) {
4061
+ logger.error(`${logPrefix3}:error:noSpenderAddress`, logData);
4062
+ return;
4063
+ }
4064
+ const allowance = await checkAllowance({
4065
+ tokenAddress: currencyInAddress,
4066
+ ownerAddress: approveActionItem.data.from,
4067
+ spenderAddress
4068
+ });
4069
+ logData.allowance = allowance;
4070
+ if (allowance === BigInt(0)) {
4071
+ logger.info(`${logPrefix3}:allowanceIsZero`, logData);
4072
+ return;
4073
+ }
4074
+ logger.info(`${logPrefix3}:resettingApproval`, logData);
4075
+ return await resetApproval({
4076
+ tokenAddress: currencyInAddress,
4077
+ spenderAddress
4078
+ });
4079
+ } catch (error) {
4080
+ logger.error("resetApprovalIfNeeded:error", error, {
4081
+ relayQuote
4082
+ });
4083
+ return;
4084
+ }
4085
+ },
4086
+ [resetApproval, checkAllowance]
4087
+ );
3839
4088
  const startRelayDirectExecution = useCallback7(
3840
4089
  async ({
3841
4090
  checkoutItem,
@@ -3858,6 +4107,7 @@ function useCheckoutDirectExecution() {
3858
4107
  throw new Error("Viem wallet client is not defined");
3859
4108
  }
3860
4109
  await checkAndSwitchChains({ executionChainId, stepMessageSetter });
4110
+ await resetApprovalIfNeeded(relayQuote);
3861
4111
  const translateRelayMessage = (message) => {
3862
4112
  const messageMap2 = {
3863
4113
  "Confirm transaction in your wallet": t("relay.confirmTransaction"),
@@ -3925,18 +4175,18 @@ function useCheckoutDirectExecution() {
3925
4175
  };
3926
4176
  return await waitForConfirmation();
3927
4177
  },
3928
- [_walletClient, checkAndSwitchChains, t]
4178
+ [_walletClient, checkAndSwitchChains, t, resetApprovalIfNeeded]
3929
4179
  );
3930
4180
  const getDirectExecutionInfo = useCallback7(
3931
4181
  (checkoutItem) => {
3932
- const noop10 = {
4182
+ const noop11 = {
3933
4183
  isDirectExecution: false,
3934
4184
  directExecutionType: null,
3935
4185
  getDirectExecutionQuote: getDirectExecutionQuoteNoop,
3936
4186
  executeDirectExecution: executeDirectExecutionNoop
3937
4187
  };
3938
4188
  if (!checkoutItem) {
3939
- return noop10;
4189
+ return noop11;
3940
4190
  }
3941
4191
  const isRelayDirectExecutionCase = getIsRelayEnabled({
3942
4192
  fromChainId: checkoutItem.selectedSourceAssetInfo.chainId,
@@ -3950,7 +4200,7 @@ function useCheckoutDirectExecution() {
3950
4200
  });
3951
4201
  const isDirectExecution = Boolean(isRelayDirectExecutionCase);
3952
4202
  if (!isDirectExecution) {
3953
- return noop10;
4203
+ return noop11;
3954
4204
  }
3955
4205
  return {
3956
4206
  isDirectExecution: true,
@@ -4717,8 +4967,8 @@ function getCheckoutStateBooleans(checkoutState, refundState) {
4717
4967
  }
4718
4968
 
4719
4969
  // src/utils/lighter.ts
4720
- import { getAddress } from "viem";
4721
- var LIGHTER_DEPOSIT_ADDRESS = getAddress(
4970
+ import { getAddress as getAddress2 } from "viem";
4971
+ var LIGHTER_DEPOSIT_ADDRESS = getAddress2(
4722
4972
  "0x3b4d794a66304f130a4db8f2551b0070dfcf5ca7"
4723
4973
  );
4724
4974
  var LIGHTER_NATIVE_FLOW_TIME_ESTIMATE_SECONDS = 60 * 2;
@@ -4727,13 +4977,23 @@ var LIGHTER_DYNAMIC_ROUTING_ID = {
4727
4977
  ETH_SPOT: "LIGHTER_ETH_SPOT",
4728
4978
  USDC_PERPS: "LIGHTER_USDC_PERPS",
4729
4979
  ETH_SPOT_NEW_USER: "LIGHTER_ETH_SPOT_NEW_USER",
4730
- USDC_PERPS_NEW_USER: "LIGHTER_USDC_PERPS_NEW_USER"
4980
+ USDC_PERPS_NEW_USER: "LIGHTER_USDC_PERPS_NEW_USER",
4981
+ LINK_SPOT_NEW_USER: "LIGHTER_LINK_SPOT_NEW_USER",
4982
+ UNI_SPOT_NEW_USER: "LIGHTER_UNI_SPOT_NEW_USER",
4983
+ AAVE_SPOT_NEW_USER: "LIGHTER_AAVE_SPOT_NEW_USER",
4984
+ SKY_SPOT_NEW_USER: "LIGHTER_SKY_SPOT_NEW_USER",
4985
+ LDO_SPOT_NEW_USER: "LIGHTER_LDO_SPOT_NEW_USER"
4731
4986
  };
4732
4987
  var LIGHTER_TOKEN_ADDRESS_BY_ROUTING_ID = {
4733
4988
  ["0x0000000000000000000000000000000000000001".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.ETH_SPOT,
4734
4989
  ["0x0000000000000000000000000000000000000000".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.USDC_PERPS,
4735
4990
  ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.ETH_SPOT_NEW_USER,
4736
- ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.USDC_PERPS_NEW_USER
4991
+ ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.USDC_PERPS_NEW_USER,
4992
+ ["0x514910771AF9Ca656af840dff83E8264EcF986CA".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.LINK_SPOT_NEW_USER,
4993
+ ["0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.UNI_SPOT_NEW_USER,
4994
+ ["0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.AAVE_SPOT_NEW_USER,
4995
+ ["0x56072C95FAA701256059aa122697B133aDEd9279".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.SKY_SPOT_NEW_USER,
4996
+ ["0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32".toLowerCase()]: LIGHTER_DYNAMIC_ROUTING_ID.LDO_SPOT_NEW_USER
4737
4997
  };
4738
4998
  var LIGHTER_ROUTING_ID_BY_TOKEN_ADDRESS = Object.fromEntries(
4739
4999
  Object.entries(LIGHTER_TOKEN_ADDRESS_BY_ROUTING_ID).map(
@@ -6238,7 +6498,7 @@ var ASSET_LOGO_SRCS = {
6238
6498
  IMX: "https://sdk-cdn.fun.xyz/images/imx.svg",
6239
6499
  INJ: "https://sdk-cdn.fun.xyz/images/inj.svg",
6240
6500
  LDO: "https://sdk-cdn.fun.xyz/images/ldo.svg",
6241
- LINK: "https://sdk-cdn.fun.xyz/images/link.svg",
6501
+ LINK: "https://sdk-cdn.fun.xyz/images/link.png",
6242
6502
  LUCK: "https://sdk-cdn.fun.xyz/images/luck.png",
6243
6503
  MATIC: "https://sdk-cdn.fun.xyz/images/matic.svg",
6244
6504
  MFER: "https://sdk-cdn.fun.xyz/images/mfer.png",
@@ -6256,7 +6516,7 @@ var ASSET_LOGO_SRCS = {
6256
6516
  SOL: "https://sdk-cdn.fun.xyz/images/sol.svg",
6257
6517
  SUSDS: "https://sdk-cdn.fun.xyz/images/susds.svg",
6258
6518
  TYBG: "https://sdk-cdn.fun.xyz/images/tybg.png",
6259
- UNI: "https://sdk-cdn.fun.xyz/images/uni.svg",
6519
+ UNI: "https://sdk-cdn.fun.xyz/images/uni.png",
6260
6520
  USDC: "https://sdk-cdn.fun.xyz/images/usdc.svg",
6261
6521
  "USDC.E": "https://sdk-cdn.fun.xyz/images/usdc.svg",
6262
6522
  USDE: "https://sdk-cdn.fun.xyz/images/usde.svg",
@@ -6298,7 +6558,8 @@ var ASSET_LOGO_SRCS = {
6298
6558
  WMON: "https://sdk-cdn.fun.xyz/images/wmon.svg",
6299
6559
  AUSD: "https://sdk-cdn.fun.xyz/images/ausd.svg",
6300
6560
  SUSHI: "https://sdk-cdn.fun.xyz/images/sushi.svg",
6301
- OP: "https://sdk-cdn.fun.xyz/images/optimism.svg"
6561
+ OP: "https://sdk-cdn.fun.xyz/images/optimism.svg",
6562
+ SKY: "https://sdk-cdn.fun.xyz/images/sky.svg"
6302
6563
  };
6303
6564
  var FALLBACK_ASSET = "https://sdk-cdn.fun.xyz/images/dollar_circle.png";
6304
6565
  function getAssetLogoSrc(symbol) {
@@ -7171,14 +7432,14 @@ import { createContext as createContext11 } from "react";
7171
7432
 
7172
7433
  // src/hooks/useTokenTransfer.ts
7173
7434
  import {
7174
- bitcoinChain as bitcoinChain2,
7435
+ bitcoinChain,
7175
7436
  hyperEvmChain,
7176
7437
  monadChain,
7177
7438
  solanaChain
7178
7439
  } from "@funkit/chains";
7179
7440
  import { FlagKey as FlagKey6 } from "@funkit/utils";
7180
7441
  import { useMemo as useMemo15 } from "react";
7181
- import { arbitrum as arbitrum2, mainnet as mainnet5, polygon as polygon2 } from "viem/chains";
7442
+ import { arbitrum as arbitrum2, mainnet as mainnet6, polygon as polygon2 } from "viem/chains";
7182
7443
 
7183
7444
  // src/utils/transfer.ts
7184
7445
  var getTransferTokenQrCodeUri = (props) => {
@@ -7234,12 +7495,12 @@ var useTokenTransfer = (selectedChainId, selectedToken, chainIds) => {
7234
7495
  const isUsdceOnPolygon = isPolygon && selectedToken === "USDC.e";
7235
7496
  const isUsdcOnPolygon = isPolygon && selectedToken === "USDC";
7236
7497
  const showOriginalRecipient = isBankrUsUser || !enableUniversal && (isUsdceOnPolygon || isUsdcOnPolygon);
7237
- const funDepositAddress = selectedChainId === solanaChain.id ? transferInit?.solanaAddr : selectedChainId === bitcoinChain2.id ? transferInit?.btcAddrSegwit : transferInit?.depositAddr;
7498
+ const funDepositAddress = selectedChainId === solanaChain.id ? transferInit?.solanaAddr : selectedChainId === bitcoinChain.id ? transferInit?.btcAddrSegwit : transferInit?.depositAddr;
7238
7499
  const blockchainType = (() => {
7239
7500
  if (selectedChainId === solanaChain.id) {
7240
7501
  return "solana";
7241
7502
  }
7242
- if (selectedChainId === bitcoinChain2.id) {
7503
+ if (selectedChainId === bitcoinChain.id) {
7243
7504
  return "bitcoin";
7244
7505
  }
7245
7506
  return "ethereum";
@@ -7278,7 +7539,7 @@ var useMinTransferLimits = () => {
7278
7539
  return limits ?? { mainnet: 0, nonMainnet: 0 };
7279
7540
  };
7280
7541
  function getMinTransferValueForChain(chainId, limits) {
7281
- const MAINNET_IDS = [mainnet5.id, bitcoinChain2.id];
7542
+ const MAINNET_IDS = [mainnet6.id, bitcoinChain.id];
7282
7543
  return MAINNET_IDS.includes(chainId) ? limits.mainnet : limits.nonMainnet;
7283
7544
  }
7284
7545
  var useMinTransferValue = (selectedChainId) => {
@@ -11939,7 +12200,7 @@ import { useCallback as useCallback11, useMemo as useMemo17 } from "react";
11939
12200
  // src/domains/wallet.ts
11940
12201
  import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO3 } from "@funkit/chains";
11941
12202
  import { isNotNullish as isNotNullish2 } from "@funkit/utils";
11942
- import { mainnet as mainnet6, polygon as polygon3 } from "viem/chains";
12203
+ import { mainnet as mainnet7, polygon as polygon3 } from "viem/chains";
11943
12204
 
11944
12205
  // src/utils/assets.ts
11945
12206
  import { isTokenAddressEquivalent as isTokenAddressEquivalent2 } from "@funkit/utils";
@@ -12234,7 +12495,7 @@ import { getCheckoutQuote as getApiCheckoutQuote } from "@funkit/api-base";
12234
12495
  import { getAssetPriceInfo } from "@funkit/api-base";
12235
12496
  import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5 } from "@funkit/chains";
12236
12497
  import { estimateGas, getGasPrice } from "@wagmi/core";
12237
- import { encodeFunctionData, erc20Abi, formatEther } from "viem";
12498
+ import { encodeFunctionData, erc20Abi as erc20Abi2, formatEther } from "viem";
12238
12499
  import { zksync } from "viem/zksync";
12239
12500
  function getFunFeeBreakdown(baseQuote) {
12240
12501
  return {
@@ -12256,7 +12517,7 @@ async function getTransferGas(baseQuote, selectedSourceAssetInfo, wagmiConfig) {
12256
12517
  to: selectedSourceAssetInfo.address,
12257
12518
  chainId: Number.parseInt(selectedSourceAssetInfo.chainId),
12258
12519
  data: encodeFunctionData({
12259
- abi: erc20Abi,
12520
+ abi: erc20Abi2,
12260
12521
  functionName: "transfer",
12261
12522
  args: [
12262
12523
  DUMMY_TRANSFER_PARAMS.toAddress,
@@ -16467,7 +16728,7 @@ import {
16467
16728
  import React74, { useEffect as useEffect27, useMemo as useMemo21, useState as useState23 } from "react";
16468
16729
  import clsx13 from "clsx";
16469
16730
  import { motion as motion5, useAnimationControls } from "motion/react";
16470
- import { mainnet as mainnet7 } from "viem/chains";
16731
+ import { mainnet as mainnet8 } from "viem/chains";
16471
16732
 
16472
16733
  // src/domains/relay.ts
16473
16734
  var KATANA_BRIDGE_ALERT_THRESHOLD_PERCENT = 0.5;
@@ -16733,7 +16994,7 @@ function computeDigest(relayQuoteMetadata, uiCustomizations, totalPriceImpactPer
16733
16994
  value: void 0
16734
16995
  };
16735
16996
  }
16736
- const isMainnet = details?.currencyIn?.currency?.chainId === mainnet7.id || details?.currencyOut?.currency?.chainId === mainnet7.id;
16997
+ const isMainnet = details?.currencyIn?.currency?.chainId === mainnet8.id || details?.currencyOut?.currency?.chainId === mainnet8.id;
16737
16998
  const percent = formatPercent(totalPriceImpactPercent);
16738
16999
  return {
16739
17000
  isMainnet,
@@ -17532,7 +17793,7 @@ import { useEffect as useEffect29, useState as useState24 } from "react";
17532
17793
  import { polygon as polygon4 } from "viem/chains";
17533
17794
 
17534
17795
  // src/hooks/useEnabledTokenTransferChainTokens.ts
17535
- import { bitcoinChain as bitcoinChain3, solanaChain as solanaChain3 } from "@funkit/chains";
17796
+ import { bitcoinChain as bitcoinChain2, solanaChain as solanaChain3 } from "@funkit/chains";
17536
17797
  import { FlagKey as FlagKey9 } from "@funkit/utils";
17537
17798
  import { base as base5 } from "viem/chains";
17538
17799
  function useEnabledTokenTransferChainTokens(transferInit, isWithdrawal) {
@@ -17559,7 +17820,7 @@ function useEnabledTokenTransferChainTokens(transferInit, isWithdrawal) {
17559
17820
  if (isSolana && !hasSolanaAddress && !isWithdrawal) {
17560
17821
  return acc;
17561
17822
  }
17562
- const isBitcoin = chainId === bitcoinChain3.id;
17823
+ const isBitcoin = chainId === bitcoinChain2.id;
17563
17824
  if (isBitcoin && !hasBitcoinAddress && !isWithdrawal) {
17564
17825
  return acc;
17565
17826
  }
@@ -26881,19 +27142,19 @@ import { Trans as Trans10 } from "react-i18next";
26881
27142
  // src/modals/CheckoutModal/ConfirmationStep/useAccountBalanceTransfer.ts
26882
27143
  import { USDT_ABI } from "@funkit/utils";
26883
27144
  import { useCallback as useCallback32 } from "react";
26884
- import { erc20Abi as erc20Abi2 } from "viem";
27145
+ import { erc20Abi as erc20Abi3 } from "viem";
26885
27146
  import { useAccount as useAccount6, useSendTransaction, useWriteContract } from "wagmi";
26886
27147
 
26887
27148
  // src/utils/isMainnetUsdt.ts
26888
27149
  import { isTokenEquivalent as isTokenEquivalent3 } from "@funkit/utils";
26889
- import { mainnet as mainnet8 } from "viem/chains";
27150
+ import { mainnet as mainnet9 } from "viem/chains";
26890
27151
  var USDT_MAINNET_ADDRESS = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
26891
27152
  function isMainnetUsdt(chainId, address) {
26892
27153
  return isTokenEquivalent3({
26893
27154
  firstTokenAddress: address,
26894
27155
  firstTokenChainId: chainId.toString(),
26895
27156
  secondTokenAddress: USDT_MAINNET_ADDRESS,
26896
- secondTokenChainId: mainnet8.id.toString()
27157
+ secondTokenChainId: mainnet9.id.toString()
26897
27158
  });
26898
27159
  }
26899
27160
 
@@ -26963,7 +27224,7 @@ function useWeb3AccountBalancePostCheckout(setPostCheckoutStepMessage) {
26963
27224
  chainId: Number.parseInt(sourceAssetChainId),
26964
27225
  address: sourceAssetAddress,
26965
27226
  // USDT on mainnet has a different ABI
26966
- abi: isTokenMainnetUsdt ? USDT_ABI : erc20Abi2,
27227
+ abi: isTokenMainnetUsdt ? USDT_ABI : erc20Abi3,
26967
27228
  functionName: "transfer",
26968
27229
  args: [depositAddress, sourceAssetAmountBaseUnit]
26969
27230
  };
@@ -30268,7 +30529,7 @@ import {
30268
30529
  katanaChain
30269
30530
  } from "@funkit/chains";
30270
30531
  import { useCallback as useCallback38, useState as useState56 } from "react";
30271
- import { mainnet as mainnet9, mantle, zksync as zksync2 } from "viem/chains";
30532
+ import { mainnet as mainnet10, mantle, zksync as zksync2 } from "viem/chains";
30272
30533
  import { getAssetErc20ByChainAndSymbol as getAssetErc20ByChainAndSymbol2 } from "@funkit/api-base";
30273
30534
  var pickSourceAssetForCard = async (checkoutItem, userIpInfo, apiKey) => {
30274
30535
  if (!checkoutItem?.initSettings.config.targetChain) {
@@ -30302,7 +30563,7 @@ var pickSourceAssetForCard = async (checkoutItem, userIpInfo, apiKey) => {
30302
30563
  sourceTokenAddress = NATIVE_TOKEN;
30303
30564
  sourceTokenChainId = moonpayChainId;
30304
30565
  } else {
30305
- sourceTokenChainId = isNyOrTxOrVi ? mainnet9.id.toString() : moonpayChainId;
30566
+ sourceTokenChainId = isNyOrTxOrVi ? mainnet10.id.toString() : moonpayChainId;
30306
30567
  if (isTargetAssetEthOrWeth) {
30307
30568
  sourceTokenTicker = "ETH" /* ETH */;
30308
30569
  sourceTokenAddress = NATIVE_TOKEN;
@@ -31240,7 +31501,7 @@ function usePaymentMethodEnablement({
31240
31501
  const isKatanaEarnFlowAction = isKatanaEarnFlow({ apiKey, checkoutConfig });
31241
31502
  const isFiatEnabled = isFiatFlagEnabled && !isKatanaEarnFlowAction;
31242
31503
  const isTokenTransferEnabled = isTokenTransferFlagEnabled && !isKatanaEarnFlowAction;
31243
- const isMeldEnabled = isMeldFlagEnabled && !isKatanaEarnFlowAction;
31504
+ const isMeldEnabled = isMeldFlagEnabled && !isKatanaEarnFlowAction && isTokenTransferEnabled;
31244
31505
  const isBrokerageEnabled = isBrokerageFlagEnabled && isTokenTransferEnabled;
31245
31506
  return {
31246
31507
  isFiatEnabled,
@@ -31300,9 +31561,16 @@ var usePaymentSources = (paymentMethodInfo, targetChainId, checkoutConfig) => {
31300
31561
  isWalletInNewSources && "balance" /* ACCOUNT_BALANCE */,
31301
31562
  isBrokerageEnabled && "brokerage" /* BROKERAGE */
31302
31563
  ].filter((b) => !!b);
31564
+ const comingSoon = [];
31565
+ if (isLighterxyzCustomer(apiKey) && !isTokenTransferEnabled) {
31566
+ comingSoon.push("token_transfer" /* TOKEN_TRANSFER */);
31567
+ comingSoon.push("card" /* CARD */);
31568
+ comingSoon.push("brokerage" /* BROKERAGE */);
31569
+ }
31303
31570
  return {
31304
31571
  preferred: connected.length > 0 ? connected : fallback2,
31305
- moreSources: newSources
31572
+ moreSources: newSources,
31573
+ comingSoon
31306
31574
  };
31307
31575
  };
31308
31576
 
@@ -31925,7 +32193,7 @@ import {
31925
32193
  import { formatCurrencyAndStringify as formatCurrencyAndStringify11, isTokenEquivalent as isTokenEquivalent5 } from "@funkit/utils";
31926
32194
  import React188, { useEffect as useEffect50, useMemo as useMemo45, useState as useState58 } from "react";
31927
32195
  import { createPortal as createPortal18 } from "react-dom";
31928
- import { mainnet as mainnet10 } from "viem/chains";
32196
+ import { mainnet as mainnet11 } from "viem/chains";
31929
32197
 
31930
32198
  // src/components/Dropdown/ReceiveTokenDropdown.tsx
31931
32199
  import React186 from "react";
@@ -31946,9 +32214,12 @@ var ReceiveTokenDropdown = ({
31946
32214
  onTokenSelected,
31947
32215
  label,
31948
32216
  activeItemLabel,
31949
- activeItemProps
32217
+ activeItemProps,
32218
+ maxDropdownHeight,
32219
+ displayedChainId
31950
32220
  }) => {
31951
32221
  const allTokens = Array.from(new Set(Object.values(tokens).flat()));
32222
+ const patchedChainId = displayedChainId ?? chainId;
31952
32223
  const tokenBadgeText = tokens.find(
31953
32224
  (token) => token.tokenSymbol === selectedToken
31954
32225
  )?.badgeText;
@@ -31961,6 +32232,7 @@ var ReceiveTokenDropdown = ({
31961
32232
  return /* @__PURE__ */ React186.createElement(
31962
32233
  BaseDropdown_default,
31963
32234
  {
32235
+ maxDropdownHeight,
31964
32236
  horizontalIconGap: "8",
31965
32237
  label,
31966
32238
  openToTopOnMobile: false,
@@ -31971,7 +32243,7 @@ var ReceiveTokenDropdown = ({
31971
32243
  assetIconSize: TOKEN_ICON_SIZE2,
31972
32244
  assetName: selectedToken,
31973
32245
  assetSrc: getTokenIconUrl(selectedToken, tokens),
31974
- chainId,
32246
+ chainId: patchedChainId,
31975
32247
  largeChainIcon: true
31976
32248
  }
31977
32249
  ),
@@ -32001,7 +32273,7 @@ var ReceiveTokenDropdown = ({
32001
32273
  assetIconSize: TOKEN_ICON_SIZE2,
32002
32274
  assetName: "receive-token-asset",
32003
32275
  assetSrc: iconUrl,
32004
- chainId,
32276
+ chainId: patchedChainId,
32005
32277
  largeChainIcon: true
32006
32278
  }
32007
32279
  ),
@@ -32769,7 +33041,7 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates, fin
32769
33041
  }
32770
33042
  if (isEtherealCustomer(apiKey)) {
32771
33043
  if (isTokenEquivalent5({
32772
- firstTokenChainId: mainnet10.id.toString(),
33044
+ firstTokenChainId: mainnet11.id.toString(),
32773
33045
  firstTokenAddress: "0x90d2af7d622ca3141efa4d8f1f24d86e5974cc8f",
32774
33046
  // eUSDe (Ethereum)
32775
33047
  secondTokenChainId: asset.pickedChainId,
@@ -32812,6 +33084,8 @@ function showsNativeTokensOnTop(apiKey) {
32812
33084
 
32813
33085
  // src/modals/CheckoutModal/SourceChange/SourceChange.tsx
32814
33086
  import { BridgeCustomerStatus as BridgeCustomerStatus6, MeldServiceProvider as MeldServiceProvider4 } from "@funkit/api-base";
33087
+ import { LIGHTER_CHAIN_ID as LIGHTER_CHAIN_ID3 } from "@funkit/chains";
33088
+ import { noop as noop9 } from "@funkit/utils";
32815
33089
  import React190, { useCallback as useCallback41, useEffect as useEffect51, useState as useState59 } from "react";
32816
33090
  import { createPortal as createPortal19 } from "react-dom";
32817
33091
 
@@ -33026,6 +33300,7 @@ function SourceChange({
33026
33300
  const [selectedTargetAsset, setSelectedTargetAsset] = useState59(
33027
33301
  () => getDefaultDynamicTargetAsset(checkoutConfig)
33028
33302
  );
33303
+ const isLighter = isLighterxyzCustomer(apiKey);
33029
33304
  useEffect51(() => {
33030
33305
  if (!paymentMethodInfo) {
33031
33306
  return;
@@ -33142,7 +33417,7 @@ function SourceChange({
33142
33417
  targetAssetMinAmount: token.targetAssetMinAmount,
33143
33418
  iconSrc: token.iconSrc
33144
33419
  });
33145
- if (isLighterxyzCustomer(apiKey)) {
33420
+ if (isLighter) {
33146
33421
  const routingId = getLighterRoutingIdByTokenAddress(token.tokenAddress);
33147
33422
  routingId && updateDynamicRoutingId(routingId);
33148
33423
  }
@@ -33152,7 +33427,7 @@ function SourceChange({
33152
33427
  onCloseConnectModal();
33153
33428
  }
33154
33429
  }, [connectionStatus]);
33155
- const { preferred, moreSources } = usePaymentSources(
33430
+ const { preferred, moreSources, comingSoon } = usePaymentSources(
33156
33431
  paymentMethodInfo,
33157
33432
  targetChainId,
33158
33433
  checkoutItem?.initSettings.config
@@ -33181,6 +33456,20 @@ function SourceChange({
33181
33456
  }
33182
33457
  );
33183
33458
  }
33459
+ function renderComingSoon(source) {
33460
+ return /* @__PURE__ */ React190.createElement(
33461
+ AddPaymentMethodItem,
33462
+ {
33463
+ key: source,
33464
+ paymentMethod: source,
33465
+ isActive: false,
33466
+ isClickable: false,
33467
+ onClick: noop9,
33468
+ customValueIcon: /* @__PURE__ */ React190.createElement(FunBadge, { borderColor: "generalBorder" }, t("common.comingSoon"))
33469
+ }
33470
+ );
33471
+ }
33472
+ const hasMoreSources = moreSources.length > 0 || comingSoon.length > 0;
33184
33473
  const bottomSectionRef = useBottomSectionRef();
33185
33474
  return /* @__PURE__ */ React190.createElement(React190.Fragment, null, isTargetAssetSelectable && /* @__PURE__ */ React190.createElement(Box, { marginBottom: "8" }, /* @__PURE__ */ React190.createElement(
33186
33475
  ReceiveTokenDropdown,
@@ -33188,6 +33477,7 @@ function SourceChange({
33188
33477
  activeItemLabel: t("sourceChange.selectTokenLabel"),
33189
33478
  activeItemProps: { background: { base: "offBackground" } },
33190
33479
  chainId: Number(selectedTargetAsset.tokenChainId),
33480
+ displayedChainId: isLighter ? LIGHTER_CHAIN_ID3 : void 0,
33191
33481
  onTokenSelected: handleTargetAssetChange,
33192
33482
  selectedToken: selectedTargetAsset?.tokenSymbol,
33193
33483
  tokens: dynamicTargetAssets
@@ -33203,7 +33493,7 @@ function SourceChange({
33203
33493
  }
33204
33494
  },
33205
33495
  preferred.map(renderSource),
33206
- preferred.length > 0 && moreSources.length > 0 && /* @__PURE__ */ React190.createElement(
33496
+ preferred.length > 0 && hasMoreSources && /* @__PURE__ */ React190.createElement(
33207
33497
  FunDivider,
33208
33498
  {
33209
33499
  label: t("sourceChange.more"),
@@ -33213,6 +33503,7 @@ function SourceChange({
33213
33503
  }
33214
33504
  ),
33215
33505
  moreSources.map(renderSource),
33506
+ comingSoon.map(renderComingSoon),
33216
33507
  /* @__PURE__ */ React190.createElement(PayPal, null)
33217
33508
  ), /* @__PURE__ */ React190.createElement(Box, { className: emptyStateStyles }, /* @__PURE__ */ React190.createElement(
33218
33509
  FunNoResults,
@@ -38026,8 +38317,7 @@ function useFunkitCheckout(props) {
38026
38317
  initNewCheckout,
38027
38318
  initNewWithdrawal,
38028
38319
  updateSourceAsset,
38029
- updateSelectedPaymentMethodInfo,
38030
- checkoutItem
38320
+ updateSelectedPaymentMethodInfo
38031
38321
  } = useContext19(FunkitCheckoutContext);
38032
38322
  const { openFunCheckoutModal } = useFunCheckoutModal();
38033
38323
  const { openWithdrawalModal } = useWithdrawalModal();
@@ -38057,12 +38347,10 @@ function useFunkitCheckout(props) {
38057
38347
  );
38058
38348
  const [pendingCheckoutConfig, setPendingCheckoutConfig] = useState75();
38059
38349
  const onCheckoutConflict = ({
38060
- newConfig,
38061
38350
  resume,
38062
38351
  replace
38063
38352
  }) => {
38064
- const lastConfig = checkoutItem?.initSettings.config;
38065
- if (lastConfig?.targetAsset === newConfig.targetAsset && isLighterxyzCustomer(apiKey)) {
38353
+ if (isLighterxyzCustomer(apiKey)) {
38066
38354
  resume();
38067
38355
  return false;
38068
38356
  }
@@ -38131,7 +38419,6 @@ function useFunkitCheckout(props) {
38131
38419
  }
38132
38420
  if (hasSoftHiddenCheckout && softHiddenCheckoutId) {
38133
38421
  const shouldContinue = onCheckoutConflict({
38134
- newConfig: validationResult.config,
38135
38422
  hiddenCheckoutId: softHiddenCheckoutId,
38136
38423
  resume: resumeSoftHiddenCheckout,
38137
38424
  replace: discardSoftHiddenCheckout
@@ -38345,11 +38632,10 @@ function getCheckoutItemDisplay({
38345
38632
  targetAssetTicker
38346
38633
  } = checkoutConfig;
38347
38634
  const displayAmount = overrideAmount ?? targetAssetAmount;
38635
+ const itemName = targetAssetTicker || checkoutItemTitle;
38348
38636
  if (isCheckoutPostActionRequired(checkoutConfig)) {
38349
- const itemName2 = checkoutItemTitle;
38350
- return !hideAmount && displayAmount > 0 ? formatCryptoAndStringify9(round3(displayAmount, 5), itemName2) : itemName2;
38637
+ return !hideAmount && displayAmount > 0 ? formatCryptoAndStringify9(round3(displayAmount, 5), itemName) : itemName;
38351
38638
  }
38352
- const itemName = targetAssetTicker || checkoutItemTitle;
38353
38639
  return hideAmount ? itemName : formatCryptoAndStringify9(displayAmount, itemName);
38354
38640
  }
38355
38641
  function getBaseQuoteTotalFeesFromAmount(baseQuote) {
@@ -38383,9 +38669,9 @@ async function getTokenDecimals(wagmiConfig, chainId, tokenAddress) {
38383
38669
  if (chainId === solanaChain5.id.toString()) {
38384
38670
  return solanaChain5.nativeCurrency.decimals;
38385
38671
  }
38386
- const decimals = await readContract(wagmiConfig, {
38672
+ const decimals = await readContract2(wagmiConfig, {
38387
38673
  address: tokenAddress,
38388
- abi: erc20Abi3,
38674
+ abi: erc20Abi4,
38389
38675
  chainId: Number.parseInt(chainId),
38390
38676
  functionName: "decimals"
38391
38677
  });
@@ -38490,12 +38776,12 @@ function computeDisplayDestinationToken(checkoutConfig, displayAssetAmount) {
38490
38776
  }
38491
38777
 
38492
38778
  // src/domains/feeEstimate.ts
38493
- import { mainnet as mainnet11 } from "viem/chains";
38779
+ import { mainnet as mainnet12 } from "viem/chains";
38494
38780
  var L1_FEES_ESTIMATE = 1;
38495
38781
  var L2_FEES_ESTIMATE = 1;
38496
38782
  var BROKERAGE_FEES_ESTIMATE = 0;
38497
38783
  var getBaseFeeUsdEstimate = (targetChainId, assetChainId) => {
38498
- if (targetChainId !== mainnet11.id.toString() && assetChainId !== mainnet11.id.toString()) {
38784
+ if (targetChainId !== mainnet12.id.toString() && assetChainId !== mainnet12.id.toString()) {
38499
38785
  return L2_FEES_ESTIMATE;
38500
38786
  }
38501
38787
  return L1_FEES_ESTIMATE;
@@ -38511,7 +38797,7 @@ var getFeesUsdEstimate = (targetChainId, assetChainId, paymentMethod) => {
38511
38797
  var isStablecoin = (symbol) => STABLECOIN_SYMBOLS.find((s) => symbol.toLowerCase().includes(s.toLowerCase()));
38512
38798
  function isPreferredChain(chainId, additionalChains = []) {
38513
38799
  const chains = /* @__PURE__ */ new Set([
38514
- mainnet12.id,
38800
+ mainnet13.id,
38515
38801
  polygon6.id,
38516
38802
  base7.id,
38517
38803
  arbitrum5.id,
@@ -38823,8 +39109,8 @@ function ConnectButtonRenderer({
38823
39109
  connectModalOpen,
38824
39110
  mounted: isMounted(),
38825
39111
  openAccountModal: () => openAccountModal?.(null),
38826
- openChainModal: openChainModal ?? noop9,
38827
- openConnectModal: openConnectModal ?? noop9
39112
+ openChainModal: openChainModal ?? noop10,
39113
+ openConnectModal: openConnectModal ?? noop10
38828
39114
  }));
38829
39115
  }
38830
39116
  ConnectButtonRenderer.displayName = "ConnectButton.Custom";