Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default Component => compose(
connect(null, { assetsRefreshState, transactionsRefreshState }),
withHandlers({
refreshAccount: (ownProps) => async () => {
try {
await ownProps.assetsRefreshState();
await ownProps.transactionsRefreshState();
} catch (error) {
// TODO more granular error messaging depending on offline status
}
},
}),
)(Component);