2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2020-12-30 23:31:03 +01:00
|
|
|
import {
|
|
|
|
selectBalance,
|
|
|
|
selectClaimsBalance,
|
|
|
|
selectSupportsBalance,
|
|
|
|
selectTipsBalance,
|
|
|
|
selectIsFetchingUtxoCounts,
|
|
|
|
selectUtxoCounts,
|
|
|
|
selectIsConsolidatingUtxos,
|
2021-01-27 17:00:31 +01:00
|
|
|
selectIsMassClaimingTips,
|
|
|
|
selectPendingConsolidateTxid,
|
|
|
|
selectPendingMassClaimTxid,
|
2021-10-17 10:36:14 +02:00
|
|
|
} from 'redux/selectors/wallet';
|
|
|
|
import { doFetchUtxoCounts, doUtxoConsolidate } from 'redux/actions/wallet';
|
2019-11-22 22:13:00 +01:00
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
2020-10-02 17:03:25 +02:00
|
|
|
import { selectSyncHash } from 'redux/selectors/sync';
|
2020-06-15 22:33:03 +02:00
|
|
|
import { selectClaimedRewards } from 'redux/selectors/rewards';
|
2017-12-21 22:08:54 +01:00
|
|
|
import WalletBalance from './view';
|
2017-08-17 22:19:29 +02:00
|
|
|
|
2021-10-17 10:36:14 +02:00
|
|
|
const select = (state) => ({
|
2017-08-17 22:19:29 +02:00
|
|
|
balance: selectBalance(state),
|
2019-09-30 23:48:30 +02:00
|
|
|
claimsBalance: selectClaimsBalance(state) || 0,
|
|
|
|
supportsBalance: selectSupportsBalance(state) || 0,
|
|
|
|
tipsBalance: selectTipsBalance(state) || 0,
|
|
|
|
rewards: selectClaimedRewards(state),
|
2020-02-21 18:23:04 +01:00
|
|
|
hasSynced: Boolean(selectSyncHash(state)),
|
2020-12-30 23:31:03 +01:00
|
|
|
fetchingUtxoCounts: selectIsFetchingUtxoCounts(state),
|
|
|
|
consolidatingUtxos: selectIsConsolidatingUtxos(state),
|
2021-01-27 17:00:31 +01:00
|
|
|
massClaimingTips: selectIsMassClaimingTips(state),
|
2020-12-30 23:31:03 +01:00
|
|
|
utxoCounts: selectUtxoCounts(state),
|
2021-01-27 17:00:31 +01:00
|
|
|
consolidateIsPending: selectPendingConsolidateTxid(state),
|
|
|
|
massClaimIsPending: selectPendingMassClaimTxid(state),
|
2017-08-17 22:19:29 +02:00
|
|
|
});
|
|
|
|
|
2020-06-01 19:03:19 +02:00
|
|
|
export default connect(select, {
|
|
|
|
doOpenModal,
|
2020-12-30 23:31:03 +01:00
|
|
|
doFetchUtxoCounts,
|
|
|
|
doUtxoConsolidate,
|
2020-06-01 19:03:19 +02:00
|
|
|
})(WalletBalance);
|