Skip to content

Commit

Permalink
resolve confilicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-torabiv committed Aug 28, 2024
1 parent 95099d9 commit 42622b7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/pages/Permissions/Permissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,21 @@ export function Permissions() {
AccessData[]
>([]);

const { data, isLoading: isLoadingApplications } = useReadContract({
const {
data,
isLoading: isLoadingApplications,
error,
} = useReadContract({
abi: sepoliaChainAppConctract.appContractABI,
address: sepoliaChainAppConctract.appContractAddress as Address,
functionName: 'getApplications',
args: applicationsArgs,
});

if (error) {
throw new Error('Error fetching applications');
}

const applications = useMemo(
() => (data as { name: string; account: string }[]) || [],
[data]
Expand Down Expand Up @@ -123,9 +131,9 @@ export function Permissions() {
}, [hasPermissionsOnApp, attestations, applications]);

const providers: Platform[] = attestations.map((attestation) => ({
id: attestation.id || '',
id: attestation.id || 'Unknown',
provider: attestation.provider || 'Unknown',
uid: attestation.id || '',
uid: attestation.id || 'Unknown',
}));

const handleGrantOrRevokeAccess = (application: any, platform: any) => {
Expand Down

0 comments on commit 42622b7

Please sign in to comment.