From dff63f9b89a468ab09ac1be3c0c5e8ca157f8069 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 5 Sep 2017 15:34:52 +0200 Subject: Use AbiType --- src/contract.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/contract.ts b/src/contract.ts index bd5afc16c..b9ab496b2 100644 --- a/src/contract.ts +++ b/src/contract.ts @@ -22,7 +22,7 @@ export class Contract implements Web3.ContractInstance { this.validator = new SchemaValidator(); } private populateFunctions(): void { - const functionsAbi = _.filter(this.abi, abiPart => abiPart.type === 'function'); + const functionsAbi = _.filter(this.abi, abiPart => abiPart.type === Web3.AbiType.Function); _.forEach(functionsAbi, (functionAbi: Web3.MethodAbi) => { if (functionAbi.constant) { const cbStyleCallFunction = this.contract[functionAbi.name].call; @@ -40,7 +40,7 @@ export class Contract implements Web3.ContractInstance { }); } private populateEvents(): void { - const eventsAbi = _.filter(this.abi, abiPart => abiPart.type === 'event'); + const eventsAbi = _.filter(this.abi, abiPart => abiPart.type === Web3.AbiType.Event); _.forEach(eventsAbi, (eventAbi: Web3.EventAbi) => { this[eventAbi.name] = this.contract[eventAbi.name]; }); -- cgit v1.2.3