@funkit/connect 9.5.0 → 9.5.1

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 (55) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/__generated__/default_configs.d.ts +145 -6
  3. package/dist/__generated__/default_feature_gates.d.ts +1 -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/Dropdown/ChainDropdown.d.ts +1 -3
  8. package/dist/components/Dropdown/TokenAndChainDropdown.d.ts +1 -3
  9. package/dist/hooks/track/CheckoutModalEvent.d.ts +1 -0
  10. package/dist/hooks/useTokenAndChainDropdown.d.ts +0 -1
  11. package/dist/hooks/useTokenTransfer.d.ts +7 -11
  12. package/dist/hooks/useTokenTransferConfig.d.ts +1 -1
  13. package/dist/index.js +1513 -1268
  14. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeContainer.d.ts +1 -1
  15. package/dist/providers/SwappedProvider.d.ts +2 -1
  16. package/dist/utils/bluvo.d.ts +2 -4
  17. package/dist/utils/funLogger.d.ts +3 -1
  18. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  19. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  20. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  21. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  22. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  23. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  24. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  25. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  26. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  27. package/dist/wallets/walletConnectors/index.js +47 -47
  28. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  29. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  30. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  31. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  32. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  33. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  34. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  35. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  36. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  37. package/package.json +3 -3
  38. package/dist/wallets/walletConnectors/{chunk-6YO27XOM.js → chunk-3Y2GG3PM.js} +3 -3
  39. package/dist/wallets/walletConnectors/{chunk-HETS3KKI.js → chunk-3YCR2ZB4.js} +3 -3
  40. package/dist/wallets/walletConnectors/{chunk-HOPH3TQ3.js → chunk-C4RP2DNH.js} +3 -3
  41. package/dist/wallets/walletConnectors/{chunk-IICWJWGZ.js → chunk-CBI3SGOC.js} +3 -3
  42. package/dist/wallets/walletConnectors/{chunk-GVOQTORD.js → chunk-CMLFDRCP.js} +3 -3
  43. package/dist/wallets/walletConnectors/{chunk-LI6QY2B5.js → chunk-COX3VEDR.js} +3 -3
  44. package/dist/wallets/walletConnectors/{chunk-EKJHJFRN.js → chunk-CT3QPTAU.js} +3 -3
  45. package/dist/wallets/walletConnectors/{chunk-7OARWILZ.js → chunk-DWMUM4F6.js} +3 -3
  46. package/dist/wallets/walletConnectors/{chunk-CJJT7LMT.js → chunk-FDVJHNLL.js} +3 -3
  47. package/dist/wallets/walletConnectors/{chunk-6UCI7GM6.js → chunk-I7K6LUZR.js} +3 -3
  48. package/dist/wallets/walletConnectors/{chunk-XBLHZICW.js → chunk-N3UJMC3V.js} +3 -3
  49. package/dist/wallets/walletConnectors/{chunk-4C7ER452.js → chunk-NEK7T3IC.js} +3 -3
  50. package/dist/wallets/walletConnectors/{chunk-PKMAPNN6.js → chunk-RLLTYOWT.js} +3 -3
  51. package/dist/wallets/walletConnectors/{chunk-GH4M6FTK.js → chunk-TIT5F32X.js} +3 -3
  52. package/dist/wallets/walletConnectors/{chunk-TTHM3WUR.js → chunk-UPUDLUBT.js} +3 -3
  53. package/dist/wallets/walletConnectors/{chunk-53VYSPXK.js → chunk-UVMMPRDM.js} +3 -3
  54. package/dist/wallets/walletConnectors/{chunk-GSHSWVEG.js → chunk-UVYZSGIX.js} +3 -3
  55. package/dist/wallets/walletConnectors/{chunk-KO56HCTI.js → chunk-ZMRIQOR5.js} +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 9.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 9827fbd: Add typeLabel to Datadog logging
8
+ - e02fa70: feat(connect): migrate MinTokenTransferValue flag to statsig
9
+ - cd9d0c2: feat(connect): migrate WithdrawalChainsAndAssets flag to statsig
10
+ - 5e1069c: refactor(connect): use dynamic config to determine chain ids for token transfer payment method item
11
+ - b12f9d8: implement swapped focus and success transaction events
12
+ - Updated dependencies [e02fa70]
13
+ - Updated dependencies [cd9d0c2]
14
+ - Updated dependencies [6024e2f]
15
+ - @funkit/utils@1.2.8
16
+ - @funkit/api-base@3.0.6
17
+
3
18
  ## 9.5.0
4
19
 
5
20
  ### 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,7 @@
1
1
  declare const _default: {
2
2
  readonly 'exact-in': false;
3
3
  readonly 'new-token-transfer-config': false;
4
+ readonly 'new-withdrawal-config': false;
4
5
  readonly 'test-testing-gate': false;
5
6
  };
6
7
  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 {
@@ -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 {};
@@ -57,5 +57,6 @@ export declare enum CheckoutModalEvent {
57
57
  SWAPPED_IFRAME_NEW_DEPOSIT_BACK = "fc::swapped_iframe::new_deposit_back",
58
58
  SWAPPED_IFRAME_EXIT = "fc::swapped_iframe::exit",
59
59
  SWAPPED_IFRAME_ORDER_DATA = "fc::swapped_iframe::order_data",
60
+ SWAPPED_IFRAME_TRANSACTION_SUCCESSFUL = "fc::swapped_iframe::transaction_successful",
60
61
  SWAPPED_IFRAME_LOGOUT = "fc::swapped_iframe::logout"
61
62
  }
@@ -14,7 +14,6 @@ interface UseTokenChainResult {
14
14
  isLoadingAssets: boolean;
15
15
  chainIdSortOrder: number[];
16
16
  priorityTokenSymbols: string[];
17
- defaultChainId: number;
18
17
  }
19
18
  /**
20
19
  * Semi reusable hook (tied into token transfer configuration)
@@ -4,6 +4,12 @@ export type FeeValue = {
4
4
  label: string;
5
5
  value: number;
6
6
  };
7
+ export interface MinTransferConfig {
8
+ default: number;
9
+ chains: {
10
+ [chainId: string]: number;
11
+ };
12
+ }
7
13
  interface UseTokenTransferResult {
8
14
  /** where money goes to first */
9
15
  depositAddress: FunAddress | undefined;
@@ -21,16 +27,6 @@ interface UseTokenTransferResult {
21
27
  blockchain: 'ethereum' | 'solana' | 'bitcoin' | 'tron';
22
28
  }
23
29
  export declare const useTokenTransfer: (selectedChainId: number, selectedToken: string, chainIds?: number[]) => UseTokenTransferResult;
24
- /**
25
- * Differentiates limit for Canada/Australia users to avoid confusion with non american dollars
26
- */
27
- export declare const useMinTransferLimits: () => {
28
- mainnet: number;
29
- nonMainnet: number;
30
- };
31
- export declare function getMinTransferValueForChain(chainId: number, limits: {
32
- mainnet: number;
33
- nonMainnet: number;
34
- }): number;
30
+ export declare function getMinTransferValueForChain(chainId: number, limits: MinTransferConfig): number;
35
31
  export declare const useMinTransferValue: (selectedChainId: number) => number;
36
32
  export {};
@@ -1,2 +1,2 @@
1
1
  import type { TokenTransferConfig } from '../utils/tokenTransfer/types';
2
- export declare function useTokenTransferConfig(): TokenTransferConfig;
2
+ export declare function useTokenTransferConfig(isWithdrawal?: boolean): TokenTransferConfig;