@ledgerhq/connect-kit 1.0.0 → 1.0.2

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 CHANGED
@@ -7,7 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 1.0.2 - 2022-12-02
11
+ ### Changed
12
+ - Use the ledgerlive: deeplink for que QR code instead of the WalletConnect
13
+ URI; this allows scanning the QR code with the native camera app.
14
+
15
+ ## 1.0.1 - 2022-12-02
16
+ ### Changed
17
+ - Don't open a blank tab when pressing the User Ledger Live deeplink.
18
+ - Correctly detect the Brave browser on iOS.
19
+ - Patch the provider's request method to handle the Connect With Ledger Live
20
+ modal in the `eth_requestAccounts` method, allowing us to reject with the
21
+ "user rejected connection" error when the modal is closed.
22
+
10
23
  ## 1.0.0 - 2022-11-17
24
+ ### Changed
25
+ - Promoted to 1.0.
11
26
 
12
27
  ## 1.0.0-beta.4-5 - 2022-11-01
13
28
  ### Changed
@@ -2,6 +2,7 @@
2
2
  export declare let setWalletConnectUri: (uri: string) => void;
3
3
  export type ConnectWithLedgerLiveModalProps = {
4
4
  withQrCode?: boolean;
5
+ onClose?: () => void;
5
6
  };
6
- declare const ConnectWithLedgerLiveModal: ({ withQrCode }: ConnectWithLedgerLiveModalProps) => JSX.Element;
7
+ declare const ConnectWithLedgerLiveModal: ({ withQrCode, onClose, }: ConnectWithLedgerLiveModalProps) => JSX.Element;
7
8
  export default ConnectWithLedgerLiveModal;
@@ -2,7 +2,8 @@ import { ReactElement } from "react";
2
2
  export declare let setIsModalOpen: (isModalOpen: boolean) => void;
3
3
  interface ModalProps {
4
4
  isOpen?: boolean;
5
+ onClose?: () => void;
5
6
  children: ReactElement | null;
6
7
  }
7
- export declare const Modal: ({ children }: ModalProps) => JSX.Element | null;
8
+ export declare const Modal: ({ onClose, children }: ModalProps) => JSX.Element | null;
8
9
  export default Modal;
@@ -1,14 +1,18 @@
1
1
  import WalletConnectProvider from '@walletconnect/ethereum-provider/dist/esm';
2
2
 
3
+ type EthereumRequestPayload = {
4
+ method: string;
5
+ params?: unknown[] | object;
6
+ };
3
7
  interface EthereumProvider {
4
8
  providers?: EthereumProvider[];
5
- request(...args: unknown[]): Promise<unknown>;
9
+ request(payload: EthereumRequestPayload): Promise<unknown>;
6
10
  disconnect?: {
7
11
  (): Promise<void>;
8
12
  };
9
13
  emit(eventName: string | symbol, ...args: any[]): boolean;
10
- on(...args: unknown[]): void;
11
- removeListener(...args: unknown[]): void;
14
+ on(event: any, listener: any): void;
15
+ removeListener(event: string, listener: any): void;
12
16
  }
13
17
 
14
18
  declare const LEDGER_CONNECT_SOLANA_PROP = "isLedgerConnect";