Skip to content

Commit

Permalink
Merge pull request #113 from RuneLabsxyz/controller-address-storage
Browse files Browse the repository at this point in the history
feat: add logs
  • Loading branch information
0xMugen authored Oct 4, 2024
2 parents b46ef21 + 85d6eba commit 8dedd1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 0 additions & 9 deletions client/src/routes/client/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@
}
}
function disconnect() {
controller.disconnect();
account.set(undefined);
username.set(undefined);
}
onMount(async () => {
if (await controller.probe()) {
Expand All @@ -78,9 +72,6 @@
>
{#if loading}
<p>Loading</p>
{:else if $account}
<Button on:click={disconnect}>Disconnect</Button>
{:else}
<Button on:click={connect}>Connect</Button>
{/if}
<Button href="/client/games">Play</Button>
Expand Down
4 changes: 4 additions & 0 deletions client/src/routes/game/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
$: if ($sessionMetaData) {
sessionMetaData.subscribe((data) => {
if ($account) {
console.log('sessionData player1', $sessionData.player1.toString())
console.log('sessionData player2', $sessionData.player2.toString())
console.log('account', $account?.address)
let isFirstPlayer = areAddressesEqual(
$sessionData.player1.toString(),
$account?.address
Expand All @@ -104,6 +107,7 @@
} else {
currentPlayerId.set(null)
}
console.log('currentPlayerId', $currentPlayerId)
}
})
}
Expand Down

0 comments on commit 8dedd1b

Please sign in to comment.