aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package.json2
-rw-r--r--src/contract.ts4
-rw-r--r--yarn.lock6
3 files changed, 6 insertions, 6 deletions
diff --git a/package.json b/package.json
index 50f54e1c4..c58c59834 100644
--- a/package.json
+++ b/package.json
@@ -86,7 +86,7 @@
"types-ethereumjs-util": "^0.0.5",
"typescript": "^2.4.1",
"web3-provider-engine": "^13.0.1",
- "web3-typescript-typings": "^0.4.1",
+ "web3-typescript-typings": "^0.5.0",
"webpack": "^3.1.0"
},
"dependencies": {
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];
});
diff --git a/yarn.lock b/yarn.lock
index 949f0b5a0..49dca778f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5005,9 +5005,9 @@ web3-provider-engine@^8.4.0:
xhr "^2.2.0"
xtend "^4.0.1"
-web3-typescript-typings@^0.4.1:
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/web3-typescript-typings/-/web3-typescript-typings-0.4.1.tgz#077f5c042c1d2625b4cabedad88b9e9427b38fb3"
+web3-typescript-typings@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/web3-typescript-typings/-/web3-typescript-typings-0.5.0.tgz#a598ad5d4600c53d8e865c52e52b62f2ad04ec84"
dependencies:
bignumber.js "^4.0.2"