@funkit/connect 5.5.17 → 5.5.19

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 (106) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/hooks/queries/useWithdrawalQuote.d.ts +1 -1
  3. package/dist/hooks/useEnabledTokenTransferChainTokens.d.ts +1 -1
  4. package/dist/hooks/useTokenChain.d.ts +2 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +3374 -2798
  7. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +4 -2
  8. package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -2
  9. package/dist/modals/WithdrwalModal/WithdrawalContent.d.ts +1 -1
  10. package/dist/providers/FunkitCheckoutContext.d.ts +15 -0
  11. package/dist/utils/address.d.ts +7 -0
  12. package/dist/utils/checkout.d.ts +1 -1
  13. package/dist/utils/flags/config.d.ts +8 -0
  14. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  15. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  16. package/dist/wallets/walletConnectors/bitskiWallet/bitskiWallet.js +2 -2
  17. package/dist/wallets/walletConnectors/braveWallet/braveWallet.js +2 -2
  18. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  19. package/dist/wallets/walletConnectors/{chunk-KR6JBW5E.js → chunk-2GJQ4XZQ.js} +4 -4
  20. package/dist/wallets/walletConnectors/{chunk-G73C6P5P.js → chunk-2HYNUNAS.js} +112 -40
  21. package/dist/wallets/walletConnectors/{chunk-2UCNRD7H.js → chunk-2KUBG3S6.js} +1 -1
  22. package/dist/wallets/walletConnectors/{chunk-FRGSRLTS.js → chunk-2L43XSW3.js} +4 -4
  23. package/dist/wallets/walletConnectors/{chunk-6ONTSPEY.js → chunk-2STUC6QL.js} +1 -1
  24. package/dist/wallets/walletConnectors/{chunk-ZSVTX6EK.js → chunk-362NXNTM.js} +1 -1
  25. package/dist/wallets/walletConnectors/{chunk-MOOBCMMB.js → chunk-3CICVJUN.js} +1 -1
  26. package/dist/wallets/walletConnectors/{chunk-A5APNTGL.js → chunk-5W7VDOCL.js} +4 -4
  27. package/dist/wallets/walletConnectors/{chunk-LMZMXEXL.js → chunk-7QONTUXT.js} +1 -1
  28. package/dist/wallets/walletConnectors/{chunk-545L7Y4M.js → chunk-A5N6B5UW.js} +4 -4
  29. package/dist/wallets/walletConnectors/{chunk-4WEHDI4Y.js → chunk-AFXHGWBH.js} +4 -4
  30. package/dist/wallets/walletConnectors/{chunk-BVX4XGNP.js → chunk-BBOM42DL.js} +1 -1
  31. package/dist/wallets/walletConnectors/{chunk-NO7XMBB5.js → chunk-BOU4WKRZ.js} +1 -1
  32. package/dist/wallets/walletConnectors/{chunk-PB254NQ4.js → chunk-BPZ2XJO2.js} +1 -1
  33. package/dist/wallets/walletConnectors/{chunk-PIUNLQJG.js → chunk-BYXPFMI7.js} +1 -1
  34. package/dist/wallets/walletConnectors/{chunk-GSOYKKIS.js → chunk-CJGUM55H.js} +4 -4
  35. package/dist/wallets/walletConnectors/{chunk-XYBEMO3C.js → chunk-CNPKISHN.js} +1 -1
  36. package/dist/wallets/walletConnectors/{chunk-SLOIIJGP.js → chunk-D6AOOO5F.js} +1 -1
  37. package/dist/wallets/walletConnectors/{chunk-WRA2DVJ7.js → chunk-DNSG5Q7V.js} +23 -9
  38. package/dist/wallets/walletConnectors/{chunk-ABFSXBE6.js → chunk-DRO6WYMM.js} +1 -1
  39. package/dist/wallets/walletConnectors/{chunk-6LPM6LUQ.js → chunk-EC6CHBSZ.js} +1 -1
  40. package/dist/wallets/walletConnectors/{chunk-3NC26XLM.js → chunk-FKJJQNKX.js} +4 -4
  41. package/dist/wallets/walletConnectors/{chunk-P74YPRF6.js → chunk-HS3C7OQV.js} +1 -1
  42. package/dist/wallets/walletConnectors/{chunk-LN7OD5EC.js → chunk-HWPKCIBE.js} +1 -1
  43. package/dist/wallets/walletConnectors/{chunk-ZMYVTWDF.js → chunk-IFON7E6U.js} +1 -1
  44. package/dist/wallets/walletConnectors/{chunk-IDKVN5CF.js → chunk-J3LI3FYZ.js} +4 -4
  45. package/dist/wallets/walletConnectors/{chunk-HBA36GW3.js → chunk-JCHN6A47.js} +4 -4
  46. package/dist/wallets/walletConnectors/{chunk-AD2KIJB6.js → chunk-JWFF4AAL.js} +1 -1
  47. package/dist/wallets/walletConnectors/{chunk-KFFJPS5R.js → chunk-KIDC67XJ.js} +1 -1
  48. package/dist/wallets/walletConnectors/{chunk-W5O4YSZN.js → chunk-LNEC5RNX.js} +1 -1
  49. package/dist/wallets/walletConnectors/{chunk-LEXSM5KI.js → chunk-M3NZ6R2E.js} +4 -4
  50. package/dist/wallets/walletConnectors/{chunk-MSFKSQBY.js → chunk-NT2HYJKW.js} +1 -1
  51. package/dist/wallets/walletConnectors/{chunk-25VW5TZP.js → chunk-NWIQNBJU.js} +4 -4
  52. package/dist/wallets/walletConnectors/{chunk-DTRYS3MO.js → chunk-OBOVHCEI.js} +1 -1
  53. package/dist/wallets/walletConnectors/{chunk-V57WLZEE.js → chunk-OL5ZO7E4.js} +1 -1
  54. package/dist/wallets/walletConnectors/{chunk-SJTXS4ZW.js → chunk-OLOIXTYS.js} +1 -1
  55. package/dist/wallets/walletConnectors/{chunk-CTU6JCOK.js → chunk-OPAZMNA7.js} +1 -1
  56. package/dist/wallets/walletConnectors/{chunk-ETTNDQQG.js → chunk-Q3H3TRBS.js} +1 -1
  57. package/dist/wallets/walletConnectors/{chunk-63YLN6R5.js → chunk-QLVVUKYB.js} +4 -4
  58. package/dist/wallets/walletConnectors/{chunk-IPOC2VJX.js → chunk-RKPCWHXL.js} +1 -1
  59. package/dist/wallets/walletConnectors/{chunk-JROWU5BP.js → chunk-RNBEDQHF.js} +1 -1
  60. package/dist/wallets/walletConnectors/{chunk-R6RWZRFF.js → chunk-RZIO5TFF.js} +1 -1
  61. package/dist/wallets/walletConnectors/{chunk-4AD7VI2P.js → chunk-SHBUZ7U7.js} +1 -1
  62. package/dist/wallets/walletConnectors/{chunk-AXWP3GD4.js → chunk-SULRQO27.js} +1 -1
  63. package/dist/wallets/walletConnectors/{chunk-HKV7EMYZ.js → chunk-TCAGNB4B.js} +4 -4
  64. package/dist/wallets/walletConnectors/{chunk-7GSNBOD3.js → chunk-TDAVGY5F.js} +4 -4
  65. package/dist/wallets/walletConnectors/{chunk-3U3BMEH5.js → chunk-TDIEHTMB.js} +4 -4
  66. package/dist/wallets/walletConnectors/{chunk-W6N74MS3.js → chunk-UIASLGLV.js} +4 -4
  67. package/dist/wallets/walletConnectors/{chunk-N2NIIUW6.js → chunk-UYGJO62F.js} +112 -40
  68. package/dist/wallets/walletConnectors/{chunk-JXP2QPW7.js → chunk-VR4TBQ6S.js} +4 -4
  69. package/dist/wallets/walletConnectors/{chunk-3S2U24BJ.js → chunk-VWCLFMWJ.js} +4 -4
  70. package/dist/wallets/walletConnectors/{chunk-ISIBREBO.js → chunk-VYBAYMP3.js} +1 -1
  71. package/dist/wallets/walletConnectors/{chunk-VCVVV2K7.js → chunk-XWUJE7MW.js} +1 -1
  72. package/dist/wallets/walletConnectors/{chunk-4UM4GTKZ.js → chunk-ZSI5N4VV.js} +1 -1
  73. package/dist/wallets/walletConnectors/{chunk-6P2EMPZI.js → chunk-ZZZRUXZE.js} +1 -1
  74. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  75. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  76. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  77. package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.js +2 -2
  78. package/dist/wallets/walletConnectors/desigWallet/desigWallet.js +2 -2
  79. package/dist/wallets/walletConnectors/enkryptWallet/enkryptWallet.js +2 -2
  80. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  81. package/dist/wallets/walletConnectors/frameWallet/frameWallet.js +2 -2
  82. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  83. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  84. package/dist/wallets/walletConnectors/index.js +74 -74
  85. package/dist/wallets/walletConnectors/injectedWallet/injectedWallet.js +2 -2
  86. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  87. package/dist/wallets/walletConnectors/mewWallet/mewWallet.js +2 -2
  88. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  89. package/dist/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.js +2 -2
  90. package/dist/wallets/walletConnectors/phantomWallet/phantomWallet.js +2 -2
  91. package/dist/wallets/walletConnectors/rabbyWallet/rabbyWallet.js +2 -2
  92. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  93. package/dist/wallets/walletConnectors/ramperWallet/ramperWallet.js +2 -2
  94. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  95. package/dist/wallets/walletConnectors/safeheronWallet/safeheronWallet.js +2 -2
  96. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  97. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  98. package/dist/wallets/walletConnectors/tahoWallet/tahoWallet.js +2 -2
  99. package/dist/wallets/walletConnectors/talismanWallet/talismanWallet.js +2 -2
  100. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  101. package/dist/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.js +2 -2
  102. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  103. package/dist/wallets/walletConnectors/xdefiWallet/xdefiWallet.js +2 -2
  104. package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
  105. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  106. package/package.json +8 -7
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
+ import { FunCheckoutStartingStep } from '~/providers/FunkitCheckoutContext';
2
3
  import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
3
4
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
4
5
  export type LoadingAccountState = CheckoutModalCommonState;
5
- type WithNewUser<T> = T & {
6
+ type UserEntryContext<T> = T & {
6
7
  newUser?: boolean;
8
+ startingStep?: FunCheckoutStartingStep;
7
9
  };
8
- export type LoadingAccountNext = WithNewUser<{
10
+ export type LoadingAccountNext = UserEntryContext<{
9
11
  chosenPaymentMethod: PaymentMethod.ACCOUNT_BALANCE;
10
12
  paymentMethodInfo: PaymentMethodAccountInfo;
11
13
  } | {
@@ -3,7 +3,7 @@ import { type BridgeCustomerNext, type BridgeCustomerState } from '~/modals/Chec
3
3
  import { type BridgeKycNext, type BridgeKycState } from '~/modals/CheckoutModal/VirtualFiatAccount/BridgeKyc';
4
4
  import { type ErrorScreenState } from '~/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen';
5
5
  import { type VirtualFiatAccountNext, type VirtualFiatAccountState } from '~/modals/CheckoutModal/VirtualFiatAccount/VirtualFiatAccount';
6
- import type { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
6
+ import type { FunCheckoutStartingStep, FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
7
7
  import { type FunkitTextCustomizationsConfig } from '../../providers/FunkitConfigContext';
8
8
  import { type CheckoutCompleteNext, type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
9
9
  import { type CheckoutHelpState } from './CheckoutHelp/CheckoutHelp';
@@ -68,12 +68,13 @@ interface ModalStepInput<S extends FunCheckoutStep> {
68
68
  state: CheckoutModalState<S>;
69
69
  apiKey: string;
70
70
  isDefiMode?: boolean;
71
+ isSourceNavWidgetEnabled: boolean;
71
72
  }
72
73
  export type ModalStepInfo<S extends FunCheckoutStep> = {
73
74
  Component: ComponentType<ModalStepComponentProps<S>>;
74
75
  disableBack?: (info: ModalStepInput<S>) => boolean;
75
76
  /** Hides the close button in the Dialog Title element */
76
- hideClose?: boolean;
77
+ hideClose?: (startingStep?: FunCheckoutStartingStep) => boolean;
77
78
  onBack?(state: CheckoutModalState<S>, prevState: CheckoutModalState): CheckoutModalState;
78
79
  onNext(state: CheckoutModalState<S>, payload: NextPayload<S>): CheckoutModalState;
79
80
  showFullHeight?: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type Hex } from 'viem';
2
+ import type { Hex } from 'viem';
3
3
  import type { FunkitActiveWithdrawalItem, FunkitWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
4
4
  import { type WithdrawalFormData } from './useWithdrawal';
5
5
  interface WithdrawContentProps {
@@ -16,6 +16,10 @@ export interface DynamicTargetAssetCandidate {
16
16
  badgeText?: string;
17
17
  targetAssetMinAmount?: number;
18
18
  }
19
+ export declare enum FunCheckoutStartingStep {
20
+ SOURCE_CHANGE = "source_change",
21
+ CONFIRMATION = "confirmation"
22
+ }
19
23
  export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'generateActionsParams' | 'customRecipient' | 'modalTitle' | 'iconSrc' | 'modalTitleMeta' | 'externalCheckoutUserId'> {
20
24
  /** List of contract action params **/
21
25
  generateActionsParams?: (targetAssetAmount: number, config?: {
@@ -41,6 +45,14 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
41
45
  withdrawalSourceTokenBalance?: () => number;
42
46
  /** Whether checkout should be started in Defi mode, which has various flow implications (most importantly targetAssetAmount must be set and is not editable throughout the checkout) */
43
47
  isDefiMode?: boolean;
48
+ /** The step at which the checkout process should start */
49
+ startingStep?: FunCheckoutStartingStep;
50
+ /** Symbol of the source token. Required if startingStep is set to FunCheckoutStartingStep.CONFIRMATION. */
51
+ sourceTokenSymbol?: string;
52
+ /** ID of the source chain. Required if startingStep is set to FunCheckoutStartingStep.CONFIRMATION. */
53
+ sourceChain?: string;
54
+ /** Address of the source token on the source chain. Required if startingStep is set to FunCheckoutStartingStep.CONFIRMATION. */
55
+ sourceTokenAddress?: Address;
44
56
  /** *****************************
45
57
  * Miscellaneous configurations *
46
58
  ********************************/
@@ -50,6 +62,9 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
50
62
  dynamicTargetAssetCandidates?: DynamicTargetAssetCandidate[];
51
63
  /** minimal toAmount needed to proceed checkout. Checked after quote */
52
64
  targetAssetMinAmount?: number;
65
+ /** For Checkout with Custom Action, QRCode needs special action type
66
+ * to specify the onchain action to execute after deposit */
67
+ qrcodeActionType?: string;
53
68
  }
54
69
  export interface FunkitWithdrawalConfig {
55
70
  /** Title to show in the checkout modal. Defaults to "Checkout" **/
@@ -6,3 +6,10 @@ export declare const getWalletLabel: (textCustomizations: FunkitTextCustomizatio
6
6
  */
7
7
  export declare function verifyIsBech32(address: string): Error | undefined;
8
8
  export declare function isDydxAddress(address: string): boolean;
9
+ export declare function isAddressSupported(address: string): boolean;
10
+ /**
11
+ * Check if the recipient address is compatible with selected chain
12
+ * Will need to update this as we enable additional chains in the future.
13
+ * This currently works as we only support evm and solana chains for withdrawal.
14
+ */
15
+ export declare function isAddressCompatibleWithChain(address: string, chainId: number): boolean;
@@ -5,7 +5,7 @@ import { type Address, type Hex } from 'viem';
5
5
  import type { UseConfigReturnType } from 'wagmi';
6
6
  import type { ServerCheckoutConfig } from '~/domains/clientMetadata';
7
7
  import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
8
- import type { FunkitCheckoutActionParams, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
8
+ import { type FunkitCheckoutActionParams, type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
9
9
  export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
10
10
  export declare const MESH_TIME_ESTIMATE_MS = 300000;
11
11
  export declare const BANK_TIME_ESTIMATE_MS = 0;
@@ -74,6 +74,10 @@ export declare const flagConfig: {
74
74
  }[];
75
75
  }[];
76
76
  };
77
+ withdrawal_chains_and_assets: {
78
+ type: "string";
79
+ default_value: string;
80
+ };
77
81
  enable_token_transfer_universal_deposit_address: {
78
82
  type: "boolean";
79
83
  default_value: true;
@@ -295,4 +299,8 @@ export declare const flagConfig: {
295
299
  type: "string";
296
300
  default_value: string;
297
301
  };
302
+ enable_source_navigation_widget: {
303
+ type: "boolean";
304
+ default_value: false;
305
+ };
298
306
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-W6N74MS3.js";
4
+ } from "../chunk-UIASLGLV.js";
5
+ import "../chunk-DNSG5Q7V.js";
5
6
  import "../chunk-23WIEY36.js";
6
- import "../chunk-WRA2DVJ7.js";
7
7
  export {
8
8
  bifrostWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bitgetWallet
4
- } from "../chunk-A5APNTGL.js";
4
+ } from "../chunk-5W7VDOCL.js";
5
+ import "../chunk-DNSG5Q7V.js";
5
6
  import "../chunk-23WIEY36.js";
6
- import "../chunk-WRA2DVJ7.js";
7
7
  export {
8
8
  bitgetWallet
9
9
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  bitskiWallet
4
- } from "../chunk-P74YPRF6.js";
5
- import "../chunk-WRA2DVJ7.js";
4
+ } from "../chunk-HS3C7OQV.js";
5
+ import "../chunk-DNSG5Q7V.js";
6
6
  export {
7
7
  bitskiWallet
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  braveWallet
4
- } from "../chunk-PB254NQ4.js";
5
- import "../chunk-WRA2DVJ7.js";
4
+ } from "../chunk-BPZ2XJO2.js";
5
+ import "../chunk-DNSG5Q7V.js";
6
6
  export {
7
7
  braveWallet
8
8
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bybitWallet
4
- } from "../chunk-6ONTSPEY.js";
4
+ } from "../chunk-LNEC5RNX.js";
5
+ import "../chunk-DNSG5Q7V.js";
5
6
  import "../chunk-23WIEY36.js";
6
- import "../chunk-WRA2DVJ7.js";
7
7
  export {
8
8
  bybitWallet
9
9
  };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getWalletConnectConnector
4
- } from "./chunk-23WIEY36.js";
5
2
  import {
6
3
  getInjectedConnector,
7
4
  hasInjectedProvider
8
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-23WIEY36.js";
9
9
 
10
10
  // src/wallets/walletConnectors/clvWallet/clvWallet.ts
11
11
  var clvWallet = ({
@@ -5,50 +5,122 @@ import {
5
5
  import {
6
6
  getInjectedConnector,
7
7
  hasInjectedProvider
8
- } from "./chunk-WRA2DVJ7.js";
8
+ } from "./chunk-DNSG5Q7V.js";
9
9
 
10
10
  // src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
11
11
  import { isAndroid, isIOS } from "@funkit/utils";
12
12
  function isMetaMask(ethereum) {
13
- if (!ethereum?.isMetaMask) return false;
14
- if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state)
15
- return false;
16
- if (ethereum.isApexWallet) return false;
17
- if (ethereum.isAvalanche) return false;
18
- if (ethereum.isBackpack) return false;
19
- if (ethereum.isBifrost) return false;
20
- if (ethereum.isBitKeep) return false;
21
- if (ethereum.isBitski) return false;
22
- if (ethereum.isBlockWallet) return false;
23
- if (ethereum.isCoinbaseWallet) return false;
24
- if (ethereum.isDawn) return false;
25
- if (ethereum.isEnkrypt) return false;
26
- if (ethereum.isExodus) return false;
27
- if (ethereum.isFrame) return false;
28
- if (ethereum.isFrontier) return false;
29
- if (ethereum.isGamestop) return false;
30
- if (ethereum.isHyperPay) return false;
31
- if (ethereum.isImToken) return false;
32
- if (ethereum.isKuCoinWallet) return false;
33
- if (ethereum.isMathWallet) return false;
34
- if (ethereum.isNestWallet) return false;
35
- if (ethereum.isOkxWallet || ethereum.isOKExWallet) return false;
36
- if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet)
37
- return false;
38
- if (ethereum.isOpera) return false;
39
- if (ethereum.isPhantom) return false;
40
- if (ethereum.isPortal) return false;
41
- if (ethereum.isRabby) return false;
42
- if (ethereum.isRainbow) return false;
43
- if (ethereum.isStatus) return false;
44
- if (ethereum.isTalisman) return false;
45
- if (ethereum.isTally) return false;
46
- if (ethereum.isTokenPocket) return false;
47
- if (ethereum.isTokenary) return false;
48
- if (ethereum.isTrust || ethereum.isTrustWallet) return false;
49
- if (ethereum.isXDEFI) return false;
50
- if (ethereum.isZeal) return false;
51
- if (ethereum.isZerion) return false;
13
+ if (!ethereum?.isMetaMask) {
14
+ return false;
15
+ }
16
+ if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state) {
17
+ return false;
18
+ }
19
+ if (ethereum.isApexWallet) {
20
+ return false;
21
+ }
22
+ if (ethereum.isAvalanche) {
23
+ return false;
24
+ }
25
+ if (ethereum.isBackpack) {
26
+ return false;
27
+ }
28
+ if (ethereum.isBifrost) {
29
+ return false;
30
+ }
31
+ if (ethereum.isBitKeep) {
32
+ return false;
33
+ }
34
+ if (ethereum.isBitski) {
35
+ return false;
36
+ }
37
+ if (ethereum.isBlockWallet) {
38
+ return false;
39
+ }
40
+ if (ethereum.isCoinbaseWallet) {
41
+ return false;
42
+ }
43
+ if (ethereum.isDawn) {
44
+ return false;
45
+ }
46
+ if (ethereum.isEnkrypt) {
47
+ return false;
48
+ }
49
+ if (ethereum.isExodus) {
50
+ return false;
51
+ }
52
+ if (ethereum.isFrame) {
53
+ return false;
54
+ }
55
+ if (ethereum.isFrontier) {
56
+ return false;
57
+ }
58
+ if (ethereum.isGamestop) {
59
+ return false;
60
+ }
61
+ if (ethereum.isHyperPay) {
62
+ return false;
63
+ }
64
+ if (ethereum.isImToken) {
65
+ return false;
66
+ }
67
+ if (ethereum.isKuCoinWallet) {
68
+ return false;
69
+ }
70
+ if (ethereum.isMathWallet) {
71
+ return false;
72
+ }
73
+ if (ethereum.isNestWallet) {
74
+ return false;
75
+ }
76
+ if (ethereum.isOkxWallet || ethereum.isOKExWallet) {
77
+ return false;
78
+ }
79
+ if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet) {
80
+ return false;
81
+ }
82
+ if (ethereum.isOpera) {
83
+ return false;
84
+ }
85
+ if (ethereum.isPhantom) {
86
+ return false;
87
+ }
88
+ if (ethereum.isPortal) {
89
+ return false;
90
+ }
91
+ if (ethereum.isRabby) {
92
+ return false;
93
+ }
94
+ if (ethereum.isRainbow) {
95
+ return false;
96
+ }
97
+ if (ethereum.isStatus) {
98
+ return false;
99
+ }
100
+ if (ethereum.isTalisman) {
101
+ return false;
102
+ }
103
+ if (ethereum.isTally) {
104
+ return false;
105
+ }
106
+ if (ethereum.isTokenPocket) {
107
+ return false;
108
+ }
109
+ if (ethereum.isTokenary) {
110
+ return false;
111
+ }
112
+ if (ethereum.isTrust || ethereum.isTrustWallet) {
113
+ return false;
114
+ }
115
+ if (ethereum.isXDEFI) {
116
+ return false;
117
+ }
118
+ if (ethereum.isZeal) {
119
+ return false;
120
+ }
121
+ if (ethereum.isZerion) {
122
+ return false;
123
+ }
52
124
  return true;
53
125
  }
54
126
  var metaMaskWallet = ({
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  getInjectedConnector,
7
7
  hasInjectedProvider
8
- } from "./chunk-WRA2DVJ7.js";
8
+ } from "./chunk-DNSG5Q7V.js";
9
9
 
10
10
  // src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts
11
11
  import { isAndroid, isIOS } from "@funkit/utils";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
6
2
  import {
7
3
  getWalletConnectConnector
8
4
  } from "./chunk-23WIEY36.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-DNSG5Q7V.js";
9
9
 
10
10
  // src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts
11
11
  import { isMobile } from "@funkit/utils";
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  getInjectedConnector,
7
7
  hasInjectedProvider
8
- } from "./chunk-WRA2DVJ7.js";
8
+ } from "./chunk-DNSG5Q7V.js";
9
9
 
10
10
  // src/wallets/walletConnectors/bybitWallet/bybitWallet.ts
11
11
  var bybitWallet = ({
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
 
7
7
  // src/wallets/walletConnectors/phantomWallet/phantomWallet.ts
8
8
  var phantomWallet = () => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
  import {
7
7
  getWalletConnectConnector
8
8
  } from "./chunk-23WIEY36.js";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getWalletConnectConnector
4
- } from "./chunk-23WIEY36.js";
5
2
  import {
6
3
  getInjectedConnector,
7
4
  hasInjectedProvider
8
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-23WIEY36.js";
9
9
 
10
10
  // src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts
11
11
  import { isAndroid } from "@funkit/utils";
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  getInjectedConnector,
7
7
  hasInjectedProvider
8
- } from "./chunk-WRA2DVJ7.js";
8
+ } from "./chunk-DNSG5Q7V.js";
9
9
 
10
10
  // src/wallets/walletConnectors/foxWallet/foxWallet.ts
11
11
  var foxWallet = ({
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
6
2
  import {
7
3
  getWalletConnectConnector
8
4
  } from "./chunk-23WIEY36.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-DNSG5Q7V.js";
9
9
 
10
10
  // src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts
11
11
  import { isAndroid } from "@funkit/utils";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getWalletConnectConnector
4
- } from "./chunk-23WIEY36.js";
5
2
  import {
6
3
  getInjectedConnector,
7
4
  hasInjectedProvider
8
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-23WIEY36.js";
9
9
 
10
10
  // src/wallets/walletConnectors/okxWallet/okxWallet.ts
11
11
  import { isAndroid } from "@funkit/utils";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
 
7
7
  // src/wallets/walletConnectors/rabbyWallet/rabbyWallet.ts
8
8
  var rabbyWallet = () => ({
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
 
7
7
  // src/wallets/walletConnectors/xdefiWallet/xdefiWallet.ts
8
8
  var xdefiWallet = () => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
 
7
7
  // src/wallets/walletConnectors/braveWallet/braveWallet.ts
8
8
  var braveWallet = () => ({
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
 
7
7
  // src/wallets/walletConnectors/ramperWallet/ramperWallet.ts
8
8
  var ramperWallet = () => {
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getWalletConnectConnector
4
- } from "./chunk-23WIEY36.js";
5
2
  import {
6
3
  getInjectedConnector,
7
4
  hasInjectedProvider
8
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-23WIEY36.js";
9
9
 
10
10
  // src/wallets/walletConnectors/gateWallet/gateWallet.ts
11
11
  import { isAndroid } from "@funkit/utils";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
  import {
7
7
  getWalletConnectConnector
8
8
  } from "./chunk-23WIEY36.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
 
7
7
  // src/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.ts
8
8
  import { isSafari } from "@funkit/utils";
@@ -5,8 +5,9 @@ import { createConnector } from "wagmi";
5
5
  import { injected } from "wagmi/connectors";
6
6
  function getExplicitInjectedProvider(flag) {
7
7
  const _window = typeof window !== "undefined" ? window : void 0;
8
- if (typeof _window === "undefined" || typeof _window.ethereum === "undefined")
8
+ if (typeof _window === "undefined" || typeof _window.ethereum === "undefined") {
9
9
  return;
10
+ }
10
11
  const providers = _window.ethereum.providers;
11
12
  return providers ? providers.find((provider) => provider[flag]) : _window.ethereum[flag] ? _window.ethereum : void 0;
12
13
  }
@@ -15,20 +16,26 @@ function getWindowProviderNamespace(namespace) {
15
16
  const [property, ...path] = namespace2.split(".");
16
17
  const _provider = provider[property];
17
18
  if (_provider) {
18
- if (path.length === 0) return _provider;
19
+ if (path.length === 0) {
20
+ return _provider;
21
+ }
19
22
  return providerSearch(_provider, path.join("."));
20
23
  }
21
24
  };
22
- if (typeof window !== "undefined") return providerSearch(window, namespace);
25
+ if (typeof window !== "undefined") {
26
+ return providerSearch(window, namespace);
27
+ }
23
28
  }
24
29
  function hasInjectedProvider({
25
30
  flag,
26
31
  namespace
27
32
  }) {
28
- if (namespace && typeof getWindowProviderNamespace(namespace) !== "undefined")
33
+ if (namespace && typeof getWindowProviderNamespace(namespace) !== "undefined") {
29
34
  return true;
30
- if (flag && typeof getExplicitInjectedProvider(flag) !== "undefined")
35
+ }
36
+ if (flag && typeof getExplicitInjectedProvider(flag) !== "undefined") {
31
37
  return true;
38
+ }
32
39
  return false;
33
40
  }
34
41
  function getInjectedProvider({
@@ -36,18 +43,25 @@ function getInjectedProvider({
36
43
  namespace
37
44
  }) {
38
45
  const _window = typeof window !== "undefined" ? window : void 0;
39
- if (typeof _window === "undefined") return;
46
+ if (typeof _window === "undefined") {
47
+ return;
48
+ }
40
49
  if (namespace) {
41
50
  const windowProvider = getWindowProviderNamespace(namespace);
42
- if (windowProvider) return windowProvider;
51
+ if (windowProvider) {
52
+ return windowProvider;
53
+ }
43
54
  }
44
55
  const providers = _window.ethereum?.providers;
45
56
  if (flag) {
46
57
  const provider = getExplicitInjectedProvider(flag);
47
- if (provider) return provider;
58
+ if (provider) {
59
+ return provider;
60
+ }
48
61
  }
49
- if (typeof providers !== "undefined" && providers.length > 0)
62
+ if (typeof providers !== "undefined" && providers.length > 0) {
50
63
  return providers[0];
64
+ }
51
65
  return _window.ethereum;
52
66
  }
53
67
  function createInjectedConnector(provider) {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
 
7
7
  // src/wallets/walletConnectors/talismanWallet/talismanWallet.ts
8
8
  var talismanWallet = () => ({
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-WRA2DVJ7.js";
5
+ } from "./chunk-DNSG5Q7V.js";
6
6
  import {
7
7
  getWalletConnectConnector
8
8
  } from "./chunk-23WIEY36.js";