Skip to content

Commit

Permalink
Merge pull request #10036 from hicommonwealth/release/v1.7.4-x
Browse files Browse the repository at this point in the history
Release/v1.7.4-6
  • Loading branch information
ilijabojanovic authored Nov 26, 2024
2 parents 70173dc + e8d667e commit 77b9df4
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions libs/model/src/community/UpdateCustomDomain.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function UpdateCustomDomain(): Command<
}

const magicRequestDomain = await fetch(
`https://api.magic.link/v1/api/magic_client/domain/allowlist/add`,
`https://api.magic.link/v2/api/magic_client/domain/allowlist/add`,
{
method: 'POST',
headers: {
Expand All @@ -55,7 +55,7 @@ export function UpdateCustomDomain(): Command<
);

const magicRequestRedirectUrl = await fetch(
`https://api.magic.link/v1/api/magic_client/redirect_url/allowlist/add`,
`https://api.magic.link/v2/api/magic_client/redirect_url/allowlist/add`,
{
method: 'POST',
headers: {
Expand All @@ -77,14 +77,14 @@ export function UpdateCustomDomain(): Command<
magicResponseDomain.status === 'failed' &&
magicResponseDomain.error_code != 'ALREADY_WHITELISTED_DOMAIN'
) {
throw new AppError(magicResponseDomain);
throw new AppError(magicResponseDomain.message);
}

if (
magicResponseRedirectUrl.status === 'failed' &&
magicResponseRedirectUrl.error_code != 'ALREADY_WHITELISTED_DOMAIN'
) {
throw new AppError(magicResponseRedirectUrl);
throw new AppError(magicResponseRedirectUrl.message);
}

response = await fetch(url, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface CreateCommentProps {
communityId: string;
address: string;
threadId: number;
threadMsgId: string;
threadMsgId: string | null;
unescapedText: string;
parentCommentId: number | null;
parentCommentMsgId: string | null;
Expand All @@ -31,9 +31,9 @@ export const buildCreateCommentInput = async ({
parentCommentMsgId = null,
}: CreateCommentProps) => {
const canvasSignedData = await signComment(address, {
thread_id: threadMsgId,
thread_id: threadMsgId ?? null,
body: unescapedText,
parent_comment_id: parentCommentMsgId,
parent_comment_id: parentCommentMsgId ?? null,
});
return {
thread_id: threadId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const buildCreateCommentReactionInput = async ({
commentMsgId,
}: CreateReactionProps) => {
const canvasSignedData = await signCommentReaction(address, {
comment_id: commentMsgId,
comment_id: commentMsgId ?? null,
like: reactionType === 'like',
});

Expand All @@ -41,7 +41,7 @@ export const buildCreateCommentReactionInput = async ({
jwt: userStore.getState().jwt,
...toCanvasSignedDataApiArgs(canvasSignedData),
comment_id: commentId,
comment_msg_id: commentMsgId,
comment_msg_id: commentMsgId ?? null,
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const buildDeleteCommentReactionInput = async ({
reactionId,
}: DeleteReactionProps) => {
const canvasSignedData = await signDeleteCommentReaction(address, {
comment_id: commentMsgId,
comment_id: commentMsgId ?? null,
});
return {
author_community_id: communityId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export const buildCreateThreadReactionInput = async ({
threadMsgId,
}: CreateReactionProps) => {
const canvasSignedData = await signThreadReaction(address, {
thread_id: threadMsgId,
thread_id: threadMsgId ?? null,
like: reactionType === 'like',
});
return {
author_community_id: userStore.getState().activeAccount?.community?.id,
thread_id: threadId,
thread_msg_id: threadMsgId,
thread_msg_id: threadMsgId ?? null,
community_id: app.chain.id,
address,
reaction: reactionType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const buildDeleteThreadReactionInput = async ({
reactionId,
}: DeleteReactionProps) => {
const canvasSignedData = await signDeleteThreadReaction(address, {
thread_id: threadMsgId,
thread_id: threadMsgId ?? null,
});

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const buildDeleteThreadInput = async (
thread: Thread,
) => {
const canvasSignedData = await signDeleteThread(address, {
thread_id: thread.canvasMsgId,
thread_id: thread.canvasMsgId ?? null,
});
return {
thread_id: thread.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const CreateComment = ({
communityId,
address: user.activeAccount!.address,
threadId: rootThread.id,
threadMsgId: rootThread.canvasMsgId!,
threadMsgId: rootThread.canvasMsgId ?? null,
unescapedText: serializeDelta(contentDelta),
parentCommentId: parentCommentId ?? null,
parentCommentMsgId: parentCommentMsgId ?? null,
Expand Down

0 comments on commit 77b9df4

Please sign in to comment.