-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add workspaces to root `package.json` so we can test demo app with local loader package without manual linking - moved `checkSupport` parameter types and their management to a `supportOptions` module, added parameters for WalletConnect v2, sets defaults for chain parameters, `getSupportOptions` is called by other modules - renamed `ExtensionUnavailableModal` to `ExtensionInstallModal` - renamed `ConnectWithLedgerLiveModal` to `UseLedgerLiveModal` - renamed the `Ethereum` provider to `ExtensionEvm` since it is used for Polygon and future EVM chains, moved chain compatibility checks there, renamed related constants and types - renamed `Solana` to `ExtensionSolana` since this is through the extension, and we might support Solana through WalletConnect as well in the future - renamed the original `WalletConnect` module to `WalletConnectLegacy` which now imports the dist file from `@walletconnect/legacy-provider`, updated the module declaration in `src/@types/index.d.ts` - created a new `WalletConnectEvm` module for the v2 provider which imports the dist file from `@walletconnect/ethereum-provider` v2, added a new module declaration in `src/@types/index.d.ts` - removed the `TryConnectEthereum` module - when the extension is supported but not installed we now default to the `WalletConnect` provider instead of the extension one, this will make it possible to use WC in that case if the user needs it - the modal module now has a `showExtensionOrLLModal` function with the logic to show the `ExtensionInstallModal` if both the user's platform and the required chains are supported, or the `UseLedgerLiveModal` one - the `eth_requestAccounts` request on both WalletConnect provider modules now call `showExtensionOrLLModal` - `getProvider` now returns the `WalletConnectLegacy` provider if the version parameter is 1 or the `WalletConnectEvm` one otherwise - store result of `checkSupport` in a module variable and make it available through `getSupportResult`, is used by `showExtensionOrLLModal` to decide which modal to show - made some changes to the rollup config to be able to bundle @walletconnect/ethereum-provider v2
- Loading branch information
1 parent
acca935
commit 89e3d61
Showing
27 changed files
with
732 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "connect-kit", | ||
"private": true, | ||
"workspaces": { | ||
"packages": [ | ||
"packages/*" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
declare module '@walletconnect/ethereum-provider/dist/umd/index.min.js' { | ||
import WalletConnectProvider from '@walletconnect/ethereum-provider/dist/esm/index'; | ||
export default WalletConnectProvider; | ||
} | ||
declare module '@walletconnect/ethereum-provider/dist/index.umd.js' { | ||
import WalletConnectProvider from '@walletconnect/ethereum-provider/dist/index.umd.js'; | ||
export default WalletConnectProvider | ||
}; | ||
|
||
declare module '@walletconnect/legacy-provider/dist/umd/index.min.js' { | ||
import WalletConnectProvider from '@walletconnect/legacy-provider/dist/umd/index.min.js'; | ||
export default WalletConnectProvider | ||
}; |
1 change: 0 additions & 1 deletion
1
packages/connect-kit/src/components/ConnectWithLedgerLiveModal/index.ts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/connect-kit/src/components/ExtensionInstallModal/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./ExtensionInstallModal"; |
1 change: 0 additions & 1 deletion
1
packages/connect-kit/src/components/ExtensionUnavailableModal/index.ts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/connect-kit/src/components/UseLedgerLiveModal/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./UseLedgerLiveModal"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { default as ExtensionUnavailableModal } from "./ExtensionUnavailableModal"; | ||
export { default as ConnectWithLedgerLiveModal } from "./ConnectWithLedgerLiveModal"; | ||
export { default as ExtensionInstallModal } from "./ExtensionInstallModal"; | ||
export { default as UseLedgerLiveModal } from "./UseLedgerLiveModal"; | ||
export { default as PlatformNotSupportedModal } from "./PlatformNotSupportedModal"; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.