@omnisat/lasereyes 0.0.66 → 0.0.69

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/dist/index.js CHANGED
@@ -798,7 +798,9 @@ var LaserEyesProvider = ({
798
798
  return;
799
799
  }
800
800
  const lib = provider === WIZZ ? window.wizz : window.unisat;
801
- lib.getAccounts().then((accounts2) => {
801
+ if (!lib)
802
+ return;
803
+ lib == null ? void 0 : lib.getAccounts().then((accounts2) => {
802
804
  handleAccountsChanged(accounts2);
803
805
  });
804
806
  lib.on("accountsChanged", handleAccountsChanged);
@@ -1185,7 +1187,8 @@ var LaserEyesProvider = ({
1185
1187
  if (!library)
1186
1188
  throw new Error("No wallet connected");
1187
1189
  if (provider === UNISAT) {
1188
- return yield library.requestAccounts();
1190
+ const lib = window.unisat;
1191
+ return yield lib.requestAccounts();
1189
1192
  } else if (provider === XVERSE) {
1190
1193
  const getAddressOptions = {
1191
1194
  payload: {
package/dist/index.mjs CHANGED
@@ -703,7 +703,9 @@ var LaserEyesProvider = ({
703
703
  return;
704
704
  }
705
705
  const lib = provider === WIZZ ? window.wizz : window.unisat;
706
- lib.getAccounts().then((accounts2) => {
706
+ if (!lib)
707
+ return;
708
+ lib == null ? void 0 : lib.getAccounts().then((accounts2) => {
707
709
  handleAccountsChanged(accounts2);
708
710
  });
709
711
  lib.on("accountsChanged", handleAccountsChanged);
@@ -1090,7 +1092,8 @@ var LaserEyesProvider = ({
1090
1092
  if (!library)
1091
1093
  throw new Error("No wallet connected");
1092
1094
  if (provider === UNISAT) {
1093
- return yield library.requestAccounts();
1095
+ const lib = window.unisat;
1096
+ return yield lib.requestAccounts();
1094
1097
  } else if (provider === XVERSE) {
1095
1098
  const getAddressOptions = {
1096
1099
  payload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnisat/lasereyes",
3
- "version": "0.0.66",
3
+ "version": "0.0.69",
4
4
  "sideEffects": false,
5
5
  "private": false,
6
6
  "license": "MIT",