Skip to content

Commit

Permalink
fix: take address from cli for tictactoe frontend (#275)
Browse files Browse the repository at this point in the history
* fix: add address from cli

* error: if address not passed

* Delete examples/tictactoe/yarn.lock

* Delete examples/tictactoe/package-lock.json
  • Loading branch information
tabshaikh authored Nov 28, 2024
1 parent 9a79dc2 commit 4fc5f4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/tictactoe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"dev": "test -n \"$npm_config_address\" && TICTACTOE_ADDRESS=$npm_config_address vite || (echo 'Error: --address parameter is required' && exit 1)",
"build": "test -n \"$npm_config_address\" && TICTACTOE_ADDRESS=$npm_config_address tsc -b && vite build || (echo 'Error: --address parameter is required' && exit 1)",
"lint": "eslint .",
"preview": "vite preview"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/tictactoe/src/constants/tictactoe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const address = '0x81D8CB015e36922F7ecC5CEAdd018dc7327e6FC7'
export const address = import.meta.env.TICTACTOE_ADDRESS

export const abi = [
{
Expand Down

0 comments on commit 4fc5f4c

Please sign in to comment.