diff --git a/src/lib/stores/nostrocket_state/soft_state/simplifiedProblems.ts b/src/lib/stores/nostrocket_state/soft_state/simplifiedProblems.ts index ef86772..702f498 100644 --- a/src/lib/stores/nostrocket_state/soft_state/simplifiedProblems.ts +++ b/src/lib/stores/nostrocket_state/soft_state/simplifiedProblems.ts @@ -1,10 +1,9 @@ import { labelledTag } from "$lib/helpers/shouldBeInNDK"; import type { NDKEvent } from "@nostr-dev-kit/ndk"; +import { get } from "svelte/store"; import { nostrocketIgnitionEvent, rootProblem } from "../../../../settings"; -import { Problem, type Nostrocket } from "../types"; import { consensusTipState } from "../master_state"; -import { get } from "svelte/store"; -import { tr } from "date-fns/locale"; +import { Problem, type Nostrocket } from "../types"; export function HandleProblemEvent( ev: NDKEvent, diff --git a/src/routes/problems/[id]/+page.svelte b/src/routes/problems/[id]/+page.svelte index ad9cfc7..66cf9ec 100644 --- a/src/routes/problems/[id]/+page.svelte +++ b/src/routes/problems/[id]/+page.svelte @@ -34,7 +34,11 @@ $: { problem = $consensusTipState.Problems.get($page.params.id); - claimable = problem?.Children.size == 0 && problem.Status == "open"; + if (problem) { + claimable = (!hasOpenChildren(problem, $consensusTipState) && problem.Status == "open"); + console.log(claimable) + } + if (statusErrorText) { setTimeout(() => { statusErrorText = undefined;