aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts')
-rw-r--r--packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts
index f5d9d108a..41afd2f67 100644
--- a/packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts
@@ -2,6 +2,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';
+import { assert } from '../utils/assert';
import { ContractWrapper } from './contract_wrapper';
import { TokenTransferProxyContract } from './generated/token_transfer_proxy';
@@ -22,8 +23,12 @@ export class TokenTransferProxyWrapper extends ContractWrapper {
* @return Whether the exchangeContractAddress is authorized.
*/
public async isAuthorizedAsync(exchangeContractAddress: string): Promise<boolean> {
+ const normalizedExchangeContractAddress = exchangeContractAddress.toLowerCase();
+ assert.isETHAddressHex('exchangeContractAddress', normalizedExchangeContractAddress);
const tokenTransferProxyContractInstance = await this._getTokenTransferProxyContractAsync();
- const isAuthorized = await tokenTransferProxyContractInstance.authorized.callAsync(exchangeContractAddress);
+ const isAuthorized = await tokenTransferProxyContractInstance.authorized.callAsync(
+ normalizedExchangeContractAddress,
+ );
return isAuthorized;
}
/**