no more evil while loop
This commit is contained in:
@@ -51,17 +51,11 @@ export default Service.extend({
|
||||
initializeKreditsContract() {
|
||||
let contract = null;
|
||||
|
||||
while (contract === null) {
|
||||
try {
|
||||
if (isPresent(config.contractMetadata)) {
|
||||
contract = kreditsContracts(this.get('web3'), config.contractMetadata)['Kredits'];
|
||||
} else {
|
||||
contract = kreditsContracts(this.get('web3'))['Kredits'];
|
||||
}
|
||||
} catch(e) {
|
||||
Ember.Logger.debug('[kredits] error initializing kredits contract', e);
|
||||
}
|
||||
}
|
||||
|
||||
return contract;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user