@devrongx/games 0.4.20 → 0.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devrongx/games",
3
- "version": "0.4.20",
3
+ "version": "0.4.21",
4
4
  "description": "Game UI components for sports prediction markets",
5
5
  "license": "MIT",
6
6
  "main": "./src/index.ts",
@@ -129,7 +129,9 @@ export const PreMatchBetsPopup = ({ poolId, matchId: _matchId, match: matchProp
129
129
  const loaded: IUserBets = {};
130
130
  for (const bet of entryData.bets) {
131
131
  if (bet.parlay_id !== null) continue;
132
- const mIdx = config.markets.findIndex((m) => m.backendChallengeId === bet.challenge_id);
132
+ // pool.challenges[].id is the pool_challenge record ID (junction table), not the challenge's own ID.
133
+ // The bets response has both pool_challenge_id (= backendChallengeId) and challenge_id (different).
134
+ const mIdx = config.markets.findIndex((m) => m.backendChallengeId === bet.pool_challenge_id);
133
135
  if (mIdx < 0) continue;
134
136
  const oIdx = config.markets[mIdx].options.findIndex(
135
137
  (o) => (o.key ?? o.label.toLowerCase().replace(/\s+/g, "_")) === bet.selected_option,
@@ -621,7 +621,7 @@ export const PreMatchGame = ({ config, bets, onBetsChange, onOptionClick, onAmou
621
621
  <motion.button
622
622
  onClick={onSubmit && buttonState !== "saved" ? onSubmit : undefined}
623
623
  disabled={submitting || buttonState === "saved"}
624
- className="relative w-[65px] rounded-xl overflow-hidden flex-shrink-0 flex items-center justify-center"
624
+ className="relative w-[65px] min-h-[54px] rounded-xl overflow-hidden flex-shrink-0 flex items-center justify-center py-3"
625
625
  style={{ background: bgColor, cursor: buttonState === "saved" ? "default" : "pointer" }}
626
626
  initial={{ opacity: 0, width: 0 }}
627
627
  animate={{ opacity: 1, width: 65 }}