@dubsdotapp/expo 0.5.4 → 0.5.6

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/dist/index.mjs CHANGED
@@ -2805,6 +2805,8 @@ function useArcadeBridge({
2805
2805
  const webviewRef = useRef5(null);
2806
2806
  const sessionTokenRef = useRef5(null);
2807
2807
  const gameStartTimeRef = useRef5(0);
2808
+ const canPlayRef = useRef5(canPlay);
2809
+ canPlayRef.current = canPlay;
2808
2810
  const [lastResult, setLastResult] = useState20(null);
2809
2811
  const [bridgeLoading, setBridgeLoading] = useState20(false);
2810
2812
  const injectSession = useCallback18((token, attemptNumber) => {
@@ -2841,10 +2843,10 @@ function useArcadeBridge({
2841
2843
  } catch {
2842
2844
  return;
2843
2845
  }
2844
- if (data.dubsArcade !== PROTOCOL_VERSION) return;
2846
+ if (data.dubsArcade !== void 0 && data.dubsArcade !== PROTOCOL_VERSION) return;
2845
2847
  switch (data.type) {
2846
2848
  case "TAP_PLAY": {
2847
- if (canPlay) {
2849
+ if (canPlayRef.current) {
2848
2850
  triggerPlay();
2849
2851
  }
2850
2852
  return;
@@ -2873,7 +2875,7 @@ function useArcadeBridge({
2873
2875
  return;
2874
2876
  }
2875
2877
  },
2876
- [canPlay, triggerPlay, submitScore, onScoreSubmitted, onError]
2878
+ [triggerPlay, submitScore, onScoreSubmitted, onError]
2877
2879
  );
2878
2880
  return { webviewRef, handleMessage, triggerPlay, lastResult, bridgeLoading };
2879
2881
  }
@@ -3040,6 +3042,7 @@ function AuthGate({
3040
3042
  renderLoading,
3041
3043
  renderError,
3042
3044
  renderRegistration,
3045
+ renderConnectWallet,
3043
3046
  appName = "Dubs",
3044
3047
  accentColor
3045
3048
  }) {
@@ -3140,6 +3143,14 @@ function AuthGate({
3140
3143
  if (renderError) return /* @__PURE__ */ jsx4(Fragment2, { children: renderError(auth.error, retry) });
3141
3144
  return /* @__PURE__ */ jsx4(DefaultErrorScreen, { error: auth.error, onRetry: retry, appName, accentColor });
3142
3145
  }
3146
+ if (auth.status === "idle") {
3147
+ const connectProps = {
3148
+ onConnect: auth.authenticate,
3149
+ connecting: false,
3150
+ error: null
3151
+ };
3152
+ if (renderConnectWallet) return /* @__PURE__ */ jsx4(Fragment2, { children: renderConnectWallet(connectProps) });
3153
+ }
3143
3154
  if (renderLoading) return /* @__PURE__ */ jsx4(Fragment2, { children: renderLoading(auth.status) });
3144
3155
  return /* @__PURE__ */ jsx4(DefaultLoadingScreen, { status: auth.status, appName, accentColor });
3145
3156
  }
@@ -3840,77 +3851,66 @@ function useAppConfig() {
3840
3851
 
3841
3852
  // src/ui/ConnectWalletButton.tsx
3842
3853
  import {
3843
- Text as Text4,
3844
3854
  TouchableOpacity as TouchableOpacity4,
3855
+ Text as Text4,
3845
3856
  ActivityIndicator as ActivityIndicator3,
3846
- StyleSheet as StyleSheet4,
3847
- View as View4
3857
+ StyleSheet as StyleSheet4
3848
3858
  } from "react-native";
3849
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
3859
+ import { jsx as jsx6 } from "react/jsx-runtime";
3850
3860
  function ConnectWalletButton({
3851
- onConnect,
3852
- connecting = false,
3853
- error = null,
3854
- accentColor,
3855
3861
  label = "Connect Wallet",
3856
- style,
3857
- buttonStyle
3862
+ accentColor,
3863
+ textColor = "#000000",
3864
+ borderRadius = 16,
3865
+ paddingVertical = 16,
3866
+ fontSize = 17,
3867
+ fullWidth = true,
3868
+ onPress
3858
3869
  }) {
3859
3870
  const t = useDubsTheme();
3871
+ const { authenticate, status } = useAuth();
3872
+ const connecting = status === "authenticating" || status === "signing" || status === "verifying";
3860
3873
  const accent = accentColor || t.accent;
3861
- return /* @__PURE__ */ jsxs4(View4, { style, children: [
3862
- error ? /* @__PURE__ */ jsx6(
3863
- View4,
3864
- {
3865
- style: [
3866
- styles3.errorBox,
3867
- { backgroundColor: t.errorBg, borderColor: t.errorBorder }
3868
- ],
3869
- children: /* @__PURE__ */ jsx6(Text4, { style: [styles3.errorText, { color: t.errorText }], children: error })
3870
- }
3871
- ) : null,
3872
- /* @__PURE__ */ jsx6(
3873
- TouchableOpacity4,
3874
- {
3875
- style: [styles3.button, { backgroundColor: accent }, buttonStyle],
3876
- onPress: onConnect,
3877
- disabled: connecting,
3878
- activeOpacity: 0.8,
3879
- children: connecting ? /* @__PURE__ */ jsx6(ActivityIndicator3, { color: "#FFFFFF", size: "small" }) : /* @__PURE__ */ jsx6(Text4, { style: styles3.buttonText, children: label })
3880
- }
3881
- )
3882
- ] });
3874
+ const handlePress = () => {
3875
+ onPress?.();
3876
+ authenticate();
3877
+ };
3878
+ return /* @__PURE__ */ jsx6(
3879
+ TouchableOpacity4,
3880
+ {
3881
+ onPress: handlePress,
3882
+ disabled: connecting,
3883
+ activeOpacity: 0.85,
3884
+ style: [
3885
+ styles3.btn,
3886
+ {
3887
+ backgroundColor: accent,
3888
+ borderRadius,
3889
+ paddingVertical,
3890
+ width: fullWidth ? "100%" : void 0,
3891
+ opacity: connecting ? 0.8 : 1
3892
+ }
3893
+ ],
3894
+ children: connecting ? /* @__PURE__ */ jsx6(ActivityIndicator3, { color: textColor, size: "small" }) : /* @__PURE__ */ jsx6(Text4, { style: [styles3.label, { color: textColor, fontSize }], children: label })
3895
+ }
3896
+ );
3883
3897
  }
3884
3898
  var styles3 = StyleSheet4.create({
3885
- button: {
3886
- height: 56,
3887
- borderRadius: 16,
3888
- justifyContent: "center",
3899
+ btn: {
3889
3900
  alignItems: "center",
3901
+ justifyContent: "center",
3890
3902
  paddingHorizontal: 24
3891
3903
  },
3892
- buttonText: {
3893
- color: "#FFFFFF",
3894
- fontSize: 18,
3895
- fontWeight: "700"
3896
- },
3897
- errorBox: {
3898
- borderWidth: 1,
3899
- borderRadius: 12,
3900
- paddingHorizontal: 16,
3901
- paddingVertical: 12,
3902
- marginBottom: 12
3903
- },
3904
- errorText: {
3905
- fontSize: 14,
3906
- textAlign: "center"
3904
+ label: {
3905
+ fontWeight: "800",
3906
+ letterSpacing: -0.2
3907
3907
  }
3908
3908
  });
3909
3909
 
3910
3910
  // src/ui/UserProfileCard.tsx
3911
3911
  import { useMemo as useMemo4 } from "react";
3912
3912
  import { View as View5, Text as Text5, Image as Image4, StyleSheet as StyleSheet5 } from "react-native";
3913
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
3913
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
3914
3914
  function truncateAddress(address, chars = 4) {
3915
3915
  if (address.length <= chars * 2 + 3) return address;
3916
3916
  return `${address.slice(0, chars)}...${address.slice(-chars)}`;
@@ -3932,9 +3932,9 @@ function UserProfileCard({
3932
3932
  () => ensurePngAvatar(avatarUrl) || `https://api.dicebear.com/9.x/avataaars/png?seed=${walletAddress}&size=128`,
3933
3933
  [avatarUrl, walletAddress]
3934
3934
  );
3935
- return /* @__PURE__ */ jsxs5(View5, { style: [styles4.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
3935
+ return /* @__PURE__ */ jsxs4(View5, { style: [styles4.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
3936
3936
  /* @__PURE__ */ jsx7(Image4, { source: { uri: imageUri }, style: styles4.avatar }),
3937
- /* @__PURE__ */ jsxs5(View5, { style: styles4.info, children: [
3937
+ /* @__PURE__ */ jsxs4(View5, { style: styles4.info, children: [
3938
3938
  username ? /* @__PURE__ */ jsx7(Text5, { style: [styles4.username, { color: t.text }], children: username }) : null,
3939
3939
  /* @__PURE__ */ jsx7(Text5, { style: [styles4.address, { color: t.textMuted }], children: truncateAddress(walletAddress) }),
3940
3940
  memberSince ? /* @__PURE__ */ jsx7(Text5, { style: [styles4.memberSince, { color: t.textDim }], children: formatMemberSince(memberSince) }) : null
@@ -3983,7 +3983,7 @@ import {
3983
3983
  ActivityIndicator as ActivityIndicator4,
3984
3984
  StyleSheet as StyleSheet6
3985
3985
  } from "react-native";
3986
- import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
3986
+ import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
3987
3987
  function truncateAddress2(address, chars = 4) {
3988
3988
  if (address.length <= chars * 2 + 3) return address;
3989
3989
  return `${address.slice(0, chars)}...${address.slice(-chars)}`;
@@ -4000,7 +4000,7 @@ function SettingsSheet({
4000
4000
  loggingOut = false
4001
4001
  }) {
4002
4002
  const t = useDubsTheme();
4003
- return /* @__PURE__ */ jsxs6(
4003
+ return /* @__PURE__ */ jsxs5(
4004
4004
  ScrollView3,
4005
4005
  {
4006
4006
  style: [styles5.container, { backgroundColor: t.background }],
@@ -4015,15 +4015,15 @@ function SettingsSheet({
4015
4015
  memberSince
4016
4016
  }
4017
4017
  ),
4018
- /* @__PURE__ */ jsxs6(View6, { style: [styles5.actionsCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
4019
- onCopyAddress ? /* @__PURE__ */ jsxs6(
4018
+ /* @__PURE__ */ jsxs5(View6, { style: [styles5.actionsCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
4019
+ onCopyAddress ? /* @__PURE__ */ jsxs5(
4020
4020
  TouchableOpacity5,
4021
4021
  {
4022
4022
  style: styles5.actionRow,
4023
4023
  onPress: onCopyAddress,
4024
4024
  activeOpacity: 0.7,
4025
4025
  children: [
4026
- /* @__PURE__ */ jsxs6(View6, { style: styles5.actionRowLeft, children: [
4026
+ /* @__PURE__ */ jsxs5(View6, { style: styles5.actionRowLeft, children: [
4027
4027
  /* @__PURE__ */ jsx8(Text6, { style: [styles5.actionLabel, { color: t.text }], children: "Wallet Address" }),
4028
4028
  /* @__PURE__ */ jsx8(Text6, { style: [styles5.actionValue, { color: t.textMuted }], children: truncateAddress2(walletAddress) })
4029
4029
  ] }),
@@ -4031,9 +4031,9 @@ function SettingsSheet({
4031
4031
  ]
4032
4032
  }
4033
4033
  ) : null,
4034
- onSupport ? /* @__PURE__ */ jsxs6(Fragment3, { children: [
4034
+ onSupport ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
4035
4035
  onCopyAddress ? /* @__PURE__ */ jsx8(View6, { style: [styles5.separator, { backgroundColor: t.border }] }) : null,
4036
- /* @__PURE__ */ jsxs6(
4036
+ /* @__PURE__ */ jsxs5(
4037
4037
  TouchableOpacity5,
4038
4038
  {
4039
4039
  style: styles5.actionRow,
@@ -4057,7 +4057,7 @@ function SettingsSheet({
4057
4057
  children: loggingOut ? /* @__PURE__ */ jsx8(ActivityIndicator4, { color: t.live, size: "small" }) : /* @__PURE__ */ jsx8(Text6, { style: [styles5.logoutText, { color: t.live }], children: "Log Out" })
4058
4058
  }
4059
4059
  ),
4060
- appVersion ? /* @__PURE__ */ jsxs6(Text6, { style: [styles5.version, { color: t.textDim }], children: [
4060
+ appVersion ? /* @__PURE__ */ jsxs5(Text6, { style: [styles5.version, { color: t.textDim }], children: [
4061
4061
  "v",
4062
4062
  appVersion
4063
4063
  ] }) : null
@@ -4143,7 +4143,7 @@ import {
4143
4143
  ScrollView as ScrollView4,
4144
4144
  Dimensions
4145
4145
  } from "react-native";
4146
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
4146
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
4147
4147
  function truncateAddress3(address, chars = 4) {
4148
4148
  if (address.length <= chars * 2 + 3) return address;
4149
4149
  return `${address.slice(0, chars)}...${address.slice(-chars)}`;
@@ -4209,7 +4209,7 @@ function UserProfileSheet({
4209
4209
  setBgColor(color);
4210
4210
  saveAvatar(getAvatarUrl(avatarStyle, avatarSeed, color));
4211
4211
  }, [avatarStyle, avatarSeed, saveAvatar]);
4212
- return /* @__PURE__ */ jsxs7(
4212
+ return /* @__PURE__ */ jsxs6(
4213
4213
  Modal,
4214
4214
  {
4215
4215
  visible,
@@ -4223,13 +4223,13 @@ function UserProfileSheet({
4223
4223
  {
4224
4224
  style: styles6.keyboardView,
4225
4225
  behavior: Platform5.OS === "ios" ? "padding" : void 0,
4226
- children: /* @__PURE__ */ jsx9(View7, { style: styles6.sheetPositioner, children: /* @__PURE__ */ jsxs7(View7, { style: [styles6.sheet, { backgroundColor: t.background }], children: [
4226
+ children: /* @__PURE__ */ jsx9(View7, { style: styles6.sheetPositioner, children: /* @__PURE__ */ jsxs6(View7, { style: [styles6.sheet, { backgroundColor: t.background }], children: [
4227
4227
  /* @__PURE__ */ jsx9(View7, { style: styles6.handleRow, children: /* @__PURE__ */ jsx9(View7, { style: [styles6.handle, { backgroundColor: t.textMuted }] }) }),
4228
- /* @__PURE__ */ jsxs7(View7, { style: styles6.header, children: [
4228
+ /* @__PURE__ */ jsxs6(View7, { style: styles6.header, children: [
4229
4229
  /* @__PURE__ */ jsx9(Text7, { style: [styles6.headerTitle, { color: t.text }], children: "Profile" }),
4230
4230
  /* @__PURE__ */ jsx9(TouchableOpacity6, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ jsx9(Text7, { style: [styles6.closeButton, { color: t.textMuted }], children: "\u2715" }) })
4231
4231
  ] }),
4232
- /* @__PURE__ */ jsxs7(
4232
+ /* @__PURE__ */ jsxs6(
4233
4233
  ScrollView4,
4234
4234
  {
4235
4235
  style: styles6.scrollContent,
@@ -4237,8 +4237,8 @@ function UserProfileSheet({
4237
4237
  showsVerticalScrollIndicator: false,
4238
4238
  bounces: false,
4239
4239
  children: [
4240
- /* @__PURE__ */ jsxs7(View7, { style: styles6.avatarSection, children: [
4241
- /* @__PURE__ */ jsxs7(View7, { style: [styles6.avatarContainer, { borderColor: t.border }], children: [
4240
+ /* @__PURE__ */ jsxs6(View7, { style: styles6.avatarSection, children: [
4241
+ /* @__PURE__ */ jsxs6(View7, { style: [styles6.avatarContainer, { borderColor: t.border }], children: [
4242
4242
  /* @__PURE__ */ jsx9(
4243
4243
  Image5,
4244
4244
  {
@@ -4251,8 +4251,8 @@ function UserProfileSheet({
4251
4251
  user.username ? /* @__PURE__ */ jsx9(Text7, { style: [styles6.username, { color: t.text }], children: user.username }) : null,
4252
4252
  /* @__PURE__ */ jsx9(Text7, { style: [styles6.walletAddress, { color: t.textMuted }], children: truncateAddress3(user.walletAddress, 6) })
4253
4253
  ] }),
4254
- /* @__PURE__ */ jsxs7(View7, { style: styles6.section, children: [
4255
- /* @__PURE__ */ jsxs7(View7, { style: styles6.sectionHeaderRow, children: [
4254
+ /* @__PURE__ */ jsxs6(View7, { style: styles6.section, children: [
4255
+ /* @__PURE__ */ jsxs6(View7, { style: styles6.sectionHeaderRow, children: [
4256
4256
  /* @__PURE__ */ jsx9(Text7, { style: [styles6.sectionLabel, { color: t.textSecondary }], children: "Change Avatar" }),
4257
4257
  /* @__PURE__ */ jsx9(
4258
4258
  TouchableOpacity6,
@@ -4279,8 +4279,8 @@ function UserProfileSheet({
4279
4279
  )
4280
4280
  ] }),
4281
4281
  error ? /* @__PURE__ */ jsx9(View7, { style: [styles6.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ jsx9(Text7, { style: [styles6.errorText, { color: t.errorText }], children: error }) }) : null,
4282
- push.enabled && /* @__PURE__ */ jsxs7(View7, { style: [styles6.notifRow, { backgroundColor: t.surface, borderColor: t.border }], children: [
4283
- /* @__PURE__ */ jsxs7(View7, { style: styles6.notifLeft, children: [
4282
+ push.enabled && /* @__PURE__ */ jsxs6(View7, { style: [styles6.notifRow, { backgroundColor: t.surface, borderColor: t.border }], children: [
4283
+ /* @__PURE__ */ jsxs6(View7, { style: styles6.notifLeft, children: [
4284
4284
  /* @__PURE__ */ jsx9(Text7, { style: [styles6.notifLabel, { color: t.text }], children: "Push Notifications" }),
4285
4285
  /* @__PURE__ */ jsx9(
4286
4286
  Text7,
@@ -4487,7 +4487,7 @@ var styles6 = StyleSheet7.create({
4487
4487
  // src/ui/game/GamePoster.tsx
4488
4488
  import { useState as useState24 } from "react";
4489
4489
  import { StyleSheet as StyleSheet8, View as View8, Text as Text8 } from "react-native";
4490
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
4490
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
4491
4491
  function computeCountdown(lockTimestamp) {
4492
4492
  if (!lockTimestamp) return "";
4493
4493
  const ts = typeof lockTimestamp === "string" ? parseInt(lockTimestamp) : lockTimestamp;
@@ -4508,7 +4508,7 @@ function GamePoster({ game, ImageComponent }) {
4508
4508
  const away = opponents[1];
4509
4509
  const countdown = computeCountdown(game.lockTimestamp);
4510
4510
  const isLive = countdown === "LIVE";
4511
- return /* @__PURE__ */ jsxs8(View8, { style: styles7.container, children: [
4511
+ return /* @__PURE__ */ jsxs7(View8, { style: styles7.container, children: [
4512
4512
  game.media?.poster ? /* @__PURE__ */ jsx10(
4513
4513
  Img,
4514
4514
  {
@@ -4516,19 +4516,19 @@ function GamePoster({ game, ImageComponent }) {
4516
4516
  style: styles7.image,
4517
4517
  resizeMode: "cover"
4518
4518
  }
4519
- ) : /* @__PURE__ */ jsx10(View8, { style: [styles7.image, { backgroundColor: t.surface }], children: /* @__PURE__ */ jsxs8(View8, { style: styles7.fallback, children: [
4519
+ ) : /* @__PURE__ */ jsx10(View8, { style: [styles7.image, { backgroundColor: t.surface }], children: /* @__PURE__ */ jsxs7(View8, { style: styles7.fallback, children: [
4520
4520
  /* @__PURE__ */ jsx10(TeamLogoInternal, { url: home?.imageUrl, size: 56, Img }),
4521
4521
  /* @__PURE__ */ jsx10(Text8, { style: styles7.vs, children: "VS" }),
4522
4522
  /* @__PURE__ */ jsx10(TeamLogoInternal, { url: away?.imageUrl, size: 56, Img })
4523
4523
  ] }) }),
4524
4524
  /* @__PURE__ */ jsx10(View8, { style: styles7.overlay }),
4525
- /* @__PURE__ */ jsxs8(View8, { style: styles7.teamNames, children: [
4525
+ /* @__PURE__ */ jsxs7(View8, { style: styles7.teamNames, children: [
4526
4526
  /* @__PURE__ */ jsx10(Text8, { style: styles7.teamNameText, numberOfLines: 1, children: home?.name || "Home" }),
4527
4527
  /* @__PURE__ */ jsx10(Text8, { style: styles7.teamNameVs, children: "vs" }),
4528
4528
  /* @__PURE__ */ jsx10(Text8, { style: styles7.teamNameText, numberOfLines: 1, children: away?.name || "Away" })
4529
4529
  ] }),
4530
4530
  countdown ? /* @__PURE__ */ jsx10(View8, { style: styles7.countdownPill, children: /* @__PURE__ */ jsx10(Text8, { style: [styles7.countdownText, isLive && styles7.countdownLive], children: countdown }) }) : null,
4531
- /* @__PURE__ */ jsx10(View8, { style: styles7.poolPill, children: /* @__PURE__ */ jsxs8(Text8, { style: styles7.poolText, children: [
4531
+ /* @__PURE__ */ jsx10(View8, { style: styles7.poolPill, children: /* @__PURE__ */ jsxs7(Text8, { style: styles7.poolText, children: [
4532
4532
  game.totalPool || 0,
4533
4533
  " SOL"
4534
4534
  ] }) })
@@ -4638,7 +4638,7 @@ var styles7 = StyleSheet8.create({
4638
4638
  // src/ui/game/LivePoolsCard.tsx
4639
4639
  import { useMemo as useMemo6 } from "react";
4640
4640
  import { StyleSheet as StyleSheet9, View as View9, Text as Text9 } from "react-native";
4641
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
4641
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
4642
4642
  function LivePoolsCard({
4643
4643
  game,
4644
4644
  shortName,
@@ -4660,29 +4660,29 @@ function LivePoolsCard({
4660
4660
  awayOdds: awayPool > 0 ? (totalPool / awayPool).toFixed(2) : "\u2014"
4661
4661
  };
4662
4662
  }, [homePool, awayPool, totalPool]);
4663
- return /* @__PURE__ */ jsxs9(View9, { style: [styles8.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4663
+ return /* @__PURE__ */ jsxs8(View9, { style: [styles8.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4664
4664
  /* @__PURE__ */ jsx11(Text9, { style: [styles8.title, { color: t.text }], children: "Live Pools" }),
4665
- /* @__PURE__ */ jsxs9(Text9, { style: [styles8.total, { color: t.accent }], children: [
4665
+ /* @__PURE__ */ jsxs8(Text9, { style: [styles8.total, { color: t.accent }], children: [
4666
4666
  totalPool,
4667
4667
  " SOL total"
4668
4668
  ] }),
4669
- /* @__PURE__ */ jsxs9(View9, { style: styles8.bars, children: [
4669
+ /* @__PURE__ */ jsxs8(View9, { style: styles8.bars, children: [
4670
4670
  /* @__PURE__ */ jsx11(PoolBar, { name: homeName, amount: homePool, percent: homePercent, color: homeColor, t }),
4671
4671
  /* @__PURE__ */ jsx11(PoolBar, { name: awayName, amount: awayPool, percent: awayPercent, color: awayColor, t })
4672
4672
  ] }),
4673
- /* @__PURE__ */ jsxs9(View9, { style: styles8.oddsRow, children: [
4674
- /* @__PURE__ */ jsxs9(Text9, { style: [styles8.oddsText, { color: t.textMuted }], children: [
4673
+ /* @__PURE__ */ jsxs8(View9, { style: styles8.oddsRow, children: [
4674
+ /* @__PURE__ */ jsxs8(Text9, { style: [styles8.oddsText, { color: t.textMuted }], children: [
4675
4675
  homeName,
4676
4676
  ": ",
4677
- /* @__PURE__ */ jsxs9(Text9, { style: { color: t.text, fontWeight: "700" }, children: [
4677
+ /* @__PURE__ */ jsxs8(Text9, { style: { color: t.text, fontWeight: "700" }, children: [
4678
4678
  homeOdds,
4679
4679
  "x"
4680
4680
  ] })
4681
4681
  ] }),
4682
- /* @__PURE__ */ jsxs9(Text9, { style: [styles8.oddsText, { color: t.textMuted }], children: [
4682
+ /* @__PURE__ */ jsxs8(Text9, { style: [styles8.oddsText, { color: t.textMuted }], children: [
4683
4683
  awayName,
4684
4684
  ": ",
4685
- /* @__PURE__ */ jsxs9(Text9, { style: { color: t.text, fontWeight: "700" }, children: [
4685
+ /* @__PURE__ */ jsxs8(Text9, { style: { color: t.text, fontWeight: "700" }, children: [
4686
4686
  awayOdds,
4687
4687
  "x"
4688
4688
  ] })
@@ -4691,10 +4691,10 @@ function LivePoolsCard({
4691
4691
  ] });
4692
4692
  }
4693
4693
  function PoolBar({ name, amount, percent, color, t }) {
4694
- return /* @__PURE__ */ jsxs9(View9, { style: styles8.barRow, children: [
4694
+ return /* @__PURE__ */ jsxs8(View9, { style: styles8.barRow, children: [
4695
4695
  /* @__PURE__ */ jsx11(Text9, { style: [styles8.barLabel, { color: t.textSecondary }], numberOfLines: 1, children: name }),
4696
4696
  /* @__PURE__ */ jsx11(View9, { style: [styles8.barTrack, { backgroundColor: t.border }], children: /* @__PURE__ */ jsx11(View9, { style: [styles8.barFill, { width: `${Math.max(percent, 2)}%`, backgroundColor: color }] }) }),
4697
- /* @__PURE__ */ jsxs9(Text9, { style: [styles8.barAmount, { color: t.text }], children: [
4697
+ /* @__PURE__ */ jsxs8(Text9, { style: [styles8.barAmount, { color: t.text }], children: [
4698
4698
  amount,
4699
4699
  " SOL"
4700
4700
  ] })
@@ -4717,7 +4717,7 @@ var styles8 = StyleSheet9.create({
4717
4717
  // src/ui/game/PickWinnerCard.tsx
4718
4718
  import { useState as useState25, useMemo as useMemo7 } from "react";
4719
4719
  import { StyleSheet as StyleSheet10, View as View10, Text as Text10, TouchableOpacity as TouchableOpacity7 } from "react-native";
4720
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
4720
+ import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
4721
4721
  function PickWinnerCard({
4722
4722
  game,
4723
4723
  selectedTeam,
@@ -4741,9 +4741,9 @@ function PickWinnerCard({
4741
4741
  }), [totalPool, homePool, awayPool, bettors]);
4742
4742
  const homeName = shortName ? shortName(opponents[0]?.name) : opponents[0]?.name || "Home";
4743
4743
  const awayName = shortName ? shortName(opponents[1]?.name) : opponents[1]?.name || "Away";
4744
- return /* @__PURE__ */ jsxs10(View10, { style: [styles9.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4744
+ return /* @__PURE__ */ jsxs9(View10, { style: [styles9.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4745
4745
  /* @__PURE__ */ jsx12(Text10, { style: [styles9.title, { color: t.text }], children: "Pick Your Winner" }),
4746
- /* @__PURE__ */ jsxs10(View10, { style: styles9.row, children: [
4746
+ /* @__PURE__ */ jsxs9(View10, { style: styles9.row, children: [
4747
4747
  /* @__PURE__ */ jsx12(
4748
4748
  TeamOption,
4749
4749
  {
@@ -4789,7 +4789,7 @@ function TeamOption({
4789
4789
  const [imgFailed, setImgFailed] = useState25(false);
4790
4790
  const Img = ImageComponent || __require("react-native").Image;
4791
4791
  const showImage = imageUrl && !imgFailed;
4792
- return /* @__PURE__ */ jsxs10(
4792
+ return /* @__PURE__ */ jsxs9(
4793
4793
  TouchableOpacity7,
4794
4794
  {
4795
4795
  style: [styles9.option, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
@@ -4798,11 +4798,11 @@ function TeamOption({
4798
4798
  children: [
4799
4799
  showImage ? /* @__PURE__ */ jsx12(Img, { source: { uri: imageUrl }, style: styles9.logo, resizeMode: "contain", onError: () => setImgFailed(true) }) : /* @__PURE__ */ jsx12(View10, { style: [styles9.logo, styles9.logoPlaceholder] }),
4800
4800
  /* @__PURE__ */ jsx12(Text10, { style: [styles9.name, { color: t.text }], numberOfLines: 1, children: name }),
4801
- /* @__PURE__ */ jsxs10(Text10, { style: [styles9.odds, { color }], children: [
4801
+ /* @__PURE__ */ jsxs9(Text10, { style: [styles9.odds, { color }], children: [
4802
4802
  odds,
4803
4803
  "x"
4804
4804
  ] }),
4805
- /* @__PURE__ */ jsxs10(Text10, { style: [styles9.bets, { color: t.textMuted }], children: [
4805
+ /* @__PURE__ */ jsxs9(Text10, { style: [styles9.bets, { color: t.textMuted }], children: [
4806
4806
  bets,
4807
4807
  " ",
4808
4808
  bets === 1 ? "bet" : "bets"
@@ -4829,7 +4829,7 @@ var styles9 = StyleSheet10.create({
4829
4829
  // src/ui/game/PlayersCard.tsx
4830
4830
  import { useState as useState26 } from "react";
4831
4831
  import { StyleSheet as StyleSheet11, View as View11, Text as Text11 } from "react-native";
4832
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
4832
+ import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
4833
4833
  function truncateWallet(addr, chars) {
4834
4834
  if (addr.length <= chars * 2 + 3) return addr;
4835
4835
  return `${addr.slice(0, chars)}...${addr.slice(-chars)}`;
@@ -4849,8 +4849,8 @@ function PlayersCard({
4849
4849
  if (team === "away") return awayColor;
4850
4850
  return drawColor;
4851
4851
  };
4852
- return /* @__PURE__ */ jsxs11(View11, { style: [styles10.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4853
- /* @__PURE__ */ jsxs11(Text11, { style: [styles10.title, { color: t.text }], children: [
4852
+ return /* @__PURE__ */ jsxs10(View11, { style: [styles10.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4853
+ /* @__PURE__ */ jsxs10(Text11, { style: [styles10.title, { color: t.text }], children: [
4854
4854
  "Players",
4855
4855
  bettors.length > 0 ? ` (${bettors.length})` : ""
4856
4856
  ] }),
@@ -4879,11 +4879,11 @@ function BettorRow({
4879
4879
  const [imgFailed, setImgFailed] = useState26(false);
4880
4880
  const Img = ImageComponent || __require("react-native").Image;
4881
4881
  const showAvatar = bettor.avatar && !imgFailed;
4882
- return /* @__PURE__ */ jsxs11(View11, { style: [styles10.row, !isFirst && { borderTopColor: t.border, borderTopWidth: 1 }], children: [
4882
+ return /* @__PURE__ */ jsxs10(View11, { style: [styles10.row, !isFirst && { borderTopColor: t.border, borderTopWidth: 1 }], children: [
4883
4883
  /* @__PURE__ */ jsx13(View11, { style: [styles10.dot, { backgroundColor: dotColor }] }),
4884
4884
  showAvatar ? /* @__PURE__ */ jsx13(Img, { source: { uri: ensurePngAvatar(bettor.avatar) }, style: styles10.avatar, resizeMode: "cover", onError: () => setImgFailed(true) }) : /* @__PURE__ */ jsx13(View11, { style: [styles10.avatar, styles10.avatarPlaceholder] }),
4885
4885
  /* @__PURE__ */ jsx13(View11, { style: styles10.nameCol, children: /* @__PURE__ */ jsx13(Text11, { style: [styles10.username, { color: t.text }], numberOfLines: 1, children: bettor.username || truncateWallet(bettor.wallet, truncateChars) }) }),
4886
- /* @__PURE__ */ jsxs11(Text11, { style: [styles10.amount, { color: t.textSecondary }], children: [
4886
+ /* @__PURE__ */ jsxs10(Text11, { style: [styles10.amount, { color: t.textSecondary }], children: [
4887
4887
  bettor.amount,
4888
4888
  " SOL"
4889
4889
  ] })
@@ -4905,7 +4905,7 @@ var styles10 = StyleSheet11.create({
4905
4905
  // src/ui/game/JoinGameButton.tsx
4906
4906
  import { useMemo as useMemo8 } from "react";
4907
4907
  import { StyleSheet as StyleSheet12, View as View12, Text as Text12, TouchableOpacity as TouchableOpacity8, ActivityIndicator as ActivityIndicator6 } from "react-native";
4908
- import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
4908
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
4909
4909
  var STATUS_LABELS = {
4910
4910
  building: "Building transaction...",
4911
4911
  signing: "Approve in wallet...",
@@ -4921,10 +4921,10 @@ function JoinGameButton({ game, walletAddress, selectedTeam, status, onJoin }) {
4921
4921
  if (alreadyJoined || game.isLocked || game.isResolved) return null;
4922
4922
  const isJoining = status !== "idle" && status !== "success" && status !== "error";
4923
4923
  const statusLabel = STATUS_LABELS[status] || "";
4924
- return /* @__PURE__ */ jsxs12(View12, { style: [styles11.bar, { backgroundColor: t.background, borderTopColor: t.border }], children: [
4925
- /* @__PURE__ */ jsxs12(View12, { style: styles11.buyInRow, children: [
4924
+ return /* @__PURE__ */ jsxs11(View12, { style: [styles11.bar, { backgroundColor: t.background, borderTopColor: t.border }], children: [
4925
+ /* @__PURE__ */ jsxs11(View12, { style: styles11.buyInRow, children: [
4926
4926
  /* @__PURE__ */ jsx14(Text12, { style: [styles11.buyInLabel, { color: t.textMuted }], children: "Buy-in" }),
4927
- /* @__PURE__ */ jsxs12(Text12, { style: [styles11.buyInValue, { color: t.text }], children: [
4927
+ /* @__PURE__ */ jsxs11(Text12, { style: [styles11.buyInValue, { color: t.text }], children: [
4928
4928
  game.buyIn,
4929
4929
  " SOL"
4930
4930
  ] })
@@ -4936,7 +4936,7 @@ function JoinGameButton({ game, walletAddress, selectedTeam, status, onJoin }) {
4936
4936
  disabled: !selectedTeam || isJoining,
4937
4937
  onPress: onJoin,
4938
4938
  activeOpacity: 0.8,
4939
- children: isJoining ? /* @__PURE__ */ jsxs12(View12, { style: styles11.joiningRow, children: [
4939
+ children: isJoining ? /* @__PURE__ */ jsxs11(View12, { style: styles11.joiningRow, children: [
4940
4940
  /* @__PURE__ */ jsx14(ActivityIndicator6, { size: "small", color: "#000" }),
4941
4941
  /* @__PURE__ */ jsx14(Text12, { style: styles11.buttonText, children: statusLabel })
4942
4942
  ] }) : /* @__PURE__ */ jsx14(Text12, { style: [styles11.buttonText, !selectedTeam && { color: t.textMuted }], children: selectedTeam ? `Join Bet \u2014 ${game.buyIn} SOL` : "Pick a team to bet" })
@@ -4968,7 +4968,7 @@ import {
4968
4968
  KeyboardAvoidingView as KeyboardAvoidingView3,
4969
4969
  Platform as Platform6
4970
4970
  } from "react-native";
4971
- import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
4971
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
4972
4972
  var STATUS_LABELS2 = {
4973
4973
  building: "Building transaction...",
4974
4974
  signing: "Approve in wallet...",
@@ -5067,7 +5067,7 @@ function CreateCustomGameSheet({
5067
5067
  }, [finalAmount, wallet.publicKey, mutation.execute, title, maxPlayers, metadata]);
5068
5068
  const statusLabel = STATUS_LABELS2[mutation.status] || "";
5069
5069
  const playersLabel = playerCount === 2 ? "2 (1v1)" : `${playerCount} players`;
5070
- return /* @__PURE__ */ jsxs13(
5070
+ return /* @__PURE__ */ jsxs12(
5071
5071
  Modal2,
5072
5072
  {
5073
5073
  visible,
@@ -5081,15 +5081,15 @@ function CreateCustomGameSheet({
5081
5081
  {
5082
5082
  style: styles12.keyboardView,
5083
5083
  behavior: Platform6.OS === "ios" ? "padding" : void 0,
5084
- children: /* @__PURE__ */ jsx15(View13, { style: styles12.sheetPositioner, children: /* @__PURE__ */ jsxs13(View13, { style: [styles12.sheet, { backgroundColor: t.background }], children: [
5084
+ children: /* @__PURE__ */ jsx15(View13, { style: styles12.sheetPositioner, children: /* @__PURE__ */ jsxs12(View13, { style: [styles12.sheet, { backgroundColor: t.background }], children: [
5085
5085
  /* @__PURE__ */ jsx15(View13, { style: styles12.handleRow, children: /* @__PURE__ */ jsx15(View13, { style: [styles12.handle, { backgroundColor: t.textMuted }] }) }),
5086
- /* @__PURE__ */ jsxs13(View13, { style: styles12.header, children: [
5086
+ /* @__PURE__ */ jsxs12(View13, { style: styles12.header, children: [
5087
5087
  /* @__PURE__ */ jsx15(Text13, { style: [styles12.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Create Pool" : "New Game" }),
5088
5088
  /* @__PURE__ */ jsx15(TouchableOpacity9, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ jsx15(Text13, { style: [styles12.closeButton, { color: t.textMuted }], children: "\u2715" }) })
5089
5089
  ] }),
5090
- !isPoolModeEnabled && /* @__PURE__ */ jsxs13(View13, { style: styles12.section, children: [
5090
+ !isPoolModeEnabled && /* @__PURE__ */ jsxs12(View13, { style: styles12.section, children: [
5091
5091
  /* @__PURE__ */ jsx15(Text13, { style: [styles12.sectionLabel, { color: t.textSecondary }], children: "Buy-In Amount" }),
5092
- /* @__PURE__ */ jsxs13(View13, { style: styles12.chipsRow, children: [
5092
+ /* @__PURE__ */ jsxs12(View13, { style: styles12.chipsRow, children: [
5093
5093
  presetAmounts.map((amount) => {
5094
5094
  const active = !isCustom && selectedAmount === amount;
5095
5095
  return /* @__PURE__ */ jsx15(
@@ -5102,7 +5102,7 @@ function CreateCustomGameSheet({
5102
5102
  ],
5103
5103
  onPress: () => handlePresetSelect(amount),
5104
5104
  activeOpacity: 0.8,
5105
- children: /* @__PURE__ */ jsxs13(Text13, { style: [styles12.chipText, { color: active ? "#FFFFFF" : t.text }], children: [
5105
+ children: /* @__PURE__ */ jsxs12(Text13, { style: [styles12.chipText, { color: active ? "#FFFFFF" : t.text }], children: [
5106
5106
  amount,
5107
5107
  " SOL"
5108
5108
  ] })
@@ -5137,22 +5137,22 @@ function CreateCustomGameSheet({
5137
5137
  }
5138
5138
  )
5139
5139
  ] }),
5140
- /* @__PURE__ */ jsxs13(View13, { style: [styles12.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5141
- /* @__PURE__ */ jsxs13(View13, { style: styles12.summaryRow, children: [
5140
+ /* @__PURE__ */ jsxs12(View13, { style: [styles12.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5141
+ /* @__PURE__ */ jsxs12(View13, { style: styles12.summaryRow, children: [
5142
5142
  /* @__PURE__ */ jsx15(Text13, { style: [styles12.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
5143
5143
  /* @__PURE__ */ jsx15(Text13, { style: [styles12.summaryValue, { color: t.text }], children: finalAmount ? `${finalAmount} SOL` : "\u2014" })
5144
5144
  ] }),
5145
5145
  /* @__PURE__ */ jsx15(View13, { style: [styles12.summarySep, { backgroundColor: t.border }] }),
5146
- /* @__PURE__ */ jsxs13(View13, { style: styles12.summaryRow, children: [
5146
+ /* @__PURE__ */ jsxs12(View13, { style: styles12.summaryRow, children: [
5147
5147
  /* @__PURE__ */ jsx15(Text13, { style: [styles12.summaryLabel, { color: t.textMuted }], children: isPoolModeEnabled ? "Max players" : "Players" }),
5148
5148
  /* @__PURE__ */ jsx15(Text13, { style: [styles12.summaryValue, { color: t.text }], children: isPoolModeEnabled ? playerCount : playersLabel })
5149
5149
  ] }),
5150
5150
  /* @__PURE__ */ jsx15(View13, { style: [styles12.summarySep, { backgroundColor: t.border }] }),
5151
- /* @__PURE__ */ jsxs13(View13, { style: styles12.summaryRow, children: [
5151
+ /* @__PURE__ */ jsxs12(View13, { style: styles12.summaryRow, children: [
5152
5152
  /* @__PURE__ */ jsx15(Text13, { style: [styles12.summaryLabel, { color: t.textMuted }], children: isPoolModeEnabled ? "Max pot" : "Winner Takes" }),
5153
- /* @__PURE__ */ jsxs13(View13, { style: styles12.winnerCol, children: [
5153
+ /* @__PURE__ */ jsxs12(View13, { style: styles12.winnerCol, children: [
5154
5154
  /* @__PURE__ */ jsx15(Text13, { style: [styles12.summaryValue, { color: t.success }], children: finalAmount ? `${(finalAmount * playerCount * (1 - fee / 100)).toFixed(4)} SOL` : "\u2014" }),
5155
- finalAmount ? /* @__PURE__ */ jsxs13(Text13, { style: [styles12.feeNote, { color: t.textDim }], children: [
5155
+ finalAmount ? /* @__PURE__ */ jsxs12(Text13, { style: [styles12.feeNote, { color: t.textDim }], children: [
5156
5156
  fee,
5157
5157
  "% platform fee"
5158
5158
  ] }) : null
@@ -5170,7 +5170,7 @@ function CreateCustomGameSheet({
5170
5170
  disabled: !canCreate,
5171
5171
  onPress: handleCreate,
5172
5172
  activeOpacity: 0.8,
5173
- children: isMutating ? /* @__PURE__ */ jsxs13(View13, { style: styles12.ctaLoading, children: [
5173
+ children: isMutating ? /* @__PURE__ */ jsxs12(View13, { style: styles12.ctaLoading, children: [
5174
5174
  /* @__PURE__ */ jsx15(ActivityIndicator7, { size: "small", color: "#FFFFFF" }),
5175
5175
  /* @__PURE__ */ jsx15(Text13, { style: styles12.ctaText, children: statusLabel })
5176
5176
  ] }) : mutation.status === "success" ? /* @__PURE__ */ jsx15(Text13, { style: styles12.ctaText, children: isPoolModeEnabled ? "Pool Created!" : STATUS_LABELS2.success }) : /* @__PURE__ */ jsx15(Text13, { style: [styles12.ctaText, !canCreate && { opacity: 0.5 }], children: isPoolModeEnabled ? `Create Pool \u2014 ${finalAmount} SOL` : effectiveAmount ? `Create Game \u2014 ${effectiveAmount} SOL` : "Select buy-in amount" })
@@ -5332,7 +5332,7 @@ import {
5332
5332
  KeyboardAvoidingView as KeyboardAvoidingView4,
5333
5333
  Platform as Platform7
5334
5334
  } from "react-native";
5335
- import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
5335
+ import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
5336
5336
  var STATUS_LABELS3 = {
5337
5337
  building: "Building transaction...",
5338
5338
  signing: "Approve in wallet...",
@@ -5350,6 +5350,7 @@ function JoinGameSheet({
5350
5350
  awayColor = "#EF4444",
5351
5351
  onSuccess,
5352
5352
  onError,
5353
+ onTeamSelect,
5353
5354
  isPoolModeEnabled = false
5354
5355
  }) {
5355
5356
  const t = useDubsTheme();
@@ -5423,7 +5424,7 @@ function JoinGameSheet({
5423
5424
  }
5424
5425
  }, [selectedTeam, wallet.publicKey, mutation.execute, game.gameId, buyIn]);
5425
5426
  const statusLabel = STATUS_LABELS3[mutation.status] || "";
5426
- return /* @__PURE__ */ jsxs14(
5427
+ return /* @__PURE__ */ jsxs13(
5427
5428
  Modal3,
5428
5429
  {
5429
5430
  visible,
@@ -5437,15 +5438,15 @@ function JoinGameSheet({
5437
5438
  {
5438
5439
  style: styles13.keyboardView,
5439
5440
  behavior: Platform7.OS === "ios" ? "padding" : void 0,
5440
- children: /* @__PURE__ */ jsx16(View14, { style: styles13.sheetPositioner, children: /* @__PURE__ */ jsxs14(View14, { style: [styles13.sheet, { backgroundColor: t.background }], children: [
5441
+ children: /* @__PURE__ */ jsx16(View14, { style: styles13.sheetPositioner, children: /* @__PURE__ */ jsxs13(View14, { style: [styles13.sheet, { backgroundColor: t.background }], children: [
5441
5442
  /* @__PURE__ */ jsx16(View14, { style: styles13.handleRow, children: /* @__PURE__ */ jsx16(View14, { style: [styles13.handle, { backgroundColor: t.textMuted }] }) }),
5442
- /* @__PURE__ */ jsxs14(View14, { style: styles13.header, children: [
5443
+ /* @__PURE__ */ jsxs13(View14, { style: styles13.header, children: [
5443
5444
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Join Pool" : "Join Game" }),
5444
5445
  /* @__PURE__ */ jsx16(TouchableOpacity10, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ jsx16(Text14, { style: [styles13.closeButton, { color: t.textMuted }], children: "\u2715" }) })
5445
5446
  ] }),
5446
- !isCustomGame && !isPoolModeEnabled && /* @__PURE__ */ jsxs14(View14, { style: styles13.section, children: [
5447
+ !isCustomGame && !isPoolModeEnabled && /* @__PURE__ */ jsxs13(View14, { style: styles13.section, children: [
5447
5448
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.sectionLabel, { color: t.textSecondary }], children: "Pick Your Side" }),
5448
- /* @__PURE__ */ jsxs14(View14, { style: styles13.teamsRow, children: [
5449
+ /* @__PURE__ */ jsxs13(View14, { style: styles13.teamsRow, children: [
5449
5450
  /* @__PURE__ */ jsx16(
5450
5451
  TeamButton,
5451
5452
  {
@@ -5455,7 +5456,10 @@ function JoinGameSheet({
5455
5456
  bets: homeBets,
5456
5457
  color: homeColor,
5457
5458
  selected: selectedTeam === "home",
5458
- onPress: () => setSelectedTeam("home"),
5459
+ onPress: () => {
5460
+ setSelectedTeam("home");
5461
+ onTeamSelect?.("home");
5462
+ },
5459
5463
  ImageComponent,
5460
5464
  t
5461
5465
  }
@@ -5469,50 +5473,53 @@ function JoinGameSheet({
5469
5473
  bets: awayBets,
5470
5474
  color: awayColor,
5471
5475
  selected: selectedTeam === "away",
5472
- onPress: () => setSelectedTeam("away"),
5476
+ onPress: () => {
5477
+ setSelectedTeam("away");
5478
+ onTeamSelect?.("away");
5479
+ },
5473
5480
  ImageComponent,
5474
5481
  t
5475
5482
  }
5476
5483
  )
5477
5484
  ] })
5478
5485
  ] }),
5479
- /* @__PURE__ */ jsxs14(View14, { style: [styles13.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5480
- /* @__PURE__ */ jsxs14(View14, { style: styles13.summaryRow, children: [
5486
+ /* @__PURE__ */ jsxs13(View14, { style: [styles13.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5487
+ /* @__PURE__ */ jsxs13(View14, { style: styles13.summaryRow, children: [
5481
5488
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
5482
- /* @__PURE__ */ jsxs14(Text14, { style: [styles13.summaryValue, { color: t.text }], children: [
5489
+ /* @__PURE__ */ jsxs13(Text14, { style: [styles13.summaryValue, { color: t.text }], children: [
5483
5490
  buyIn,
5484
5491
  " SOL"
5485
5492
  ] })
5486
5493
  ] }),
5487
5494
  /* @__PURE__ */ jsx16(View14, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5488
- isPoolModeEnabled ? /* @__PURE__ */ jsxs14(Fragment4, { children: [
5489
- /* @__PURE__ */ jsxs14(View14, { style: styles13.summaryRow, children: [
5495
+ isPoolModeEnabled ? /* @__PURE__ */ jsxs13(Fragment4, { children: [
5496
+ /* @__PURE__ */ jsxs13(View14, { style: styles13.summaryRow, children: [
5490
5497
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Players in" }),
5491
5498
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.summaryValue, { color: t.text }], children: bettors.length })
5492
5499
  ] }),
5493
5500
  /* @__PURE__ */ jsx16(View14, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5494
- /* @__PURE__ */ jsxs14(View14, { style: styles13.summaryRow, children: [
5501
+ /* @__PURE__ */ jsxs13(View14, { style: styles13.summaryRow, children: [
5495
5502
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
5496
- /* @__PURE__ */ jsxs14(Text14, { style: [styles13.summaryValue, { color: t.success }], children: [
5503
+ /* @__PURE__ */ jsxs13(Text14, { style: [styles13.summaryValue, { color: t.success }], children: [
5497
5504
  totalPool,
5498
5505
  " SOL"
5499
5506
  ] })
5500
5507
  ] })
5501
- ] }) : /* @__PURE__ */ jsxs14(Fragment4, { children: [
5502
- /* @__PURE__ */ jsxs14(View14, { style: styles13.summaryRow, children: [
5508
+ ] }) : /* @__PURE__ */ jsxs13(Fragment4, { children: [
5509
+ /* @__PURE__ */ jsxs13(View14, { style: styles13.summaryRow, children: [
5503
5510
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Your side" }),
5504
5511
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.summaryValue, { color: t.text }], children: selectedName })
5505
5512
  ] }),
5506
5513
  /* @__PURE__ */ jsx16(View14, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5507
- /* @__PURE__ */ jsxs14(View14, { style: styles13.summaryRow, children: [
5514
+ /* @__PURE__ */ jsxs13(View14, { style: styles13.summaryRow, children: [
5508
5515
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Total pool" }),
5509
- /* @__PURE__ */ jsxs14(Text14, { style: [styles13.summaryValue, { color: t.text }], children: [
5516
+ /* @__PURE__ */ jsxs13(Text14, { style: [styles13.summaryValue, { color: t.text }], children: [
5510
5517
  poolAfterJoin,
5511
5518
  " SOL"
5512
5519
  ] })
5513
5520
  ] }),
5514
5521
  /* @__PURE__ */ jsx16(View14, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5515
- /* @__PURE__ */ jsxs14(View14, { style: styles13.summaryRow, children: [
5522
+ /* @__PURE__ */ jsxs13(View14, { style: styles13.summaryRow, children: [
5516
5523
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Potential winnings" }),
5517
5524
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.summaryValue, { color: t.success }], children: potentialWinnings !== "\u2014" ? `${potentialWinnings} SOL` : "\u2014" })
5518
5525
  ] })
@@ -5530,7 +5537,7 @@ function JoinGameSheet({
5530
5537
  disabled: !canJoin,
5531
5538
  onPress: handleJoin,
5532
5539
  activeOpacity: 0.8,
5533
- children: isMutating ? /* @__PURE__ */ jsxs14(View14, { style: styles13.ctaLoading, children: [
5540
+ children: isMutating ? /* @__PURE__ */ jsxs13(View14, { style: styles13.ctaLoading, children: [
5534
5541
  /* @__PURE__ */ jsx16(ActivityIndicator8, { size: "small", color: "#FFFFFF" }),
5535
5542
  /* @__PURE__ */ jsx16(Text14, { style: styles13.ctaText, children: statusLabel })
5536
5543
  ] }) : mutation.status === "success" ? /* @__PURE__ */ jsx16(Text14, { style: styles13.ctaText, children: isPoolModeEnabled ? "Joined!" : STATUS_LABELS3.success }) : /* @__PURE__ */ jsx16(Text14, { style: [styles13.ctaText, !canJoin && { opacity: 0.5 }], children: alreadyJoined ? "Already Joined" : isPoolModeEnabled ? `Join Pool \u2014 ${buyIn} SOL` : selectedTeam ? `Join Game \u2014 ${buyIn} SOL` : "Pick a side to join" })
@@ -5557,7 +5564,7 @@ function TeamButton({
5557
5564
  const [imgFailed, setImgFailed] = useState28(false);
5558
5565
  const Img = ImageComponent || __require("react-native").Image;
5559
5566
  const showImage = imageUrl && !imgFailed;
5560
- return /* @__PURE__ */ jsxs14(
5567
+ return /* @__PURE__ */ jsxs13(
5561
5568
  TouchableOpacity10,
5562
5569
  {
5563
5570
  style: [styles13.teamOption, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
@@ -5566,11 +5573,11 @@ function TeamButton({
5566
5573
  children: [
5567
5574
  showImage ? /* @__PURE__ */ jsx16(Img, { source: { uri: imageUrl }, style: styles13.teamLogo, resizeMode: "contain", onError: () => setImgFailed(true) }) : /* @__PURE__ */ jsx16(View14, { style: [styles13.teamLogo, styles13.teamLogoPlaceholder] }),
5568
5575
  /* @__PURE__ */ jsx16(Text14, { style: [styles13.teamName, { color: t.text }], numberOfLines: 1, children: name }),
5569
- /* @__PURE__ */ jsxs14(Text14, { style: [styles13.teamOdds, { color }], children: [
5576
+ /* @__PURE__ */ jsxs13(Text14, { style: [styles13.teamOdds, { color }], children: [
5570
5577
  odds,
5571
5578
  "x"
5572
5579
  ] }),
5573
- /* @__PURE__ */ jsxs14(Text14, { style: [styles13.teamBets, { color: t.textMuted }], children: [
5580
+ /* @__PURE__ */ jsxs13(Text14, { style: [styles13.teamBets, { color: t.textMuted }], children: [
5574
5581
  bets,
5575
5582
  " ",
5576
5583
  bets === 1 ? "bet" : "bets"
@@ -5743,7 +5750,7 @@ import {
5743
5750
  KeyboardAvoidingView as KeyboardAvoidingView5,
5744
5751
  Platform as Platform8
5745
5752
  } from "react-native";
5746
- import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
5753
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
5747
5754
  var STATUS_LABELS4 = {
5748
5755
  building: "Building transaction...",
5749
5756
  signing: "Approve in wallet...",
@@ -5823,7 +5830,7 @@ function ClaimPrizeSheet({
5823
5830
  }
5824
5831
  }, [wallet.publicKey, mutation.execute, gameId, prizeAmount]);
5825
5832
  const statusLabel = STATUS_LABELS4[mutation.status] || "";
5826
- return /* @__PURE__ */ jsxs15(
5833
+ return /* @__PURE__ */ jsxs14(
5827
5834
  Modal4,
5828
5835
  {
5829
5836
  visible,
@@ -5837,13 +5844,13 @@ function ClaimPrizeSheet({
5837
5844
  {
5838
5845
  style: styles14.keyboardView,
5839
5846
  behavior: Platform8.OS === "ios" ? "padding" : void 0,
5840
- children: /* @__PURE__ */ jsx17(View15, { style: styles14.sheetPositioner, children: /* @__PURE__ */ jsxs15(View15, { style: [styles14.sheet, { backgroundColor: t.background }], children: [
5847
+ children: /* @__PURE__ */ jsx17(View15, { style: styles14.sheetPositioner, children: /* @__PURE__ */ jsxs14(View15, { style: [styles14.sheet, { backgroundColor: t.background }], children: [
5841
5848
  /* @__PURE__ */ jsx17(View15, { style: styles14.handleRow, children: /* @__PURE__ */ jsx17(View15, { style: [styles14.handle, { backgroundColor: t.textMuted }] }) }),
5842
- /* @__PURE__ */ jsxs15(View15, { style: styles14.header, children: [
5849
+ /* @__PURE__ */ jsxs14(View15, { style: styles14.header, children: [
5843
5850
  /* @__PURE__ */ jsx17(Text15, { style: [styles14.headerTitle, { color: t.text }], children: showCelebration ? isRefund ? "Refund Claimed!" : "Prize Claimed!" : isRefund ? "Claim Refund" : "Claim Prize" }),
5844
5851
  /* @__PURE__ */ jsx17(TouchableOpacity11, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ jsx17(Text15, { style: [styles14.closeButton, { color: t.textMuted }], children: "\u2715" }) })
5845
5852
  ] }),
5846
- showCelebration && /* @__PURE__ */ jsxs15(
5853
+ showCelebration && /* @__PURE__ */ jsxs14(
5847
5854
  Animated5.View,
5848
5855
  {
5849
5856
  style: [
@@ -5855,7 +5862,7 @@ function ClaimPrizeSheet({
5855
5862
  ],
5856
5863
  children: [
5857
5864
  /* @__PURE__ */ jsx17(Text15, { style: styles14.celebrationEmoji, children: "\u{1F3C6}" }),
5858
- /* @__PURE__ */ jsxs15(Text15, { style: [styles14.celebrationText, { color: t.success }], children: [
5865
+ /* @__PURE__ */ jsxs14(Text15, { style: [styles14.celebrationText, { color: t.success }], children: [
5859
5866
  "+",
5860
5867
  prizeAmount,
5861
5868
  " SOL"
@@ -5864,18 +5871,18 @@ function ClaimPrizeSheet({
5864
5871
  ]
5865
5872
  }
5866
5873
  ),
5867
- !showCelebration && /* @__PURE__ */ jsxs15(View15, { style: [styles14.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5868
- /* @__PURE__ */ jsxs15(View15, { style: styles14.summaryRow, children: [
5874
+ !showCelebration && /* @__PURE__ */ jsxs14(View15, { style: [styles14.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5875
+ /* @__PURE__ */ jsxs14(View15, { style: styles14.summaryRow, children: [
5869
5876
  /* @__PURE__ */ jsx17(Text15, { style: [styles14.summaryLabel, { color: t.textMuted }], children: isRefund ? "Refund" : "Prize" }),
5870
- /* @__PURE__ */ jsxs15(Text15, { style: [styles14.summaryValue, { color: t.success }], children: [
5877
+ /* @__PURE__ */ jsxs14(Text15, { style: [styles14.summaryValue, { color: t.success }], children: [
5871
5878
  prizeAmount,
5872
5879
  " SOL"
5873
5880
  ] })
5874
5881
  ] }),
5875
5882
  /* @__PURE__ */ jsx17(View15, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5876
- /* @__PURE__ */ jsxs15(View15, { style: styles14.summaryRow, children: [
5883
+ /* @__PURE__ */ jsxs14(View15, { style: styles14.summaryRow, children: [
5877
5884
  /* @__PURE__ */ jsx17(Text15, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Game" }),
5878
- /* @__PURE__ */ jsxs15(
5885
+ /* @__PURE__ */ jsxs14(
5879
5886
  Text15,
5880
5887
  {
5881
5888
  style: [styles14.summaryValue, { color: t.text }],
@@ -5900,10 +5907,10 @@ function ClaimPrizeSheet({
5900
5907
  disabled: !canClaim,
5901
5908
  onPress: handleClaim,
5902
5909
  activeOpacity: 0.8,
5903
- children: isMutating ? /* @__PURE__ */ jsxs15(View15, { style: styles14.ctaLoading, children: [
5910
+ children: isMutating ? /* @__PURE__ */ jsxs14(View15, { style: styles14.ctaLoading, children: [
5904
5911
  /* @__PURE__ */ jsx17(ActivityIndicator9, { size: "small", color: "#FFFFFF" }),
5905
5912
  /* @__PURE__ */ jsx17(Text15, { style: styles14.ctaText, children: statusLabel })
5906
- ] }) : /* @__PURE__ */ jsxs15(Text15, { style: [styles14.ctaText, !canClaim && { opacity: 0.5 }], children: [
5913
+ ] }) : /* @__PURE__ */ jsxs14(Text15, { style: [styles14.ctaText, !canClaim && { opacity: 0.5 }], children: [
5907
5914
  isRefund ? "Claim Refund" : "Claim Prize",
5908
5915
  " \u2014 ",
5909
5916
  prizeAmount,
@@ -6046,7 +6053,7 @@ var styles14 = StyleSheet15.create({
6046
6053
  // src/ui/game/ClaimButton.tsx
6047
6054
  import { useState as useState30, useMemo as useMemo10, useCallback as useCallback25 } from "react";
6048
6055
  import { StyleSheet as StyleSheet16, Text as Text16, TouchableOpacity as TouchableOpacity12 } from "react-native";
6049
- import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
6056
+ import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
6050
6057
  function ClaimButton({ gameId, style, onSuccess, onError }) {
6051
6058
  const t = useDubsTheme();
6052
6059
  const { wallet } = useDubs();
@@ -6082,7 +6089,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6082
6089
  style: [styles15.badge, { borderColor: t.accent }, style],
6083
6090
  activeOpacity: 1,
6084
6091
  disabled: true,
6085
- children: /* @__PURE__ */ jsxs16(Text16, { style: [styles15.badgeText, { color: t.accent }], children: [
6092
+ children: /* @__PURE__ */ jsxs15(Text16, { style: [styles15.badgeText, { color: t.accent }], children: [
6086
6093
  label,
6087
6094
  " Claimed!"
6088
6095
  ] })
@@ -6092,14 +6099,14 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6092
6099
  if (!isEligible) {
6093
6100
  return null;
6094
6101
  }
6095
- return /* @__PURE__ */ jsxs16(Fragment5, { children: [
6102
+ return /* @__PURE__ */ jsxs15(Fragment5, { children: [
6096
6103
  /* @__PURE__ */ jsx18(
6097
6104
  TouchableOpacity12,
6098
6105
  {
6099
6106
  style: [styles15.button, { backgroundColor: t.accent }, style],
6100
6107
  activeOpacity: 0.8,
6101
6108
  onPress: () => setSheetVisible(true),
6102
- children: /* @__PURE__ */ jsxs16(Text16, { style: styles15.buttonText, children: [
6109
+ children: /* @__PURE__ */ jsxs15(Text16, { style: styles15.buttonText, children: [
6103
6110
  "Claim ",
6104
6111
  label,
6105
6112
  " \u2014 ",
@@ -6162,7 +6169,7 @@ import {
6162
6169
  KeyboardAvoidingView as KeyboardAvoidingView6,
6163
6170
  Platform as Platform9
6164
6171
  } from "react-native";
6165
- import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
6172
+ import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
6166
6173
  var STATUS_LABELS5 = {
6167
6174
  building: "Building transaction...",
6168
6175
  signing: "Approve in wallet...",
@@ -6209,9 +6216,10 @@ function EnterArcadePoolSheet({
6209
6216
  }
6210
6217
  }, [mutation.status, mutation.error]);
6211
6218
  const buyInSol = (pool.buy_in_lamports / 1e9).toFixed(4);
6212
- const totalPlayers = stats?.total_entries ?? pool.total_entries ?? 0;
6219
+ const totalPlayers = stats?.total_entries ?? 0;
6220
+ const totalBuyIns = pool.total_entries ?? totalPlayers;
6213
6221
  const topScore = stats?.top_score ?? 0;
6214
- const potSol = (pool.buy_in_lamports * Number(totalPlayers) / 1e9).toFixed(4);
6222
+ const potSol = (pool.buy_in_lamports * Number(totalBuyIns) / 1e9).toFixed(4);
6215
6223
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
6216
6224
  const canJoin = !isMutating && mutation.status !== "success";
6217
6225
  const handleJoin = useCallback26(async () => {
@@ -6226,7 +6234,7 @@ function EnterArcadePoolSheet({
6226
6234
  const headerTitle = isRejoin ? "Play Again" : "Join Pool";
6227
6235
  const ctaLabel = isRejoin ? `Play Again \u2014 ${buyInSol} SOL` : `Join Pool \u2014 ${buyInSol} SOL`;
6228
6236
  const successLabel = isRejoin ? "Lives refilled!" : "Joined!";
6229
- return /* @__PURE__ */ jsxs17(
6237
+ return /* @__PURE__ */ jsxs16(
6230
6238
  Modal5,
6231
6239
  {
6232
6240
  visible,
@@ -6240,42 +6248,42 @@ function EnterArcadePoolSheet({
6240
6248
  {
6241
6249
  style: styles16.keyboardView,
6242
6250
  behavior: Platform9.OS === "ios" ? "padding" : void 0,
6243
- children: /* @__PURE__ */ jsx19(View16, { style: styles16.sheetPositioner, children: /* @__PURE__ */ jsxs17(View16, { style: [styles16.sheet, { backgroundColor: t.background }], children: [
6251
+ children: /* @__PURE__ */ jsx19(View16, { style: styles16.sheetPositioner, children: /* @__PURE__ */ jsxs16(View16, { style: [styles16.sheet, { backgroundColor: t.background }], children: [
6244
6252
  /* @__PURE__ */ jsx19(View16, { style: styles16.handleRow, children: /* @__PURE__ */ jsx19(View16, { style: [styles16.handle, { backgroundColor: t.textMuted }] }) }),
6245
- /* @__PURE__ */ jsxs17(View16, { style: styles16.header, children: [
6253
+ /* @__PURE__ */ jsxs16(View16, { style: styles16.header, children: [
6246
6254
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.headerTitle, { color: t.text }], children: headerTitle }),
6247
6255
  /* @__PURE__ */ jsx19(TouchableOpacity13, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ jsx19(Text17, { style: [styles16.closeButton, { color: t.textMuted }], children: "\u2715" }) })
6248
6256
  ] }),
6249
6257
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.poolName, { color: t.textSecondary }], children: pool.name }),
6250
- /* @__PURE__ */ jsxs17(View16, { style: [styles16.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
6251
- /* @__PURE__ */ jsxs17(View16, { style: styles16.summaryRow, children: [
6258
+ /* @__PURE__ */ jsxs16(View16, { style: [styles16.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
6259
+ /* @__PURE__ */ jsxs16(View16, { style: styles16.summaryRow, children: [
6252
6260
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
6253
- /* @__PURE__ */ jsxs17(Text17, { style: [styles16.summaryValue, { color: t.text }], children: [
6261
+ /* @__PURE__ */ jsxs16(Text17, { style: [styles16.summaryValue, { color: t.text }], children: [
6254
6262
  buyInSol,
6255
6263
  " SOL"
6256
6264
  ] })
6257
6265
  ] }),
6258
6266
  /* @__PURE__ */ jsx19(View16, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6259
- /* @__PURE__ */ jsxs17(View16, { style: styles16.summaryRow, children: [
6267
+ /* @__PURE__ */ jsxs16(View16, { style: styles16.summaryRow, children: [
6260
6268
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Players in" }),
6261
6269
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.summaryValue, { color: t.text }], children: totalPlayers })
6262
6270
  ] }),
6263
6271
  /* @__PURE__ */ jsx19(View16, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6264
- /* @__PURE__ */ jsxs17(View16, { style: styles16.summaryRow, children: [
6272
+ /* @__PURE__ */ jsxs16(View16, { style: styles16.summaryRow, children: [
6265
6273
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
6266
- /* @__PURE__ */ jsxs17(Text17, { style: [styles16.summaryValue, { color: t.success }], children: [
6274
+ /* @__PURE__ */ jsxs16(Text17, { style: [styles16.summaryValue, { color: t.success }], children: [
6267
6275
  potSol,
6268
6276
  " SOL"
6269
6277
  ] })
6270
6278
  ] }),
6271
6279
  /* @__PURE__ */ jsx19(View16, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6272
- /* @__PURE__ */ jsxs17(View16, { style: styles16.summaryRow, children: [
6280
+ /* @__PURE__ */ jsxs16(View16, { style: styles16.summaryRow, children: [
6273
6281
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Lives" }),
6274
6282
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.summaryValue, { color: t.text }], children: pool.max_lives })
6275
6283
  ] }),
6276
- topScore > 0 && /* @__PURE__ */ jsxs17(Fragment6, { children: [
6284
+ topScore > 0 && /* @__PURE__ */ jsxs16(Fragment6, { children: [
6277
6285
  /* @__PURE__ */ jsx19(View16, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6278
- /* @__PURE__ */ jsxs17(View16, { style: styles16.summaryRow, children: [
6286
+ /* @__PURE__ */ jsxs16(View16, { style: styles16.summaryRow, children: [
6279
6287
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Top score" }),
6280
6288
  /* @__PURE__ */ jsx19(Text17, { style: [styles16.summaryValue, { color: t.text }], children: topScore })
6281
6289
  ] })
@@ -6292,7 +6300,7 @@ function EnterArcadePoolSheet({
6292
6300
  disabled: !canJoin,
6293
6301
  onPress: handleJoin,
6294
6302
  activeOpacity: 0.8,
6295
- children: isMutating ? /* @__PURE__ */ jsxs17(View16, { style: styles16.ctaLoading, children: [
6303
+ children: isMutating ? /* @__PURE__ */ jsxs16(View16, { style: styles16.ctaLoading, children: [
6296
6304
  /* @__PURE__ */ jsx19(ActivityIndicator10, { size: "small", color: "#FFFFFF" }),
6297
6305
  /* @__PURE__ */ jsx19(Text17, { style: styles16.ctaText, children: statusLabel })
6298
6306
  ] }) : mutation.status === "success" ? /* @__PURE__ */ jsx19(Text17, { style: styles16.ctaText, children: successLabel }) : /* @__PURE__ */ jsx19(Text17, { style: [styles16.ctaText, !canJoin && { opacity: 0.5 }], children: ctaLabel })
@@ -6378,7 +6386,7 @@ import {
6378
6386
  Image as Image6,
6379
6387
  FlatList
6380
6388
  } from "react-native";
6381
- import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
6389
+ import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
6382
6390
  function RankLabel({ index }) {
6383
6391
  if (index === 0) return /* @__PURE__ */ jsx20(Text18, { style: styles17.rankEmoji, children: "\u{1F947}" });
6384
6392
  if (index === 1) return /* @__PURE__ */ jsx20(Text18, { style: styles17.rankEmoji, children: "\u{1F948}" });
@@ -6406,7 +6414,7 @@ function ArcadeLeaderboardSheet({
6406
6414
  }, [visible]);
6407
6415
  const renderItem = ({ item, index }) => {
6408
6416
  const isMe = highlightWallet && item.wallet_address === highlightWallet;
6409
- return /* @__PURE__ */ jsxs18(
6417
+ return /* @__PURE__ */ jsxs17(
6410
6418
  View17,
6411
6419
  {
6412
6420
  style: [
@@ -6417,9 +6425,9 @@ function ArcadeLeaderboardSheet({
6417
6425
  children: [
6418
6426
  /* @__PURE__ */ jsx20(View17, { style: styles17.rankCol, children: /* @__PURE__ */ jsx20(RankLabel, { index }) }),
6419
6427
  item.avatar ? /* @__PURE__ */ jsx20(Image6, { source: { uri: ensurePngAvatar(item.avatar) }, style: styles17.avatar }) : /* @__PURE__ */ jsx20(View17, { style: [styles17.avatar, { backgroundColor: t.border }] }),
6420
- /* @__PURE__ */ jsxs18(View17, { style: styles17.nameCol, children: [
6428
+ /* @__PURE__ */ jsxs17(View17, { style: styles17.nameCol, children: [
6421
6429
  /* @__PURE__ */ jsx20(Text18, { style: [styles17.name, { color: t.text }], numberOfLines: 1, children: item.username || `${item.wallet_address.slice(0, 4)}...${item.wallet_address.slice(-4)}` }),
6422
- /* @__PURE__ */ jsxs18(Text18, { style: [styles17.lives, { color: t.textMuted }], children: [
6430
+ /* @__PURE__ */ jsxs17(Text18, { style: [styles17.lives, { color: t.textMuted }], children: [
6423
6431
  item.lives_used,
6424
6432
  " ",
6425
6433
  item.lives_used === 1 ? "life" : "lives",
@@ -6431,7 +6439,7 @@ function ArcadeLeaderboardSheet({
6431
6439
  }
6432
6440
  );
6433
6441
  };
6434
- return /* @__PURE__ */ jsxs18(
6442
+ return /* @__PURE__ */ jsxs17(
6435
6443
  Modal6,
6436
6444
  {
6437
6445
  visible,
@@ -6445,27 +6453,27 @@ function ArcadeLeaderboardSheet({
6445
6453
  {
6446
6454
  style: styles17.keyboardView,
6447
6455
  behavior: Platform10.OS === "ios" ? "padding" : void 0,
6448
- children: /* @__PURE__ */ jsx20(View17, { style: styles17.sheetPositioner, children: /* @__PURE__ */ jsxs18(View17, { style: [styles17.sheet, { backgroundColor: t.background }], children: [
6456
+ children: /* @__PURE__ */ jsx20(View17, { style: styles17.sheetPositioner, children: /* @__PURE__ */ jsxs17(View17, { style: [styles17.sheet, { backgroundColor: t.background }], children: [
6449
6457
  /* @__PURE__ */ jsx20(View17, { style: styles17.handleRow, children: /* @__PURE__ */ jsx20(View17, { style: [styles17.handle, { backgroundColor: t.textMuted }] }) }),
6450
- /* @__PURE__ */ jsxs18(View17, { style: styles17.header, children: [
6451
- /* @__PURE__ */ jsxs18(View17, { children: [
6458
+ /* @__PURE__ */ jsxs17(View17, { style: styles17.header, children: [
6459
+ /* @__PURE__ */ jsxs17(View17, { children: [
6452
6460
  /* @__PURE__ */ jsx20(Text18, { style: [styles17.headerTitle, { color: t.text }], children: "Leaderboard" }),
6453
6461
  pool && /* @__PURE__ */ jsx20(Text18, { style: [styles17.poolName, { color: t.textMuted }], children: pool.name })
6454
6462
  ] }),
6455
6463
  /* @__PURE__ */ jsx20(TouchableOpacity14, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ jsx20(Text18, { style: [styles17.closeButton, { color: t.textMuted }], children: "\u2715" }) })
6456
6464
  ] }),
6457
- stats && /* @__PURE__ */ jsxs18(View17, { style: [styles17.statsBar, { backgroundColor: t.surface, borderColor: t.border }], children: [
6458
- /* @__PURE__ */ jsxs18(View17, { style: styles17.statItem, children: [
6465
+ stats && /* @__PURE__ */ jsxs17(View17, { style: [styles17.statsBar, { backgroundColor: t.surface, borderColor: t.border }], children: [
6466
+ /* @__PURE__ */ jsxs17(View17, { style: styles17.statItem, children: [
6459
6467
  /* @__PURE__ */ jsx20(Text18, { style: [styles17.statValue, { color: t.text }], children: stats.total_entries }),
6460
6468
  /* @__PURE__ */ jsx20(Text18, { style: [styles17.statLabel, { color: t.textMuted }], children: "Players" })
6461
6469
  ] }),
6462
6470
  /* @__PURE__ */ jsx20(View17, { style: [styles17.statDivider, { backgroundColor: t.border }] }),
6463
- /* @__PURE__ */ jsxs18(View17, { style: styles17.statItem, children: [
6471
+ /* @__PURE__ */ jsxs17(View17, { style: styles17.statItem, children: [
6464
6472
  /* @__PURE__ */ jsx20(Text18, { style: [styles17.statValue, { color: t.accent }], children: stats.top_score }),
6465
6473
  /* @__PURE__ */ jsx20(Text18, { style: [styles17.statLabel, { color: t.textMuted }], children: "Top Score" })
6466
6474
  ] }),
6467
6475
  /* @__PURE__ */ jsx20(View17, { style: [styles17.statDivider, { backgroundColor: t.border }] }),
6468
- /* @__PURE__ */ jsxs18(View17, { style: styles17.statItem, children: [
6476
+ /* @__PURE__ */ jsxs17(View17, { style: styles17.statItem, children: [
6469
6477
  /* @__PURE__ */ jsx20(Text18, { style: [styles17.statValue, { color: t.text }], children: Math.round(stats.avg_score) }),
6470
6478
  /* @__PURE__ */ jsx20(Text18, { style: [styles17.statLabel, { color: t.textMuted }], children: "Avg Score" })
6471
6479
  ] })