Skip to content

Commit

Permalink
fix season prize not populating in progress component
Browse files Browse the repository at this point in the history
  • Loading branch information
merklejerk committed May 29, 2024
1 parent 0d1c4bb commit 738b17d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/lib/components/contest-progress.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@
let loadPageState: BusyState;
const loadPageAwait = createBusy(r => loadPageState = r);
let seasonData: undefined | Array<SeasonTournaments>;
$: {
if ($season && seasonData?.[$season.idx]) {
seasonData[$season.idx].prize = $season.prize;
}
}
loadPageAwait(async () => {
const [seasons, tournaments] = await Promise.all([
fetchOnchainSeasons().catch(() => []),
Expand Down
2 changes: 1 addition & 1 deletion src/routes/player/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
seasonResults: TournamentResult[][];
} | null = null;
let isWalletOperator = false;
let playerIsActive: boolean = true;
let playerIsActive: boolean = false;
let playerPrize: bigint = 0n;
$: isSeasonClosed = $season?.state !== SeasonState.Started;
Expand Down

0 comments on commit 738b17d

Please sign in to comment.