From 1f0db51a20c7c0bd195947241e4ed2298a22e52e Mon Sep 17 00:00:00 2001 From: ikprk <168457495+ikprk@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:53:31 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Skip=20metadata=20update=20on=20?= =?UTF-8?q?internal=20account=20(#54)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/_comments/Comment/InternalComment.tsx | 9 +++------ .../src/providers/transactions/transactions.hooks.ts | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/atlas/src/components/_comments/Comment/InternalComment.tsx b/packages/atlas/src/components/_comments/Comment/InternalComment.tsx index cec6e9e9fa..c9ba62879a 100644 --- a/packages/atlas/src/components/_comments/Comment/InternalComment.tsx +++ b/packages/atlas/src/components/_comments/Comment/InternalComment.tsx @@ -98,7 +98,6 @@ export const InternalComment: FC = ({ onEditClick, onDeleteClick, onReactionClick, - onOnBoardingPopoverOpen, reactions, onReplyClick, replyAvatars, @@ -169,15 +168,13 @@ export const InternalComment: FC = ({ const handleCommentReactionClick = useCallback( async (reactionId: CommentReaction) => { + onReactionClick?.(reactionId) + if (!reactionPopoverDismissed) { - setTempReactionId(reactionId) - await onOnBoardingPopoverOpen?.(reactionId) popoverRef.current?.show() - } else { - onReactionClick?.(reactionId) } }, - [onOnBoardingPopoverOpen, onReactionClick, reactionPopoverDismissed] + [onReactionClick, reactionPopoverDismissed] ) const sortedReactions = reactions && [...reactions].sort((a, b) => (b.count || 0) - (a.count || 0)) diff --git a/packages/atlas/src/providers/transactions/transactions.hooks.ts b/packages/atlas/src/providers/transactions/transactions.hooks.ts index 2ed5db69d2..b06e1f75a4 100644 --- a/packages/atlas/src/providers/transactions/transactions.hooks.ts +++ b/packages/atlas/src/providers/transactions/transactions.hooks.ts @@ -87,7 +87,7 @@ export const useTransaction = (): HandleTransactionFn => { return false } - if (isSignerMetadataOutdated && WALLETS_WITH_METADATA.includes(wallet?.extensionName ?? '')) { + if (isSignerMetadataOutdated && wallet?.extensionName && WALLETS_WITH_METADATA.includes(wallet.extensionName)) { await new Promise((resolve) => { openOngoingTransactionModal({ title: 'Update Wallet Metadata',