Refactor UNLIMITED_ALLOWANCE_IN_BASE_UNITS to constants
This commit is contained in:
		@@ -29,7 +29,7 @@ const ALLOWANCE_TO_ZERO_GAS_AMOUNT = 47155;
 | 
				
			|||||||
 * to the 0x Proxy smart contract.
 | 
					 * to the 0x Proxy smart contract.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export class TokenWrapper extends ContractWrapper {
 | 
					export class TokenWrapper extends ContractWrapper {
 | 
				
			||||||
    public UNLIMITED_ALLOWANCE_IN_BASE_UNITS = new BigNumber(2).pow(256).minus(1);
 | 
					    public UNLIMITED_ALLOWANCE_IN_BASE_UNITS = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
 | 
				
			||||||
    private _tokenContractsByAddress: {[address: string]: TokenContract};
 | 
					    private _tokenContractsByAddress: {[address: string]: TokenContract};
 | 
				
			||||||
    private _tokenLogEventEmitters: ContractEventEmitter[];
 | 
					    private _tokenLogEventEmitters: ContractEventEmitter[];
 | 
				
			||||||
    constructor(web3Wrapper: Web3Wrapper) {
 | 
					    constructor(web3Wrapper: Web3Wrapper) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,10 @@
 | 
				
			|||||||
 | 
					import * as BigNumber from 'bignumber.js';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const constants = {
 | 
					export const constants = {
 | 
				
			||||||
    NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
 | 
					    NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
 | 
				
			||||||
    TESTRPC_NETWORK_ID: 50,
 | 
					    TESTRPC_NETWORK_ID: 50,
 | 
				
			||||||
    MAX_DIGITS_IN_UNSIGNED_256_INT: 78,
 | 
					    MAX_DIGITS_IN_UNSIGNED_256_INT: 78,
 | 
				
			||||||
    INVALID_JUMP_PATTERN: 'invalid JUMP at',
 | 
					    INVALID_JUMP_PATTERN: 'invalid JUMP at',
 | 
				
			||||||
    OUT_OF_GAS_PATTERN: 'out of gas',
 | 
					    OUT_OF_GAS_PATTERN: 'out of gas',
 | 
				
			||||||
 | 
					    UNLIMITED_ALLOWANCE_IN_BASE_UNITS: new BigNumber(2).pow(256).minus(1),
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user