Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const passDownProps = omit(this.props, DATA_PROP, PROGRESS_PROP)
return
}
getCallbackState = props => ({
data: props[DATA_PROP],
error: props[ERROR_PROP],
})
getCallbackProps = props =>
omit(props, DATA_PROP, ERROR_PROP, PROGRESS_PROP)
}
return compose(
withProgress(actions, { propName: PROGRESS_PROP }),
withData(actions, mapDataToProps),
withError(actions, mapErrorToProps),
)(WrappedComponent)
}
}
const passDownProps = omit(this.props, DATA_PROP, PROGRESS_PROP);
return ;
}
getCallbackState = (props) => {
return { data: props[DATA_PROP], error: props[ERROR_PROP] };
}
getCallbackProps = (props) => {
return omit(props, DATA_PROP, ERROR_PROP, PROGRESS_PROP);
}
}
return compose(
withProgress(actions, { propName: PROGRESS_PROP }),
withData(actions, mapDataToProps),
withError(actions, mapErrorToProps)
)(WrappedComponent);
};
}
export default function withBalancesData(mapBalancesDataToProps: Function) {
return withData(balancesActions, mapBalancesDataToProps)
}
import { compose } from 'recompose';
import { withData } from 'spunky';
import withUnmountReset from 'shared/hocs/withUnmountReset';
import Register from './Register';
import createAccountActions from '../../actions/createAccountActions';
const mapAccountDataToProps = (account) => ({ account });
export default compose(
withUnmountReset(createAccountActions),
withData(createAccountActions, mapAccountDataToProps)
)(Register);
export default function withInvocationPrompt(balancesActions) {
return compose(
withNetworkData(),
withData(authActions, mapAuthDataToProps),
withCall(balancesActions),
withNullLoader(balancesActions),
withData(balancesActions, mapBalancesDataToProps),
withPrompt(InvocationPrompt, (props) => ({
title: null,
renderFooter: () =>
}))
);
}
export default function makeGetPublicKey(publicKeyActions) {
return compose(
withClean(publicKeyActions),
withData(authActions, mapAuthDataToProps),
withInitialCall(publicKeyActions, ({ wif }) => ({ wif })),
withNullLoader(publicKeyActions),
withData(publicKeyActions, mapPublicKeyDataToProps)
)(GetPublicKey);
}
import { compose } from 'recompose';
import { withData } from 'spunky';
import authActions from 'auth/actions/authActions';
import Wallets from './Wallets';
const mapAuthDataToProps = (account) => ({ account });
export default compose(withData(authActions, mapAuthDataToProps))(Wallets);
export default function withTokensData(key: string = 'tokens') {
return compose(
withData(settingsActions, settings => ({ [key]: settings.tokens })),
withRecall(icoTokensActions, ['tokens']),
)
}