Fix linter errors

This commit is contained in:
Fabio Berger 2018-01-30 20:45:09 +01:00
parent 57acb8db5c
commit 16ea0348a9
21 changed files with 20 additions and 72 deletions

View File

@ -41,7 +41,6 @@ import {
SignatureData, SignatureData,
Token, Token,
TokenByAddress, TokenByAddress,
TokenStateByAddress,
} from 'ts/types'; } from 'ts/types';
import { configs } from 'ts/utils/configs'; import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants'; import { constants } from 'ts/utils/constants';
@ -220,7 +219,7 @@ export class Blockchain {
this._web3Wrapper = new Web3Wrapper(this._dispatcher, provider, this.networkId, shouldPollUserAddress); this._web3Wrapper = new Web3Wrapper(this._dispatcher, provider, this.networkId, shouldPollUserAddress);
this._zeroEx.setProvider(provider, this.networkId); this._zeroEx.setProvider(provider, this.networkId);
await this._postInstantiationOrUpdatingProviderZeroExAsync(); await this._postInstantiationOrUpdatingProviderZeroExAsync();
this._web3Wrapper.startEmittingNetworkConnectionAndUserBalanceStateAsync(); this._web3Wrapper.startEmittingNetworkConnectionAndUserBalanceState();
this._dispatcher.updateProviderType(ProviderType.Ledger); this._dispatcher.updateProviderType(ProviderType.Ledger);
} }
public async updateProviderToInjectedAsync() { public async updateProviderToInjectedAsync() {
@ -244,7 +243,7 @@ export class Blockchain {
await this._postInstantiationOrUpdatingProviderZeroExAsync(); await this._postInstantiationOrUpdatingProviderZeroExAsync();
await this.fetchTokenInformationAsync(); await this.fetchTokenInformationAsync();
this._web3Wrapper.startEmittingNetworkConnectionAndUserBalanceStateAsync(); this._web3Wrapper.startEmittingNetworkConnectionAndUserBalanceState();
this._dispatcher.updateProviderType(ProviderType.Injected); this._dispatcher.updateProviderType(ProviderType.Injected);
delete this._ledgerSubprovider; delete this._ledgerSubprovider;
delete this._cachedProvider; delete this._cachedProvider;
@ -264,7 +263,6 @@ export class Blockchain {
}, },
); );
await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash); await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
const allowance = amountInBaseUnits;
} }
public async transferAsync(token: Token, toAddress: string, amountInBaseUnits: BigNumber): Promise<void> { public async transferAsync(token: Token, toAddress: string, amountInBaseUnits: BigNumber): Promise<void> {
this._showFlashMessageIfLedger(); this._showFlashMessageIfLedger();
@ -451,7 +449,6 @@ export class Blockchain {
from: this._userAddress, from: this._userAddress,
gasPrice: this._defaultGasPrice, gasPrice: this._defaultGasPrice,
}); });
const balanceDelta = constants.MINT_AMOUNT;
} }
public async getBalanceInEthAsync(owner: string): Promise<BigNumber> { public async getBalanceInEthAsync(owner: string): Promise<BigNumber> {
const balance = await this._web3Wrapper.getBalanceInEthAsync(owner); const balance = await this._web3Wrapper.getBalanceInEthAsync(owner);
@ -762,7 +759,7 @@ export class Blockchain {
this._userAddress = await this._web3Wrapper.getFirstAccountIfExistsAsync(); this._userAddress = await this._web3Wrapper.getFirstAccountIfExistsAsync();
this._dispatcher.updateUserAddress(this._userAddress); this._dispatcher.updateUserAddress(this._userAddress);
await this.fetchTokenInformationAsync(); await this.fetchTokenInformationAsync();
this._web3Wrapper.startEmittingNetworkConnectionAndUserBalanceStateAsync(); this._web3Wrapper.startEmittingNetworkConnectionAndUserBalanceState();
await this._rehydrateStoreWithContractEvents(); await this._rehydrateStoreWithContractEvents();
} }
// This method should always be run after instantiating or updating the provider // This method should always be run after instantiating or updating the provider

View File

@ -10,7 +10,7 @@ import { Blockchain } from 'ts/blockchain';
import { NetworkDropDown } from 'ts/components/dropdowns/network_drop_down'; import { NetworkDropDown } from 'ts/components/dropdowns/network_drop_down';
import { LifeCycleRaisedButton } from 'ts/components/ui/lifecycle_raised_button'; import { LifeCycleRaisedButton } from 'ts/components/ui/lifecycle_raised_button';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { Networks, ProviderType } from 'ts/types'; import { ProviderType } from 'ts/types';
import { colors } from 'ts/utils/colors'; import { colors } from 'ts/utils/colors';
import { configs } from 'ts/utils/configs'; import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants'; import { constants } from 'ts/utils/constants';

View File

@ -6,7 +6,7 @@ import * as React from 'react';
import { Blockchain } from 'ts/blockchain'; import { Blockchain } from 'ts/blockchain';
import { EthWethConversionDialog } from 'ts/components/dialogs/eth_weth_conversion_dialog'; import { EthWethConversionDialog } from 'ts/components/dialogs/eth_weth_conversion_dialog';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { BlockchainCallErrs, Side, Token, TokenState } from 'ts/types'; import { BlockchainCallErrs, Side, Token } from 'ts/types';
import { constants } from 'ts/utils/constants'; import { constants } from 'ts/utils/constants';
import { errorReporter } from 'ts/utils/error_reporter'; import { errorReporter } from 'ts/utils/error_reporter';
import { utils } from 'ts/utils/utils'; import { utils } from 'ts/utils/utils';
@ -16,7 +16,6 @@ interface EthWethConversionButtonProps {
networkId: number; networkId: number;
direction: Side; direction: Side;
ethToken: Token; ethToken: Token;
ethTokenState: TokenState;
dispatcher: Dispatcher; dispatcher: Dispatcher;
blockchain: Blockchain; blockchain: Blockchain;
userEtherBalance: BigNumber; userEtherBalance: BigNumber;
@ -93,7 +92,6 @@ export class EthWethConversionButton extends React.Component<
}); });
this._toggleConversionDialog(); this._toggleConversionDialog();
const token = this.props.ethToken; const token = this.props.ethToken;
const tokenState = this.props.ethTokenState;
try { try {
if (direction === Side.Deposit) { if (direction === Side.Deposit) {
await this.props.blockchain.convertEthToWrappedEthTokensAsync(token.address, value); await this.props.blockchain.convertEthToWrappedEthTokensAsync(token.address, value);
@ -105,7 +103,7 @@ export class EthWethConversionButton extends React.Component<
this.props.dispatcher.showFlashMessage(`Successfully unwrapped ${tokenAmount.toString()} WETH to ETH`); this.props.dispatcher.showFlashMessage(`Successfully unwrapped ${tokenAmount.toString()} WETH to ETH`);
} }
if (!this.props.isOutdatedWrappedEther) { if (!this.props.isOutdatedWrappedEther) {
this.props.refetchEthTokenStateAsync(); await this.props.refetchEthTokenStateAsync();
} }
this.props.onConversionSuccessful(); this.props.onConversionSuccessful();
} catch (err) { } catch (err) {

View File

@ -16,7 +16,6 @@ import {
Token, Token,
TokenByAddress, TokenByAddress,
TokenState, TokenState,
TokenStateByAddress,
} from 'ts/types'; } from 'ts/types';
import { colors } from 'ts/utils/colors'; import { colors } from 'ts/utils/colors';
import { configs } from 'ts/utils/configs'; import { configs } from 'ts/utils/configs';
@ -163,7 +162,6 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
isOutdatedWrappedEther={false} isOutdatedWrappedEther={false}
direction={Side.Deposit} direction={Side.Deposit}
ethToken={etherToken} ethToken={etherToken}
ethTokenState={this.state.ethTokenState}
dispatcher={this.props.dispatcher} dispatcher={this.props.dispatcher}
blockchain={this.props.blockchain} blockchain={this.props.blockchain}
userEtherBalance={this.props.userEtherBalance} userEtherBalance={this.props.userEtherBalance}
@ -191,7 +189,6 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
direction={Side.Receive} direction={Side.Receive}
isDisabled={!this.state.isWethStateLoaded} isDisabled={!this.state.isWethStateLoaded}
ethToken={etherToken} ethToken={etherToken}
ethTokenState={this.state.ethTokenState}
dispatcher={this.props.dispatcher} dispatcher={this.props.dispatcher}
blockchain={this.props.blockchain} blockchain={this.props.blockchain}
userEtherBalance={this.props.userEtherBalance} userEtherBalance={this.props.userEtherBalance}

View File

@ -8,7 +8,7 @@ import { TrackTokenConfirmation } from 'ts/components/track_token_confirmation';
import { TokenIcon } from 'ts/components/ui/token_icon'; import { TokenIcon } from 'ts/components/ui/token_icon';
import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage'; import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { DialogConfigs, Token, TokenByAddress, TokenState, TokenVisibility } from 'ts/types'; import { DialogConfigs, Token, TokenByAddress, TokenVisibility } from 'ts/types';
const TOKEN_ICON_DIMENSION = 100; const TOKEN_ICON_DIMENSION = 100;
const TILE_DIMENSION = 146; const TILE_DIMENSION = 146;

View File

@ -27,7 +27,6 @@ import {
SignatureData, SignatureData,
Token, Token,
TokenByAddress, TokenByAddress,
TokenStateByAddress,
} from 'ts/types'; } from 'ts/types';
import { colors } from 'ts/utils/colors'; import { colors } from 'ts/utils/colors';
import { errorReporter } from 'ts/utils/error_reporter'; import { errorReporter } from 'ts/utils/error_reporter';

View File

@ -1,4 +1,3 @@
import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash'; import * as _ from 'lodash';
import TextField from 'material-ui/TextField'; import TextField from 'material-ui/TextField';
import * as React from 'react'; import * as React from 'react';
@ -7,7 +6,7 @@ import { AddressInput } from 'ts/components/inputs/address_input';
import { Alert } from 'ts/components/ui/alert'; import { Alert } from 'ts/components/ui/alert';
import { LifeCycleRaisedButton } from 'ts/components/ui/lifecycle_raised_button'; import { LifeCycleRaisedButton } from 'ts/components/ui/lifecycle_raised_button';
import { RequiredLabel } from 'ts/components/ui/required_label'; import { RequiredLabel } from 'ts/components/ui/required_label';
import { AlertTypes, Token, TokenByAddress, TokenState } from 'ts/types'; import { AlertTypes, Token, TokenByAddress } from 'ts/types';
import { colors } from 'ts/utils/colors'; import { colors } from 'ts/utils/colors';
interface NewTokenFormProps { interface NewTokenFormProps {

View File

@ -5,7 +5,7 @@ import * as React from 'react';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { Blockchain } from 'ts/blockchain'; import { Blockchain } from 'ts/blockchain';
import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input'; import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input';
import { InputErrMsg, Token, TokenState, ValidatedBigNumberCallback, WebsitePaths } from 'ts/types'; import { InputErrMsg, Token, ValidatedBigNumberCallback, WebsitePaths } from 'ts/types';
import { colors } from 'ts/utils/colors'; import { colors } from 'ts/utils/colors';
interface TokenAmountInputProps { interface TokenAmountInputProps {
@ -55,6 +55,7 @@ export class TokenAmountInput extends React.Component<TokenAmountInputProps, Tok
nextProps.token.address !== this.props.token.address || nextProps.token.address !== this.props.token.address ||
nextProps.lastForceTokenStateRefetch !== this.props.lastForceTokenStateRefetch nextProps.lastForceTokenStateRefetch !== this.props.lastForceTokenStateRefetch
) { ) {
// tslint:disable-next-line:no-floating-promises
this._fetchBalanceAndAllowanceAsync(nextProps.token.address, nextProps.userAddress); this._fetchBalanceAndAllowanceAsync(nextProps.token.address, nextProps.userAddress);
} }
} }

View File

@ -21,7 +21,6 @@ import { FlashMessage } from 'ts/components/ui/flash_message';
import { GenerateOrderForm } from 'ts/containers/generate_order_form'; import { GenerateOrderForm } from 'ts/containers/generate_order_form';
import { localStorage } from 'ts/local_storage/local_storage'; import { localStorage } from 'ts/local_storage/local_storage';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { State } from 'ts/redux/reducer';
import { orderSchema } from 'ts/schemas/order_schema'; import { orderSchema } from 'ts/schemas/order_schema';
import { SchemaValidator } from 'ts/schemas/validator'; import { SchemaValidator } from 'ts/schemas/validator';
import { import {
@ -30,9 +29,7 @@ import {
Order, Order,
ProviderType, ProviderType,
ScreenWidths, ScreenWidths,
Token,
TokenByAddress, TokenByAddress,
TokenStateByAddress,
WebsitePaths, WebsitePaths,
} from 'ts/types'; } from 'ts/types';
import { colors } from 'ts/utils/colors'; import { colors } from 'ts/utils/colors';

View File

@ -5,7 +5,7 @@ import * as React from 'react';
import { Blockchain } from 'ts/blockchain'; import { Blockchain } from 'ts/blockchain';
import { SendDialog } from 'ts/components/dialogs/send_dialog'; import { SendDialog } from 'ts/components/dialogs/send_dialog';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { BlockchainCallErrs, Token, TokenState } from 'ts/types'; import { BlockchainCallErrs, Token } from 'ts/types';
import { errorReporter } from 'ts/utils/error_reporter'; import { errorReporter } from 'ts/utils/error_reporter';
import { utils } from 'ts/utils/utils'; import { utils } from 'ts/utils/utils';
@ -13,7 +13,6 @@ interface SendButtonProps {
userAddress: string; userAddress: string;
networkId: number; networkId: number;
token: Token; token: Token;
tokenState: TokenState;
dispatcher: Dispatcher; dispatcher: Dispatcher;
blockchain: Blockchain; blockchain: Blockchain;
onError: () => void; onError: () => void;
@ -69,10 +68,9 @@ export class SendButton extends React.Component<SendButtonProps, SendButtonState
}); });
this._toggleSendDialog(); this._toggleSendDialog();
const token = this.props.token; const token = this.props.token;
const tokenState = this.props.tokenState;
try { try {
await this.props.blockchain.transferAsync(token, recipient, value); await this.props.blockchain.transferAsync(token, recipient, value);
this.props.refetchTokenStateAsync(token.address); await this.props.refetchTokenStateAsync(token.address);
} catch (err) { } catch (err) {
const errMsg = `${err}`; const errMsg = `${err}`;
if (_.includes(errMsg, BlockchainCallErrs.UserHasNoAssociatedAddresses)) { if (_.includes(errMsg, BlockchainCallErrs.UserHasNoAssociatedAddresses)) {

View File

@ -107,8 +107,8 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
}; };
} }
public componentWillMount() { public componentWillMount() {
// tslint:disable-next-line:no-floating-promises
const trackedTokenAddresses = _.keys(this.state.trackedTokenStateByAddress); const trackedTokenAddresses = _.keys(this.state.trackedTokenStateByAddress);
// tslint:disable-next-line:no-floating-promises
this._fetchBalancesAndAllowancesAsync(trackedTokenAddresses); this._fetchBalancesAndAllowancesAsync(trackedTokenAddresses);
} }
public componentWillUnmount() { public componentWillUnmount() {
@ -152,6 +152,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
trackedTokenStateByAddress, trackedTokenStateByAddress,
}); });
// Fetch the actual balance/allowance. // Fetch the actual balance/allowance.
// tslint:disable-next-line:no-floating-promises
this._fetchBalancesAndAllowancesAsync(newTokenAddresses); this._fetchBalancesAndAllowancesAsync(newTokenAddresses);
} }
} }
@ -433,7 +434,6 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
blockchain={this.props.blockchain} blockchain={this.props.blockchain}
dispatcher={this.props.dispatcher} dispatcher={this.props.dispatcher}
token={token} token={token}
tokenState={tokenState}
onError={this._onSendFailed.bind(this)} onError={this._onSendFailed.bind(this)}
lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch} lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
refetchTokenStateAsync={this._refetchTokenStateAsync.bind(this, token.address)} refetchTokenStateAsync={this._refetchTokenStateAsync.bind(this, token.address)}

View File

@ -1,10 +1,6 @@
import * as _ from 'lodash'; import * as _ from 'lodash';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import { RadioButton, RadioButtonGroup } from 'material-ui/RadioButton';
import RaisedButton from 'material-ui/RaisedButton'; import RaisedButton from 'material-ui/RaisedButton';
import * as React from 'react'; import * as React from 'react';
import { Link } from 'react-router-dom';
import { Blockchain } from 'ts/blockchain'; import { Blockchain } from 'ts/blockchain';
import { ProviderPicker } from 'ts/components/top_bar/provider_picker'; import { ProviderPicker } from 'ts/components/top_bar/provider_picker';
import { DropDown } from 'ts/components/ui/drop_down'; import { DropDown } from 'ts/components/ui/drop_down';

View File

@ -1,19 +1,11 @@
import * as _ from 'lodash'; import * as _ from 'lodash';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import { RadioButton, RadioButtonGroup } from 'material-ui/RadioButton'; import { RadioButton, RadioButtonGroup } from 'material-ui/RadioButton';
import * as React from 'react'; import * as React from 'react';
import { Link } from 'react-router-dom';
import { Blockchain } from 'ts/blockchain'; import { Blockchain } from 'ts/blockchain';
import { DropDown } from 'ts/components/ui/drop_down';
import { Identicon } from 'ts/components/ui/identicon';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { ProviderType } from 'ts/types'; import { ProviderType } from 'ts/types';
import { colors } from 'ts/utils/colors'; import { colors } from 'ts/utils/colors';
import { constants } from 'ts/utils/constants'; import { constants } from 'ts/utils/constants';
import { utils } from 'ts/utils/utils';
const IDENTICON_DIAMETER = 32;
interface ProviderPickerProps { interface ProviderPickerProps {
networkId: number; networkId: number;

View File

@ -14,9 +14,8 @@ import { Identicon } from 'ts/components/ui/identicon';
import { DocsInfo } from 'ts/pages/documentation/docs_info'; import { DocsInfo } from 'ts/pages/documentation/docs_info';
import { NestedSidebarMenu } from 'ts/pages/shared/nested_sidebar_menu'; import { NestedSidebarMenu } from 'ts/pages/shared/nested_sidebar_menu';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { DocsMenu, MenuSubsectionsBySection, ProviderType, Styles, TypeDocNode, WebsitePaths } from 'ts/types'; import { DocsMenu, MenuSubsectionsBySection, ProviderType, Styles, WebsitePaths } from 'ts/types';
import { colors } from 'ts/utils/colors'; import { colors } from 'ts/utils/colors';
import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants'; import { constants } from 'ts/utils/constants';
interface TopBarProps { interface TopBarProps {
@ -189,7 +188,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
</div> </div>
)} )}
{this.props.blockchainIsLoaded && ( {this.props.blockchainIsLoaded && (
<div className="col col-5"> <div className="sm-hide xs-hide col col-5">
<ProviderDisplay <ProviderDisplay
dispatcher={this.props.dispatcher} dispatcher={this.props.dispatcher}
userAddress={this.props.userAddress} userAddress={this.props.userAddress}

View File

@ -1,9 +1,7 @@
import * as _ from 'lodash'; import * as _ from 'lodash';
import Menu from 'material-ui/Menu';
import Popover, { PopoverAnimationVertical } from 'material-ui/Popover'; import Popover, { PopoverAnimationVertical } from 'material-ui/Popover';
import * as React from 'react'; import * as React from 'react';
import { MaterialUIPosition, Styles, WebsitePaths } from 'ts/types'; import { MaterialUIPosition } from 'ts/types';
import { colors } from 'ts/utils/colors';
const CHECK_CLOSE_POPOVER_INTERVAL_MS = 300; const CHECK_CLOSE_POPOVER_INTERVAL_MS = 300;
const DEFAULT_STYLE = { const DEFAULT_STYLE = {

View File

@ -6,14 +6,7 @@ import { Blockchain } from 'ts/blockchain';
import { GenerateOrderForm as GenerateOrderFormComponent } from 'ts/components/generate_order/generate_order_form'; import { GenerateOrderForm as GenerateOrderFormComponent } from 'ts/components/generate_order/generate_order_form';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { State } from 'ts/redux/reducer'; import { State } from 'ts/redux/reducer';
import { import { BlockchainErrs, HashData, SideToAssetToken, SignatureData, TokenByAddress } from 'ts/types';
BlockchainErrs,
HashData,
SideToAssetToken,
SignatureData,
TokenByAddress,
TokenStateByAddress,
} from 'ts/types';
interface GenerateOrderFormProps { interface GenerateOrderFormProps {
blockchain: Blockchain; blockchain: Blockchain;

View File

@ -6,16 +6,7 @@ import { Dispatch } from 'redux';
import { Portal as PortalComponent, PortalAllProps as PortalComponentAllProps } from 'ts/components/portal'; import { Portal as PortalComponent, PortalAllProps as PortalComponentAllProps } from 'ts/components/portal';
import { Dispatcher } from 'ts/redux/dispatcher'; import { Dispatcher } from 'ts/redux/dispatcher';
import { State } from 'ts/redux/reducer'; import { State } from 'ts/redux/reducer';
import { import { BlockchainErrs, HashData, Order, ProviderType, ScreenWidths, Side, TokenByAddress } from 'ts/types';
BlockchainErrs,
HashData,
Order,
ProviderType,
ScreenWidths,
Side,
TokenByAddress,
TokenStateByAddress,
} from 'ts/types';
import { constants } from 'ts/utils/constants'; import { constants } from 'ts/utils/constants';
interface ConnectedState { interface ConnectedState {

View File

@ -13,7 +13,6 @@ import {
SignatureData, SignatureData,
Token, Token,
TokenByAddress, TokenByAddress,
TokenStateByAddress,
} from 'ts/types'; } from 'ts/types';
export class Dispatcher { export class Dispatcher {

View File

@ -13,8 +13,6 @@ import {
SideToAssetToken, SideToAssetToken,
SignatureData, SignatureData,
TokenByAddress, TokenByAddress,
TokenState,
TokenStateByAddress,
} from 'ts/types'; } from 'ts/types';
import { utils } from 'ts/utils/utils'; import { utils } from 'ts/utils/utils';

View File

@ -25,10 +25,6 @@ export interface TokenState {
balance: BigNumber; balance: BigNumber;
} }
export interface TokenStateByAddress {
[address: string]: TokenState;
}
export interface AssetToken { export interface AssetToken {
address?: string; address?: string;
amount?: BigNumber; amount?: BigNumber;

View File

@ -87,7 +87,7 @@ export class Web3Wrapper {
public updatePrevUserAddress(userAddress: string) { public updatePrevUserAddress(userAddress: string) {
this._prevUserAddress = userAddress; this._prevUserAddress = userAddress;
} }
public async startEmittingNetworkConnectionAndUserBalanceStateAsync() { public startEmittingNetworkConnectionAndUserBalanceState() {
if (!_.isUndefined(this._watchNetworkAndBalanceIntervalId)) { if (!_.isUndefined(this._watchNetworkAndBalanceIntervalId)) {
return; // we are already emitting the state return; // we are already emitting the state
} }