@funkit/connect 9.24.0-next.0 → 9.25.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 (108) hide show
  1. package/CHANGELOG.md +50 -4
  2. package/dist/clients/aave.d.ts +9 -0
  3. package/dist/clients/aave.js +4 -1
  4. package/dist/clients/{chunk-4HCOSF4M.js → chunk-7G3QEQFB.js} +2 -2
  5. package/dist/clients/{chunk-7FIVHWNC.js → chunk-7UIDHSYG.js} +47 -0
  6. package/dist/clients/{chunk-UUHGOBKZ.js → chunk-AHYOV7AV.js} +2 -1
  7. package/dist/clients/{chunk-S7FRYR55.js → chunk-ME4OAQIY.js} +1 -1
  8. package/dist/clients/{chunk-CEBG7XQ5.js → chunk-MXPZTW2H.js} +212 -1126
  9. package/dist/clients/chunk-SQ2RX7WY.js +1110 -0
  10. package/dist/clients/{chunk-KWIR3HO4.js → chunk-VJZW3MA3.js} +1 -1
  11. package/dist/clients/{chunk-MRBN4XCA.js → chunk-ZEXZQOAO.js} +1 -1
  12. package/dist/clients/fanatics.css +1 -1
  13. package/dist/clients/fanatics.js +4 -6
  14. package/dist/clients/lighter.css +2816 -1
  15. package/dist/clients/lighter.js +44 -28
  16. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +217 -222
  17. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +7 -8
  18. package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
  19. package/dist/clients/polymarket/index.css +217 -222
  20. package/dist/clients/polymarket/index.js +7 -8
  21. package/dist/clients/polymarket/polymarket.js +2 -2
  22. package/dist/clients/polymarket/usePolymarketAccountBalances.js +2 -2
  23. package/dist/clients/rolly.js +1 -1
  24. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +1 -2
  25. package/dist/components/FunTooltip/FunTooltip.d.ts +10 -5
  26. package/dist/components/FunTransactionSummary/DestinationHealthFactorRow.d.ts +15 -0
  27. package/dist/components/FunTransactionSummary/DestinationYieldRows.d.ts +1 -0
  28. package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +2 -1
  29. package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +8 -1
  30. package/dist/domains/aave.d.ts +14 -9
  31. package/dist/domains/nado.d.ts +9 -0
  32. package/dist/hooks/track/CheckoutModalEvent.d.ts +0 -1
  33. package/dist/hooks/track/WithdrawModalEvent.d.ts +9 -1
  34. package/dist/hooks/useGetAssetHoldingsFromRpc.d.ts +23 -0
  35. package/dist/hooks/useInjectedAssetHoldings.d.ts +23 -0
  36. package/dist/hooks/useXstockAssetHoldings.d.ts +15 -0
  37. package/dist/hooks/useXstocksWrappedTokenAddress.d.ts +16 -0
  38. package/dist/index.css +11 -16
  39. package/dist/index.js +4696 -4117
  40. package/dist/modals/CheckoutModal/CheckoutComplete/CheckoutComplete.d.ts +1 -1
  41. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +0 -1
  42. package/dist/modals/CheckoutModal/InputAmount/useNadoDirectTransfer.d.ts +64 -0
  43. package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +1 -1
  44. package/dist/modals/CheckoutModal/stepTransition.d.ts +0 -3
  45. package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +25 -4
  46. package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +10 -1
  47. package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +8 -1
  48. package/dist/modals/WithdrawalModal/WithdrawalSwappedIframeController.d.ts +11 -0
  49. package/dist/modals/WithdrawalModal/types.d.ts +1 -0
  50. package/dist/providers/FunkitCheckoutContext/types.d.ts +29 -12
  51. package/dist/utils/assets.d.ts +7 -0
  52. package/dist/utils/checkoutHistory.d.ts +1 -5
  53. package/dist/utils/customer.d.ts +6 -0
  54. package/dist/wallets/walletConnectors/index.js +50 -50
  55. package/package.json +6 -6
  56. package/dist/__generated__/default_configs.d.ts +0 -901
  57. package/dist/__generated__/default_feature_gates.d.ts +0 -20
  58. package/dist/clients/chunk-25ICASD7.js +0 -2371
  59. package/dist/clients/chunk-3GO74QTP.js +0 -2382
  60. package/dist/clients/chunk-7GWX2ZS4.js +0 -69
  61. package/dist/clients/chunk-7HNGV6JU.js +0 -54
  62. package/dist/clients/chunk-A32VN2DX.js +0 -2382
  63. package/dist/clients/chunk-ELLXM7RO.js +0 -186
  64. package/dist/clients/chunk-GGXTLJ7J.js +0 -290
  65. package/dist/clients/chunk-GUWXVR5S.js +0 -186
  66. package/dist/clients/chunk-HRWCNZJA.js +0 -230
  67. package/dist/clients/chunk-JBWB54MX.js +0 -69
  68. package/dist/clients/chunk-JD3FIVZ7.js +0 -69
  69. package/dist/clients/chunk-JTGKAPID.js +0 -2382
  70. package/dist/clients/chunk-L7PABCF2.js +0 -54
  71. package/dist/clients/chunk-LII3SVUH.js +0 -230
  72. package/dist/clients/chunk-NCUPPJ2Z.js +0 -2382
  73. package/dist/clients/chunk-NPPIETHZ.js +0 -54
  74. package/dist/clients/chunk-NUJ6ZM5F.js +0 -186
  75. package/dist/clients/chunk-UVWNEQMD.js +0 -186
  76. package/dist/clients/chunk-VVTNR7YH.js +0 -2382
  77. package/dist/clients/chunk-YYMIRDCQ.js +0 -230
  78. package/dist/clients/chunk-ZNVFASTH.js +0 -54
  79. package/dist/clients/nado.d.ts +0 -78
  80. package/dist/clients/nado.js +0 -107
  81. package/dist/clients/polymarket.d.ts +0 -161
  82. package/dist/clients/polymarket.js +0 -688
  83. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryHelp.d.ts +0 -10
  84. package/dist/interfaces/logTransport.d.ts +0 -51
  85. package/dist/interfaces/swapped-transport.d.ts +0 -78
  86. package/dist/modals/CheckoutModal/CheckoutHelp/CheckoutHelp.d.ts +0 -9
  87. package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +0 -4
  88. package/dist/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.d.ts +0 -4
  89. package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +0 -6
  90. package/dist/utils/flags/resolver.d.ts +0 -34
  91. package/dist/wallets/walletConnectors/chunk-4NV5BYRP.js +0 -95
  92. package/dist/wallets/walletConnectors/chunk-AVDUNQUW.js +0 -96
  93. package/dist/wallets/walletConnectors/chunk-GUQM4QSL.js +0 -66
  94. package/dist/wallets/walletConnectors/chunk-IULPZP2Q.js +0 -69
  95. package/dist/wallets/walletConnectors/chunk-JPN6TWIT.js +0 -92
  96. package/dist/wallets/walletConnectors/chunk-KCRO2AGO.js +0 -106
  97. package/dist/wallets/walletConnectors/chunk-KI5Y2BBF.js +0 -94
  98. package/dist/wallets/walletConnectors/chunk-NR2OGDHQ.js +0 -103
  99. package/dist/wallets/walletConnectors/chunk-OEEGYENV.js +0 -87
  100. package/dist/wallets/walletConnectors/chunk-OX37G4YT.js +0 -98
  101. package/dist/wallets/walletConnectors/chunk-SWFF3TWJ.js +0 -100
  102. package/dist/wallets/walletConnectors/chunk-TKB2OY6G.js +0 -99
  103. package/dist/wallets/walletConnectors/chunk-W2LCLDPX.js +0 -70
  104. package/dist/wallets/walletConnectors/chunk-WAHGI5L7.js +0 -96
  105. package/dist/wallets/walletConnectors/chunk-WKNQMP4A.js +0 -93
  106. package/dist/wallets/walletConnectors/chunk-XCNHV3HS.js +0 -110
  107. package/dist/wallets/walletConnectors/chunk-YO2K4MBH.js +0 -218
  108. package/dist/wallets/walletConnectors/chunk-YQFGVZGR.js +0 -92
package/CHANGELOG.md CHANGED
@@ -1,21 +1,67 @@
1
1
  # @funkit/connect
2
2
 
3
- ## 9.24.0-next.0
3
+ ## 9.25.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - eca6251: feat(connect): add `onBeforeSign` pre-sign hook to Lighter withdrawal config
7
+ - 639d776: Remove the deprecated `/support` API service. The `POST /support/send-message` endpoint is being decommissioned on the API server, so all client references are removed.
8
+
9
+ `@funkit/api-base` (breaking): the `sendSupportMessage` function and the `SendSupportMessageRequest` type are no longer exported. There is no replacement client — integrate with the support provider directly, or contact the Fun.xyz team for the supported path.
10
+
11
+ `@funkit/connect`: the in-app checkout "Tell us more" report form (which posted to `/support`) has been removed. The "Get help" affordances in checkout-complete, the post-checkout history detail, and notifications now open the support contact link (`CONTACT_US_LINK`) in a new tab, consistent with the existing direct-execution help flow. No public exports changed.
12
+
13
+ - 23ec218: Nado: deposit the user's on-chain balance of the target spot token (e.g. QQQx/SPYx on Ink) via a same-token, same-chain ERC-20 transfer run from the confirmation step, instead of routing through Relay. Behind the `enable-rpc-xstock-assets` gate (off by default).
14
+ - cd57fba: Foundational types and config for the xStock direct-transfer flow: add the optional `assetClass` field to `DynamicTargetAssetCandidate`, the `enable-rpc-xstock-assets` feature gate, the `getActiveDynamicTargetAsset` / Nado asset-class helpers, and the wSPYx / wQQQx asset logos. Additive only — no behavior change.
15
+
16
+ ### Patch Changes
17
+
18
+ - b777bcf: Read a target token's (and its xStocks wrapper's) on-chain balance via RPC and inject it as a payable holding, behind the `enable-rpc-xstock-assets` gate (off by default).
19
+ - Updated dependencies [fc74160]
20
+ - Updated dependencies [bb08629]
21
+ - Updated dependencies [639d776]
22
+ - Updated dependencies [23ec218]
23
+ - Updated dependencies [09452ce]
24
+ - Updated dependencies [cd57fba]
25
+ - @funkit/api-base@5.0.0
26
+ - @funkit/connect-core@1.3.0
27
+ - @funkit/fun-relay@2.8.4
28
+
29
+ ## 9.24.0
30
+
31
+ ### Minor Changes
32
+
33
+ - 5f381f8: Add an integrator-provided health-factor preview (before → after) to the Aave supply confirmation screen, and route the native supply fast-path through confirmation so it's shown there too.
34
+ - d4a2a99: feat(connect): cap Lighter Fast withdrawals at $3M with a "Secure withdrawal" prompt
35
+ - 281d46c: feat(connect): add `onBeforeSign` pre-sign hook to Lighter withdrawal config
8
36
 
9
37
  Adds an optional, awaited `onBeforeSign` hook to `LighterWithdrawalConfig` (and the underlying `WithdrawalConfigBase`, so it applies to both the Fast and Secure methods). It fires after the user taps "Withdraw" but before the SDK fetches a nonce, prompts the wallet, or submits the L2 transaction. Integrators can cancel in-flight automated strategies here so the withdrawal signs against a stable nonce; throwing aborts the withdrawal and surfaces the message verbatim without consuming a nonce.
10
38
 
11
- - df03326: chore: bump version
39
+ - bb56335: Wire real backend withdrawal FOPs and preload Swapped iframe URLs for the fiat withdrawal off-ramp
40
+ - f64e821: Add Swapped sell iframe rendering and event handling for fiat withdrawal flow
41
+
42
+ ### Patch Changes
43
+
44
+ - be17e90: fix(connect): show the single Lighter Fast source token (USDC Perps) as a static chip instead of a one-item dropdown.
45
+ - 03f0299: feat(connect): style the Lighter Secure receive address, token, and chain as locked read-only fields with hover tooltips. Each field now uses the tertiary filled background with muted text to signal it can't be edited, and hovering surfaces an explanation ("You can only withdraw to your connected wallet", "You can only receive the token you are choosing to withdraw", "Secure withdrawals are only available on Ethereum"). The Lighter Fast source-token chip ("USDC (Perps)") also gains a hover tooltip explaining that fast withdrawals are only available for the USDC (Perps) balance.
46
+ - 66da5ee: fix(connect): show "Pending" instead of "Requested" as the Lighter Secure withdrawal fill status, matching the status shown in Lighter's own app.
47
+ - b3a77db: fix(connect): keep the Lighter withdraw balance fresh — refetch on widget open (`refetchOnMount` + 10s stale window) and eagerly invalidate the cached account after a withdrawal completes.
48
+ - 42c71e1: fix: suppress datadog multiple
49
+ - 7391a93: Point the Rolly Arbitrum deposit target (`ROLLY_VAULT_ADDRESS` in `clients/rolly.tsx`) at the current canonical vault `0x57d05CfC7bCAc9E7Ebf4D35a2b1725a83ADA771C`, replacing the two-versions-old `0x67Ae473b…42b1`. The new vault is registered on the Arbitrum VaultDepositooor with the `depositToken(address,uint256)` selector. Used by the internal-testing Rolly quickoption only.
50
+ - 7e1a68b: fix(connect): gate the withdrawal quote on a valid, settled amount — no quote fires for insufficient/below-min amounts, and changing the amount clears the stale quote until the new value settles.
51
+ - Updated dependencies [f64e821]
52
+ - @funkit/connect-core@1.2.0
53
+
54
+ ## 9.23.2
12
55
 
13
56
  ### Patch Changes
14
57
 
15
- - df03326: chore(connect): bump @funkit/connect for the next prerelease
16
58
  - ed6d644: feat(connect): hide price impact for free usdc banner
17
59
  - ed6d644: feat(connect): replace hidden fee breakdown with Terms/Help footer for free usdc
60
+ - 7612afd: chore(connect): update withdrawal empty-selection ui
18
61
  - e021cb4: test(connect): test SelectBrokerage
62
+ - 5d5d4f5: Use Statsig gate `disable-frontend-chainalysis` to skip risk assessment checks.
63
+ - Updated dependencies [5d5d4f5]
64
+ - @funkit/connect-core@1.1.1
19
65
 
20
66
  ## 9.23.1
21
67
 
@@ -92,6 +92,15 @@ export interface AaveSupplyCheckoutInput {
92
92
  decimals: number;
93
93
  iconSrc?: string;
94
94
  };
95
+ /**
96
+ * Integrator-owned health-factor resolver, called with the live supply amount
97
+ * to render the Health factor (before → after) row. Compute it against live
98
+ * on-chain data (e.g. `@aave/math-utils`); `null` if not ready, `"-1"` for ∞.
99
+ */
100
+ resolveHealthFactor?: (underlyingHumanAmount: string) => {
101
+ before: string | null;
102
+ after: string | null;
103
+ } | null;
95
104
  }
96
105
  /**
97
106
  * High-level builder for an Aave V3 supply checkout. Returns a
@@ -127,7 +127,8 @@ function createAaveSupplyCheckoutConfig(input) {
127
127
  walletAddress,
128
128
  display,
129
129
  referralCode,
130
- receiptToken
130
+ receiptToken,
131
+ resolveHealthFactor
131
132
  } = input;
132
133
  if (!isAaveSupplySupported(chainId)) {
133
134
  return void 0;
@@ -148,6 +149,8 @@ function createAaveSupplyCheckoutConfig(input) {
148
149
  targetChain: chainId.toString(),
149
150
  targetAsset: underlyingAsset,
150
151
  qrcodeActionType: AAVE_SUPPLY_ACTION_TYPE,
152
+ // Integrator-owned HF math (live position data); the SDK only renders it.
153
+ resolveHealthFactor,
151
154
  targetAssetTicker: receiptTicker,
152
155
  checkoutItemTitle: receiptTicker,
153
156
  // Prefer the aToken's icon (e.g. Aave's aEthUSDC artwork) when known so
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  Box
4
- } from "./chunk-JD3FIVZ7.js";
4
+ } from "./chunk-7UIDHSYG.js";
5
5
  import {
6
6
  logger
7
- } from "./chunk-UUHGOBKZ.js";
7
+ } from "./chunk-AHYOV7AV.js";
8
8
 
9
9
  // src/components/AsyncImage/useAsyncImage.ts
10
10
  import { useEffect, useReducer } from "react";
@@ -56,6 +56,52 @@ var Box = React.forwardRef(
56
56
  );
57
57
  Box.displayName = "Box";
58
58
 
59
+ // src/components/Text/Text.tsx
60
+ import React2 from "react";
61
+ var Text = React2.forwardRef(
62
+ ({
63
+ as = "div",
64
+ children,
65
+ className,
66
+ color = "primaryText",
67
+ display,
68
+ font = "body",
69
+ id,
70
+ size = "16",
71
+ style,
72
+ tabIndex,
73
+ title,
74
+ textAlign = "inherit",
75
+ textTransform = "none",
76
+ weight = "regular",
77
+ testId
78
+ }, ref) => {
79
+ return /* @__PURE__ */ React2.createElement(
80
+ Box,
81
+ {
82
+ as,
83
+ className,
84
+ color: color === "inherit" ? void 0 : color,
85
+ display,
86
+ fontFamily: font,
87
+ fontSize: size,
88
+ fontWeight: weight,
89
+ id,
90
+ title,
91
+ ref,
92
+ style,
93
+ tabIndex,
94
+ textAlign,
95
+ textTransform,
96
+ testId,
97
+ background: { selection: "textSelection" }
98
+ },
99
+ children
100
+ );
101
+ }
102
+ );
103
+ Text.displayName = "Text";
104
+
59
105
  // src/hooks/useFunkitTranslation.ts
60
106
  import { useTranslation } from "react-i18next";
61
107
  function useFunkitTranslation() {
@@ -65,5 +111,6 @@ function useFunkitTranslation() {
65
111
  export {
66
112
  themeVars,
67
113
  Box,
114
+ Text,
68
115
  useFunkitTranslation
69
116
  };
@@ -13,7 +13,8 @@ var DatadogBrowserLogsTransport = class {
13
13
  site: "datadoghq.com",
14
14
  forwardErrorsToLogs: false,
15
15
  sessionSampleRate: 100,
16
- service: "connect-sdk"
16
+ service: "connect-sdk",
17
+ silentMultipleInit: true
17
18
  });
18
19
  }
19
20
  setEnv(environment) {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  logger
4
- } from "./chunk-UUHGOBKZ.js";
4
+ } from "./chunk-AHYOV7AV.js";
5
5
 
6
6
  // src/clients/polymarket/polymarket.tsx
7
7
  import {