fix tests
This commit is contained in:
@@ -47,15 +47,16 @@ export default Ember.Controller.extend({
|
||||
contributorsSorting: ['balance:desc'],
|
||||
contributorsSorted: Ember.computed.sort('contributorsWithKredits', 'contributorsSorting'),
|
||||
|
||||
watchContractEvents: function() {
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.get('kredits.kreditsContract')
|
||||
.then((contract) => {
|
||||
contract.onproposalvoted = this._handleProposalVoted.bind(this); //function(a,b,c) { console.log('voted', a, b, c) }
|
||||
contract.onproposalvoted = this._handleProposalVoted.bind(this);
|
||||
contract.onproposalcreated = this._handleProposalCreated.bind(this);
|
||||
contract.onproposalexecuted = this._handleProposalExecuted.bind(this);
|
||||
// TODO: transfer on the token contract
|
||||
});
|
||||
}.on('init'),
|
||||
},
|
||||
|
||||
_handleProposalCreated(proposalId, creatorAddress, recipientAddress, amount) {
|
||||
if (Ember.isPresent(this.get('model.proposals')
|
||||
|
||||
@@ -45,7 +45,7 @@ export default Service.extend({
|
||||
} else {
|
||||
debug('[kredits] Creating new instance from npm module class');
|
||||
let providerUrl = localStorage.getItem('config:web3ProviderUrl') || config.web3ProviderUrl;
|
||||
let networkId = config.contractMetadata.networkId;
|
||||
let networkId = parseInt(config.contractMetadata.networkId);
|
||||
web3Provider = new ethers.providers.JsonRpcProvider(providerUrl, {chainId: networkId});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user