Skip to content

Commit

Permalink
fix: ensure we always update loading state correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlc03 committed Sep 4, 2024
1 parent 4647014 commit 355fbb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/interface/src/contexts/Maci.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export const MaciProvider: React.FC<MaciProviderProps> = ({ children }: MaciProv
switch (gatekeeperTrait) {
case GatekeeperTrait.Semaphore:
if (!signer) {
setIsLoading(false);
return;
}
getSemaphoreProof(signer, semaphoreIdentity!)
Expand All @@ -126,6 +127,7 @@ export const MaciProvider: React.FC<MaciProviderProps> = ({ children }: MaciProv
break;
case GatekeeperTrait.Hats:
if (!signer) {
setIsLoading(false);
return;
}
getHatsSingleGatekeeperData({
Expand Down Expand Up @@ -377,6 +379,7 @@ export const MaciProvider: React.FC<MaciProviderProps> = ({ children }: MaciProv
setIsLoading(false);
} else {
if (!window.ethereum) {
setIsLoading(false);
return;
}

Expand Down

0 comments on commit 355fbb0

Please sign in to comment.