2017-12-21 18:08:54 -03:00
|
|
|
import { connect } from 'react-redux';
|
2019-09-25 08:59:47 -04:00
|
|
|
import {
|
|
|
|
selectBalance,
|
|
|
|
selectTotalBalance,
|
|
|
|
selectClaimsBalance,
|
|
|
|
selectSupportsBalance,
|
|
|
|
selectTipsBalance,
|
|
|
|
} from 'lbry-redux';
|
2019-11-22 16:13:00 -05:00
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
2020-02-21 12:23:04 -05:00
|
|
|
import { selectClaimedRewards, selectSyncHash } from 'lbryinc';
|
2017-12-21 18:08:54 -03:00
|
|
|
import WalletBalance from './view';
|
2017-08-17 16:19:29 -04:00
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
balance: selectBalance(state),
|
2019-09-25 08:59:47 -04:00
|
|
|
totalBalance: selectTotalBalance(state),
|
2019-09-30 17:48:30 -04:00
|
|
|
claimsBalance: selectClaimsBalance(state) || 0,
|
|
|
|
supportsBalance: selectSupportsBalance(state) || 0,
|
|
|
|
tipsBalance: selectTipsBalance(state) || 0,
|
|
|
|
rewards: selectClaimedRewards(state),
|
2020-02-21 12:23:04 -05:00
|
|
|
hasSynced: Boolean(selectSyncHash(state)),
|
2017-08-17 16:19:29 -04:00
|
|
|
});
|
|
|
|
|
2019-11-22 16:13:00 -05:00
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
{
|
|
|
|
doOpenModal,
|
|
|
|
}
|
|
|
|
)(WalletBalance);
|