Skip to content

[High Roller & TicTacToe] Use @counterfactual/apps for dapps #23

@Alonski

Description

@Alonski

Currently, in the High Roller and Tic Tac Toe dapps the Contract addresses are hard coded or partially hard coded. This is very error prone especially now that the dapps are in a different repo.

What we currently have:

High Roller currently hard codes the address:

https://github.com/counterfactual/dapps-bots/blob/master/packages/dapp-high-roller/src/components/app-root/app-root.tsx#L206

Tic Tac Toe gets the address using @counterfactual/apps however it hardcodes the network:

https://github.com/counterfactual/dapps-bots/blob/master/packages/dapp-tic-tac-toe/src/Wager.jsx#L78

The flaw with the TTT method is that the network used is hard coded. We can probably figure this out from MetaMask or another method.

What needs to be done:

We need to update High Roller to also use @counterfactual/apps
Then we need to update both dapps to get the network dynamically and act accordingly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions