From 752f4e392a21eb96c4e44d6dbc5e412d550281b2 Mon Sep 17 00:00:00 2001 From: Snehil Kumar <51155558+SneakySensei@users.noreply.github.com> Date: Mon, 2 Sep 2024 20:43:44 +0530 Subject: [PATCH] update sign payload --- .../rock-paper-scissors/components/PlayerScreen.tsx | 3 +-- .../src/utils/service/sign-protocol.service.ts | 11 ++++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/frontend/src/app/games/rock-paper-scissors/components/PlayerScreen.tsx b/packages/frontend/src/app/games/rock-paper-scissors/components/PlayerScreen.tsx index e619919..3ce6d2f 100644 --- a/packages/frontend/src/app/games/rock-paper-scissors/components/PlayerScreen.tsx +++ b/packages/frontend/src/app/games/rock-paper-scissors/components/PlayerScreen.tsx @@ -41,8 +41,7 @@ export default function PlayerScreen({ const signClient = new SignClient(walletClient); const attestation = await signClient.attest({ - game_id: RockPaperScissors.gameId, - season_id: "6dd7cc5f-45ab-42d8-84f9-9bc0a5ff2121", + played_game_id: gameState.room_id, player_id: gameState.player.player_id, tier_id: tier, }); diff --git a/packages/frontend/src/utils/service/sign-protocol.service.ts b/packages/frontend/src/utils/service/sign-protocol.service.ts index c32339c..2b7535e 100644 --- a/packages/frontend/src/utils/service/sign-protocol.service.ts +++ b/packages/frontend/src/utils/service/sign-protocol.service.ts @@ -37,13 +37,11 @@ export default class SignClient { } async attest({ - game_id, + played_game_id, player_id, - season_id, tier_id, }: { - game_id: string; - season_id: string; + played_game_id: string; player_id: string; tier_id: string; }): Promise { @@ -51,12 +49,11 @@ export default class SignClient { const response = await this.signClient.createAttestation({ schemaId: "0x92", data: { - game_id, - season_id, + played_game_id, player_id, tier_id, }, - indexingValue: game_id, + indexingValue: played_game_id, }); return response;