Removes ability to create comments anonymously

This commit is contained in:
Oleg Silkin 2020-02-18 17:37:54 -05:00 committed by Sean Yesmunt
parent 73d6fd9e90
commit e1bc577efd
2 changed files with 4 additions and 6 deletions

View file

@ -1,7 +1,7 @@
// @flow
import React, { useEffect, Fragment } from 'react';
import { CHANNEL_NEW, CHANNEL_ANONYMOUS } from 'constants/claim';
import { CHANNEL_NEW } from 'constants/claim';
import { buildURI, isURIValid } from 'lbry-redux';
import ChannelCreate from 'component/channelCreate';
import Card from 'component/common/card';
@ -21,7 +21,7 @@ function ChannelForm(props: Props) {
// Every time the channel or name changes, resolve the uris to find winning bid amounts
useEffect(() => {
// If they are midway through a channel creation, treat it as anonymous until it completes
const channelName = channel === CHANNEL_ANONYMOUS || channel === CHANNEL_NEW ? '' : channel;
const channelName = channel === CHANNEL_NEW ? '' : channel;
// We are only going to store the full uri, but we need to resolve the uri with and without the channel name
let uri;

View file

@ -1,5 +1,5 @@
// @flow
import { CHANNEL_NEW, CHANNEL_ANONYMOUS } from 'constants/claim';
import { CHANNEL_NEW } from 'constants/claim';
import React, { Fragment } from 'react';
import { FormField } from 'component/common/form';
import ChannelCreate from 'component/channelCreate';
@ -12,7 +12,6 @@ type Props = {
createChannel: (string, number) => Promise<any>,
fetchChannelListMine: () => void,
fetchingChannels: boolean,
hideAnon: boolean,
includeNew?: boolean,
label?: string,
injected?: Array<string>,
@ -71,7 +70,7 @@ class ChannelSection extends React.PureComponent<Props, State> {
render() {
const channel = this.state.addingChannel ? 'new' : this.props.channel;
const { fetchingChannels, channels = [], hideAnon, label, injected = [] } = this.props;
const { fetchingChannels, channels = [], label, injected = [] } = this.props;
const { addingChannel } = this.state;
return (
@ -83,7 +82,6 @@ class ChannelSection extends React.PureComponent<Props, State> {
onChange={this.handleChannelChange}
value={channel}
>
{!hideAnon && <option value={CHANNEL_ANONYMOUS}>{__('Anonymous')}</option>}
{channels &&
channels.map(({ name, claim_id: claimId }) => (
<option key={claimId} value={name}>