@reef-knot/web3-react 1.4.1 → 1.4.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":"useAutoConnect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutoConnect.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGpD,eAAO,MAAM,cAAc,eAAgB,sBAAsB,SAKhE,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAAgB,sBAAsB,SA4DnE,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAO,IAwBvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAAO,IAgB3C,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAO,IAexC,CAAC"}
1
+ {"version":3,"file":"useAutoConnect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutoConnect.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGpD,eAAO,MAAM,cAAc,eAAgB,sBAAsB,SAKhE,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAAgB,sBAAsB,SAkEnE,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAO,IAwBvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAAO,IAgB3C,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAO,IAexC,CAAC"}
@@ -53,7 +53,14 @@ var useEagerConnector = connectors => {
53
53
  return null;
54
54
  })();
55
55
  if (!connector) return;
56
- var connectWallet = () => activate(connector, undefined, true);
56
+ var connectWallet = () => __awaiter(void 0, void 0, void 0, function* () {
57
+ var _d;
58
+ yield activate(connector, undefined, true);
59
+ // Hide the modal if a user approved the connection in a wallet's UI.
60
+ // If a user rejects the connection, then an error is thrown
61
+ // and the following code is not being reached, the modal stays visible.
62
+ (_d = acceptTermsModal.setVisible) === null || _d === void 0 ? void 0 : _d.call(acceptTermsModal, false);
63
+ });
57
64
  var termsAccepted = false;
58
65
  if (typeof window !== 'undefined') {
59
66
  termsAccepted = ((_a = window.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(LS_KEY_TERMS_ACCEPTANCE)) === 'true';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/web3-react",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {