From 61ae481a035612ba1699f3e7d70c0069b1823ccc Mon Sep 17 00:00:00 2001 From: James Grugett Date: Wed, 10 Aug 2022 18:42:44 -0500 Subject: [PATCH 01/10] Document cancel bet --- docs/docs/api.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/api.md b/docs/docs/api.md index 48564cb3..e4936418 100644 --- a/docs/docs/api.md +++ b/docs/docs/api.md @@ -528,6 +528,10 @@ $ curl https://manifold.markets/api/v0/bet -X POST -H 'Content-Type: application "contractId":"{...}"}' ``` +### `POST /v0/bet/cancel/[id]` + +Cancel the limit order of a bet with the specified id. If the bet was unfilled, it will be cancelled so that no other bets will match with it. This is action irreversable. + ### `POST /v0/market` Creates a new market on behalf of the authorized user. From 6e93f11a5949147876a13ff6f95dd7471f5ef9bc Mon Sep 17 00:00:00 2001 From: James Grugett Date: Thu, 11 Aug 2022 00:00:40 -0500 Subject: [PATCH 02/10] Fix bolded group chat not getting unbolded --- web/components/groups/group-chat.tsx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/web/components/groups/group-chat.tsx b/web/components/groups/group-chat.tsx index 62d327f2..0f9e8955 100644 --- a/web/components/groups/group-chat.tsx +++ b/web/components/groups/group-chat.tsx @@ -21,6 +21,7 @@ import { Content, useTextEditor } from 'web/components/editor' import { useUnseenPreferredNotifications } from 'web/hooks/use-notifications' import { ChevronDownIcon, UsersIcon } from '@heroicons/react/outline' import { setNotificationsAsSeen } from 'web/pages/notifications' +import { usePrivateUser } from 'web/hooks/use-user' export function GroupChat(props: { messages: Comment[] @@ -29,6 +30,9 @@ export function GroupChat(props: { tips: CommentTipMap }) { const { messages, user, group, tips } = props + + const privateUser = usePrivateUser(user?.id) + const { editor, upload } = useTextEditor({ simple: true, placeholder: 'Send a message', @@ -175,6 +179,15 @@ export function GroupChat(props: { )} + + {privateUser && ( +