@1sat/react 0.0.31 → 0.0.32
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":"ConnectDialogProvider.d.ts","sourceRoot":"","sources":["../src/ConnectDialogProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"ConnectDialogProvider.d.ts","sourceRoot":"","sources":["../src/ConnectDialogProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,SAAS,EAMd,MAAM,OAAO,CAAA;AACd,OAAO,EAAiB,KAAK,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAG9E,UAAU,yBAAyB;IAClC,iBAAiB,EAAE,MAAM,IAAI,CAAA;CAC7B;AAID;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,yBAAyB,CAQ5D;AAED,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,EAAE,SAAS,CAAA;IACnB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,SAAS,CAAA;CAC7D;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EACrC,QAAQ,EACR,YAAY,GACZ,EAAE,0BAA0B,2CAuB5B"}
|
package/dist/index.js
CHANGED
|
@@ -417,6 +417,7 @@ import {
|
|
|
417
417
|
createContext as createContext2,
|
|
418
418
|
useCallback as useCallback3,
|
|
419
419
|
useContext as useContext2,
|
|
420
|
+
useEffect as useEffect4,
|
|
420
421
|
useState as useState4
|
|
421
422
|
} from "react";
|
|
422
423
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -433,7 +434,13 @@ function ConnectDialogProvider({
|
|
|
433
434
|
children,
|
|
434
435
|
renderDialog
|
|
435
436
|
}) {
|
|
437
|
+
const { status } = useWallet();
|
|
436
438
|
const [open, setOpen] = useState4(false);
|
|
439
|
+
useEffect4(() => {
|
|
440
|
+
if (status === "selecting") {
|
|
441
|
+
setOpen(true);
|
|
442
|
+
}
|
|
443
|
+
}, [status]);
|
|
437
444
|
const openConnectDialog = useCallback3(() => {
|
|
438
445
|
setOpen(true);
|
|
439
446
|
}, []);
|