Tom Kirkpatrick
6 years ago
6 changed files with 64 additions and 47 deletions
@ -0,0 +1,27 @@ |
|||
import { connect } from 'react-redux' |
|||
import { Request } from 'components/Request' |
|||
import { tickerSelectors, setCurrency, setFiatTicker } from 'reducers/ticker' |
|||
import { createInvoice } from 'reducers/invoice' |
|||
|
|||
const mapStateToProps = state => ({ |
|||
cryptoName: tickerSelectors.cryptoName(state), |
|||
currentTicker: tickerSelectors.currentTicker(state), |
|||
cryptoCurrency: state.ticker.currency, |
|||
cryptoCurrencyTicker: tickerSelectors.currencyName(state), |
|||
cryptoCurrencies: state.ticker.currencyFilters, |
|||
fiatCurrencies: state.ticker.fiatTickers, |
|||
fiatCurrency: state.ticker.fiatTicker, |
|||
isProcessing: state.invoice.invoiceLoading, |
|||
payReq: state.invoice.invoice |
|||
}) |
|||
|
|||
const mapDispatchToProps = { |
|||
createInvoice, |
|||
setCryptoCurrency: setCurrency, |
|||
setFiatCurrency: setFiatTicker |
|||
} |
|||
|
|||
export default connect( |
|||
mapStateToProps, |
|||
mapDispatchToProps |
|||
)(Request) |
Loading…
Reference in new issue