From 4dbb5260ed2d2f39c4e9842b962c0f356d4639a3 Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Tue, 18 Jun 2024 20:55:26 -0400 Subject: [PATCH] fix bids after a failed one not showing up in matches announce failed bids --- src/routes/(app)/match/+page.svelte | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/routes/(app)/match/+page.svelte b/src/routes/(app)/match/+page.svelte index 53b5abc7..87c4dec3 100644 --- a/src/routes/(app)/match/+page.svelte +++ b/src/routes/(app)/match/+page.svelte @@ -202,6 +202,8 @@ const log = logs[i]; if (log.event === 'block_bid') { bids[log.builderIdx] = Number(log.bid) / 1e18; + } else if (log.event === 'build_block_failed') { + bids[log.builderIdx] = NaN; } else { break; } @@ -650,14 +652,21 @@ {#if roundIdx === data.rounds.length - 1 && playerIdx === data.winnerIdx}🏆️{/if} - {#if round.block?.bids && round.block.bids[playerIdx] > 0} + {#if round.block?.bids} + {#if round.block.bids[playerIdx] > 0} bid {getAssetEmoji(0)} {formatAmount(round.block.bids[playerIdx])} - and - {/if} + and + {:else if isNaN(round.block.bids[playerIdx])} + + FAILED their bid + + and + {/if} + {/if} holds: {#each round.balances[playerIdx] as bal, assetIdx}