@funkit/connect 9.5.0 → 9.6.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 (166) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/__generated__/default_configs.d.ts +145 -6
  3. package/dist/__generated__/default_feature_gates.d.ts +2 -0
  4. package/dist/clients/{chunk-SBQ2UUPK.js → chunk-H6F75ULR.js} +7 -1
  5. package/dist/clients/fanatics.js +1 -1
  6. package/dist/clients/polymarket.js +1 -1
  7. package/dist/components/CopyAddress/CopyInputDisplayedAddress.d.ts +1 -0
  8. package/dist/components/Dialog/Dialog.d.ts +13 -7
  9. package/dist/components/Dialog/DialogContent.css.d.ts +7 -2
  10. package/dist/components/Dropdown/ChainDropdown.d.ts +1 -3
  11. package/dist/components/Dropdown/TokenAndChainDropdown.d.ts +1 -3
  12. package/dist/components/FunFeatureList/FunFeatureList.d.ts +2 -1
  13. package/dist/components/FunNotificationBanner/FunNotificationBanner.d.ts +2 -1
  14. package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +4 -1
  15. package/dist/components/Icons/GlobeIcon.d.ts +4 -0
  16. package/dist/components/PaddedScrollableArea/PaddedScrollableArea.d.ts +28 -0
  17. package/dist/components/PaddedScrollableArea/paddedScrollableArea.css.d.ts +4 -0
  18. package/dist/components/TransferTokenDetails/TransferTokenDetails.d.ts +2 -1
  19. package/dist/domains/asset.d.ts +0 -1
  20. package/dist/domains/quote.d.ts +6 -4
  21. package/dist/domains/quoteMode/index.d.ts +2 -2
  22. package/dist/domains/quoteMode/resolveQuoteMode.d.ts +8 -7
  23. package/dist/domains/quoteMode/types.d.ts +13 -5
  24. package/dist/domains/swapped.d.ts +7 -1
  25. package/dist/domains/wallet.d.ts +6 -0
  26. package/dist/hooks/queries/useWithdrawFops.d.ts +7 -4
  27. package/dist/hooks/track/CheckoutModalEvent.d.ts +14 -1
  28. package/dist/hooks/useAssetPrice.d.ts +3 -1
  29. package/dist/hooks/useNewTokenBanner.d.ts +2 -0
  30. package/dist/hooks/useTokenAndChainDropdown.d.ts +0 -1
  31. package/dist/hooks/useTokenTransfer.d.ts +7 -11
  32. package/dist/hooks/useTokenTransferConfig.d.ts +1 -1
  33. package/dist/index.css +67 -81
  34. package/dist/index.js +5477 -3841
  35. package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +6 -1
  36. package/dist/modals/CheckoutModal/ConfirmationStep/mapRetryAction.d.ts +18 -0
  37. package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutQuote.d.ts +3 -2
  38. package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +4 -0
  39. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +3 -1
  40. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +32 -1
  41. package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +3 -0
  42. package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +19 -0
  43. package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +4 -0
  44. package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +2 -1
  45. package/dist/modals/CheckoutModal/SourceChange/sourceChange.css.d.ts +0 -3
  46. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeContainer.d.ts +1 -1
  47. package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.d.ts +2 -0
  48. package/dist/modals/CheckoutModal/TransferToken/useTransferTokenTracking.d.ts +29 -0
  49. package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -3
  50. package/dist/modals/WithdrawalModal/WithdrawalMethodSelect.d.ts +3 -1
  51. package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -1
  52. package/dist/providers/FunkitCheckoutContext/types.d.ts +7 -0
  53. package/dist/providers/FunkitQuoteContext.d.ts +5 -4
  54. package/dist/providers/FunkitQuoteContext.track.d.ts +3 -2
  55. package/dist/providers/QuoteModeContext.d.ts +6 -0
  56. package/dist/providers/SwappedProvider.d.ts +2 -1
  57. package/dist/utils/address.d.ts +3 -4
  58. package/dist/utils/bluvo.d.ts +2 -4
  59. package/dist/utils/checkout.d.ts +2 -1
  60. package/dist/utils/funLogger.d.ts +3 -1
  61. package/dist/utils/tokenTransfer/types.d.ts +7 -1
  62. package/dist/wagmi/hooks.d.ts +1 -1
  63. package/dist/wallets/walletConnectors/argentWallet/argentWallet.js +3 -3
  64. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +4 -4
  65. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +4 -4
  66. package/dist/wallets/walletConnectors/bitskiWallet/bitskiWallet.js +3 -3
  67. package/dist/wallets/walletConnectors/bitverseWallet/bitverseWallet.js +3 -3
  68. package/dist/wallets/walletConnectors/bloomWallet/bloomWallet.js +3 -3
  69. package/dist/wallets/walletConnectors/braveWallet/braveWallet.js +3 -3
  70. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +4 -4
  71. package/dist/wallets/walletConnectors/{chunk-W6TXXLCO.js → chunk-2DKNXOPL.js} +1 -1
  72. package/dist/wallets/walletConnectors/{chunk-KV4HGYM3.js → chunk-3K2MFXCO.js} +1 -0
  73. package/dist/wallets/walletConnectors/{chunk-GVOQTORD.js → chunk-3ZJN3PXP.js} +2 -2
  74. package/dist/wallets/walletConnectors/{chunk-GH4M6FTK.js → chunk-55VS2NKG.js} +2 -2
  75. package/dist/wallets/walletConnectors/{chunk-XMNVOYSJ.js → chunk-57GN4W23.js} +1 -1
  76. package/dist/wallets/walletConnectors/{chunk-6UCI7GM6.js → chunk-7IEUTLHY.js} +2 -2
  77. package/dist/wallets/walletConnectors/{chunk-WFNPWKU3.js → chunk-7PVUEV4M.js} +1 -1
  78. package/dist/wallets/walletConnectors/{chunk-HE2LMIPD.js → chunk-A5EZBNME.js} +1 -1
  79. package/dist/wallets/walletConnectors/{chunk-4R4AARTG.js → chunk-AM5MSNVQ.js} +1 -1
  80. package/dist/wallets/walletConnectors/{chunk-GSHSWVEG.js → chunk-AZYMJ4C6.js} +2 -2
  81. package/dist/wallets/walletConnectors/{chunk-BVX22N7L.js → chunk-BBPTPMH7.js} +1 -1
  82. package/dist/wallets/walletConnectors/{chunk-YKVWTGU7.js → chunk-BHAPTB57.js} +1 -1
  83. package/dist/wallets/walletConnectors/{chunk-IUVO4IN3.js → chunk-BWLMNATA.js} +1 -1
  84. package/dist/wallets/walletConnectors/{chunk-HKVDCVCG.js → chunk-DP5ICBEB.js} +1 -1
  85. package/dist/wallets/walletConnectors/{chunk-HE5J5T7X.js → chunk-E3NZE4UP.js} +1 -1
  86. package/dist/wallets/walletConnectors/{chunk-RVWLP4IM.js → chunk-EUMOVTRQ.js} +1 -1
  87. package/dist/wallets/walletConnectors/{chunk-MAPXJUOO.js → chunk-FMVNQKZL.js} +1 -1
  88. package/dist/wallets/walletConnectors/{chunk-KO56HCTI.js → chunk-FWM4KTOV.js} +2 -2
  89. package/dist/wallets/walletConnectors/{chunk-INNF7G5X.js → chunk-G3RQSCYR.js} +1 -1
  90. package/dist/wallets/walletConnectors/{chunk-W6MXINYY.js → chunk-HPUEYLLS.js} +1 -1
  91. package/dist/wallets/walletConnectors/{chunk-HOPH3TQ3.js → chunk-IMNI4AGV.js} +2 -2
  92. package/dist/wallets/walletConnectors/{chunk-HETS3KKI.js → chunk-IRHK6SOW.js} +2 -2
  93. package/dist/wallets/walletConnectors/{chunk-CJJT7LMT.js → chunk-J3PJOMO7.js} +2 -2
  94. package/dist/wallets/walletConnectors/{chunk-4BMUFNMT.js → chunk-KS5MJNGD.js} +1 -1
  95. package/dist/wallets/walletConnectors/{chunk-O7RSASRH.js → chunk-KSNA53EX.js} +1 -1
  96. package/dist/wallets/walletConnectors/{chunk-7OARWILZ.js → chunk-LEAZMT5Y.js} +2 -2
  97. package/dist/wallets/walletConnectors/{chunk-WDTNOIMF.js → chunk-MTJIPVYB.js} +1 -1
  98. package/dist/wallets/walletConnectors/{chunk-G4V5B6YC.js → chunk-O4IDLNBH.js} +1 -1
  99. package/dist/wallets/walletConnectors/{chunk-J34FG3W4.js → chunk-O7ZCUI2Y.js} +1 -1
  100. package/dist/wallets/walletConnectors/{chunk-EKJHJFRN.js → chunk-OD6B2ISG.js} +2 -2
  101. package/dist/wallets/walletConnectors/{chunk-PKMAPNN6.js → chunk-OSOB6QYX.js} +2 -2
  102. package/dist/wallets/walletConnectors/{chunk-RZXMOPIV.js → chunk-OUM6H3WU.js} +1 -1
  103. package/dist/wallets/walletConnectors/{chunk-R4S234FL.js → chunk-P4E2ZFQB.js} +1 -1
  104. package/dist/wallets/walletConnectors/{chunk-TFVCCI2D.js → chunk-PARFRRNI.js} +1 -1
  105. package/dist/wallets/walletConnectors/{chunk-34LO6Q7A.js → chunk-R7X5RIO7.js} +1 -1
  106. package/dist/wallets/walletConnectors/{chunk-GROWFRGP.js → chunk-RZH4FSX7.js} +1 -1
  107. package/dist/wallets/walletConnectors/{chunk-6YO27XOM.js → chunk-RZQ4B4Z7.js} +2 -2
  108. package/dist/wallets/walletConnectors/{chunk-UB2SSFH7.js → chunk-S6R4B763.js} +1 -1
  109. package/dist/wallets/walletConnectors/{chunk-6MFOL6EB.js → chunk-T3VMQBBI.js} +1 -1
  110. package/dist/wallets/walletConnectors/{chunk-JYVLYSH3.js → chunk-TNVLCMJD.js} +1 -1
  111. package/dist/wallets/walletConnectors/{chunk-TTHM3WUR.js → chunk-UFYNHHDU.js} +2 -2
  112. package/dist/wallets/walletConnectors/{chunk-NHLG5PVD.js → chunk-UKSIXGWC.js} +1 -1
  113. package/dist/wallets/walletConnectors/{chunk-4C7ER452.js → chunk-UYW6MV74.js} +2 -2
  114. package/dist/wallets/walletConnectors/{chunk-WKCCLGHJ.js → chunk-V4EXM3KB.js} +1 -1
  115. package/dist/wallets/walletConnectors/{chunk-IICWJWGZ.js → chunk-VMMROPXK.js} +2 -2
  116. package/dist/wallets/walletConnectors/{chunk-VUOAIUZE.js → chunk-XTD6OMZP.js} +1 -1
  117. package/dist/wallets/walletConnectors/{chunk-ZRNBHLUU.js → chunk-XVH4JIXB.js} +1 -1
  118. package/dist/wallets/walletConnectors/{chunk-A7FNGC4A.js → chunk-Y36HPFB3.js} +1 -1
  119. package/dist/wallets/walletConnectors/{chunk-53VYSPXK.js → chunk-YGMU5VWD.js} +2 -2
  120. package/dist/wallets/walletConnectors/{chunk-BAVE62IL.js → chunk-YYYRPQHB.js} +1 -1
  121. package/dist/wallets/walletConnectors/{chunk-XBLHZICW.js → chunk-ZJJWGKB6.js} +2 -2
  122. package/dist/wallets/walletConnectors/{chunk-LI6QY2B5.js → chunk-ZL6XCMV5.js} +2 -2
  123. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +4 -4
  124. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +4 -4
  125. package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.js +2 -2
  126. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +4 -4
  127. package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.js +3 -3
  128. package/dist/wallets/walletConnectors/desigWallet/desigWallet.js +3 -3
  129. package/dist/wallets/walletConnectors/enkryptWallet/enkryptWallet.js +3 -3
  130. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +4 -4
  131. package/dist/wallets/walletConnectors/frameWallet/frameWallet.js +3 -3
  132. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +4 -4
  133. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +4 -4
  134. package/dist/wallets/walletConnectors/imTokenWallet/imTokenWallet.js +3 -3
  135. package/dist/wallets/walletConnectors/index.js +63 -63
  136. package/dist/wallets/walletConnectors/injectedWallet/injectedWallet.js +3 -3
  137. package/dist/wallets/walletConnectors/kresusWallet/kresusWallet.js +3 -3
  138. package/dist/wallets/walletConnectors/ledgerWallet/ledgerWallet.js +3 -3
  139. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +4 -4
  140. package/dist/wallets/walletConnectors/mewWallet/mewWallet.js +3 -3
  141. package/dist/wallets/walletConnectors/oktoWallet/oktoWallet.js +3 -3
  142. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +4 -4
  143. package/dist/wallets/walletConnectors/omniWallet/omniWallet.js +3 -3
  144. package/dist/wallets/walletConnectors/oneInchWallet/oneInchWallet.js +3 -3
  145. package/dist/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.js +3 -3
  146. package/dist/wallets/walletConnectors/phantomWallet/phantomWallet.js +3 -3
  147. package/dist/wallets/walletConnectors/rabbyWallet/rabbyWallet.js +3 -3
  148. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +4 -4
  149. package/dist/wallets/walletConnectors/ramperWallet/ramperWallet.js +3 -3
  150. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +4 -4
  151. package/dist/wallets/walletConnectors/safeWallet/safeWallet.js +2 -2
  152. package/dist/wallets/walletConnectors/safeheronWallet/safeheronWallet.js +3 -3
  153. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +4 -4
  154. package/dist/wallets/walletConnectors/subWallet/subWallet.js +4 -4
  155. package/dist/wallets/walletConnectors/tahoWallet/tahoWallet.js +3 -3
  156. package/dist/wallets/walletConnectors/talismanWallet/talismanWallet.js +3 -3
  157. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +4 -4
  158. package/dist/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.js +3 -3
  159. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +4 -4
  160. package/dist/wallets/walletConnectors/uniswapWallet/uniswapWallet.js +3 -3
  161. package/dist/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.js +3 -3
  162. package/dist/wallets/walletConnectors/xdefiWallet/xdefiWallet.js +3 -3
  163. package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +3 -3
  164. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +4 -4
  165. package/package.json +3 -3
  166. package/dist/components/Dropdown/TokenAndChainDropdown.css.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 9.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2c480aa: Add exact-in quoting support and improve max button accuracy
8
+ - 114cbaf: Add CRYPTO_FIAT rail config types and integrate /fops API for swapped withdrawal off-ramp
9
+
10
+ ### Patch Changes
11
+
12
+ - 7c75d3c: empty form of payments message implemented
13
+ - 2c480aa: fix(connect): use live gas price instead of hardcoded 50 gwei for max button
14
+ - 2c480aa: fix(connect): round fiat amount to 2 decimal places for quick options
15
+ - 3cff3a7: update labels and restore min deposit on mobile
16
+ - d4da769: refactor(connect): remove dirty global css for source change inner scroll area
17
+ - c261752: require countrycode for fops call
18
+ - f987707: feat(connect): instrument quote mode and quick option events for rollout telemetry
19
+ - b8fec96: fix(connect): fix withdrawal amount debounce
20
+ - 8dec5f9: feat(connect): sync amounts while instant quoting
21
+ - 78c4d50: feat(connect): add statsig events for checkout notifications
22
+ - 6c5c1ba: feat(connect): migrate TokenTransferNewTokens and NewTokenAssetSelectionBanner flags to statsig
23
+ - 14763f9: feat: support tron USDT withdrawals
24
+ - 5aafb0a: Feature gate excluded withdrawal tokens logic
25
+ - d4da769: fix(connect): fix source change without initial wallet
26
+ - Updated dependencies [514b734]
27
+ - Updated dependencies [6c5c1ba]
28
+ - Updated dependencies [114cbaf]
29
+ - @funkit/api-base@4.0.0
30
+ - @funkit/utils@2.0.0
31
+
32
+ ## 9.5.1
33
+
34
+ ### Patch Changes
35
+
36
+ - 9827fbd: Add typeLabel to Datadog logging
37
+ - e02fa70: feat(connect): migrate MinTokenTransferValue flag to statsig
38
+ - cd9d0c2: feat(connect): migrate WithdrawalChainsAndAssets flag to statsig
39
+ - 5e1069c: refactor(connect): use dynamic config to determine chain ids for token transfer payment method item
40
+ - b12f9d8: implement swapped focus and success transaction events
41
+ - Updated dependencies [e02fa70]
42
+ - Updated dependencies [cd9d0c2]
43
+ - Updated dependencies [6024e2f]
44
+ - @funkit/utils@1.2.8
45
+ - @funkit/api-base@3.0.6
46
+
3
47
  ## 9.5.0
4
48
 
5
49
  ### Minor Changes
@@ -61,6 +61,9 @@ declare const _default: {
61
61
  readonly disabletokentransferchainsandassets: {
62
62
  readonly value: {};
63
63
  };
64
+ readonly disablewithdrawalchainsandassets: {
65
+ readonly value: {};
66
+ };
64
67
  readonly dynamicrouting: {
65
68
  readonly value: readonly [{
66
69
  readonly routeId: "LIGHTER_ETH_SPOT";
@@ -424,8 +427,12 @@ declare const _default: {
424
427
  readonly countryCodes: readonly ["CA"];
425
428
  };
426
429
  readonly value: {
427
- readonly mainnet: 15;
428
- readonly nonMainnet: 3;
430
+ readonly default: 3;
431
+ readonly chains: {
432
+ readonly '1': 15;
433
+ readonly '8253038': 15;
434
+ readonly '728126428': 15;
435
+ };
429
436
  };
430
437
  }, {
431
438
  readonly condition: {
@@ -433,15 +440,26 @@ declare const _default: {
433
440
  readonly countryCodes: readonly ["AU"];
434
441
  };
435
442
  readonly value: {
436
- readonly mainnet: 15;
437
- readonly nonMainnet: 3;
443
+ readonly default: 3.5;
444
+ readonly chains: {
445
+ readonly '1': 15;
446
+ readonly '8253038': 15;
447
+ readonly '728126428': 15;
448
+ };
438
449
  };
439
450
  }];
440
451
  readonly value: {
441
- readonly mainnet: 10;
442
- readonly nonMainnet: 2.5;
452
+ readonly default: 2.5;
453
+ readonly chains: {
454
+ readonly '1': 10;
455
+ readonly '8253038': 10;
456
+ readonly '728126428': 10;
457
+ };
443
458
  };
444
459
  };
460
+ readonly newtokenassetselectionbanner: {
461
+ readonly value: {};
462
+ };
445
463
  readonly relaybypasssourcechainsandassets: {
446
464
  readonly value: {
447
465
  readonly '1': readonly ["*"];
@@ -708,6 +726,127 @@ declare const _default: {
708
726
  };
709
727
  }];
710
728
  };
729
+ readonly withdrawalconfig: {
730
+ readonly value: {
731
+ readonly priorityTokens: readonly [];
732
+ readonly chains: readonly [{
733
+ readonly chainId: 1;
734
+ readonly assets: readonly [{
735
+ readonly address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
736
+ }, {
737
+ readonly address: "0x6B175474E89094C44Da98b954EedeAC495271d0F";
738
+ }, {
739
+ readonly address: "0xdAC17F958D2ee523a2206206994597C13D831ec7";
740
+ }, {
741
+ readonly address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
742
+ }, {
743
+ readonly address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
744
+ }, {
745
+ readonly address: "0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6";
746
+ }, {
747
+ readonly address: "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0";
748
+ }, {
749
+ readonly address: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf";
750
+ }, {
751
+ readonly address: "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3";
752
+ }];
753
+ }, {
754
+ readonly chainId: 1151111081099710;
755
+ readonly assets: readonly [{
756
+ readonly address: "11111111111111111111111111111111";
757
+ }, {
758
+ readonly address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
759
+ }, {
760
+ readonly address: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB";
761
+ }];
762
+ }, {
763
+ readonly chainId: 56;
764
+ readonly assets: readonly [{
765
+ readonly address: "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d";
766
+ }, {
767
+ readonly address: "0x55d398326f99059fF775485246999027B3197955";
768
+ }, {
769
+ readonly address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
770
+ }, {
771
+ readonly address: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
772
+ }, {
773
+ readonly address: "0x2170Ed0880ac9A755fd29B2688956BD959F933F8";
774
+ }, {
775
+ readonly address: "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3";
776
+ }, {
777
+ readonly address: "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56";
778
+ }, {
779
+ readonly address: "0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c";
780
+ }, {
781
+ readonly address: "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34";
782
+ }];
783
+ }, {
784
+ readonly chainId: 8453;
785
+ readonly assets: readonly [{
786
+ readonly address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
787
+ }, {
788
+ readonly address: "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2";
789
+ }, {
790
+ readonly address: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb";
791
+ }, {
792
+ readonly address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
793
+ }, {
794
+ readonly address: "0x4200000000000000000000000000000000000006";
795
+ }, {
796
+ readonly address: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf";
797
+ }, {
798
+ readonly address: "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34";
799
+ }];
800
+ }, {
801
+ readonly chainId: 137;
802
+ readonly assets: readonly [{
803
+ readonly address: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359";
804
+ }, {
805
+ readonly address: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174";
806
+ }, {
807
+ readonly address: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F";
808
+ }, {
809
+ readonly address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
810
+ }, {
811
+ readonly address: "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063";
812
+ }, {
813
+ readonly address: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619";
814
+ }];
815
+ }, {
816
+ readonly chainId: 42161;
817
+ readonly assets: readonly [{
818
+ readonly address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831";
819
+ }, {
820
+ readonly address: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9";
821
+ }, {
822
+ readonly address: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1";
823
+ }, {
824
+ readonly address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
825
+ }, {
826
+ readonly address: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1";
827
+ }, {
828
+ readonly address: "0x912CE59144191C1204E64559FE8253a0e49E6548";
829
+ }, {
830
+ readonly address: "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34";
831
+ }];
832
+ }, {
833
+ readonly chainId: 10;
834
+ readonly assets: readonly [{
835
+ readonly address: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85";
836
+ }, {
837
+ readonly address: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58";
838
+ }, {
839
+ readonly address: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1";
840
+ }, {
841
+ readonly address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
842
+ }, {
843
+ readonly address: "0x4200000000000000000000000000000000000006";
844
+ }, {
845
+ readonly address: "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34";
846
+ }];
847
+ }];
848
+ };
849
+ };
711
850
  readonly withdrawalinfobanner: {
712
851
  readonly value: {
713
852
  readonly message: "";
@@ -1,6 +1,8 @@
1
1
  declare const _default: {
2
2
  readonly 'exact-in': false;
3
+ readonly 'new-de-endpoint': false;
3
4
  readonly 'new-token-transfer-config': false;
5
+ readonly 'new-withdrawal-config': false;
4
6
  readonly 'test-testing-gate': false;
5
7
  };
6
8
  export default _default;
@@ -25,6 +25,7 @@ var FunLogger = class {
25
25
  this.userAddress = null;
26
26
  this.userName = null;
27
27
  this.userLoginType = null;
28
+ this.typeLabel = null;
28
29
  this.sdkVersion = null;
29
30
  this.l2Address = null;
30
31
  this.isConfigured = false;
@@ -48,6 +49,7 @@ var FunLogger = class {
48
49
  userName: this.userName,
49
50
  userAddress: this.userAddress,
50
51
  userLoginType: this.userLoginType,
52
+ typeLabel: this.typeLabel,
51
53
  sdkVersion: this.sdkVersion
52
54
  };
53
55
  switch (level) {
@@ -189,14 +191,18 @@ var FunLogger = class {
189
191
  getUserLoginType() {
190
192
  return this.userLoginType;
191
193
  }
194
+ getTypeLabel() {
195
+ return this.typeLabel;
196
+ }
192
197
  getL2Address() {
193
198
  return this.l2Address;
194
199
  }
195
- setUserInfo(userId, userAddress, userName, userLoginType, l2Address) {
200
+ setUserInfo(userId, userAddress, userName, userLoginType, typeLabel, l2Address) {
196
201
  this.userId = userId;
197
202
  this.userAddress = userAddress;
198
203
  this.userName = userName;
199
204
  this.userLoginType = userLoginType;
205
+ this.typeLabel = typeLabel;
200
206
  this.l2Address = l2Address ?? null;
201
207
  }
202
208
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  logger
4
- } from "./chunk-SBQ2UUPK.js";
4
+ } from "./chunk-H6F75ULR.js";
5
5
 
6
6
  // src/clients/fanatics.tsx
7
7
  import React7, { useEffect as useEffect2, useMemo as useMemo2 } from "react";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  logger
4
- } from "./chunk-SBQ2UUPK.js";
4
+ } from "./chunk-H6F75ULR.js";
5
5
 
6
6
  // src/clients/polymarket.tsx
7
7
  import {
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  interface CopyInputDisplayedAddressProps {
3
3
  address: string;
4
+ onAddressCopied?: () => void;
4
5
  truncateAddress?: boolean;
5
6
  }
6
7
  /**
@@ -14,8 +14,6 @@ interface DialogProps {
14
14
  isSmartCloseable?: boolean;
15
15
  /** Whether side padding around the content of the modal should be applied */
16
16
  withoutSidePadding?: boolean;
17
- /** Whether bottom padding around the content of the modal should be applied */
18
- withoutBottomPadding?: boolean;
19
17
  /** Whether the transition animation should be used on open/close */
20
18
  withTransition?: boolean;
21
19
  testId?: string;
@@ -25,24 +23,32 @@ interface DialogProps {
25
23
  /**
26
24
  * Dialog components (title, content, bottom bar) must be rendered as direct children of Dialog for correct scrolling behavior
27
25
  */
28
- export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withoutBottomPadding, withTransition, testId, isFanaticsBottomSheet, }: DialogProps): React.ReactPortal | null;
26
+ export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withTransition, testId, isFanaticsBottomSheet, }: DialogProps): React.ReactPortal | null;
29
27
  export declare namespace Dialog {
30
28
  var Title: ({ title, titleMeta, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, isBackDisabled, onBack, className, }: DialogTitleProps) => React.JSX.Element;
31
- var Content: ({ children, fullHeight, paddingLeft, paddingBottom, paddingTop, className, withTopDivider, withBottomDivider, id, withoutInternalPadding, extraContentTopPadding, ...boxProps }: DialogContentProps) => React.JSX.Element;
29
+ var Content: ({ children, fullHeight, className, id, paddingTop, withTopDivider, withBottomDivider, withoutBottomPadding, withoutSidePadding, extraContentTopPadding, withChildScrollArea, ...boxProps }: DialogContentProps) => React.JSX.Element;
32
30
  var BottomSection: ({ paddingX, children, ...boxProps }: BoxProps) => React.JSX.Element;
33
31
  var BottomBar: ({ topSection, topSectionVisible, actionButtonProps, onClose, onCloseLabel, }: import("../FunBottomBar/FunBottomBar").FunBottomBarProps) => React.JSX.Element | null;
34
32
  }
35
- interface DialogContentProps extends BoxProps {
33
+ interface DialogContentProps extends Omit<BoxProps, 'padding' | 'paddingX' | 'paddingY' | 'paddingLeft' | 'paddingRight' | 'paddingBottom'> {
36
34
  children: ReactNode;
37
35
  /** Whether the content should fill all available space */
38
36
  fullHeight?: boolean;
39
37
  withTopDivider?: 'always' | 'scroll' | 'never';
40
38
  withBottomDivider?: 'always' | 'scroll' | 'never';
41
39
  id?: string;
42
- /** Whether internal padding around the content of the modal should be applied */
43
- withoutInternalPadding?: boolean;
40
+ /** Whether bottom padding should be applied */
41
+ withoutBottomPadding?: boolean;
42
+ /** Whether side padding should be applied */
43
+ withoutSidePadding?: boolean;
44
44
  /** Whether to add extra top padding to visually balance the FunBottomBar */
45
45
  extraContentTopPadding?: boolean;
46
+ /**
47
+ * When true, Dialog.Content becomes a non-scrolling flex column container, delegating
48
+ * scrolling to a child PaddedScrollableArea. Applies expanded side margins so that
49
+ * full-width dividers inside the child can visually reach the dialog border edges.
50
+ */
51
+ withChildScrollArea?: boolean;
46
52
  }
47
53
  export interface DialogTitleProps {
48
54
  title?: string;
@@ -1,9 +1,9 @@
1
1
  export declare const DIALOG_WIDTH_WIDE = "450px";
2
2
  export declare const DIALOG_HEIGHT = 525;
3
3
  export declare const DIALOG_HEIGHT_SWAPPED_IFRAME = 580;
4
+ export declare const DIALOG_INNER_PADDING_X = 12;
4
5
  export declare const SCROLL_BAR_WIDTH = 6;
5
6
  export declare const DIALOG_BOTTOM_PADDING = "15";
6
- export declare const bottomPaddingVariable = "--bottom-padding-value";
7
7
  /**
8
8
  * note the border defined here is taken into account in the FunCheckoutModalHeightAnimationWrapper component in the `getPermittedHeight` function
9
9
  * adjusting the border width will require adjusting the `getPermittedHeight` function
@@ -13,7 +13,6 @@ export declare const dialogCompact: string;
13
13
  export declare const dialogMedium: string;
14
14
  export declare const dialogWide: string;
15
15
  export declare const withoutSidePadding: string;
16
- export declare const withoutBottomPadding: string;
17
16
  export declare const dialogMobile: string;
18
17
  /**
19
18
  * Fanatics-specific bottom sheet style for mobile
@@ -27,6 +26,12 @@ export declare const dialogFanaticsBottomSheet: string;
27
26
  export declare const scrollContent: string;
28
27
  export declare const scrollbarHidden: string;
29
28
  export declare const fullHeightContent: string;
29
+ /**
30
+ * Used when a child component (e.g. PaddedScrollableArea) owns its own scrolling.
31
+ * Dialog.Content becomes a non-scrolling flex column container.
32
+ * The margin/padding expansion needed for full-width dividers is applied as inline styles in Dialog.tsx.
33
+ */
34
+ export declare const childScrollAreaContent: string;
30
35
  export declare const noPaddingContent: string;
31
36
  export declare const dividerTransition: string;
32
37
  export declare const contentExpanded: string;
@@ -24,8 +24,6 @@ interface ChainDropdownProps {
24
24
  maxDropdownHeight?: BaseDropdownProps['maxDropdownHeight'];
25
25
  tagComponent?: (value: string) => React.ReactNode;
26
26
  testId?: string;
27
- /** Default chain ID — promoted to first position in the dropdown */
28
- defaultChainId?: number;
29
27
  }
30
- export declare const ChainDropdown: ({ assets, chainIdSortOrder, selectedChainId: propSelectedChainId, selectedToken, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, openDropdownFullWidth, isLoading, alwaysOpenToTop, maxDropdownHeight, tagComponent, testId, defaultChainId, }: ChainDropdownProps) => React.JSX.Element;
28
+ export declare const ChainDropdown: ({ assets, chainIdSortOrder, selectedChainId: propSelectedChainId, selectedToken, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, openDropdownFullWidth, isLoading, alwaysOpenToTop, maxDropdownHeight, tagComponent, testId, }: ChainDropdownProps) => React.JSX.Element;
31
29
  export {};
@@ -30,9 +30,7 @@ interface TokenAndChainDropdownProps {
30
30
  priorityTokenSymbols?: string[];
31
31
  /** Determines the chain display order */
32
32
  chainIdSortOrder?: number[];
33
- /** Default chain ID — promoted to first position in chain dropdown */
34
- defaultChainId?: number;
35
33
  }
36
34
  /** Combines together chain and token dropdowns */
37
- export declare const TokenAndChainDropdown: ({ isLoading, selectedToken, selectedChainId, assets, onTokenSelected, onChainSelected, tokenLabel, chainLabel, chainLabelAddon, alwaysOpenToTop, maxTokenDropdownHeight, maxChainDropdownHeight, openChainDropdownFullWidth, chainTagComponent, hideNewTokenBadge, priorityTokenSymbols, chainIdSortOrder, defaultChainId, }: TokenAndChainDropdownProps) => React.JSX.Element;
35
+ export declare const TokenAndChainDropdown: ({ isLoading, selectedToken, selectedChainId, assets, onTokenSelected, onChainSelected, tokenLabel, chainLabel, chainLabelAddon, alwaysOpenToTop, maxTokenDropdownHeight, maxChainDropdownHeight, openChainDropdownFullWidth, chainTagComponent, hideNewTokenBadge, priorityTokenSymbols, chainIdSortOrder, }: TokenAndChainDropdownProps) => React.JSX.Element;
38
36
  export {};
@@ -10,6 +10,7 @@ interface FunFeatureListProps {
10
10
  /** Whether background should be applied only to individual items. Defaults to false since background is applied to the container by default */
11
11
  withBackgroundItem?: boolean;
12
12
  gapBetweenItems?: Extract<BoxProps['gap'], string>;
13
+ onExpanded?: () => void;
13
14
  }
14
- export declare const FunFeatureList: ({ items, isExpandable, disabled, withBackgroundContainer, withBackgroundItem, gapBetweenItems, }: FunFeatureListProps) => React.JSX.Element;
15
+ export declare const FunFeatureList: ({ items, isExpandable, disabled, withBackgroundContainer, withBackgroundItem, gapBetweenItems, onExpanded, }: FunFeatureListProps) => React.JSX.Element;
15
16
  export {};
@@ -7,6 +7,7 @@ interface FunNotificationBannerProps extends FunNotificationBannerIconProps {
7
7
  disclaimer?: ReactNode;
8
8
  children?: ReactNode;
9
9
  onClosed?: () => void;
10
+ onShowMore?: () => void;
10
11
  }
11
- export declare const FunNotificationBanner: ({ iconUrl, status, fallbackIconUrl, description, disclaimer, title, children, onClosed, }: FunNotificationBannerProps) => React.JSX.Element;
12
+ export declare const FunNotificationBanner: ({ iconUrl, status, fallbackIconUrl, description, disclaimer, title, children, onClosed, onShowMore, }: FunNotificationBannerProps) => React.JSX.Element;
12
13
  export {};
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { DirectExecutionType } from '@funkit/api-base';
3
3
  import type { FunkitCheckoutQuoteResult } from '../../domains/quote';
4
+ import type { QuoteDisplayAmounts } from '../../domains/quoteMode';
4
5
  import type { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
5
6
  interface PaymentAmountSummaryProps {
6
7
  isLoading: boolean;
@@ -8,6 +9,8 @@ interface PaymentAmountSummaryProps {
8
9
  checkoutItem: FunkitActiveCheckoutItem | null;
9
10
  quote: FunkitCheckoutQuoteResult | null;
10
11
  directExecutionType?: DirectExecutionType | null;
12
+ /** Mode-aware display amounts from QuoteBuilder.getDisplayAmounts() */
13
+ displayAmounts?: QuoteDisplayAmounts | null;
11
14
  }
12
- export declare function PaymentAmountSummary({ isLoading, targetChainId: originalChainId, quote, checkoutItem, directExecutionType, }: PaymentAmountSummaryProps): React.JSX.Element;
15
+ export declare function PaymentAmountSummary({ isLoading, targetChainId: originalChainId, quote, checkoutItem, directExecutionType, displayAmounts, }: PaymentAmountSummaryProps): React.JSX.Element;
13
16
  export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const GlobeIcon: ({ size }: {
3
+ size?: number;
4
+ }) => React.JSX.Element;
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import { type BoxProps } from '../../components/Box/Box';
3
+ /** Discount scrollbar width, except on Safari */
4
+ export declare function subtractScrollbarWidth(padding: number): number;
5
+ interface PaddedScrollableAreaProps {
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ /** Controls whether the scrollbar thumb is visible. Pass `isScrolling` from useScrollDivider. */
9
+ isScrolling: boolean;
10
+ /** Nominal right-side padding in px (matches what a non-scrolling sibling uses).
11
+ * Internal paddingRight is set to `padding - SCROLL_BAR_WIDTH` so that the scrollbar
12
+ * occupies the remaining space and content always sees `padding` px on the right. */
13
+ padding: number;
14
+ /** Optional bottom padding (sprinkle value) applied inside the scroll area, e.g. when no bottom bar is present. */
15
+ paddingBottom?: BoxProps['paddingBottom'];
16
+ ref?: React.Ref<HTMLDivElement>;
17
+ style?: React.CSSProperties;
18
+ }
19
+ /**
20
+ * A flex-1 scrollable container with a thin (6px) rounded scrollbar that reserves
21
+ * stable gutter space. The scrollbar thumb is hidden when not scrolling and appears
22
+ * on hover/active scroll.
23
+ *
24
+ * paddingRight is automatically calculated as `padding - SCROLL_BAR_WIDTH` so that
25
+ * content appears to have `padding`px of right-side spacing regardless of scrollbar state.
26
+ */
27
+ export declare function PaddedScrollableArea({ padding, isScrolling, paddingBottom, children, className, ref, style, }: PaddedScrollableAreaProps): React.JSX.Element;
28
+ export {};
@@ -0,0 +1,4 @@
1
+ import { SCROLL_BAR_WIDTH } from '../../components/Dialog/DialogContent.css';
2
+ export { SCROLL_BAR_WIDTH };
3
+ export declare const scrollArea: string;
4
+ export declare const scrollbarHidden: string;
@@ -5,6 +5,7 @@ interface TransferTokenDetailsProps {
5
5
  estProcessingTime?: number;
6
6
  estPriceImpact: FeeValue | undefined;
7
7
  maxSlippage: FeeValue | undefined;
8
+ onExpanded?: () => void;
8
9
  }
9
- export declare const TransferTokenDetails: ({ estProcessingTime, disabled, estPriceImpact, maxSlippage, }: TransferTokenDetailsProps) => React.JSX.Element;
10
+ export declare const TransferTokenDetails: ({ estProcessingTime, disabled, estPriceImpact, maxSlippage, onExpanded, }: TransferTokenDetailsProps) => React.JSX.Element;
10
11
  export {};
@@ -32,5 +32,4 @@ export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, pay
32
32
  reason: string;
33
33
  minUsdWithFees?: number;
34
34
  };
35
- export declare function getUsdAvailableAmount(targetChainId: string, assetChainId: string | undefined, assetUsdAmount: number | null | undefined, paymentMethod: PaymentMethod | undefined): number | null;
36
35
  export {};
@@ -1,5 +1,6 @@
1
1
  import type { ApiFunkitCheckoutQuoteResult, CheckoutQuoteResponse } from '@funkit/utils';
2
- import type { Address } from 'viem';
2
+ import type { Dnum } from 'dnum';
3
+ import { type Address } from 'viem';
3
4
  import type { Config } from '../wagmi/hooks';
4
5
  import type { BluvoBrokerageQuote } from '../hooks/useBluvo';
5
6
  import type { FunkitDirectExecutionInfo } from '../hooks/useCheckoutDirectExecution';
@@ -7,11 +8,12 @@ import type { FunkitActiveCheckoutItem } from '../providers/FunkitCheckoutContex
7
8
  import type { LoginType } from '../providers/GeneralWalletProvider';
8
9
  import { type BrokerageDetails, type CheckoutFees } from './fees';
9
10
  import { type PaymentMethodInfo } from './paymentMethods';
11
+ import type { QuoteBuilder } from './quoteMode';
10
12
  export interface FunkitCheckoutQuoteResult extends Omit<ApiFunkitCheckoutQuoteResult, 'finalFeesBreakdown'> {
11
13
  finalSpreadUsd: string;
12
14
  finalFeesBreakdown: CheckoutFees;
13
15
  }
14
- export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutItem, userId: string, walletAddress: Address, apiKey: string, wagmiConfig: Config, directExecutionInfo: FunkitDirectExecutionInfo, senderAddress?: Address, isWithdrawal?: boolean): Promise<CheckoutQuoteResponse>;
16
+ export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutItem, userId: string, walletAddress: Address, apiKey: string, wagmiConfig: Config, directExecutionInfo: FunkitDirectExecutionInfo, senderAddress?: Address, isWithdrawal?: boolean, quoteBuilder?: QuoteBuilder): Promise<CheckoutQuoteResponse>;
15
17
  export declare function getQuoteFinalEstimation(baseQuote: CheckoutQuoteResponse, checkoutItem: FunkitActiveCheckoutItem, newPaymentMethodInfo: PaymentMethodInfo, wagmiConfig: Config, apiKey: string, loginType: LoginType, isWithdrawal?: boolean, brokerageQuote?: BluvoBrokerageQuote): Promise<{
16
18
  finalEstimation: FunkitCheckoutQuoteResult;
17
19
  brokerage?: BrokerageDetails;
@@ -19,8 +21,8 @@ export declare function getQuoteFinalEstimation(baseQuote: CheckoutQuoteResponse
19
21
  export interface CheckedAssetAmount {
20
22
  isAboveMaximum: boolean;
21
23
  isBelowMinimum: boolean;
22
- maxTargetAssetAmount?: number;
23
- minTargetAssetAmount?: number;
24
+ maxTargetAssetAmount?: Dnum;
25
+ minTargetAssetAmount?: Dnum;
24
26
  }
25
27
  export declare function checkAssetAmount(checkoutItem: FunkitActiveCheckoutItem, finalEstimation: FunkitCheckoutQuoteResult, wagmiConfig: Config, walletAddress: Address, brokerage?: BrokerageDetails): Promise<CheckedAssetAmount>;
26
28
  export interface CheckoutQuoteParams {
@@ -4,6 +4,6 @@ export type { Dnum } from 'dnum';
4
4
  export { createExactOutBuilder } from './exactOut';
5
5
  export { createExactInBuilder } from './exactIn';
6
6
  export { createOneToOneBuilder } from './oneToOne';
7
- export { createQuoteBuilder, _resolveQuoteMode } from './resolveQuoteMode';
8
- export type { CreateQuoteBuilderParams } from './resolveQuoteMode';
7
+ export { resolveQuoteBuilder, _resolveQuoteMode } from './resolveQuoteMode';
8
+ export type { ResolveQuoteBuilderParams } from './resolveQuoteMode';
9
9
  export { getGasEstimateWei, CHECKOUT_GAS_UNITS } from './gasEstimate';
@@ -1,6 +1,6 @@
1
1
  import { type QuoteBuilder } from './types';
2
- export interface CreateQuoteBuilderParams {
3
- hasPostAction: boolean;
2
+ export interface ResolveQuoteBuilderParams {
3
+ hasPostAction: boolean | undefined;
4
4
  isExactInEnabled: boolean;
5
5
  providerSupportsExactInWithActions?: boolean;
6
6
  }
@@ -8,12 +8,13 @@ export interface CreateQuoteBuilderParams {
8
8
  * Determines the quote mode and returns the corresponding builder.
9
9
  *
10
10
  * Resolution order:
11
- * 1. Feature gate off → EXACT_OUT (Stage 1 default)
12
- * 2. No action paramsEXACT_IN
13
- * 3. Action params + provider supports → EXACT_IN
14
- * 4. Action params + no supportEXACT_OUT
11
+ * 1. No checkout config (hasPostAction is undefined) → EXACT_OUT (safe default)
12
+ * 2. Feature gate offEXACT_OUT (Stage 1 default)
13
+ * 3. No action params → EXACT_IN
14
+ * 4. Action params + provider supportsEXACT_IN
15
+ * 5. Action params + no support → EXACT_OUT
15
16
  *
16
17
  * Note: ONE_TO_ONE (subsidized routes) is not yet auto-detected.
17
18
  * It will be enabled in a future phase when subsidy detection is implemented.
18
19
  */
19
- export declare function createQuoteBuilder({ hasPostAction, isExactInEnabled, providerSupportsExactInWithActions, }: CreateQuoteBuilderParams): QuoteBuilder;
20
+ export declare function resolveQuoteBuilder({ hasPostAction, isExactInEnabled, providerSupportsExactInWithActions, }: ResolveQuoteBuilderParams): QuoteBuilder;
@@ -49,8 +49,8 @@ export interface QuoteDisplayAmounts {
49
49
  confirmationScreenDisplayAmount: string;
50
50
  /** "You send" line */
51
51
  sendAmount: string;
52
- /** "You receive" line */
53
- receiveAmount: string;
52
+ /** "You receive" line — null when the value cannot be derived (e.g. missing metadata) */
53
+ receiveAmount: string | null;
54
54
  /** Whether the send amount is exact (vs estimated) */
55
55
  isSendExact: boolean;
56
56
  /** Whether the receive amount is exact (vs estimated) */
@@ -86,6 +86,8 @@ export interface UsdAvailableAmountParams {
86
86
  }
87
87
  export interface QuoteBuilder {
88
88
  readonly mode: QuoteMode;
89
+ /** Whether the quote mode is EXACT_IN */
90
+ isExactIn(): boolean;
89
91
  /** Compute the USD available amount for the source asset, accounting for fees where applicable */
90
92
  getUsdAvailableAmount(params: UsdAvailableAmountParams): number | null;
91
93
  /** Compute max sendable token amount for the max button */
@@ -98,9 +100,14 @@ export interface QuoteBuilder {
98
100
  handleRetry(params: {
99
101
  error: QuoteRetryError;
100
102
  }): RetryAction;
101
- /** Derive display amounts for confirmation screen.
102
- * @param inputAmount — the user's input in human-readable form (e.g., 15.9) */
103
- getDisplayAmounts(quote: FunkitCheckoutQuoteResult, inputAmount: number): QuoteDisplayAmounts;
103
+ /** Derive display amounts for confirmation screen. */
104
+ getDisplayAmounts(params: {
105
+ quote: FunkitCheckoutQuoteResult;
106
+ /** The user's input in human-readable form (e.g., 15.9) */
107
+ inputAmount: number;
108
+ /** Target asset ticker (e.g. "USDC") — used for stablecoin display logic */
109
+ targetAssetTicker: string;
110
+ }): QuoteDisplayAmounts;
104
111
  /** Whether the confirmation screen can show a dollar amount before the quote resolves */
105
112
  hasKnownAmountBeforeQuote(config: {
106
113
  targetAssetAmount?: number;
@@ -114,6 +121,7 @@ export interface QuoteBuilder {
114
121
  tokenBalanceBaseUnit: Dnum | null;
115
122
  frozenUnitPrice: number | null;
116
123
  usdAvailableAmount: number | null;
124
+ maxSendableAmount: Dnum | null;
117
125
  }): {
118
126
  type: QuickOptionType.SET_TOKEN_AMOUNT;
119
127
  tokenAmountBaseUnit: Dnum;
@@ -1,4 +1,10 @@
1
- import type { ExchangeRates, SwappedFormOfPayment } from '@funkit/api-base';
1
+ import { type ExchangeRates, type GetFopsResponse, type SwappedFormOfPayment } from '@funkit/api-base';
2
+ export declare const FOPS_STALE_TIME: number;
3
+ /**
4
+ * Validates FOPs by checking icon URL, embedded flow URL, and payment group.
5
+ * Deduplicates generic FOPs whose fopType already appears in saved FOPs.
6
+ */
7
+ export declare function validateFops(res: GetFopsResponse, logTag: 'useFops' | 'useWithdrawFops'): GetFopsResponse;
2
8
  /**
3
9
  * Sorts fops by a priority order list (array of fopType strings, index = priority).
4
10
  * Fops not in the list are sorted by max checkout limit descending.