Use .init() instead of static .setup()
This commit is contained in:
@@ -60,7 +60,10 @@ export default Service.extend({
|
|||||||
ethSigner = ethProvider.getSigner();
|
ethSigner = ethProvider.getSigner();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Kredits.setup(ethProvider, ethSigner, config.ipfs).then((kredits) => {
|
let kredits = new Kredits(ethProvider, ethSigner);
|
||||||
|
return kredits
|
||||||
|
.init()
|
||||||
|
.then((kredits) => {
|
||||||
this.set('kredits', kredits);
|
this.set('kredits', kredits);
|
||||||
|
|
||||||
if (this.currentUserAccounts && this.currentUserAccounts.length > 0) {
|
if (this.currentUserAccounts && this.currentUserAccounts.length > 0) {
|
||||||
|
|||||||
@@ -46,13 +46,6 @@ module.exports = function(environment) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.NETWORK_ID) {
|
|
||||||
ENV.contractMetadata['networkId'] = process.env.NETWORK_ID;
|
|
||||||
}
|
|
||||||
if (process.env.WEB3_PROVIDER_URL) {
|
|
||||||
ENV.web3ProviderUrl = process.env.WEB3_PROVIDER_URL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (environment === 'development') {
|
if (environment === 'development') {
|
||||||
// ENV.APP.LOG_RESOLVER = true;
|
// ENV.APP.LOG_RESOLVER = true;
|
||||||
// ENV.APP.LOG_ACTIVE_GENERATION = true;
|
// ENV.APP.LOG_ACTIVE_GENERATION = true;
|
||||||
@@ -60,6 +53,7 @@ module.exports = function(environment) {
|
|||||||
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
||||||
// ENV.APP.LOG_VIEW_LOOKUPS = true;
|
// ENV.APP.LOG_VIEW_LOOKUPS = true;
|
||||||
ENV.contractMetadata['networkId'] = '100';
|
ENV.contractMetadata['networkId'] = '100';
|
||||||
|
ENV.web3ProviderUrl = 'http://localhost:7545';
|
||||||
|
|
||||||
ENV.ipfs = {
|
ENV.ipfs = {
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
@@ -84,5 +78,12 @@ module.exports = function(environment) {
|
|||||||
// here you can enable a production-specific feature
|
// here you can enable a production-specific feature
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.NETWORK_ID) {
|
||||||
|
ENV.contractMetadata['networkId'] = process.env.NETWORK_ID;
|
||||||
|
}
|
||||||
|
if (process.env.WEB3_PROVIDER_URL) {
|
||||||
|
ENV.web3ProviderUrl = process.env.WEB3_PROVIDER_URL;
|
||||||
|
}
|
||||||
|
|
||||||
return ENV;
|
return ENV;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user