@omnisat/lasereyes 0.0.24 → 0.0.25
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 +6 -6
- package/dist/index.mjs +10 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -705,7 +705,7 @@ var LaserEyesProvider = ({
|
|
|
705
705
|
connect(defaultWallet);
|
|
706
706
|
}
|
|
707
707
|
}, []);
|
|
708
|
-
const connectUnisat = () => __async(void 0, null, function* () {
|
|
708
|
+
const connectUnisat = (0, import_react.useCallback)(() => __async(void 0, null, function* () {
|
|
709
709
|
try {
|
|
710
710
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, UNISAT);
|
|
711
711
|
const lib = window.unisat;
|
|
@@ -728,8 +728,8 @@ var LaserEyesProvider = ({
|
|
|
728
728
|
} catch (error) {
|
|
729
729
|
throw error;
|
|
730
730
|
}
|
|
731
|
-
});
|
|
732
|
-
const connectXverse = () => __async(void 0, null, function* () {
|
|
731
|
+
}), [hasUnisat]);
|
|
732
|
+
const connectXverse = (0, import_react.useCallback)(() => __async(void 0, null, function* () {
|
|
733
733
|
try {
|
|
734
734
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, XVERSE);
|
|
735
735
|
let xverseNetwork = getXverseNetwork((config == null ? void 0 : config.network) || MAINNET);
|
|
@@ -768,7 +768,7 @@ var LaserEyesProvider = ({
|
|
|
768
768
|
} catch (error) {
|
|
769
769
|
throw error;
|
|
770
770
|
}
|
|
771
|
-
});
|
|
771
|
+
}), [hasXverse]);
|
|
772
772
|
const connectOyl = () => __async(void 0, null, function* () {
|
|
773
773
|
try {
|
|
774
774
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, OYL);
|
|
@@ -859,7 +859,7 @@ var LaserEyesProvider = ({
|
|
|
859
859
|
throw error;
|
|
860
860
|
}
|
|
861
861
|
});
|
|
862
|
-
const connectLeather = () => __async(void 0, null, function* () {
|
|
862
|
+
const connectLeather = (0, import_react.useCallback)(() => __async(void 0, null, function* () {
|
|
863
863
|
try {
|
|
864
864
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, LEATHER);
|
|
865
865
|
const lib = window.LeatherProvider;
|
|
@@ -899,7 +899,7 @@ var LaserEyesProvider = ({
|
|
|
899
899
|
} catch (error) {
|
|
900
900
|
new Error(`Can't lasereyes to ${LEATHER} wallet`);
|
|
901
901
|
}
|
|
902
|
-
});
|
|
902
|
+
}), [hasLeather]);
|
|
903
903
|
const connectPhantom = () => __async(void 0, null, function* () {
|
|
904
904
|
try {
|
|
905
905
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, PHANTOM);
|
package/dist/index.mjs
CHANGED
|
@@ -185,6 +185,7 @@ var createConfig = (config) => {
|
|
|
185
185
|
// src/providers/LaserEyesProvider.tsx
|
|
186
186
|
import {
|
|
187
187
|
createContext,
|
|
188
|
+
useCallback,
|
|
188
189
|
useContext,
|
|
189
190
|
useEffect,
|
|
190
191
|
useRef,
|
|
@@ -627,7 +628,7 @@ var LaserEyesProvider = ({
|
|
|
627
628
|
connect(defaultWallet);
|
|
628
629
|
}
|
|
629
630
|
}, []);
|
|
630
|
-
const connectUnisat = () => __async(void 0, null, function* () {
|
|
631
|
+
const connectUnisat = useCallback(() => __async(void 0, null, function* () {
|
|
631
632
|
try {
|
|
632
633
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, UNISAT);
|
|
633
634
|
const lib = window.unisat;
|
|
@@ -650,8 +651,8 @@ var LaserEyesProvider = ({
|
|
|
650
651
|
} catch (error) {
|
|
651
652
|
throw error;
|
|
652
653
|
}
|
|
653
|
-
});
|
|
654
|
-
const connectXverse = () => __async(void 0, null, function* () {
|
|
654
|
+
}), [hasUnisat]);
|
|
655
|
+
const connectXverse = useCallback(() => __async(void 0, null, function* () {
|
|
655
656
|
try {
|
|
656
657
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, XVERSE);
|
|
657
658
|
let xverseNetwork = getXverseNetwork((config == null ? void 0 : config.network) || MAINNET);
|
|
@@ -690,7 +691,7 @@ var LaserEyesProvider = ({
|
|
|
690
691
|
} catch (error) {
|
|
691
692
|
throw error;
|
|
692
693
|
}
|
|
693
|
-
});
|
|
694
|
+
}), [hasXverse]);
|
|
694
695
|
const connectOyl = () => __async(void 0, null, function* () {
|
|
695
696
|
try {
|
|
696
697
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, OYL);
|
|
@@ -781,7 +782,7 @@ var LaserEyesProvider = ({
|
|
|
781
782
|
throw error;
|
|
782
783
|
}
|
|
783
784
|
});
|
|
784
|
-
const connectLeather = () => __async(void 0, null, function* () {
|
|
785
|
+
const connectLeather = useCallback(() => __async(void 0, null, function* () {
|
|
785
786
|
try {
|
|
786
787
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, LEATHER);
|
|
787
788
|
const lib = window.LeatherProvider;
|
|
@@ -821,7 +822,7 @@ var LaserEyesProvider = ({
|
|
|
821
822
|
} catch (error) {
|
|
822
823
|
new Error(`Can't lasereyes to ${LEATHER} wallet`);
|
|
823
824
|
}
|
|
824
|
-
});
|
|
825
|
+
}), [hasLeather]);
|
|
825
826
|
const connectPhantom = () => __async(void 0, null, function* () {
|
|
826
827
|
try {
|
|
827
828
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, PHANTOM);
|
|
@@ -1702,7 +1703,7 @@ var LaserEyesProvider = ({
|
|
|
1702
1703
|
};
|
|
1703
1704
|
|
|
1704
1705
|
// src/hooks/useInscriber.ts
|
|
1705
|
-
import { useCallback, useEffect as useEffect2, useState as useState2 } from "react";
|
|
1706
|
+
import { useCallback as useCallback2, useEffect as useEffect2, useState as useState2 } from "react";
|
|
1706
1707
|
|
|
1707
1708
|
// src/consts/inscribe.ts
|
|
1708
1709
|
var MIME_TYPE_TEXT = "text/plain;charset=utf-8";
|
|
@@ -1731,7 +1732,7 @@ var useInscriber = ({
|
|
|
1731
1732
|
setCommitPsbtBase64("");
|
|
1732
1733
|
setCommitTxId("");
|
|
1733
1734
|
}, [content, address2, mimeType, feeRate]);
|
|
1734
|
-
const getCommitPsbt =
|
|
1735
|
+
const getCommitPsbt = useCallback2(() => __async(void 0, null, function* () {
|
|
1735
1736
|
try {
|
|
1736
1737
|
if (!content)
|
|
1737
1738
|
throw new Error("missing content");
|
|
@@ -1778,7 +1779,7 @@ var useInscriber = ({
|
|
|
1778
1779
|
throw e;
|
|
1779
1780
|
}
|
|
1780
1781
|
});
|
|
1781
|
-
const inscribe =
|
|
1782
|
+
const inscribe = useCallback2(
|
|
1782
1783
|
(_0) => __async(void 0, [_0], function* ({
|
|
1783
1784
|
content: providedContent,
|
|
1784
1785
|
mimeType: providedMimeType,
|