aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/token_wrapper.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-12 05:16:09 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-07-12 08:54:57 +0800
commit6033c1a5d5f494d1ed27b00488ca458952341ae6 (patch)
tree17b53c7971047ca57b235c5351e972da721c09a4 /src/contract_wrappers/token_wrapper.ts
parent38fbf028a6699c7d8e853db4699a37cdf60e70c2 (diff)
downloaddexon-sol-tools-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar
dexon-sol-tools-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.gz
dexon-sol-tools-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.bz2
dexon-sol-tools-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.lz
dexon-sol-tools-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.xz
dexon-sol-tools-6033c1a5d5f494d1ed27b00488ca458952341ae6.tar.zst
dexon-sol-tools-6033c1a5d5f494d1ed27b00488ca458952341ae6.zip
Use PascalCase names as string enum keys
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 fdf711823..9c073f30b 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -146,7 +146,7 @@ export class TokenWrapper extends ContractWrapper {
const fromAddressBalance = await this.getBalanceAsync(tokenAddress, fromAddress);
if (fromAddressBalance.lessThan(amountInBaseUnits)) {
- throw new Error(ZeroExError.INSUFFICIENT_BALANCE_FOR_TRANSFER);
+ throw new Error(ZeroExError.InsufficientBalanceForTransfer);
}
await tokenContract.transfer(toAddress, amountInBaseUnits, {
@@ -178,12 +178,12 @@ export class TokenWrapper extends ContractWrapper {
const fromAddressAllowance = await this.getAllowanceAsync(tokenAddress, fromAddress, senderAddress);
if (fromAddressAllowance.lessThan(amountInBaseUnits)) {
- throw new Error(ZeroExError.INSUFFICIENT_ALLOWANCE_FOR_TRANSFER);
+ throw new Error(ZeroExError.InsufficientAllowanceForTransfer);
}
const fromAddressBalance = await this.getBalanceAsync(tokenAddress, fromAddress);
if (fromAddressBalance.lessThan(amountInBaseUnits)) {
- throw new Error(ZeroExError.INSUFFICIENT_BALANCE_FOR_TRANSFER);
+ throw new Error(ZeroExError.InsufficientBalanceForTransfer);
}
await tokenContract.transferFrom(fromAddress, toAddress, amountInBaseUnits, {
@@ -252,7 +252,7 @@ export class TokenWrapper extends ContractWrapper {
undefined :
(ProxyArtifacts as any).networks[networkIdIfExists];
if (_.isUndefined(proxyNetworkConfigsIfExists)) {
- throw new Error(ZeroExError.CONTRACT_NOT_DEPLOYED_ON_NETWORK);
+ throw new Error(ZeroExError.ContractNotDeployedOnNetwork);
}
const proxyAddress = proxyNetworkConfigsIfExists.address;
return proxyAddress;