@reef-knot/web3-react 1.13.0 → 1.13.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConnectorInfo.d.ts","sourceRoot":"","sources":["../../src/hooks/useConnectorInfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useConnectorInfo.d.ts","sourceRoot":"","sources":["../../src/hooks/useConnectorInfo.ts"],"names":[],"mappings":"AAoBA,KAAK,aAAa,GAAG;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,aAsFnC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { useAccount } from 'wagmi';
|
|
|
2
2
|
import { SafeAppConnector } from '@gnosis.pm/safe-apps-web3-react';
|
|
3
3
|
import { InjectedConnector } from '@web3-react/injected-connector';
|
|
4
4
|
import { WalletLinkConnector } from '@web3-react/walletlink-connector';
|
|
5
|
-
import { LedgerHQFrameConnector } from '@reef-knot/ledger-connector';
|
|
5
|
+
import { LedgerHIDConnector, LedgerHQFrameConnector } from '@reef-knot/ledger-connector';
|
|
6
6
|
import { useWeb3 } from './useWeb3.js';
|
|
7
7
|
import { PROVIDER_NAMES } from '../constants/connectors.js';
|
|
8
8
|
import { isCoinbaseProvider, isDappBrowserProvider, isMetamaskProvider, isImTokenProvider, isTrustProvider, isXdefiProvider, isZerionProvider } from '../helpers/providerDetectors.js';
|
|
@@ -19,6 +19,7 @@ var useConnectorInfo = () => {
|
|
|
19
19
|
connector: wagmiConnector
|
|
20
20
|
} = useAccount();
|
|
21
21
|
var isConnectedViaWagmi = isConnected && !!wagmiConnector;
|
|
22
|
+
var isLedger = wagmiConnector instanceof LedgerHIDConnector;
|
|
22
23
|
// === WAGMI connectors END
|
|
23
24
|
// === WEB3-REACT connectors BEGIN
|
|
24
25
|
var isGnosis = active && connector instanceof SafeAppConnector;
|
|
@@ -48,6 +49,7 @@ var useConnectorInfo = () => {
|
|
|
48
49
|
// So it is easy for a user to understand which wallet app is being used for connection.
|
|
49
50
|
if (isDappBrowser) return undefined;
|
|
50
51
|
if (isGnosis) return PROVIDER_NAMES.GNOSIS;
|
|
52
|
+
if (isLedger) return PROVIDER_NAMES.LEDGER;
|
|
51
53
|
if (isLedgerLive) return PROVIDER_NAMES.LEDGER_HQ_LIVE;
|
|
52
54
|
if (isImToken) return PROVIDER_NAMES.IM_TOKEN;
|
|
53
55
|
if (isTrust) return PROVIDER_NAMES.TRUST;
|
|
@@ -70,6 +72,7 @@ var useConnectorInfo = () => {
|
|
|
70
72
|
providerName,
|
|
71
73
|
isConnectedViaWagmi,
|
|
72
74
|
isGnosis,
|
|
75
|
+
isLedger,
|
|
73
76
|
isLedgerLive,
|
|
74
77
|
isWalletLink,
|
|
75
78
|
isCoinbase,
|