useSignerStream -> useBunker

environments/review-update-vid-g70vyz/deployments/5013
Alex Gleason 2024-10-28 16:15:06 -05:00
rodzic 6788be671e
commit f67abaa3cd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -11,7 +11,7 @@ const secretStorageKey = 'soapbox:nip46:secret';
sessionStorage.setItem(secretStorageKey, crypto.randomUUID()); sessionStorage.setItem(secretStorageKey, crypto.randomUUID());
function useSignerStream() { function useBunker() {
const { relay } = useNostr(); const { relay } = useNostr();
const [isSubscribed, setIsSubscribed] = useState(false); const [isSubscribed, setIsSubscribed] = useState(false);
@ -88,4 +88,4 @@ function useSignerStream() {
}; };
} }
export { useSignerStream }; export { useBunker };

Wyświetl plik

@ -3,7 +3,7 @@ import { IntlProvider } from 'react-intl';
import { fetchMe } from 'soapbox/actions/me'; import { fetchMe } from 'soapbox/actions/me';
import { loadSoapboxConfig } from 'soapbox/actions/soapbox'; import { loadSoapboxConfig } from 'soapbox/actions/soapbox';
import { useSignerStream } from 'soapbox/api/hooks/nostr/useSignerStream'; import { useBunker } from 'soapbox/api/hooks/nostr/useBunker';
import LoadingScreen from 'soapbox/components/loading-screen'; import LoadingScreen from 'soapbox/components/loading-screen';
import { useNostr } from 'soapbox/contexts/nostr-context'; import { useNostr } from 'soapbox/contexts/nostr-context';
import { import {
@ -45,7 +45,7 @@ const SoapboxLoad: React.FC<ISoapboxLoad> = ({ children }) => {
const [isLoaded, setIsLoaded] = useState(false); const [isLoaded, setIsLoaded] = useState(false);
const { hasNostr, isRelayOpen, signer } = useNostr(); const { hasNostr, isRelayOpen, signer } = useNostr();
const { isSubscribed } = useSignerStream(); const { isSubscribed } = useBunker();
const nostrLoading = Boolean(hasNostr && signer && (!isRelayOpen || !isSubscribed)); const nostrLoading = Boolean(hasNostr && signer && (!isRelayOpen || !isSubscribed));