@smartico/public-api 0.0.397 → 0.0.398
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
|
@@ -367,13 +367,16 @@ export class WSAPIMiniGames extends WSAPIRaffles {
|
|
|
367
367
|
*/
|
|
368
368
|
public async playMiniGame(
|
|
369
369
|
template_id: number,
|
|
370
|
-
{ onUpdate }: { onUpdate?: (data: TMiniGameTemplate[]) => void } = {},
|
|
370
|
+
{ onUpdate, acknowledge = true }: { onUpdate?: (data: TMiniGameTemplate[]) => void, acknowledge?: boolean } = {},
|
|
371
371
|
): Promise<TMiniGamePlayResult> {
|
|
372
372
|
if (typeof onUpdate === 'function') {
|
|
373
373
|
this.onUpdateCallback.set(onUpdateContextKey.Saw, onUpdate);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
const r = await this.api.sawSpinRequest(this.userExtId, template_id);
|
|
377
|
+
if (acknowledge) {
|
|
378
|
+
await this.api.doAcknowledgeRequest(this.userExtId, r.request_id);
|
|
379
|
+
}
|
|
377
380
|
const o: TMiniGamePlayResult = {
|
|
378
381
|
err_code: r.errCode,
|
|
379
382
|
err_message: r.errMsg,
|