connect to contracts depending on the environment

This commit is contained in:
2017-02-07 13:28:37 +08:00
parent bb3696addc
commit d6d4e51ea3
+2 -1
View File
@@ -38,7 +38,8 @@ export default Ember.Service.extend({
return this.get('kreditsContractInstance'); return this.get('kreditsContractInstance');
} }
let contract = kreditsContracts(this.get('web3'))['Kredits']; let chain = {development: 'testnet', staging: 'testnet', production: 'main'}[config.environment];
let contract = kreditsContracts(this.get('web3'), chain)['Kredits'];
window.Kredits = contract; window.Kredits = contract;
this.set('kreditsContractInstance', contract); this.set('kreditsContractInstance', contract);