aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/token_registry_wrapper.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-06-22 22:22:20 +0800
committerGitHub <noreply@github.com>2017-06-22 22:22:20 +0800
commit1375126e4cec43714fdd7bf17a0a5d7301bf7928 (patch)
treec411ec567878a8178aa64313bd9b76dfcb455fc7 /src/contract_wrappers/token_registry_wrapper.ts
parent25a9ba90f508e0d147c060f60a9e3683e07d45e4 (diff)
parent94cab6f694027d47971d661bca33beac42f4ade1 (diff)
downloaddexon-0x-contracts-1375126e4cec43714fdd7bf17a0a5d7301bf7928.tar.gz
dexon-0x-contracts-1375126e4cec43714fdd7bf17a0a5d7301bf7928.tar.zst
dexon-0x-contracts-1375126e4cec43714fdd7bf17a0a5d7301bf7928.zip
Merge pull request #77 from 0xProject/revert-71-lodash-tree-shake
Revert "Use different lodash import syntax which allows to include only used functions"
Diffstat (limited to 'src/contract_wrappers/token_registry_wrapper.ts')
-rw-r--r--src/contract_wrappers/token_registry_wrapper.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts
index 971b2d43c..3e87e4852 100644
--- a/src/contract_wrappers/token_registry_wrapper.ts
+++ b/src/contract_wrappers/token_registry_wrapper.ts
@@ -1,5 +1,4 @@
-import map = require('lodash/map');
-import isUndefined = require('lodash/isUndefined');
+import * as _ from 'lodash';
import {Web3Wrapper} from '../web3_wrapper';
import {Token, TokenRegistryContract, TokenMetadata} from '../types';
import {assert} from '../utils/assert';
@@ -25,12 +24,12 @@ export class TokenRegistryWrapper extends ContractWrapper {
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
const addresses = await tokenRegistryContract.getTokenAddresses.call();
- const tokenMetadataPromises: Array<Promise<TokenMetadata>> = map(
+ const tokenMetadataPromises: Array<Promise<TokenMetadata>> = _.map(
addresses,
(address: string) => (tokenRegistryContract.getTokenMetaData.call(address)),
);
const tokensMetadata = await Promise.all(tokenMetadataPromises);
- const tokens = map(tokensMetadata, metadata => {
+ const tokens = _.map(tokensMetadata, metadata => {
return {
address: metadata[0],
name: metadata[1],
@@ -42,7 +41,7 @@ export class TokenRegistryWrapper extends ContractWrapper {
return tokens;
}
private async _getTokenRegistryContractAsync(): Promise<TokenRegistryContract> {
- if (!isUndefined(this._tokenRegistryContractIfExists)) {
+ if (!_.isUndefined(this._tokenRegistryContractIfExists)) {
return this._tokenRegistryContractIfExists;
}
const contractInstance = await this._instantiateContractIfExistsAsync((TokenRegistryArtifacts as any));