Manually set networkId

By default kredits-contracts gets the networkId from the web3 object.
This causes some random JSON RPC errors when using MetaMask:
https://github.com/MetaMask/metamask-plugin/issues/1538

This set the default networkId to 17 which is our custom private
network. For development purposes the networkId can also be set
dynamically through the config:networkId local storage entry.
This commit is contained in:
2017-06-04 19:18:51 +02:00
parent 32e1bbd617
commit f8b75cca61
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -51,6 +51,7 @@ module.exports = function(environment) {
if (process.env.WEB3_PROVIDER_URL) {
ENV.web3ProviderUrl = process.env.WEB3_PROVIDER_URL;
}
ENV.contractMetadata['networkId'] = "17";
if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;