Skip to content

Commit

Permalink
fix(trading): update team from private back to public (#6970)
Browse files Browse the repository at this point in the history
  • Loading branch information
asiaznik authored Sep 19, 2024
1 parent d547637 commit 52e6fa4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions apps/trading/client-pages/competitions/team-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import {
FormGroup,
Input,
TradingInputError,
TradingCheckbox,
TextArea,
Button,
Intent,
VegaIcon,
VegaIconNames,
Switch,
} from '@vegaprotocol/ui-toolkit';
import { URL_REGEX, isValidVegaPublicKey } from '@vegaprotocol/utils';

Expand Down Expand Up @@ -68,7 +68,7 @@ const prepareTransaction = (
name: fields.name.trim(),
teamUrl: fields.url,
avatarUrl: fields.avatarUrl,
closed: fields.private,
closed: fields.private || 'ptr-to-false',
allowList: fields.private
? parseAllowListText(fields.allowList)
: [],
Expand Down Expand Up @@ -199,14 +199,16 @@ export const TeamForm = ({
control={control}
render={({ field }) => {
return (
<TradingCheckbox
label={t('Make team private')}
checked={field.value}
onCheckedChange={(value) => {
field.onChange(value);
}}
data-testid="team-private-checkbox"
/>
<div className="text-xs">
<Switch
checked={field.value}
labelText={t('Make team private')}
onCheckedChange={(value) => {
field.onChange(value);
}}
data-testid="team-private-checkbox"
/>
</div>
);
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion libs/wallet/src/transaction-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ export type UpdateReferralSet = {
name: string;
teamUrl?: string;
avatarUrl?: string;
closed: boolean;
closed: boolean | 'ptr-to-false';
allowList: string[];
};
};
Expand Down

0 comments on commit 52e6fa4

Please sign in to comment.