@funkit/connect 11.6.0 → 11.7.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 (34) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/clients/{chunk-UPB4JKJG.js → chunk-44USAVWK.js} +12 -7
  3. package/dist/clients/{chunk-FNB7OPJI.js → chunk-AXLGZ5XX.js} +10 -1
  4. package/dist/clients/{chunk-ZQZDPRWC.js → chunk-FGUMPXTO.js} +1 -1
  5. package/dist/clients/{chunk-DUBZPIDN.js → chunk-I4B5AKZC.js} +1 -1
  6. package/dist/clients/{chunk-SX3CX34W.js → chunk-NM2NAKI3.js} +106 -88
  7. package/dist/clients/{chunk-LYZLETOM.js → chunk-OASVWVSV.js} +1 -1
  8. package/dist/clients/{chunk-WNZ6QV5Q.js → chunk-SG4ZS447.js} +16 -0
  9. package/dist/clients/fanatics.js +2 -2
  10. package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
  11. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  12. package/dist/clients/internal/nado/withdrawalForm.js +3 -3
  13. package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
  14. package/dist/clients/lighter.js +4 -4
  15. package/dist/clients/mallard.js +2 -2
  16. package/dist/clients/nado.js +3 -3
  17. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +5 -5
  18. package/dist/clients/polymarket/index.js +5 -5
  19. package/dist/hooks/track/analytics/checkout.d.ts +10 -0
  20. package/dist/hooks/track/analytics/events.d.ts +2 -1
  21. package/dist/hooks/track/analytics/resolveExecutionProgressContext.d.ts +2 -1
  22. package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +0 -16
  23. package/dist/hooks/useTextMeasurer.d.ts +1 -1
  24. package/dist/index.js +3359 -3014
  25. package/dist/modals/WithdrawalModal/RecipientAddress.d.ts +5 -0
  26. package/dist/providers/FunkitCheckoutContext/types.d.ts +14 -17
  27. package/dist/providers/FunkitShadowHostProvider.d.ts +31 -0
  28. package/dist/providers/FunkitThemeStyle.d.ts +12 -0
  29. package/dist/shadow/loadShadowCss.d.ts +9 -0
  30. package/dist/shadow/useMountShadowHost.d.ts +18 -0
  31. package/dist/shadow/useShadowCss.d.ts +6 -0
  32. package/dist/shadow-css.js +1 -1
  33. package/dist/wallets/walletConnectors/index.js +4 -4
  34. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 11.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cbb4306: Encapsulate funkit modal in shadow dom
8
+ - 79c49b6: Fix withdrawal callbacks requiring the cashier form factor and a checkout config to be set.
9
+
10
+ ### Patch Changes
11
+
12
+ - 08eb810: Expose raw dynamic routing IDs on Statsig v2 checkout events.
13
+ - 6a0dc34: Fall back to light DOM when the shadow host cannot mount
14
+ - 2364013: fix: Nado withdrawals request their deposit address with a checksummed recipient
15
+ - 2ce10fc: Show the connected wallet in the withdrawal recipient-address field when it is selected as the recipient.
16
+ - Updated dependencies [08eb810]
17
+ - Updated dependencies [b2c2340]
18
+ - Updated dependencies [2364013]
19
+ - @funkit/utils@4.0.2
20
+ - @funkit/connect-core@4.2.0
21
+ - @funkit/api-base@7.2.1
22
+
3
23
  ## 11.6.0
4
24
 
5
25
  ### Minor Changes
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  isExpectedNadoWithdrawalFailure,
4
4
  toNadoWithdrawalErrorMessage
5
- } from "./chunk-ZQZDPRWC.js";
5
+ } from "./chunk-FGUMPXTO.js";
6
6
  import {
7
7
  toWithdrawalAmountBaseUnit
8
8
  } from "./chunk-B7UU2ETA.js";
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-OODIKHYE.js";
14
14
  import {
15
15
  i18n_default
16
- } from "./chunk-WNZ6QV5Q.js";
16
+ } from "./chunk-SG4ZS447.js";
17
17
  import {
18
18
  generateClientMetadataForTokenTransfer
19
19
  } from "./chunk-PENJ5JGH.js";
@@ -26,7 +26,11 @@ import {
26
26
  NADO_API_KEY,
27
27
  initializeCheckoutTokenTransferAddress
28
28
  } from "@funkit/api-base";
29
- import { deductFlatFee, safeBigInt } from "@funkit/connect-core";
29
+ import {
30
+ deductFlatFee,
31
+ normalizeRecipientAddress,
32
+ safeBigInt
33
+ } from "@funkit/connect-core";
30
34
  import {
31
35
  INK_CHAIN_ID,
32
36
  NADO_WITHDRAWAL_ACTION_TYPE,
@@ -61,6 +65,7 @@ function createNadoWithdrawalCallback({
61
65
  targetChainId,
62
66
  destinationAddress
63
67
  } = param;
68
+ const recipientAddr = normalizeRecipientAddress(destinationAddress);
64
69
  let step = "validate";
65
70
  try {
66
71
  if (customerData?.customerName !== "nado" || !userInputAmount) {
@@ -94,7 +99,7 @@ function createNadoWithdrawalCallback({
94
99
  sequencerFeeTokenAmount,
95
100
  targetChainId,
96
101
  targetAssetAddress,
97
- destinationAddress
102
+ destinationAddress: recipientAddr
98
103
  });
99
104
  await assertWithinMaxWithdrawable({
100
105
  subaccount,
@@ -112,7 +117,7 @@ function createNadoWithdrawalCallback({
112
117
  // No Fun user context in a client bundle entry; the owner wallet is the
113
118
  // stable per-user id and matches what sourceOfFund records.
114
119
  userId: walletAddress,
115
- recipientAddr: destinationAddress,
120
+ recipientAddr,
116
121
  toChainId: targetChainId.toString(),
117
122
  toTokenAddress: targetAssetAddress,
118
123
  sourceOfFund: `balance|nado|${walletAddress}`,
@@ -129,7 +134,7 @@ function createNadoWithdrawalCallback({
129
134
  logger.info("nado:withdrawal:udaGenerated", {
130
135
  depositAddr,
131
136
  productId,
132
- destinationAddress
137
+ destinationAddress: recipientAddr
133
138
  });
134
139
  step = "sign";
135
140
  const nonce = await getNadoTxNonce(walletAddress, { logger });
@@ -173,7 +178,7 @@ function createNadoWithdrawalCallback({
173
178
  step,
174
179
  walletAddress,
175
180
  subaccount,
176
- destinationAddress,
181
+ destinationAddress: recipientAddr,
177
182
  targetChainId
178
183
  });
179
184
  }
@@ -1218,7 +1218,16 @@ var FunInput = forwardRef(function FunInputWithRef({
1218
1218
  hover: "inputBackgroundHover"
1219
1219
  }
1220
1220
  },
1221
- prefix && /* @__PURE__ */ React5.createElement(Box, { paddingLeft: "12", height: "max" }, prefix),
1221
+ prefix && /* @__PURE__ */ React5.createElement(
1222
+ Box,
1223
+ {
1224
+ display: "flex",
1225
+ alignItems: "center",
1226
+ paddingLeft: "12",
1227
+ height: "max"
1228
+ },
1229
+ prefix
1230
+ ),
1222
1231
  prefixIcon === "SearchIcon" && /* @__PURE__ */ React5.createElement(
1223
1232
  Box,
1224
1233
  {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  i18n_default
4
- } from "./chunk-WNZ6QV5Q.js";
4
+ } from "./chunk-SG4ZS447.js";
5
5
 
6
6
  // src/clients/internal/nado/withdrawalErrors.ts
7
7
  import {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useFunkitTranslation
4
- } from "./chunk-LYZLETOM.js";
4
+ } from "./chunk-OASVWVSV.js";
5
5
 
6
6
  // src/providers/FunkitConfigContext.tsx
7
7
  import {