@dubsdotapp/expo 0.5.34 → 0.5.35

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": "@dubsdotapp/expo",
3
- "version": "0.5.34",
3
+ "version": "0.5.35",
4
4
  "description": "React Native SDK for the Dubs betting platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -102,6 +102,14 @@ export function useCreateGame() {
102
102
  'Draw';
103
103
 
104
104
  const message = `I just placed a ${wagerAmount} SOL bet on ${teamLabel} - Join me!`;
105
+ // event.startTime is an ESPN-unified ISO string ("…Z"), but every
106
+ // downstream chat consumer (dubs.app SPA, mobile app) does
107
+ // `new Date(strTimestamp + 'Z')` and crashes on the resulting
108
+ // double-Z. Strip the trailing Z so the on-the-wire shape matches
109
+ // the legacy TheSportsDB format the rest of the system expects.
110
+ const strTimestamp = typeof event?.startTime === 'string'
111
+ ? event.startTime.replace(/Z$/, '')
112
+ : null;
105
113
  const gameInvite = {
106
114
  gameId: createResult.gameId,
107
115
  gameAddress: createResult.gameAddress,
@@ -117,7 +125,7 @@ export function useCreateGame() {
117
125
  imageUrl: event?.media?.thumbnail ?? null,
118
126
  strThumb: event?.media?.thumbnail ?? null,
119
127
  strPoster: event?.media?.poster ?? null,
120
- strTimestamp: event?.startTime ?? null,
128
+ strTimestamp,
121
129
  creatorTeam: params.teamChoice,
122
130
  creatorWallet: params.playerWallet,
123
131
  } as Record<string, unknown>;