@funkit/connect 9.21.1-next.0 → 9.23.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 (82) hide show
  1. package/CHANGELOG.md +26 -18
  2. package/dist/clients/aave.d.ts +2 -0
  3. package/dist/clients/aave.js +3 -0
  4. package/dist/clients/{chunk-7HNGV6JU.js → chunk-KSSSSWR6.js} +1 -1
  5. package/dist/clients/{chunk-4HCOSF4M.js → chunk-NCCAYPLO.js} +1 -1
  6. package/dist/clients/{chunk-NCUPPJ2Z.js → chunk-OWXKWC7I.js} +8 -8
  7. package/dist/clients/{chunk-NUJ6ZM5F.js → chunk-ZMVXBMON.js} +1 -1
  8. package/dist/clients/fanatics.css +1 -1
  9. package/dist/clients/fanatics.js +3 -3
  10. package/dist/clients/lighter.css +1 -1
  11. package/dist/clients/lighter.js +3 -3
  12. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +11 -11
  13. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +5 -5
  14. package/dist/clients/polymarket/index.css +11 -11
  15. package/dist/clients/polymarket/index.js +5 -5
  16. package/dist/components/Icons/New/ArrowCircleUpRightIcon.d.ts +4 -0
  17. package/dist/domains/swapped.d.ts +10 -1
  18. package/dist/hooks/queries/useRecentCheckouts.d.ts +4 -2
  19. package/dist/hooks/queries/useRecentDeposits.d.ts +4 -9
  20. package/dist/hooks/track/CheckoutModalEvent.d.ts +1 -0
  21. package/dist/hooks/useEffectEvent.d.ts +1 -3
  22. package/dist/hooks/usePaymentMethodTabs.d.ts +5 -0
  23. package/dist/hooks/usePaymentSources.d.ts +1 -1
  24. package/dist/hooks/useTokenTransferConfig.d.ts +0 -7
  25. package/dist/index.css +11 -11
  26. package/dist/index.js +1470 -1250
  27. package/dist/interfaces/identity.d.ts +7 -0
  28. package/dist/modals/CheckoutModal/InputAmount/InputAmountLayout.d.ts +6 -1
  29. package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +2 -2
  30. package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +31 -0
  31. package/dist/providers/FunkitConfigContext.d.ts +2 -0
  32. package/dist/providers/SwappedProvider.d.ts +2 -2
  33. package/dist/utils/checkout.d.ts +18 -20
  34. package/dist/utils/customer.d.ts +13 -1
  35. package/dist/utils/tokenTransfer/disabledList.d.ts +14 -1
  36. package/dist/utils/tokenTransfer/types.d.ts +30 -5
  37. package/dist/wallets/walletConnectors/index.js +48 -48
  38. package/package.json +2 -2
  39. package/dist/__generated__/default_configs.d.ts +0 -901
  40. package/dist/__generated__/default_feature_gates.d.ts +0 -20
  41. package/dist/chunk-6K4U3Z4Z.js +0 -375
  42. package/dist/chunk-NBECXHBY.js +0 -249
  43. package/dist/chunk-PFIXC5YK.js +0 -249
  44. package/dist/clients/chunk-25ICASD7.js +0 -2371
  45. package/dist/clients/chunk-7GWX2ZS4.js +0 -69
  46. package/dist/clients/chunk-EGMA6ATZ.js +0 -2371
  47. package/dist/clients/chunk-GGXTLJ7J.js +0 -290
  48. package/dist/clients/chunk-HRWCNZJA.js +0 -230
  49. package/dist/clients/chunk-JTGKAPID.js +0 -2382
  50. package/dist/clients/chunk-L7PABCF2.js +0 -54
  51. package/dist/clients/chunk-OJLDTEKB.js +0 -54
  52. package/dist/clients/chunk-SSSQQ32F.js +0 -186
  53. package/dist/clients/chunk-UVWNEQMD.js +0 -186
  54. package/dist/clients/chunk-YLZ7COFH.js +0 -230
  55. package/dist/clients/chunk-ZEFHAWRH.js +0 -69
  56. package/dist/clients/polymarket.d.ts +0 -161
  57. package/dist/clients/polymarket.js +0 -688
  58. package/dist/interfaces/logTransport.d.ts +0 -51
  59. package/dist/interfaces/swapped-transport.d.ts +0 -78
  60. package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +0 -4
  61. package/dist/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.d.ts +0 -4
  62. package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +0 -6
  63. package/dist/utils/flags/resolver.d.ts +0 -34
  64. package/dist/wallets/walletConnectors/chunk-2VP2F6EK.js +0 -70
  65. package/dist/wallets/walletConnectors/chunk-4T6ZSRJF.js +0 -69
  66. package/dist/wallets/walletConnectors/chunk-6BW3HLBG.js +0 -96
  67. package/dist/wallets/walletConnectors/chunk-CCQV2ZET.js +0 -218
  68. package/dist/wallets/walletConnectors/chunk-CPI4TD43.js +0 -99
  69. package/dist/wallets/walletConnectors/chunk-F5XEEVG6.js +0 -98
  70. package/dist/wallets/walletConnectors/chunk-HNRB7KJU.js +0 -92
  71. package/dist/wallets/walletConnectors/chunk-HTHAK6XB.js +0 -93
  72. package/dist/wallets/walletConnectors/chunk-MIQTHJ6X.js +0 -66
  73. package/dist/wallets/walletConnectors/chunk-RB3HR4R2.js +0 -95
  74. package/dist/wallets/walletConnectors/chunk-RVOY537T.js +0 -100
  75. package/dist/wallets/walletConnectors/chunk-STVVP43G.js +0 -94
  76. package/dist/wallets/walletConnectors/chunk-UK7C2JXW.js +0 -87
  77. package/dist/wallets/walletConnectors/chunk-VAPGUPHO.js +0 -92
  78. package/dist/wallets/walletConnectors/chunk-VTM6EECM.js +0 -110
  79. package/dist/wallets/walletConnectors/chunk-X6CGV36L.js +0 -103
  80. package/dist/wallets/walletConnectors/chunk-YEZM4CK4.js +0 -96
  81. package/dist/wallets/walletConnectors/chunk-ZNX4EMPB.js +0 -106
  82. /package/dist/clients/{chunk-JD3FIVZ7.js → chunk-52NKHZS2.js} +0 -0
@@ -1,51 +0,0 @@
1
- /** Severity levels emitted by `FunLogger`. */
2
- export type LogLevel = 'info' | 'debug' | 'warn' | 'error';
3
- /** User tracking consent, mirroring the Datadog browser SDK's values. */
4
- export type TrackingConsent = 'granted' | 'not-granted';
5
- /**
6
- * The structured context `FunLogger` assembles for every record: the caller's
7
- * data plus the logger's resolved user/session fields. Concrete (rather than
8
- * `object`) so transport implementors get property access and autocomplete.
9
- */
10
- export interface LogContext {
11
- /** Caller-supplied structured data for this log line, if any. */
12
- data?: object;
13
- apiKey: string | null;
14
- userId: string | null;
15
- userName: string | null;
16
- userAddress: string | null;
17
- userLoginType: string | null;
18
- typeLabel: string | null;
19
- sdkVersion: string | null;
20
- }
21
- /** A single fully-assembled log record handed to a transport. */
22
- export interface LogRecord {
23
- level: LogLevel;
24
- title: string;
25
- /** Assembled by `FunLogger` so transports stay dumb sinks. */
26
- context: LogContext;
27
- /** Present only for `error`-level records. */
28
- error?: Error;
29
- }
30
- /**
31
- * Platform sink for `FunLogger`. The logger (queueing, env detection, level
32
- * routing, console fallback, context tracking) is platform-agnostic; everything
33
- * platform-specific about *emitting* lives behind this interface.
34
- *
35
- * Part of the React Native split (see docs/connect-rn-architecture.md): web
36
- * implements it with `DatadogBrowserLogsTransport`, React Native will implement
37
- * it with a Datadog React Native transport (`@datadog/mobile-react-native`).
38
- * Kept free of DOM/`@datadog/browser-logs` types so it can move to
39
- * `@funkit/connect-core` untouched.
40
- */
41
- export interface LogTransport {
42
- /** Emit one record to the platform sink. */
43
- log(record: LogRecord): void;
44
- /**
45
- * Reflect the resolved environment (e.g. `'development'` | `'production'`).
46
- * Optional — sinks that don't segment by environment can omit it.
47
- */
48
- setEnv?(environment: string): void;
49
- /** Reflect user tracking consent. Optional. */
50
- setTrackingConsent?(consent: TrackingConsent): void;
51
- }
@@ -1,78 +0,0 @@
1
- import type { PaymentGroupType } from '@funkit/api-base';
2
- import type { SwappedTheme } from '../utils/swapped';
3
- /**
4
- * Typed contract for the message bridge between the SDK and the embedded
5
- * Swapped flow. On web this is bridged over an `<iframe>` + `window.postMessage`
6
- * (see {@link createIframeSwappedTransport}); React Native will bridge the same
7
- * messages over a `WebView`. Freezing the event catalog here lets both
8
- * platforms share the `SwappedProvider` state machine and turns any drift in
9
- * the message shapes into a compile-time error.
10
- *
11
- * Reference: the inbound switch in `SwappedIframeController` and the sends in
12
- * `SwappedProvider`.
13
- *
14
- * This module is platform-agnostic and is slated to move to
15
- * `@funkit/connect-core/interfaces/` during the RN extraction.
16
- */
17
- /**
18
- * Navigation steps reported by the Swapped embed. Open-ended — the embed may
19
- * emit steps we don't enumerate, which fall through to the default handler.
20
- */
21
- export type SwappedStep = 'EMPTY' | 'KYC_ADDRESS' | 'KYC_AWAITING_IDENTITY' | 'KYC_IDENTITY' | 'KYC_PERSONAL' | 'KYC_SUMSUB' | 'LOGIN_EMAIL' | 'LOGIN_EMAIL_VERIFICATION' | 'PAYMENT' | 'ORDER_CONFIRMATION' | (string & {});
22
- /**
23
- * Opaque payloads — the SDK never introspects these, it only forwards them to
24
- * analytics via `JSON.stringify`. Typed as `unknown` so callers must stringify
25
- * rather than read fields.
26
- */
27
- export type SwappedErrorPayload = unknown;
28
- export type SwappedTxPayload = unknown;
29
- /** embed → parent */
30
- export type SwappedInboundMessage = {
31
- type: 'SWAPPED_READY';
32
- } | {
33
- type: 'SWAPPED_GO_BACK';
34
- } | {
35
- type: 'SWAPPED_CLOSE';
36
- } | {
37
- type: 'SWAPPED_NEW_DEPOSIT';
38
- } | {
39
- type: 'SWAPPED_ERROR';
40
- data?: SwappedErrorPayload;
41
- } | {
42
- type: 'SWAPPED_NAVIGATION';
43
- data?: {
44
- step?: SwappedStep;
45
- };
46
- } | {
47
- type: 'SWAPPED_ORDER_DATA';
48
- data?: unknown;
49
- } | {
50
- type: 'SWAPPED_TRANSACTION_SUCCESSFUL';
51
- data?: SwappedTxPayload;
52
- } | {
53
- type: 'SWAPPED_LOGOUT';
54
- };
55
- /** parent → embed */
56
- export type SwappedOutboundMessage = {
57
- type: 'SWAPPED_METHOD';
58
- method: PaymentGroupType;
59
- } | {
60
- type: 'SWAPPED_THEME';
61
- data: SwappedTheme;
62
- } | {
63
- type: 'SWAPPED_FOCUS';
64
- };
65
- export interface SwappedTransport {
66
- /**
67
- * Send a message to the embed. Returns `true` if the message was dispatched,
68
- * `false` if the embed isn't reachable yet (so callers can mirror today's
69
- * behavior of logging only on a successful send).
70
- */
71
- send(msg: SwappedOutboundMessage): boolean;
72
- /**
73
- * Subscribe to messages from the embed. The handler is only invoked for
74
- * messages whose origin has already been validated by the transport. Returns
75
- * an unsubscribe function.
76
- */
77
- onMessage(handler: (msg: SwappedInboundMessage) => void): () => void;
78
- }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare function EmptyFormOfPaymentsMessage({ minHeight, }: {
3
- minHeight: number;
4
- }): React.JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare function useUpdateCardSourceAsset(): {
2
- onSelectCard: () => Promise<void>;
3
- isUpdating: boolean;
4
- };
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { type BoxProps } from '../../../components/Box/Box';
3
- export declare function SwappedErrorMessage({ minHeight, paddingBottom, }: {
4
- minHeight: number;
5
- paddingBottom?: BoxProps['paddingBottom'];
6
- }): React.JSX.Element;
@@ -1,34 +0,0 @@
1
- type BaseCondition = {
2
- type: 'country';
3
- countryCodes: string[];
4
- };
5
- type Condition = BaseCondition | {
6
- type: 'all';
7
- conditions: Condition[];
8
- } | {
9
- type: 'any';
10
- conditions: Condition[];
11
- };
12
- interface Variant<T> {
13
- condition?: Condition;
14
- value: T;
15
- }
16
- interface VariantConfig<T> {
17
- variants: Variant<T>[];
18
- value: T;
19
- }
20
- interface EvaluationContext {
21
- countryCode?: string;
22
- }
23
- /**
24
- * Type guard to check if a value is a VariantConfig
25
- * (used to distinguish from simple static configs)
26
- */
27
- export declare function isVariantConfig<T>(value: unknown): value is VariantConfig<T>;
28
- /**
29
- * Resolves the appropriate value from a VariantConfig based on runtime context.
30
- * Evaluates variants in order and returns the first matching variant's value.
31
- * Falls back to default value if no variants match.
32
- */
33
- export declare function resolveValue<T>(config: VariantConfig<T>, ctx: EvaluationContext): T;
34
- export {};
@@ -1,70 +0,0 @@
1
- "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-OLZ7626J.js";
6
- import {
7
- getWalletConnectConnector
8
- } from "./chunk-N4IJLYFY.js";
9
-
10
- // src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts
11
- import { isAndroid, isIOS } from "@funkit/utils";
12
- var rainbowWallet = ({
13
- projectId,
14
- walletConnectParameters
15
- }) => {
16
- const isRainbowInjected = hasInjectedProvider({ flag: "isRainbow" });
17
- const shouldUseWalletConnect = !isRainbowInjected;
18
- const getUri = (uri) => {
19
- return isAndroid() ? uri : isIOS() ? `rainbow://wc?uri=${encodeURIComponent(uri)}&connector=rainbowkit` : `https://rnbwapp.com/wc?uri=${encodeURIComponent(
20
- uri
21
- )}&connector=rainbowkit`;
22
- };
23
- return {
24
- id: "rainbow",
25
- name: "Rainbow",
26
- rdns: "me.rainbow",
27
- iconUrl: async () => (await import("./rainbowWallet-MFJQCICF.js")).default,
28
- iconBackground: "#0c2f78",
29
- installed: !shouldUseWalletConnect ? isRainbowInjected : void 0,
30
- downloadUrls: {
31
- android: "https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",
32
- ios: "https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",
33
- mobile: "https://rainbow.download?utm_source=rainbowkit",
34
- qrCode: "https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",
35
- browserExtension: "https://rainbow.me/extension?utm_source=rainbowkit"
36
- },
37
- mobile: { getUri: shouldUseWalletConnect ? getUri : void 0 },
38
- qrCode: shouldUseWalletConnect ? {
39
- getUri,
40
- instructions: {
41
- learnMoreUrl: "https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",
42
- steps: [
43
- {
44
- description: "wallet_connectors.rainbow.qr_code.step1.description",
45
- step: "install",
46
- title: "wallet_connectors.rainbow.qr_code.step1.title"
47
- },
48
- {
49
- description: "wallet_connectors.rainbow.qr_code.step2.description",
50
- step: "create",
51
- title: "wallet_connectors.rainbow.qr_code.step2.title"
52
- },
53
- {
54
- description: "wallet_connectors.rainbow.qr_code.step3.description",
55
- step: "scan",
56
- title: "wallet_connectors.rainbow.qr_code.step3.title"
57
- }
58
- ]
59
- }
60
- } : void 0,
61
- createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
62
- projectId,
63
- walletConnectParameters
64
- }) : getInjectedConnector({ flag: "isRainbow" })
65
- };
66
- };
67
-
68
- export {
69
- rainbowWallet
70
- };
@@ -1,69 +0,0 @@
1
- "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-OLZ7626J.js";
6
- import {
7
- getWalletConnectConnector
8
- } from "./chunk-N4IJLYFY.js";
9
-
10
- // src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts
11
- import { isAndroid } from "@funkit/utils";
12
- var bifrostWallet = ({
13
- projectId,
14
- walletConnectParameters
15
- }) => {
16
- const isBifrostInjected = hasInjectedProvider({ flag: "isBifrost" });
17
- const shouldUseWalletConnect = !isBifrostInjected;
18
- const getUri = (uri) => {
19
- return isAndroid() ? uri : `https://app.bifrostwallet.com/wc?uri=${encodeURIComponent(uri)}`;
20
- };
21
- return {
22
- id: "bifrostWallet",
23
- name: "Bifrost Wallet",
24
- iconUrl: async () => (await import("./bifrostWallet-5NQVDZ5P.js")).default,
25
- iconBackground: "#fff",
26
- installed: !shouldUseWalletConnect ? isBifrostInjected : void 0,
27
- downloadUrls: {
28
- android: "https://play.google.com/store/apps/details?id=com.bifrostwallet.app",
29
- ios: "https://apps.apple.com/us/app/bifrost-wallet/id1577198351",
30
- qrCode: "https://bifrostwallet.com/#download-app"
31
- },
32
- mobile: {
33
- getUri: shouldUseWalletConnect ? getUri : void 0
34
- },
35
- qrCode: shouldUseWalletConnect ? {
36
- getUri: (uri) => uri,
37
- instructions: {
38
- learnMoreUrl: "https://support.bifrostwallet.com/en/articles/6886814-how-to-use-walletconnect",
39
- steps: [
40
- {
41
- description: "wallet_connectors.bifrost.qr_code.step1.description",
42
- step: "install",
43
- title: "wallet_connectors.bifrost.qr_code.step1.title"
44
- },
45
- {
46
- description: "wallet_connectors.bifrost.qr_code.step2.description",
47
- step: "create",
48
- title: "wallet_connectors.bifrost.qr_code.step2.title"
49
- },
50
- {
51
- description: "wallet_connectors.bifrost.qr_code.step3.description",
52
- step: "scan",
53
- title: "wallet_connectors.bifrost.qr_code.step3.title"
54
- }
55
- ]
56
- }
57
- } : void 0,
58
- createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
59
- projectId,
60
- walletConnectParameters
61
- }) : getInjectedConnector({
62
- flag: "isBifrost"
63
- })
64
- };
65
- };
66
-
67
- export {
68
- bifrostWallet
69
- };
@@ -1,96 +0,0 @@
1
- "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-OLZ7626J.js";
6
- import {
7
- getWalletConnectConnector
8
- } from "./chunk-N4IJLYFY.js";
9
-
10
- // src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts
11
- var coin98Wallet = ({
12
- projectId,
13
- walletConnectParameters
14
- }) => {
15
- const isCoin98WalletInjected = hasInjectedProvider({
16
- namespace: "coin98.provider",
17
- flag: "isCoin98"
18
- });
19
- const shouldUseWalletConnect = !isCoin98WalletInjected;
20
- return {
21
- id: "coin98",
22
- name: "Coin98 Wallet",
23
- iconUrl: async () => (await import("./coin98Wallet-I5CP5KYZ.js")).default,
24
- installed: isCoin98WalletInjected,
25
- iconAccent: "#CDA349",
26
- iconBackground: "#fff",
27
- rdns: "coin98.com",
28
- downloadUrls: {
29
- android: "https://play.google.com/store/apps/details?id=coin98.crypto.finance.media",
30
- ios: "https://apps.apple.com/vn/app/coin98-super-app/id1561969966",
31
- mobile: "https://coin98.com/wallet",
32
- qrCode: "https://coin98.com/wallet",
33
- chrome: "https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",
34
- browserExtension: "https://coin98.com/wallet"
35
- },
36
- mobile: {
37
- getUri: shouldUseWalletConnect ? (uri) => uri : void 0
38
- },
39
- qrCode: shouldUseWalletConnect ? {
40
- getUri: (uri) => uri,
41
- instructions: {
42
- learnMoreUrl: "https://coin98.com/wallet",
43
- steps: [
44
- {
45
- description: "wallet_connectors.coin98.qr_code.step1.description",
46
- step: "install",
47
- title: "wallet_connectors.coin98.qr_code.step1.title"
48
- },
49
- {
50
- description: "wallet_connectors.coin98.qr_code.step2.description",
51
- step: "create",
52
- title: "wallet_connectors.coin98.qr_code.step2.title"
53
- },
54
- {
55
- description: "wallet_connectors.coin98.qr_code.step3.description",
56
- step: "scan",
57
- title: "wallet_connectors.coin98.qr_code.step3.title"
58
- }
59
- ]
60
- }
61
- } : void 0,
62
- extension: {
63
- instructions: {
64
- learnMoreUrl: "https://coin98.com/wallet",
65
- steps: [
66
- {
67
- description: "wallet_connectors.coin98.extension.step1.description",
68
- step: "install",
69
- title: "wallet_connectors.coin98.extension.step1.title"
70
- },
71
- {
72
- description: "wallet_connectors.coin98.extension.step2.description",
73
- step: "create",
74
- title: "wallet_connectors.coin98.extension.step2.title"
75
- },
76
- {
77
- description: "wallet_connectors.coin98.extension.step3.description",
78
- step: "refresh",
79
- title: "wallet_connectors.coin98.extension.step3.title"
80
- }
81
- ]
82
- }
83
- },
84
- createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
85
- projectId,
86
- walletConnectParameters
87
- }) : getInjectedConnector({
88
- namespace: "coin98Wallet",
89
- flag: "isCoin98"
90
- })
91
- };
92
- };
93
-
94
- export {
95
- coin98Wallet
96
- };
@@ -1,218 +0,0 @@
1
- "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-OLZ7626J.js";
6
- import {
7
- getWalletConnectConnector
8
- } from "./chunk-N4IJLYFY.js";
9
-
10
- // src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
11
- import { isAndroid, isIOS } from "@funkit/utils";
12
- function isMetaMask(ethereum) {
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
- }
124
- return true;
125
- }
126
- var metaMaskWallet = ({
127
- projectId,
128
- walletConnectParameters
129
- }) => {
130
- const isMetaMaskInjected = hasInjectedProvider({ flag: "isMetaMask" });
131
- const shouldUseWalletConnect = !isMetaMaskInjected;
132
- const getUri = (uri) => {
133
- return isAndroid() ? uri : isIOS() ? (
134
- // currently broken in MetaMask v6.5.0 https://github.com/MetaMask/metamask-mobile/issues/6457
135
- `metamask://wc?uri=${encodeURIComponent(uri)}`
136
- ) : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;
137
- };
138
- return {
139
- id: "metaMask",
140
- name: "MetaMask",
141
- rdns: "io.metamask",
142
- iconUrl: async () => (await import("./metaMaskWallet-RMHEKBDR.js")).default,
143
- iconAccent: "#f6851a",
144
- iconBackground: "#fff",
145
- installed: !shouldUseWalletConnect ? isMetaMaskInjected : void 0,
146
- downloadUrls: {
147
- android: "https://play.google.com/store/apps/details?id=io.metamask",
148
- ios: "https://apps.apple.com/us/app/metamask/id1438144202",
149
- mobile: "https://metamask.io/download",
150
- qrCode: "https://metamask.io/download",
151
- chrome: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",
152
- edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",
153
- firefox: "https://addons.mozilla.org/firefox/addon/ether-metamask",
154
- opera: "https://addons.opera.com/extensions/details/metamask-10",
155
- browserExtension: "https://metamask.io/download"
156
- },
157
- mobile: {
158
- getUri: shouldUseWalletConnect ? getUri : void 0
159
- },
160
- qrCode: shouldUseWalletConnect ? {
161
- getUri,
162
- instructions: {
163
- learnMoreUrl: "https://metamask.io/faqs/",
164
- steps: [
165
- {
166
- description: "wallet_connectors.metamask.qr_code.step1.description",
167
- step: "install",
168
- title: "wallet_connectors.metamask.qr_code.step1.title"
169
- },
170
- {
171
- description: "wallet_connectors.metamask.qr_code.step2.description",
172
- step: "create",
173
- title: "wallet_connectors.metamask.qr_code.step2.title"
174
- },
175
- {
176
- description: "wallet_connectors.metamask.qr_code.step3.description",
177
- step: "refresh",
178
- title: "wallet_connectors.metamask.qr_code.step3.title"
179
- }
180
- ]
181
- }
182
- } : void 0,
183
- extension: {
184
- instructions: {
185
- learnMoreUrl: "https://metamask.io/faqs/",
186
- steps: [
187
- {
188
- description: "wallet_connectors.metamask.extension.step1.description",
189
- step: "install",
190
- title: "wallet_connectors.metamask.extension.step1.title"
191
- },
192
- {
193
- description: "wallet_connectors.metamask.extension.step2.description",
194
- step: "create",
195
- title: "wallet_connectors.metamask.extension.step2.title"
196
- },
197
- {
198
- description: "wallet_connectors.metamask.extension.step3.description",
199
- step: "refresh",
200
- title: "wallet_connectors.metamask.extension.step3.title"
201
- }
202
- ]
203
- }
204
- },
205
- createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
206
- projectId,
207
- walletConnectParameters
208
- }) : getInjectedConnector({
209
- target: typeof window !== "undefined" ? window.ethereum?.providers?.find(
210
- isMetaMask
211
- ) ?? window.ethereum : void 0
212
- })
213
- };
214
- };
215
-
216
- export {
217
- metaMaskWallet
218
- };