Skip to content

Commit

Permalink
Merge pull request #299 from privacy-scaling-explorations/fix/loading…
Browse files Browse the repository at this point in the history
…-states

fix: ensure we always update loading state correctly
  • Loading branch information
ctrlc03 authored Sep 4, 2024
2 parents 96ace2d + 45b1690 commit d8ecc7f
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 56 deletions.
4 changes: 2 additions & 2 deletions packages/coordinator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
"class-validator": "^0.14.1",
"dotenv": "^16.4.5",
"ethers": "^6.13.1",
"hardhat": "^2.22.6",
"hardhat": "^2.22.8",
"helmet": "^7.1.0",
"lowdb": "^1.0.0",
"maci-circuits": "^2.1.0",
"maci-cli": "^2.1.0",
"maci-contracts": "^2.1.0",
"maci-contracts": "0.0.0-ci.d683cb3",
"maci-domainobjs": "^2.0.0",
"maci-subgraph": "^2.1.0",
"mustache": "^4.2.0",
Expand Down
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
Loading

0 comments on commit d8ecc7f

Please sign in to comment.