Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Development

Anxo Rodriguez edited this page Jul 30, 2020 · 3 revisions

Running locally

# Install dependencies (we use Yarn but NPM should work too)
yarn

# Start dev server in http://localhost:8080
yarn start

Open http://localhost:8080 in your browser.

Mock mode (default)

The app will run by default in mock mode, that means that all service implementations will be replaced by a mocked one with some fake data. This is useful for development, however it's also useful to run it with the actual implementation:

# Disable mock mode
MOCK=false yarn start

Alternatively, if you want to persist this behaviour, add the env var into a local .env file (i.e. use .env.example as a template).

Autoconnect for mock mode (default)

When running in mock mode, the wallet will be connected automatically - to change this behaviour run the app via:

# Disable autoconnect, for mock mode
AUTOCONNECT=false yarn start

Alternatively, if you want to persist this behaviour add the env var into a local .env file (i.e. use .env.example as a template).

Automatically fixing code

Manually, by running:

yarn lint:fix

If you use Visual Studio Code, it's recommended to install Prettier - Code formatter and add the following to your settings.json

"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true
}

Testnet faucets

Test faucets allow to get some tokens for using them in a testnet.

Gnosis Protocol is deployed and fully functional in Rinkeby testnet.

Read more here.

Customizing components

Gnosis Protocol Web allows to redefine any React component, so you can add new pages, modify the existing ones, or modify the layout and styles.

Learn about customizing components here.