@wagmi/connectors 0.3.9 → 0.3.10

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.
@@ -17,7 +17,6 @@ type WalletConnectOptions = {
17
17
  * will determine if that chain should be considered as stale. A stale chain is a chain that
18
18
  * WalletConnect has yet to establish a relationship with (ie. the user has not approved or
19
19
  * rejected the chain).
20
- * Defaults to `true`.
21
20
  *
22
21
  * Preface: Whereas WalletConnect v1 supported dynamic chain switching, WalletConnect v2 requires
23
22
  * the user to pre-approve a set of chains up-front. This comes with consequent UX nuances (see below) when
@@ -43,6 +42,7 @@ type WalletConnectOptions = {
43
42
  * dapp handles this error and prompts the user to reconnect to the dapp in order to approve
44
43
  * the newly added chain.
45
44
  *
45
+ * @default true
46
46
  */
47
47
  isNewChainsStale?: boolean;
48
48
  /**
@@ -52,9 +52,15 @@ type WalletConnectOptions = {
52
52
  metadata?: EthereumProviderOptions['metadata'];
53
53
  /**
54
54
  * Whether or not to show the QR code modal.
55
+ * @default true
55
56
  * @link https://docs.walletconnect.com/2.0/javascript/providers/ethereum#initialization
56
57
  */
57
58
  showQrModal?: EthereumProviderOptions['showQrModal'];
59
+ /**
60
+ * Options of QR code modal.
61
+ * @link https://docs.walletconnect.com/2.0/web3modal/options
62
+ */
63
+ qrModalOptions?: EthereumProviderOptions['qrModalOptions'];
58
64
  };
59
65
  type WalletConnectSigner = providers.JsonRpcSigner;
60
66
  type ConnectConfig = {
@@ -218,9 +218,10 @@ initProvider_fn = async function() {
218
218
  } = await import("@walletconnect/ethereum-provider");
219
219
  const [defaultChain, ...optionalChains] = this.chains.map(({ id }) => id);
220
220
  if (defaultChain) {
221
- const { projectId, showQrModal } = this.options;
221
+ const { projectId, showQrModal = true, qrModalOptions } = this.options;
222
222
  __privateSet(this, _provider, await EthereumProvider.init({
223
223
  showQrModal,
224
+ qrModalOptions,
224
225
  projectId,
225
226
  optionalMethods: OPTIONAL_METHODS,
226
227
  optionalEvents: OPTIONAL_EVENTS,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@wagmi/connectors",
3
3
  "description": "A collection of connectors for wagmi",
4
4
  "license": "MIT",
5
- "version": "0.3.9",
5
+ "version": "0.3.10",
6
6
  "peerDependencies": {
7
7
  "@wagmi/core": ">=0.9.x",
8
8
  "ethers": ">=5.5.1 <6",
@@ -19,9 +19,9 @@
19
19
  "dependencies": {
20
20
  "@coinbase/wallet-sdk": "^3.5.4",
21
21
  "@ledgerhq/connect-kit-loader": "^1.0.1",
22
- "@walletconnect/ethereum-provider": "^2.5.1",
22
+ "@walletconnect/ethereum-provider": "2.5.2",
23
23
  "@walletconnect/legacy-provider": "^2.0.0",
24
- "@web3modal/standalone": "^2.2.1",
24
+ "@web3modal/standalone": "2.2.2",
25
25
  "@safe-global/safe-apps-provider": "^0.15.2",
26
26
  "@safe-global/safe-apps-sdk": "^7.9.0",
27
27
  "abitype": "^0.3.0",