aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/token_wrapper.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 18:40:58 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 18:40:58 +0800
commitf7236e7f499f59d883603798cda11d3636b26f4a (patch)
treea4ab3fd3758bc179cb16fea8dfa78700f5d309aa /src/contract_wrappers/token_wrapper.ts
parented3d1a8142e6f65480f95df7c3991ae00c757e38 (diff)
downloaddexon-sol-tools-f7236e7f499f59d883603798cda11d3636b26f4a.tar
dexon-sol-tools-f7236e7f499f59d883603798cda11d3636b26f4a.tar.gz
dexon-sol-tools-f7236e7f499f59d883603798cda11d3636b26f4a.tar.bz2
dexon-sol-tools-f7236e7f499f59d883603798cda11d3636b26f4a.tar.lz
dexon-sol-tools-f7236e7f499f59d883603798cda11d3636b26f4a.tar.xz
dexon-sol-tools-f7236e7f499f59d883603798cda11d3636b26f4a.tar.zst
dexon-sol-tools-f7236e7f499f59d883603798cda11d3636b26f4a.zip
Rename senderAccount to senderAddress
Diffstat (limited to 'src/contract_wrappers/token_wrapper.ts')
-rw-r--r--src/contract_wrappers/token_wrapper.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts
index 326bca189..34697d97c 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -115,20 +115,20 @@ export class TokenWrapper extends ContractWrapper {
/**
* Transfers `amountInBaseUnits` ERC20 tokens from `fromAddress` to `toAddress`.
* Requires the fromAddress to have sufficient funds and to have approved an allowance of
- * `amountInBaseUnits` for senderAccount.
+ * `amountInBaseUnits` for senderAddress.
*/
public async transferFromAsync(tokenAddress: string, fromAddress: string, toAddress: string,
- senderAccount: string, amountInBaseUnits: BigNumber.BigNumber):
+ senderAddress: string, amountInBaseUnits: BigNumber.BigNumber):
Promise<void> {
assert.isETHAddressHex('tokenAddress', tokenAddress);
assert.isETHAddressHex('fromAddress', fromAddress);
assert.isETHAddressHex('toAddress', toAddress);
- await assert.isSenderAddressHexAsync('senderAccount', senderAccount, this.web3Wrapper);
+ await assert.isSenderAddressHexAsync('senderAddress', senderAddress, this.web3Wrapper);
assert.isBigNumber('amountInBaseUnits', amountInBaseUnits);
const tokenContract = await this.getTokenContractAsync(tokenAddress);
- const fromAddressAllowance = await this.getAllowanceAsync(tokenAddress, fromAddress, senderAccount);
+ const fromAddressAllowance = await this.getAllowanceAsync(tokenAddress, fromAddress, senderAddress);
if (fromAddressAllowance.lessThan(amountInBaseUnits)) {
throw new Error(ZeroExError.INSUFFICIENT_ALLOWANCE_FOR_TRANSFER);
}
@@ -139,7 +139,7 @@ export class TokenWrapper extends ContractWrapper {
}
await tokenContract.transferFrom(fromAddress, toAddress, amountInBaseUnits, {
- from: senderAccount,
+ from: senderAddress,
});
}
private async getTokenContractAsync(tokenAddress: string): Promise<TokenContract> {