SubstrateChess / pallet-chess

The Unlicense
11 stars 6 forks source link

Get user's matches #23

Closed AlexD10S closed 1 year ago

AlexD10S commented 1 year ago

A normal flow for a frontend app is to connect a wallet and fetch the matches of a users using its AccountID.

With the current implementation, the only option the Dapp has here is to query all the list Matches using chess_matches() and go through all the list checking if the Match opponent or the match challenger are the same as the AccountID.