Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
123456789101112131415161718interface GrantEvidenceInput { granted?: boolean; url?: { searchParams: Pick<URLSearchParams, "has"> } | null; // task creation requires an active grant tasks?: readonly unknown[] | null; sessionCreated?: boolean;}
export const hasGrantEvidence = ({ granted, url, tasks, sessionCreated}: GrantEvidenceInput = {}): boolean => sessionCreated === true || (tasks?.length ?? 0) > 0 || (granted === true && url != null && !url.searchParams.has("oauth_error"));