feat: bet placement panel with odds and payout preview

BetPanel component with pick-winner buttons, preset amounts (21/100/500/
1000 sats), Cashu token paste, odds display from server, and payout
preview with 5% house cut. Wired into FightCardPage for scheduled fights.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-08 19:55:44 +00:00
co-authored by Claude Opus 4.6
parent fd22b126e7
commit de15d27468
2 changed files with 213 additions and 0 deletions
+12
View File
@@ -3,6 +3,7 @@ import { ref, computed, onMounted, onUnmounted, watch } from 'vue'
import { RouterLink } from 'vue-router'
import SpritePreview from '../components/SpritePreview.vue'
import PixelGlove from '../components/PixelGlove.vue'
import BetPanel from '../components/BetPanel.vue'
interface BotInfo {
name: string
@@ -15,6 +16,8 @@ interface BotInfo {
interface UpcomingFight {
id: string
botAId: string
botBId: string
botA: BotInfo | null
botB: BotInfo | null
arenaInfo: { name: string } | null
@@ -409,6 +412,15 @@ onUnmounted(() => {
</button>
</div>
<!-- Bet panel for upcoming fights -->
<div v-if="featured && featured.botA && featured.botB && featured.status === 'scheduled'" class="px-4 pb-2 shrink-0">
<BetPanel
:fight-id="featured.id"
:bot-a="{ id: featured.botAId, name: featured.botA.name, eloRating: featured.botA.eloRating, tier: featured.botA.tier }"
:bot-b="{ id: featured.botBId, name: featured.botB.name, eloRating: featured.botB.eloRating, tier: featured.botB.tier }"
/>
</div>
<!-- Enter the ring -->
<div class="px-4 pb-3 lg:pb-5 shrink-0">
<RouterLink