lbry-desktop/ui/component/walletBalance/index.js
2020-02-21 13:42:17 -05:00

28 lines
747 B
JavaScript

import { connect } from 'react-redux';
import {
selectBalance,
selectTotalBalance,
selectClaimsBalance,
selectSupportsBalance,
selectTipsBalance,
} from 'lbry-redux';
import { doOpenModal } from 'redux/actions/app';
import { selectClaimedRewards, selectSyncHash } from 'lbryinc';
import WalletBalance from './view';
const select = state => ({
balance: selectBalance(state),
totalBalance: selectTotalBalance(state),
claimsBalance: selectClaimsBalance(state) || 0,
supportsBalance: selectSupportsBalance(state) || 0,
tipsBalance: selectTipsBalance(state) || 0,
rewards: selectClaimedRewards(state),
hasSynced: Boolean(selectSyncHash(state)),
});
export default connect(
select,
{
doOpenModal,
}
)(WalletBalance);