Skip to content

Commit

Permalink
add mina wallet support to chess
Browse files Browse the repository at this point in the history
  • Loading branch information
ecioppettini committed Apr 30, 2024
1 parent 2be0d40 commit 95295e0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions chess/api/src/controllers/searchOpenLobbies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export class SearchOpenLobbiesController extends Controller {
if (searchQuery.length < MIN_SEARCH_LENGTH || searchQuery.length > LOBBY_ID_LENGTH)
return emptyResponse;

wallet = wallet.toLowerCase();

if (searchQuery.length == LOBBY_ID_LENGTH) {
const lobbies = await getOpenLobbyById.run({ searchQuery, wallet }, pool);
return { lobbies };
Expand Down
1 change: 0 additions & 1 deletion chess/api/src/controllers/userLobbies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class UserLobbiesController extends Controller {
throw new ValidateError({ count: { message: 'invalid number' } }, '');
}

wallet = wallet.toLowerCase();
// after typecheck, valid data output is given in .right
const p = valPage.right;
const c = valCount.right;
Expand Down
1 change: 0 additions & 1 deletion chess/api/src/controllers/userLobbiesBlockheight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export class UserLobbiesBlockheightController extends Controller {
throw new ValidateError({ blockHeight: { message: 'invalid number' } }, '');
}

wallet = wallet.toLowerCase();
const lobbies = await getNewLobbiesByUserAndBlockHeight.run(
{ wallet, block_height: blockHeight },
pool
Expand Down
4 changes: 3 additions & 1 deletion chess/frontend/src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const wallets = [
"EVM Self-sequence",
"Algorand",
"Polkadot",
"Cardano"
"Cardano",
"Mina",
] as const;

type WalletType = typeof wallets[number];
Expand Down Expand Up @@ -62,6 +63,7 @@ const Login: React.FC = () => {
Cardano: { mode: WalletMode.Cardano },
Polkadot: { mode: WalletMode.Polkadot },
Algorand: { mode: WalletMode.Algorand },
Mina: { mode: WalletMode.Mina }
});
}
getWallets();
Expand Down
2 changes: 1 addition & 1 deletion chess/state-transition/src/stf/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default async function (
dbConn: Pool
): Promise<SQLUpdate[]> {
console.log(inputData, 'parsing input data');
const user = inputData.userAddress.toLowerCase();
const user = inputData.realAddress;
const parsed = parse(inputData.inputData);
console.log(`Processing input string: ${inputData.inputData}`);
console.log(`Input string parsed as: ${parsed.input}`);
Expand Down

0 comments on commit 95295e0

Please sign in to comment.