lbry-desktop/ui/util/toast-wrappers.js
infinite-persistence dcc66f211e Reject reaction if already done from another channel.
## Issue
1075, spam prevention.

## Approach
- When making a reaction, fetch reactions for all my channels for the particular comment id, and reject the reaction is any was found.
- Report the channel name in the toast so that user can at least know which channel to select in order to undo the reaction.
2022-05-02 16:03:53 -04:00

19 lines
517 B
JavaScript

// @flow
import { doToast } from 'redux/actions/notifications';
export function doFailedSignatureToast(dispatch: Dispatch, channelName: string) {
dispatch(
doToast({
message: __('Unable to verify signature.'),
subMessage: channelName,
isError: true,
})
);
}
export function devToast(dispatch: Dispatch, msg: string) {
// @if process.env.NODE_ENV!='production'
console.error(msg); // eslint-disable-line
dispatch(doToast({ isError: true, message: `DEV: ${msg}` }));
// @endif
}