@dubsdotapp/expo 0.2.38 → 0.2.40
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.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/types.ts +2 -0
- package/src/ui/game/ClaimPrizeSheet.tsx +9 -4
package/dist/index.d.mts
CHANGED
|
@@ -195,6 +195,8 @@ interface GameDetail {
|
|
|
195
195
|
status: string;
|
|
196
196
|
league: string | null;
|
|
197
197
|
lockTimestamp: number | null;
|
|
198
|
+
/** Winning side: 'home' | 'away' | 'draw' | null (null = refund) */
|
|
199
|
+
winnerSide: string | null;
|
|
198
200
|
opponents: GameListOpponent[];
|
|
199
201
|
bettors: Bettor[];
|
|
200
202
|
homePool: number;
|
|
@@ -964,11 +966,13 @@ interface ClaimPrizeSheetProps {
|
|
|
964
966
|
gameId: string;
|
|
965
967
|
/** Prize amount in SOL */
|
|
966
968
|
prizeAmount: number;
|
|
969
|
+
/** When true, shows refund language instead of prize language */
|
|
970
|
+
isRefund?: boolean;
|
|
967
971
|
/** Callbacks */
|
|
968
972
|
onSuccess?: (result: ClaimMutationResult) => void;
|
|
969
973
|
onError?: (error: Error) => void;
|
|
970
974
|
}
|
|
971
|
-
declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, onSuccess, onError, }: ClaimPrizeSheetProps): react_jsx_runtime.JSX.Element;
|
|
975
|
+
declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, isRefund, onSuccess, onError, }: ClaimPrizeSheetProps): react_jsx_runtime.JSX.Element;
|
|
972
976
|
|
|
973
977
|
/**
|
|
974
978
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
package/dist/index.d.ts
CHANGED
|
@@ -195,6 +195,8 @@ interface GameDetail {
|
|
|
195
195
|
status: string;
|
|
196
196
|
league: string | null;
|
|
197
197
|
lockTimestamp: number | null;
|
|
198
|
+
/** Winning side: 'home' | 'away' | 'draw' | null (null = refund) */
|
|
199
|
+
winnerSide: string | null;
|
|
198
200
|
opponents: GameListOpponent[];
|
|
199
201
|
bettors: Bettor[];
|
|
200
202
|
homePool: number;
|
|
@@ -964,11 +966,13 @@ interface ClaimPrizeSheetProps {
|
|
|
964
966
|
gameId: string;
|
|
965
967
|
/** Prize amount in SOL */
|
|
966
968
|
prizeAmount: number;
|
|
969
|
+
/** When true, shows refund language instead of prize language */
|
|
970
|
+
isRefund?: boolean;
|
|
967
971
|
/** Callbacks */
|
|
968
972
|
onSuccess?: (result: ClaimMutationResult) => void;
|
|
969
973
|
onError?: (error: Error) => void;
|
|
970
974
|
}
|
|
971
|
-
declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, onSuccess, onError, }: ClaimPrizeSheetProps): react_jsx_runtime.JSX.Element;
|
|
975
|
+
declare function ClaimPrizeSheet({ visible, onDismiss, gameId, prizeAmount, isRefund, onSuccess, onError, }: ClaimPrizeSheetProps): react_jsx_runtime.JSX.Element;
|
|
972
976
|
|
|
973
977
|
/**
|
|
974
978
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
package/dist/index.js
CHANGED
|
@@ -4336,6 +4336,7 @@ function ClaimPrizeSheet({
|
|
|
4336
4336
|
onDismiss,
|
|
4337
4337
|
gameId,
|
|
4338
4338
|
prizeAmount,
|
|
4339
|
+
isRefund = false,
|
|
4339
4340
|
onSuccess,
|
|
4340
4341
|
onError
|
|
4341
4342
|
}) {
|
|
@@ -4420,7 +4421,7 @@ function ClaimPrizeSheet({
|
|
|
4420
4421
|
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.View, { style: styles11.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native16.View, { style: [styles11.sheet, { backgroundColor: t.background }], children: [
|
|
4421
4422
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.View, { style: styles11.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.View, { style: [styles11.handle, { backgroundColor: t.textMuted }] }) }),
|
|
4422
4423
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native16.View, { style: styles11.header, children: [
|
|
4423
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.Text, { style: [styles11.headerTitle, { color: t.text }], children: showCelebration ? "Prize Claimed!" : "Claim Prize" }),
|
|
4424
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.Text, { style: [styles11.headerTitle, { color: t.text }], children: showCelebration ? isRefund ? "Refund Claimed!" : "Prize Claimed!" : isRefund ? "Claim Refund" : "Claim Prize" }),
|
|
4424
4425
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.Text, { style: [styles11.closeButton, { color: t.textMuted }], children: "\u2715" }) })
|
|
4425
4426
|
] }),
|
|
4426
4427
|
showCelebration && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
@@ -4440,13 +4441,13 @@ function ClaimPrizeSheet({
|
|
|
4440
4441
|
prizeAmount,
|
|
4441
4442
|
" SOL"
|
|
4442
4443
|
] }),
|
|
4443
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.Text, { style: [styles11.celebrationSubtext, { color: t.textMuted }], children: "Winnings sent to your wallet" })
|
|
4444
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.Text, { style: [styles11.celebrationSubtext, { color: t.textMuted }], children: isRefund ? "Refund sent to your wallet" : "Winnings sent to your wallet" })
|
|
4444
4445
|
]
|
|
4445
4446
|
}
|
|
4446
4447
|
),
|
|
4447
4448
|
!showCelebration && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native16.View, { style: [styles11.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
|
|
4448
4449
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native16.View, { style: styles11.summaryRow, children: [
|
|
4449
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.Text, { style: [styles11.summaryLabel, { color: t.textMuted }], children: "Prize" }),
|
|
4450
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.Text, { style: [styles11.summaryLabel, { color: t.textMuted }], children: isRefund ? "Refund" : "Prize" }),
|
|
4450
4451
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native16.Text, { style: [styles11.summaryValue, { color: t.success }], children: [
|
|
4451
4452
|
prizeAmount,
|
|
4452
4453
|
" SOL"
|
|
@@ -4484,7 +4485,8 @@ function ClaimPrizeSheet({
|
|
|
4484
4485
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
|
|
4485
4486
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native16.Text, { style: styles11.ctaText, children: statusLabel })
|
|
4486
4487
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native16.Text, { style: [styles11.ctaText, !canClaim && { opacity: 0.5 }], children: [
|
|
4487
|
-
"Claim
|
|
4488
|
+
isRefund ? "Claim Refund" : "Claim Prize",
|
|
4489
|
+
" \u2014 ",
|
|
4488
4490
|
prizeAmount,
|
|
4489
4491
|
" SOL"
|
|
4490
4492
|
] })
|