lbry-desktop/ui/redux/selectors/coinSwap.js
infinite-persistence b2630f6f21 Save entire swap info instead of just the address.
- Users should be able to see the entered and promised amount, otherwise they might forget how much to send over.
- This change also prepares for the future upgrade to support multiple coins.
2021-04-13 14:02:25 -04:00

8 lines
302 B
JavaScript

// @flow
import { createSelector } from 'reselect';
const selectState = (state: { coinSwap: CoinSwapState }) => state.coinSwap || {};
export const selectCoinSwaps = createSelector(selectState, (state: CoinSwapState) => {
return state.coinSwaps.filter((x) => typeof x.sendAddress === 'string');
});