gnosis / pm-trading-ui

Prediction Market Trading Interface for Gnosis Contracts
https://gnosis.pm
MIT License
20 stars 16 forks source link

[WEBPACK]: invalid interface configuration selected: 'big-tournament' #464

Closed joaosantos15 closed 6 years ago

joaosantos15 commented 6 years ago

Hello, I'm following the Apollo configuration guide for Frontier. I've deployed the smart-contracts and set up the database. I configured the interface following this section of the guide, creating the config/environments folder and then creating the big-tournament folder inside it. config.json and interface.config.json have also been configuring.

After npm install, when running GNOSIS_ENV='big-tournament' npm start, I get the following error:

[WEBPACK]: invalid interface configuration selected: 'big-tournament' - using fallback configuration

It then reverts to default config. Here is the content of the files (with the addresses removed):

config.json

{
  "pm-trading-db": {
    "protocol": "http",
    "host": "localhost",
    "port": 8000
  },
  "ethereum": {
    "protocol": "https",
    "host": "rinkeby.infura.io",
    "port": 443
  },
  "whitelist": {
    "0x67eD...": "username"
  }
}

interface.config.json

{
  "tournament": {
    "enabled": true,
    "name": "Big Tournament",
    "registration": {
      "enabled": true,
      "contractAddress": "0x9ba..."
    }
  },
  "collateralToken": {
    "address": "0x9f3c..",
    "icon": "/assets/img/icons/icon_metamask.svg"
  },
  "providers": {
    "default": "METAMASK",
    "options": {
      "UPORT": {
        "appName": "Tournament test",
        "clientId": "2ooNzwDvjgZTPswkrewUnxokRUH8KYpRNNL",
        "network": "rinkeby",
        "privateKey": "",
        "useNotifications": false
      }
    }
  },
  "rewards": {
    "enabled": true,
    "rewardToken": {
      "symbol": "BIG",
      "contractAddress": "0x9f3C...",
      "networkId": 4
    },
    "claimReward": {
      "claimStart": "2018-07-01T12:00:00",
      "claimUntil": "2018-09-01T12:00:00",
      "contractAddress": "0xcBA7...",
      "networkId": 4
    },
    "levels": [
      { "value": 5, "minRank": 1, "maxRank": 1 },
      { "value": 4, "minRank": 2, "maxRank": 2 },
      { "value": 3, "minRank": 3, "maxRank": 3 },
      { "value": 2, "minRank": 4, "maxRank": 4 },
      { "value": 1, "minRank": 5, "maxRank": 5 },
      { "value": 0.9, "minRank": 6, "maxRank": 7 },
      { "value": 0.8, "minRank": 8, "maxRank": 9 },
      { "value": 0.7, "minRank": 10, "maxRank": 11 },
      { "value": 0.6, "minRank": 12, "maxRank": 13 },
      { "value": 0.5, "minRank": 14, "maxRank": 15 },
      { "value": 0.4, "minRank": 16, "maxRank": 17 },
      { "value": 0.3, "minRank": 18, "maxRank": 19 },
      { "value": 0.2, "minRank": 19, "maxRank": 34 },
      { "value": 0.1, "minRank": 34, "maxRank": 100 }
    ]
  }
}

Any ideas about the reason big-tournament is not working? Thank you!

mmv08 commented 6 years ago

Hi @joaosantos15!

Looks like you are using the newest version of pm-trading-ui.

We're currently in process of refactoring the configuration to make it possible to configure the application in the runtime, without a need to rebuild the application. We haven't updated the documentation yet, we will do it after we finish the refactor and test the application (approximate estimation is 2 weeks).

Please use https://github.com/gnosis/pm-trading-ui/tree/stable-0.3.3. This branch includes latest stable version.

Sorry for not including this into the documentation.

Cheers 🙂