aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/contract_wrappers/token_wrapper.ts8
-rw-r--r--src/types.ts2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts
index bd815554a..fe1d0c89f 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -4,10 +4,10 @@ import {Web3Wrapper} from '../web3_wrapper';
import {assert} from '../utils/assert';
import {ContractWrapper} from './contract_wrapper';
import * as TokenArtifacts from '../artifacts/Token.json';
-import {ERC20Contract} from '../types';
+import {TokenContract} from '../types';
export class TokenWrapper extends ContractWrapper {
- private tokenContractsByAddress: {[address: string]: ERC20Contract};
+ private tokenContractsByAddress: {[address: string]: TokenContract};
constructor(web3Wrapper: Web3Wrapper) {
super(web3Wrapper);
this.tokenContractsByAddress = {};
@@ -29,13 +29,13 @@ export class TokenWrapper extends ContractWrapper {
balance = _.isUndefined(balance) ? new BigNumber(0) : new BigNumber(balance);
return balance;
}
- private async getTokenContractAsync(tokenAddress: string): Promise<ERC20Contract> {
+ private async getTokenContractAsync(tokenAddress: string): Promise<TokenContract> {
let tokenContract = this.tokenContractsByAddress[tokenAddress];
if (!_.isUndefined(tokenContract)) {
return tokenContract;
}
const contractInstance = await this.instantiateContractIfExistsAsync((TokenArtifacts as any), tokenAddress);
- tokenContract = contractInstance as ERC20Contract;
+ tokenContract = contractInstance as TokenContract;
this.tokenContractsByAddress[tokenAddress] = tokenContract;
return tokenContract;
}
diff --git a/src/types.ts b/src/types.ts
index 9c82c1fa6..e1c68e8ae 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -30,7 +30,7 @@ export interface ExchangeContract {
isValidSignature: any;
}
-export interface ERC20Contract {
+export interface TokenContract {
balanceOf: {
call: (address: string) => Promise<BigNumber.BigNumber>;
};