@ledgerhq/connect-kit 1.0.0 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -7,7 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 1.0.1 - 2022-12-02
11
+ ### Changed
12
+ - Don't open a blank tab when pressing the User Ledger Live deeplink.
13
+ - Correctly detect the Brave browser on iOS.
14
+ - Patch the provider's request method to handle the Connect With Ledger Live
15
+ modal in the `eth_requestAccounts` method, allowing us to reject with the
16
+ "user rejected connection" error when the modal is closed.
17
+
10
18
  ## 1.0.0 - 2022-11-17
19
+ ### Changed
20
+ - Promoted to 1.0.
11
21
 
12
22
  ## 1.0.0-beta.4-5 - 2022-11-01
13
23
  ### 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";