aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/token_wrapper.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-30 20:49:29 +0800
committerFabio Berger <me@fabioberger.com>2017-05-30 20:49:29 +0800
commit2f16c5483569b819b292554efc736b415b43ca19 (patch)
tree82d7fb15d2a46cd1368a60dee475c9d422a78d95 /src/contract_wrappers/token_wrapper.ts
parent2c3b718a4fa063277163e72f1be962dab3dfd21a (diff)
downloaddexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.gz
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.bz2
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.lz
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.xz
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.zst
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.zip
rename ERC20Contract to TokenContract
Diffstat (limited to 'src/contract_wrappers/token_wrapper.ts')
-rw-r--r--src/contract_wrappers/token_wrapper.ts8
1 files changed, 4 insertions, 4 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;
}