lbry-desktop/ui/js/page/wallet/index.js

42 lines
1.1 KiB
JavaScript
Raw Normal View History

2017-04-22 15:17:01 +02:00
import React from 'react'
import {
connect
} from 'react-redux'
import {
doCloseModal,
} from 'actions/app'
import {
doGetNewAddress,
2017-04-22 16:01:57 +02:00
doCheckAddressIsMine,
2017-04-22 15:17:01 +02:00
} from 'actions/wallet'
import {
selectCurrentPage,
} from 'selectors/app'
import {
selectBalance,
selectTransactions,
selectTransactionItems,
selectIsFetchingTransactions,
selectReceiveAddress,
selectGettingNewAddress,
} from 'selectors/wallet'
import WalletPage from './view'
const select = (state) => ({
currentPage: selectCurrentPage(state),
balance: selectBalance(state),
transactions: selectTransactions(state),
fetchingTransactions: selectIsFetchingTransactions(state),
transactionItems: selectTransactionItems(state),
receiveAddress: selectReceiveAddress(state),
gettingNewAddress: selectGettingNewAddress(state),
})
const perform = (dispatch) => ({
closeModal: () => dispatch(doCloseModal()),
getNewAddress: () => dispatch(doGetNewAddress()),
2017-04-22 16:01:57 +02:00
checkAddressIsMine: (address) => dispatch(doCheckAddressIsMine(address))
2017-04-22 15:17:01 +02:00
})
export default connect(select, perform)(WalletPage)