<commit_before>import React, {Component, PropTypes} from "react";
import AltContainer from "alt/AltContainer"
import connectToStores from "alt/utils/connectToStores"

import alt from "alt-instance"
import WalletDb from "stores/WalletDb";
import PrivateKeyStore from "stores/PrivateKeyStore";
import BalanceClaimStore from "stores/BalanceClaimStore";
import ImportKeysStore from "stores/ImportKeysStore"
import BalanceClaimActions from "actions/BalanceClaimActions"
import FormattedAsset from "components/Utility/FormattedAsset";
import LoadingIndicator from "components/LoadingIndicator";
import ExistingAccountsAccountSelect from "components/Forms/ExistingAccountsAccountSelect";
import WalletActions from "actions/WalletActions";
import WalletUnlockActions from "actions/WalletUnlockActions";
import notify from "actions/NotificationActions";
import cname from "classnames";
import lookup from "chain/lookup";
import v from "chain/serializer_validation";
import ChainTypes from "components/Utility/ChainTypes"

var TRACE = false

//BindToChainState({keep_updating: true})
export default class BalanceClaim extends Component{
    // static propTypes = {
    //     balances: ChainTypes.ChainAddressBalances
    // }
    render() {
        return <BalanceClaimImpl/>
    }
}

@connectToStores
class BalanceClaimImpl extends Component {
    static contextTypes = {router: React.PropTypes.func.isRequired}
    constructor() {
        super();
        this.state = this._getInitialState();
    }
    
    _getInitialState() {
        return {
            claim_account_name: null,
            selected_balance_claims: null,
            checked: new Map()
        };
    }
    
    reset() {
        this.setState(this._getInitialState())
    }
    
    static getStores() {
        return [BalanceClaimStore, ImportKeysStore]
    }
    
    static getPropsFromStores() {
        //DEBUG console.log('... BalanceClaimStore.getState()',BalanceClaimStore.getState())
        var props = BalanceClaimStore.getState()
        
        return props
    }
    
    componentWillMount() {
        //DEBUG console.log('... BalanceClaim componentWillMount')
        BalanceClaimActions.willMount()
        BalanceClaimActions.refreshBalanceClaims()
        BalanceClaimActions.loadMyAccounts()
    }
    
    componentWillUnmount() {
        BalanceClaimActions.willUnmount()
    }
    
    componentWillReceiveProps() {
        //console.log('... BalanceClaim componentWillReceiveProps')
        if(this.props.balance_claim_error) {<commit_msg>Removed unused chane state code from legacy balance claim component #235<commit_after>import React, {Component, PropTypes} from "react";
import AltContainer from "alt/AltContainer"
import connectToStores from "alt/utils/connectToStores"

import alt from "alt-instance"
import WalletDb from "stores/WalletDb";
import PrivateKeyStore from "stores/PrivateKeyStore";
import BalanceClaimStore from "stores/BalanceClaimStore";
import ImportKeysStore from "stores/ImportKeysStore"
import BalanceClaimActions from "actions/BalanceClaimActions"
import FormattedAsset from "components/Utility/FormattedAsset";
import LoadingIndicator from "components/LoadingIndicator";
import ExistingAccountsAccountSelect from "components/Forms/ExistingAccountsAccountSelect";
import WalletActions from "actions/WalletActions";
import WalletUnlockActions from "actions/WalletUnlockActions";
import notify from "actions/NotificationActions";
import cname from "classnames";
import lookup from "chain/lookup";
import v from "chain/serializer_validation";
import ChainTypes from "components/Utility/ChainTypes"

var TRACE = false

@connectToStores
export default class BalanceClaim extends Component {
    
    constructor() {
        super();
        this.state = this._getInitialState();
    }
    
    _getInitialState() {
        return {
            claim_account_name: null,
            selected_balance_claims: null,
            checked: new Map()
        };
    }
    
    reset() {
        this.setState(this._getInitialState())
    }
    
    static getStores() {
        return [BalanceClaimStore, ImportKeysStore]
    }
    
    static getPropsFromStores() {
        //DEBUG console.log('... BalanceClaimStore.getState()',BalanceClaimStore.getState())
        var props = BalanceClaimStore.getState()
        
        return props
    }
    
    componentWillMount() {
        //DEBUG console.log('... BalanceClaim componentWillMount')
        
        BalanceClaimActions.willMount()
        BalanceClaimActions.refreshBalanceClaims()
        BalanceClaimActions.loadMyAccounts()
    }
    
    componentWillUnmount() {
        BalanceClaimActions.willUnmount()
    }
    
    componentWillReceiveProps() {
        //console.log('... BalanceClaim componentWillReceiveProps')
        if(this.props.balance_claim_error) {
{'fraction_non_alphanumeric': 0.08953680727874276, 'fraction_numerical': 0.0006203473945409429, 'mean_word_length': 3.5804924242424243, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2755343', 'n_tokens_mistral': 1289, 'n_tokens_neox': 1282, 'n_words': 293}