Remove unused variables
This commit is contained in:
		@@ -43,6 +43,8 @@ import {
 | 
			
		||||
    BlockchainErrs,
 | 
			
		||||
    ContractInstance,
 | 
			
		||||
    Fill,
 | 
			
		||||
    InjectedProviderObservable,
 | 
			
		||||
    InjectedProviderUpdate,
 | 
			
		||||
    Order as PortalOrder,
 | 
			
		||||
    Providers,
 | 
			
		||||
    ProviderType,
 | 
			
		||||
@@ -50,8 +52,6 @@ import {
 | 
			
		||||
    SideToAssetToken,
 | 
			
		||||
    Token,
 | 
			
		||||
    TokenByAddress,
 | 
			
		||||
    InjectedProviderObservable,
 | 
			
		||||
    InjectedProviderUpdate,
 | 
			
		||||
} from 'ts/types';
 | 
			
		||||
import { backendClient } from 'ts/utils/backend_client';
 | 
			
		||||
import { configs } from 'ts/utils/configs';
 | 
			
		||||
@@ -811,14 +811,8 @@ export class Blockchain {
 | 
			
		||||
            this._blockchainWatcher.destroy();
 | 
			
		||||
        }
 | 
			
		||||
        this._web3Wrapper = new Web3Wrapper(provider);
 | 
			
		||||
        this._blockchainWatcher = new BlockchainWatcher(
 | 
			
		||||
            this._dispatcher,
 | 
			
		||||
            this._web3Wrapper,
 | 
			
		||||
            this.networkId,
 | 
			
		||||
            shouldPollUserAddress,
 | 
			
		||||
        );
 | 
			
		||||
        this._blockchainWatcher = new BlockchainWatcher(this._dispatcher, this._web3Wrapper, shouldPollUserAddress);
 | 
			
		||||
        if (useLedgerProvider && !_.isUndefined(ledgerSubproviderIfExists)) {
 | 
			
		||||
            // TODO: why?
 | 
			
		||||
            delete this._userAddressIfExists;
 | 
			
		||||
            this._ledgerSubprovider = ledgerSubproviderIfExists;
 | 
			
		||||
            this._dispatcher.updateUserAddress(undefined);
 | 
			
		||||
 
 | 
			
		||||
@@ -6,21 +6,13 @@ import { Dispatcher } from 'ts/redux/dispatcher';
 | 
			
		||||
export class BlockchainWatcher {
 | 
			
		||||
    private _dispatcher: Dispatcher;
 | 
			
		||||
    private _web3Wrapper: Web3Wrapper;
 | 
			
		||||
    private _prevNetworkId: number;
 | 
			
		||||
    private _isWatchingNetworkId: boolean = false;
 | 
			
		||||
    private _shouldPollUserAddress: boolean;
 | 
			
		||||
    private _watchBalanceIntervalId: NodeJS.Timer;
 | 
			
		||||
    private _prevUserEtherBalanceInWei?: BigNumber;
 | 
			
		||||
    private _prevUserAddressIfExists: string;
 | 
			
		||||
    constructor(
 | 
			
		||||
        dispatcher: Dispatcher,
 | 
			
		||||
        web3Wrapper: Web3Wrapper,
 | 
			
		||||
        networkIdIfExists: number,
 | 
			
		||||
        shouldPollUserAddress: boolean,
 | 
			
		||||
    ) {
 | 
			
		||||
    constructor(dispatcher: Dispatcher, web3Wrapper: Web3Wrapper, shouldPollUserAddress: boolean) {
 | 
			
		||||
        this._dispatcher = dispatcher;
 | 
			
		||||
        this._shouldPollUserAddress = shouldPollUserAddress;
 | 
			
		||||
        this._prevNetworkId = networkIdIfExists;
 | 
			
		||||
        this._web3Wrapper = web3Wrapper;
 | 
			
		||||
    }
 | 
			
		||||
    public destroy(): void {
 | 
			
		||||
 
 | 
			
		||||
@@ -151,11 +151,11 @@ export class Portal extends React.Component<PortalProps, PortalState> {
 | 
			
		||||
        this.props.dispatcher.resetState();
 | 
			
		||||
    }
 | 
			
		||||
    public componentDidUpdate(prevProps: PortalProps): void {
 | 
			
		||||
        // if (!prevProps.blockchainIsLoaded && this.props.blockchainIsLoaded) {
 | 
			
		||||
        //     const trackedTokenAddresses = _.keys(this.state.trackedTokenStateByAddress);
 | 
			
		||||
        //     // tslint:disable-next-line:no-floating-promises
 | 
			
		||||
        //     this._fetchBalancesAndAllowancesAsync(trackedTokenAddresses);
 | 
			
		||||
        // }
 | 
			
		||||
        if (!prevProps.blockchainIsLoaded && this.props.blockchainIsLoaded) {
 | 
			
		||||
            const trackedTokenAddresses = _.keys(this.state.trackedTokenStateByAddress);
 | 
			
		||||
            // tslint:disable-next-line:no-floating-promises
 | 
			
		||||
            this._fetchBalancesAndAllowancesAsync(trackedTokenAddresses);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public componentWillReceiveProps(nextProps: PortalProps): void {
 | 
			
		||||
        if (nextProps.networkId !== this.state.prevNetworkId) {
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,6 @@ import { ProviderDisplay } from 'ts/components/top_bar/provider_display';
 | 
			
		||||
import { TopBarMenuItem } from 'ts/components/top_bar/top_bar_menu_item';
 | 
			
		||||
import { DropDown } from 'ts/components/ui/drop_down';
 | 
			
		||||
import { Dispatcher } from 'ts/redux/dispatcher';
 | 
			
		||||
import { zIndex } from 'ts/style/z_index';
 | 
			
		||||
import { Deco, Key, ProviderType, WebsiteLegacyPaths, WebsitePaths } from 'ts/types';
 | 
			
		||||
import { constants } from 'ts/utils/constants';
 | 
			
		||||
import { Translate } from 'ts/utils/translate';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user