diff options
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/ts/components/wallet.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/components/wallet.tsx b/packages/website/ts/components/wallet.tsx index a3ba92ee1..738f18330 100644 --- a/packages/website/ts/components/wallet.tsx +++ b/packages/website/ts/components/wallet.tsx @@ -144,13 +144,13 @@ export class Wallet extends React.Component<WalletProps, WalletState> { // Add placeholder entry for this token to the state, since fetching the // balance/allowance is asynchronous const trackedTokenStateByAddress = this.state.trackedTokenStateByAddress; - for (const tokenAddress of newTokenAddresses) { + _.each(newTokenAddresses, (tokenAddress: string) => { trackedTokenStateByAddress[tokenAddress] = { balance: new BigNumber(0), allowance: new BigNumber(0), isLoaded: false, }; - } + }); this.setState({ trackedTokenStateByAddress, }); @@ -161,7 +161,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> { } public render() { const isReadyToRender = this.props.blockchainIsLoaded && this.props.blockchainErr === BlockchainErrs.NoError; - return <div style={styles.wallet}>{isReadyToRender ? this._renderRows() : <div />}</div>; + return <div style={styles.wallet}>{isReadyToRender && this._renderRows()}</div>; } private _renderRows() { return ( |