useSignerStream -> useBunker

This commit is contained in:
Alex Gleason 2024-10-28 16:15:06 -05:00
parent 6788be671e
commit f67abaa3cd
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 4 additions and 4 deletions

View File

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

View File

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