forgot await

This commit is contained in:
Tom (plebeius.eth)
2024-09-20 12:14:21 +02:00
parent 184f343e2b
commit e1faf55f12
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ const PostFormTable = ({ closeForm, postCid }: { closeForm: () => void; postCid:
const getAnonAddressForReply = useCallback(async () => { const getAnonAddressForReply = useCallback(async () => {
if (anonMode && !hasCalledAnonAddressRef.current) { if (anonMode && !hasCalledAnonAddressRef.current) {
hasCalledAnonAddressRef.current = true; hasCalledAnonAddressRef.current = true;
const existingSigner = getExistingSigner(address); const existingSigner = await getExistingSigner(address);
if (existingSigner) { if (existingSigner) {
setPublishReplyOptions({ setPublishReplyOptions({
signer: existingSigner, signer: existingSigner,
+1 -1
View File
@@ -44,7 +44,7 @@ const ReplyModal = ({ closeModal, showReplyModal, parentCid, postCid, scrollY, s
const getAnonAddressForReply = useCallback(async () => { const getAnonAddressForReply = useCallback(async () => {
if (anonMode && !hasCalledAnonAddressRef.current) { if (anonMode && !hasCalledAnonAddressRef.current) {
hasCalledAnonAddressRef.current = true; hasCalledAnonAddressRef.current = true;
const existingSigner = getExistingSigner(address); const existingSigner = await getExistingSigner(address);
if (existingSigner) { if (existingSigner) {
setPublishReplyOptions({ setPublishReplyOptions({
signer: existingSigner, signer: existingSigner,
+1 -1
View File
@@ -23,7 +23,7 @@ const useAnonModeStore = create<AnonModeState>((set, get) => ({
addressSigners: {}, addressSigners: {},
setAnonMode: (mode: boolean) => { setAnonMode: (mode: boolean) => {
set({ anonMode: mode }); set({ anonMode: mode });
anonModeStore.setItem('anonMode', mode); // Persist anonMode state anonModeStore.setItem('anonMode', mode);
}, },
setThreadSigner: (postCid: string, signer: any) => { setThreadSigner: (postCid: string, signer: any) => {
set((state) => ({ set((state) => ({