@dubsdotapp/expo 0.2.30 → 0.2.31
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 +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +4 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +0 -2
- package/src/hooks/useCreateCustomGame.ts +0 -2
- package/src/types.ts +0 -5
- package/src/ui/game/CreateCustomGameSheet.tsx +1 -4
package/dist/index.d.mts
CHANGED
|
@@ -118,14 +118,12 @@ interface CreateCustomGameParams {
|
|
|
118
118
|
title?: string;
|
|
119
119
|
maxPlayers?: number;
|
|
120
120
|
metadata?: Record<string, unknown>;
|
|
121
|
-
externalGameId?: string;
|
|
122
121
|
}
|
|
123
122
|
interface CreateCustomGameResult {
|
|
124
123
|
gameId: string;
|
|
125
124
|
gameAddress: string;
|
|
126
125
|
transaction: string;
|
|
127
126
|
lockTimestamp: number;
|
|
128
|
-
externalGameId?: string | null;
|
|
129
127
|
}
|
|
130
128
|
interface JoinGameParams {
|
|
131
129
|
playerWallet: string;
|
|
@@ -191,7 +189,6 @@ interface GameDetail {
|
|
|
191
189
|
drawPool: number;
|
|
192
190
|
totalPool: number;
|
|
193
191
|
media: GameMedia;
|
|
194
|
-
externalGameId?: string | null;
|
|
195
192
|
createdAt: string;
|
|
196
193
|
updatedAt: string;
|
|
197
194
|
}
|
|
@@ -211,14 +208,12 @@ interface GameListItem {
|
|
|
211
208
|
league: string | null;
|
|
212
209
|
lockTimestamp: number | null;
|
|
213
210
|
createdAt: string;
|
|
214
|
-
externalGameId?: string | null;
|
|
215
211
|
opponents: GameListOpponent[];
|
|
216
212
|
media: GameMedia;
|
|
217
213
|
}
|
|
218
214
|
interface GetGamesParams {
|
|
219
215
|
wallet?: string;
|
|
220
216
|
status?: 'open' | 'locked' | 'resolved';
|
|
221
|
-
externalGameId?: string;
|
|
222
217
|
limit?: number;
|
|
223
218
|
offset?: number;
|
|
224
219
|
}
|
|
@@ -738,7 +733,6 @@ interface CreateCustomGameMutationResult {
|
|
|
738
733
|
signature: string;
|
|
739
734
|
explorerUrl: string;
|
|
740
735
|
buyIn: number;
|
|
741
|
-
externalGameId?: string | null;
|
|
742
736
|
}
|
|
743
737
|
declare function useCreateCustomGame(): {
|
|
744
738
|
execute: (params: CreateCustomGameParams) => Promise<CreateCustomGameMutationResult>;
|
|
@@ -902,12 +896,11 @@ interface CreateCustomGameSheetProps {
|
|
|
902
896
|
presetAmounts?: number[];
|
|
903
897
|
defaultAmount?: number;
|
|
904
898
|
metadata?: Record<string, unknown>;
|
|
905
|
-
externalGameId?: string;
|
|
906
899
|
onAmountChange?: (amount: number | null) => void;
|
|
907
900
|
onSuccess?: (result: CreateCustomGameMutationResult) => void;
|
|
908
901
|
onError?: (error: Error) => void;
|
|
909
902
|
}
|
|
910
|
-
declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, defaultAmount, metadata,
|
|
903
|
+
declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, defaultAmount, metadata, onAmountChange, onSuccess, onError, }: CreateCustomGameSheetProps): react_jsx_runtime.JSX.Element;
|
|
911
904
|
|
|
912
905
|
interface JoinGameSheetProps {
|
|
913
906
|
visible: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -118,14 +118,12 @@ interface CreateCustomGameParams {
|
|
|
118
118
|
title?: string;
|
|
119
119
|
maxPlayers?: number;
|
|
120
120
|
metadata?: Record<string, unknown>;
|
|
121
|
-
externalGameId?: string;
|
|
122
121
|
}
|
|
123
122
|
interface CreateCustomGameResult {
|
|
124
123
|
gameId: string;
|
|
125
124
|
gameAddress: string;
|
|
126
125
|
transaction: string;
|
|
127
126
|
lockTimestamp: number;
|
|
128
|
-
externalGameId?: string | null;
|
|
129
127
|
}
|
|
130
128
|
interface JoinGameParams {
|
|
131
129
|
playerWallet: string;
|
|
@@ -191,7 +189,6 @@ interface GameDetail {
|
|
|
191
189
|
drawPool: number;
|
|
192
190
|
totalPool: number;
|
|
193
191
|
media: GameMedia;
|
|
194
|
-
externalGameId?: string | null;
|
|
195
192
|
createdAt: string;
|
|
196
193
|
updatedAt: string;
|
|
197
194
|
}
|
|
@@ -211,14 +208,12 @@ interface GameListItem {
|
|
|
211
208
|
league: string | null;
|
|
212
209
|
lockTimestamp: number | null;
|
|
213
210
|
createdAt: string;
|
|
214
|
-
externalGameId?: string | null;
|
|
215
211
|
opponents: GameListOpponent[];
|
|
216
212
|
media: GameMedia;
|
|
217
213
|
}
|
|
218
214
|
interface GetGamesParams {
|
|
219
215
|
wallet?: string;
|
|
220
216
|
status?: 'open' | 'locked' | 'resolved';
|
|
221
|
-
externalGameId?: string;
|
|
222
217
|
limit?: number;
|
|
223
218
|
offset?: number;
|
|
224
219
|
}
|
|
@@ -738,7 +733,6 @@ interface CreateCustomGameMutationResult {
|
|
|
738
733
|
signature: string;
|
|
739
734
|
explorerUrl: string;
|
|
740
735
|
buyIn: number;
|
|
741
|
-
externalGameId?: string | null;
|
|
742
736
|
}
|
|
743
737
|
declare function useCreateCustomGame(): {
|
|
744
738
|
execute: (params: CreateCustomGameParams) => Promise<CreateCustomGameMutationResult>;
|
|
@@ -902,12 +896,11 @@ interface CreateCustomGameSheetProps {
|
|
|
902
896
|
presetAmounts?: number[];
|
|
903
897
|
defaultAmount?: number;
|
|
904
898
|
metadata?: Record<string, unknown>;
|
|
905
|
-
externalGameId?: string;
|
|
906
899
|
onAmountChange?: (amount: number | null) => void;
|
|
907
900
|
onSuccess?: (result: CreateCustomGameMutationResult) => void;
|
|
908
901
|
onError?: (error: Error) => void;
|
|
909
902
|
}
|
|
910
|
-
declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, defaultAmount, metadata,
|
|
903
|
+
declare function CreateCustomGameSheet({ visible, onDismiss, title, maxPlayers, fee, presetAmounts, defaultAmount, metadata, onAmountChange, onSuccess, onError, }: CreateCustomGameSheetProps): react_jsx_runtime.JSX.Element;
|
|
911
904
|
|
|
912
905
|
interface JoinGameSheetProps {
|
|
913
906
|
visible: boolean;
|
package/dist/index.js
CHANGED
|
@@ -344,8 +344,7 @@ var DubsClient = class {
|
|
|
344
344
|
gameId: res.gameId,
|
|
345
345
|
gameAddress: res.gameAddress,
|
|
346
346
|
transaction: res.transaction,
|
|
347
|
-
lockTimestamp: res.lockTimestamp
|
|
348
|
-
externalGameId: res.externalGameId ?? null
|
|
347
|
+
lockTimestamp: res.lockTimestamp
|
|
349
348
|
};
|
|
350
349
|
}
|
|
351
350
|
async confirmCustomGame(params) {
|
|
@@ -392,7 +391,6 @@ var DubsClient = class {
|
|
|
392
391
|
const qs = new URLSearchParams();
|
|
393
392
|
if (params?.wallet) qs.set("wallet", params.wallet);
|
|
394
393
|
if (params?.status) qs.set("status", params.status);
|
|
395
|
-
if (params?.externalGameId) qs.set("externalGameId", params.externalGameId);
|
|
396
394
|
if (params?.limit != null) qs.set("limit", String(params.limit));
|
|
397
395
|
if (params?.offset != null) qs.set("offset", String(params.offset));
|
|
398
396
|
const query = qs.toString();
|
|
@@ -1914,8 +1912,7 @@ function useCreateCustomGame() {
|
|
|
1914
1912
|
gameAddress: createResult.gameAddress,
|
|
1915
1913
|
signature,
|
|
1916
1914
|
explorerUrl,
|
|
1917
|
-
buyIn: params.wagerAmount
|
|
1918
|
-
externalGameId: createResult.externalGameId ?? null
|
|
1915
|
+
buyIn: params.wagerAmount
|
|
1919
1916
|
};
|
|
1920
1917
|
setData(result);
|
|
1921
1918
|
setStatus("success");
|
|
@@ -3497,7 +3494,6 @@ function CreateCustomGameSheet({
|
|
|
3497
3494
|
presetAmounts = [0.01, 0.1, 0.5, 1],
|
|
3498
3495
|
defaultAmount = 0.01,
|
|
3499
3496
|
metadata,
|
|
3500
|
-
externalGameId,
|
|
3501
3497
|
onAmountChange,
|
|
3502
3498
|
onSuccess,
|
|
3503
3499
|
onError
|
|
@@ -3572,12 +3568,11 @@ function CreateCustomGameSheet({
|
|
|
3572
3568
|
wagerAmount: effectiveAmount,
|
|
3573
3569
|
title,
|
|
3574
3570
|
maxPlayers,
|
|
3575
|
-
metadata
|
|
3576
|
-
externalGameId
|
|
3571
|
+
metadata
|
|
3577
3572
|
});
|
|
3578
3573
|
} catch {
|
|
3579
3574
|
}
|
|
3580
|
-
}, [effectiveAmount, wallet.publicKey, mutation.execute, title, maxPlayers, metadata
|
|
3575
|
+
}, [effectiveAmount, wallet.publicKey, mutation.execute, title, maxPlayers, metadata]);
|
|
3581
3576
|
const statusLabel = STATUS_LABELS2[mutation.status] || "";
|
|
3582
3577
|
const playersLabel = playerCount === 2 ? "2 (1v1)" : `${playerCount} players`;
|
|
3583
3578
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|