@reef-knot/wallets-helpers 1.0.1 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"walletConnectConnector.d.ts","sourceRoot":"","sources":["../../src/factories/walletConnectConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAIxE,eAAO,MAAM,uBAAuB,QAAS,OAAO,MAAM,EAAE,MAAM,CAAC,2BAUlE,CAAC;AAEF,eAAO,MAAM,yBAAyB;SAO/B,OAAO,MAAM,EAAE,MAAM,CAAC;;;;;2DAkC5B,CAAC"}
1
+ {"version":3,"file":"walletConnectConnector.d.ts","sourceRoot":"","sources":["../../src/factories/walletConnectConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAIxE,eAAO,MAAM,uBAAuB,QAAS,OAAO,MAAM,EAAE,MAAM,CAAC,2BAUlE,CAAC;AAEF,eAAO,MAAM,yBAAyB;SAO/B,OAAO,MAAM,EAAE,MAAM,CAAC;;;;;2DAuC5B,CAAC"}
@@ -18,9 +18,13 @@ const getWalletConnectConnector = ({
18
18
  qrcode = true,
19
19
  v2: _v2 = false
20
20
  }) => {
21
+ let v2EnabledByLS = false;
22
+ if (typeof window !== 'undefined') {
23
+ v2EnabledByLS = window.localStorage.getItem('reefknot_wcv2_enable') === 'true';
24
+ }
21
25
  // WalletConnect v2 will automatically replace legacy v1 after this date:
22
- const v2TransitionDate = new Date('2023-06-20T00:00:00Z');
23
- const v2 = _v2 || new Date() > v2TransitionDate;
26
+ const v2TransitionDate = new Date('2023-06-24T00:00:00Z');
27
+ const v2 = _v2 || v2EnabledByLS || new Date() > v2TransitionDate;
24
28
  if (v2) {
25
29
  return new WalletConnectConnector({
26
30
  options: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/wallets-helpers",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {