@ledgerhq/connect-kit 1.0.3 → 1.0.5
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.
- package/CHANGELOG.md +21 -1
- package/dist/umd/components/ConnectWithLedgerLiveModal/ConnectWithLedgerLiveModal.d.ts +4 -4
- package/dist/umd/components/ExtensionUnavailableModal/ExtensionUnavailableModal.d.ts +3 -1
- package/dist/umd/components/Modal/Modal.d.ts +2 -2
- package/dist/umd/index.d.ts +2 -4
- package/dist/umd/index.js +28 -28
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/lib/errors.d.ts +5 -0
- package/dist/umd/lib/modal.d.ts +2 -1
- package/dist/umd/lib/provider.d.ts +1 -2
- package/dist/umd/providers/Ethereum.d.ts +2 -3
- package/dist/umd/providers/TryConnectEthereum.d.ts +7 -0
- package/dist/umd/providers/WalletConnect.d.ts +2 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
@@ -7,11 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## Unreleased
|
9
9
|
|
10
|
+
## 1.0.5 - 2022-12-12
|
11
|
+
### Changed
|
12
|
+
- Return a valid provider in case the Connect extension is supported but not
|
13
|
+
enabled, instead of throwing an exception. The modal that guides the user to
|
14
|
+
install the extension was being shown on the `getProvider` function, but has
|
15
|
+
been moved to the `eth_requestAccounts` request on the new provider to
|
16
|
+
correctly work with autoconnect on wagmi.
|
17
|
+
|
18
|
+
## 1.0.4 - 2022-12-06
|
19
|
+
### Changed
|
20
|
+
- Create a new WalletConnect session each time `eth_requestAccounts` is called
|
21
|
+
(and hence each time the "Use Ledger Live" modal is shown) to avoid reusing
|
22
|
+
the same WalletConnect URI.
|
23
|
+
- The "Use Ledger Live" modal is now closed when pressing the "Use Ledger
|
24
|
+
Live" button to avoid the same WalletConnect URI being reused (e.g. if the
|
25
|
+
user clicks "Decline" in Ledger Live and clicks "Use Ledger Live" again.
|
26
|
+
- No longer reuse the provider instance in the Provider module as it
|
27
|
+
interferes with refreshing the WalletConnect URI.
|
28
|
+
- No longer reuse the provider instance in the WalletConnect module.
|
29
|
+
|
10
30
|
## 1.0.3 - 2022-12-06
|
11
31
|
|
12
32
|
## 1.0.2 - 2022-12-02
|
13
33
|
### Changed
|
14
|
-
- Use the ledgerlive: deeplink for
|
34
|
+
- Use the ledgerlive: deeplink for the QR code instead of the WalletConnect
|
15
35
|
URI; this allows scanning the QR code with the native camera app.
|
16
36
|
|
17
37
|
## 1.0.1 - 2022-12-02
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
|
2
|
+
import { ModalProps } from "../Modal/Modal";
|
3
3
|
export type ConnectWithLedgerLiveModalProps = {
|
4
4
|
withQrCode?: boolean;
|
5
|
-
|
6
|
-
};
|
7
|
-
declare const ConnectWithLedgerLiveModal: ({ withQrCode, onClose, }: ConnectWithLedgerLiveModalProps) => JSX.Element;
|
5
|
+
uri?: string;
|
6
|
+
} & ModalProps;
|
7
|
+
declare const ConnectWithLedgerLiveModal: ({ withQrCode, uri, onClose, }: ConnectWithLedgerLiveModalProps) => JSX.Element;
|
8
8
|
export default ConnectWithLedgerLiveModal;
|
@@ -1,3 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
|
2
|
+
import { ModalProps } from "../Modal/Modal";
|
3
|
+
export type ExtensionUnavailableModalProps = ModalProps;
|
4
|
+
declare const ExtensionUnavailableModal: ({ onClose, }: ExtensionUnavailableModalProps) => JSX.Element;
|
3
5
|
export default ExtensionUnavailableModal;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ReactElement } from "react";
|
2
2
|
export declare let setIsModalOpen: (isModalOpen: boolean) => void;
|
3
|
-
interface ModalProps {
|
3
|
+
export interface ModalProps {
|
4
4
|
isOpen?: boolean;
|
5
5
|
onClose?: () => void;
|
6
|
-
children
|
6
|
+
children?: ReactElement | null;
|
7
7
|
}
|
8
8
|
export declare const Modal: ({ onClose, children }: ModalProps) => JSX.Element | null;
|
9
9
|
export default Modal;
|
package/dist/umd/index.d.ts
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
import WalletConnectProvider from '@walletconnect/ethereum-provider/dist/esm';
|
2
|
-
|
3
1
|
type EthereumRequestPayload = {
|
4
2
|
method: string;
|
5
3
|
params?: unknown[] | object;
|
6
4
|
};
|
7
5
|
interface EthereumProvider {
|
8
6
|
providers?: EthereumProvider[];
|
9
|
-
request(
|
7
|
+
request<T = unknown>(args: EthereumRequestPayload): Promise<T>;
|
10
8
|
disconnect?: {
|
11
9
|
(): Promise<void>;
|
12
10
|
};
|
@@ -33,7 +31,7 @@ declare enum SupportedProviderImplementations {
|
|
33
31
|
LedgerConnect = "LedgerConnect",
|
34
32
|
WalletConnect = "WalletConnect"
|
35
33
|
}
|
36
|
-
type ProviderResult = EthereumProvider | SolanaProvider
|
34
|
+
type ProviderResult = EthereumProvider | SolanaProvider;
|
37
35
|
declare function getProvider(): Promise<ProviderResult>;
|
38
36
|
|
39
37
|
type CheckSupportOptions = {
|