Skip to content

chore(react-native): remove unused ActivityDetailSheet component / add missing translation keys - #1211

Open
lealobanov wants to merge 14 commits into
devfrom
1195-activity-detail-page
Open

chore(react-native): remove unused ActivityDetailSheet component / add missing translation keys#1211
lealobanov wants to merge 14 commits into
devfrom
1195-activity-detail-page

Conversation

@lealobanov

@lealobanov lealobanov commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

Closes #1195
Screenshot 2026-02-24 at 1 30 54 AM

Note: do not merge until the mock data is removed

🔗 Related Issues

Linked automatically from the branch name. If incorrect, edit:

Self-Checklist

  • I read through my own diff
  • I ran at least one manual check
  • No mock / debug code left in production code

📝 Description

📸 Screenshots/Videos

@github-actions

github-actions Bot commented Jan 25, 2026

Copy link
Copy Markdown

PR Summary

Addressed multiple issues related to transaction activity monitoring in the browser extension and internationalization in the React Native app. Key changes include:

  • Extension transaction monitoring fixes: Resolved issues where transactions would get stuck in pending status after service worker restarts by implementing resumePendingTransactions to re-attach FCL monitoring, recovering non-terminal transactions from cache, and ensuring FCL uses the correct network before subscribing to transaction events.
  • E2E test improvements: Broadened transaction success status regex to include success and Finalized, increased test timeouts from 120s to 600s, added .first() to activity item assertions to prevent Playwright strict mode violations, and increased success check timeout from 100s to 200s.
  • Activity list polling: Added background polling every 5 seconds while pending transactions exist to ensure UI updates even when chrome.storage.onChanged events are not reliably delivered.
  • i18n cleanup: Added missing activity.loadMore and claim.title keys to all 5 locales, removed unused translation keys (activity.today, activity.yesterday, claim.drawer.from, claim.drawer.token, claimNFTDetail.claimButton), and fixed ActivityScreen to use existing translation keys.
  • Component cleanup: Removed unused ActivityDetailSheet and ClaimSenderRow components, and added ActivityCardLabels prop to ActivityCard for translated status/direction labels.

Changes

File Summary
apps/extension/e2e/transaction/cadence-transaction.test.ts Updated waitForTransaction calls to use /success|Finalized|Executed|Sealed/ regex pattern instead of /Executed|Sealed/. Increased test timeouts from 120s to 600s for all Cadence transaction tests to accommodate sequential transactions.
apps/extension/e2e/transaction/ft-transaction.test.ts Updated waitForTransaction call to use comprehensive /success|Finalized|Executed|Sealed/ regex. Increased test timeouts from 120s to 600s for all FT transaction tests.
apps/extension/e2e/utils/helper.ts Added .first() to checkNFTTrx, checkSentNFT, and waitForTransaction activity item assertions to prevent Playwright strict mode violations when multiple items match. Increased success check timeout from 100s to 200s.
apps/extension/src/background/index.ts Added call to userWalletService.resumePendingTransactions() after initialization to re-register FCL monitoring for transactions that were pending before service worker restart.
apps/extension/src/core/service/transaction-activity.ts Added recovery logic for non-terminal transactions (PENDING, Executed, Finalized) from cache when in-memory pending list is empty after SW restart. Implemented case-insensitive comparison for transaction ID matching. Added getRecoverableCadenceTxIds method to retrieve Cadence txIds needing FCL monitoring.
apps/extension/src/core/service/userWallet.ts Added fclEnsureNetwork() call before FCL transaction subscriptions to ensure correct network configuration. Implemented resumePendingTransactions() to re-attach FCL monitoring after SW restart. Added private reattachFclMonitoring() helper for subscribing to transaction status events.
apps/extension/src/ui/hooks/useTransferListHook.ts Added useEffect hook that triggers background refresh every 5 seconds (PENDING_POLL_INTERVAL_MS) when pendingCount is non-zero, ensuring UI updates even when chrome.storage.onChanged events are not reliably delivered.
apps/extension/src/ui/views/TransferList/index.tsx Added txStableId variable using tx.cadenceTxId || tx.hash for potential use as a stable data-testid, though the existing txCombinedKey is still used for the key prop.
packages/screens/src/activity/ActivityScreen.query.tsx Added getActivityStatusLabel helper function and cardLabels memoized object for translated labels. Updated RefreshView components to use existing translation keys (activity.error, activity.empty, common.retry). Passed labels prop to ActivityCard for localized status/direction text.
packages/screens/src/locales/en.json Added activity.loadMore and claim.title keys. Removed unused keys: activity.today, activity.yesterday, claim.drawer.token, claim.drawer.from, claimNFTDetail.claimButton.
packages/screens/src/locales/es.json Added activity.loadMore ("Cargar más") and claim.title ("Reclamar") keys. Removed unused keys: activity.today, activity.yesterday, claim.drawer.token, claim.drawer.from, claimNFTDetail.claimButton.
packages/screens/src/locales/jp.json Added activity.loadMore ("さらに読み込む") and claim.title ("請求する") keys. Removed unused keys: activity.today, activity.yesterday, claim.drawer.token, claim.drawer.from, claimNFTDetail.claimButton.
packages/screens/src/locales/ru.json Added activity.loadMore ("Загрузить ещё") and claim.title ("Получить") keys. Removed unused keys: activity.today, activity.yesterday, claim.drawer.token, claim.drawer.from, claimNFTDetail.claimButton.
packages/screens/src/locales/zh.json Added activity.loadMore ("加载更多") and claim.title ("领取") keys. Removed unused keys: activity.today, activity.yesterday, claim.drawer.token, claim.drawer.from, claimNFTDetail.claimButton.
packages/screens/src/tokens/ClaimTokenDetailScreen.query.tsx Updated NFTCollectionDetailView to use existing translation keys: claimNFTDetail.about instead of claim.nft.about, claim.searchPlaceholder instead of claim.nft.search, and claimNFTDetail.empty instead of claim.nft.empty.
packages/ui/src/components/ActivityCard.tsx Added optional labels prop of type ActivityCardLabels to support translated status, sent/received, and to/from labels. Updated getStatusText to use provided label. Modified display text to use labels?.sent, labels?.received, labels?.to, labels?.from with English fallbacks.
packages/ui/src/components/ActivityDetailSheet.tsx Deleted the entire ActivityDetailSheet component file as it was never used in the codebase.
packages/ui/src/components/ClaimSenderRow.tsx Deleted the entire ClaimSenderRow component file as it was never exported or imported anywhere in the codebase.
packages/ui/src/index.ts Removed the export statement for the deleted ActivityDetailSheet component.
packages/ui/src/types/index.ts Added new ActivityCardLabels interface with optional status, sent, received, to, and from string properties. Updated ActivityCardProps to include optional labels prop of this type.

autogenerated by presubmit.ai

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • 26948cb: feat: add ActivityDetailSheet modal for transaction details

  • Create ActivityDetailSheet component with Tamagui Sheet

  • Add ActivityDetailRow reusable component for detail rows

  • Wire up detail sheet in ActivityScreen with onPress handler

  • Add block explorer navigation via Linking.openURL

  • Add i18n translations for all supported languages (en, zh, ru, jp, es)

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Closes #1195

Files Processed (10)
  • packages/screens/src/activity/ActivityScreen.query.tsx (5 hunks)
  • packages/screens/src/locales/en.json (1 hunk)
  • packages/screens/src/locales/es.json (1 hunk)
  • packages/screens/src/locales/jp.json (1 hunk)
  • packages/screens/src/locales/ru.json (1 hunk)
  • packages/screens/src/locales/zh.json (1 hunk)
  • packages/ui/src/components/ActivityDetailRow.tsx (1 hunk)
  • packages/ui/src/components/ActivityDetailSheet.tsx (1 hunk)
  • packages/ui/src/index.ts (1 hunk)
  • packages/ui/src/types/index.ts (1 hunk)
Actionable Comments (2)
  • packages/ui/src/components/ActivityDetailSheet.tsx [362-362]

    possible bug: "Hardcoded network fee value should be dynamic."

  • packages/ui/src/components/ActivityDetailSheet.tsx [353-356]

    possible bug: "Hardcoded transaction fee values should be dynamic."

Skipped Comments (3)
  • packages/screens/src/activity/ActivityScreen.query.tsx [89-91]

    possible issue: "Potential memory leak with setTimeout in callback."

  • packages/ui/src/components/ActivityDetailSheet.tsx [57-64]

    enhancement: "Date formatting uses hardcoded locale."

  • packages/ui/src/components/ActivityDetailSheet.tsx [331-331]

    possible bug: "Missing null check for address display."

Comment thread packages/ui/src/components/ActivityDetailSheet.tsx Outdated
Comment thread packages/ui/src/components/ActivityDetailSheet.tsx Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (3)
  • 23b2469: fix: make ActivityCard onPress work reliably

Change from conditional spread pattern to direct prop assignment
for onPress handling on XStack.

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Closes #1195

  • 26b2080: fix: align ActivityDetailSheet with Figma designs

  • Large amount for sent transactions uses neutral color (red in "You Sent" row only)

  • Hide Date row for App Interaction type (per Figma)

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Closes #1195

  • 09be913: refactor: use ActivityDetailRow instead of inline DetailRow

Remove duplicate DetailRow component and import the existing
ActivityDetailRow component to reduce code duplication.

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Closes #1195

Files Processed (2)
  • packages/ui/src/components/ActivityCard.tsx (1 hunk)
  • packages/ui/src/components/ActivityDetailSheet.tsx (1 hunk)
Actionable Comments (1)
  • packages/ui/src/components/ActivityDetailSheet.tsx [311-311]

    possible bug: "Hardcoded network fee value should be dynamic."

Skipped Comments (3)
  • packages/ui/src/components/ActivityDetailSheet.tsx [58-65]

    enhancement: "Date formatting uses hardcoded locale instead of user's locale."

  • packages/ui/src/components/ActivityDetailSheet.tsx [315-329]

    enhancement: "Button colors may not adapt to dark theme."

  • packages/ui/src/components/ActivityCard.tsx [144-146]

    maintainability: "Props are always passed even when onPress is undefined."

Comment thread packages/ui/src/components/ActivityDetailSheet.tsx Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • a509900: fix: use Sent/Received title for self-transfers instead of Transferred

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Closes #1195

Files Processed (1)
  • packages/services/src/ActivityService.ts (2 hunks)
Actionable Comments (0)
Skipped Comments (1)
  • packages/services/src/ActivityService.ts [182-182]

    possible issue: "Inconsistent transfer type assignment for interactions."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 0958169: fix: use EVM block explorer for Flow EVM transactions

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Closes #1195

Files Processed (1)
  • packages/screens/src/activity/ActivityScreen.query.tsx (5 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • packages/screens/src/activity/ActivityScreen.query.tsx [90-90]

    maintainability: "Hardcoded timeout for animation synchronization may be fragile."

  • packages/screens/src/activity/ActivityScreen.query.tsx [109-109]

    possible bug: "Missing error handling for URL opening."

Base automatically changed from 1194-activity-ui to dev January 29, 2026 23:00
@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 6733452: chore: merge dev branch, resolve conflict in ActivityService

Removed createMockActivityItems helper function to align with dev.

Closes #1195

Files Processed (11)
  • docs/releaseNotes/ext/3-1-10-de.md (1 hunk)
  • docs/releaseNotes/ext/3-1-10-en.md (1 hunk)
  • docs/releaseNotes/ext/3-1-10-es.md (1 hunk)
  • docs/releaseNotes/ext/3-1-10-fr.md (1 hunk)
  • docs/releaseNotes/ext/3-1-10-ja.md (1 hunk)
  • docs/releaseNotes/ext/3-1-10-ko.md (1 hunk)
  • docs/releaseNotes/ext/3-1-10-pt.md (1 hunk)
  • docs/releaseNotes/ext/3-1-10-zh.md (1 hunk)
  • packages/screens/src/activity/ActivityScreen.query.tsx (5 hunks)
  • packages/ui/src/components/ActivityCard.tsx (1 hunk)
  • packages/ui/src/index.ts (1 hunk)
Actionable Comments (0)
Skipped Comments (3)
  • packages/screens/src/activity/ActivityScreen.query.tsx [82-82]

    possible bug: "Potential memory leak with uncleared timeout."

  • packages/screens/src/activity/ActivityScreen.query.tsx [101-101]

    possible bug: "Missing error handling for URL opening."

  • packages/ui/src/components/ActivityCard.tsx [158-160]

    possible issue: "Unconditional onPress prop may change component behavior."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 92f12b0: feat: convert activity detail from sheet to full screen

Replace bottom sheet with full-screen navigation for activity details:

  • Add ActivityDetailScreen as standalone full-screen component
  • Update ActivityScreen to navigate to detail screen on item press
  • Add ActivityDetail route to RN app navigator with dynamic header title
  • Header shows Sent/Received/App Interaction based on transaction type

Closes #1195

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Files Processed (5)
  • apps/react-native/src/navigation/AppNavigator.tsx (4 hunks)
  • packages/screens/src/activity/ActivityDetailScreen.query.tsx (1 hunk)
  • packages/screens/src/activity/ActivityScreen.query.tsx (1 hunk)
  • packages/screens/src/activity/index.ts (1 hunk)
  • packages/screens/src/index.ts (1 hunk)
Actionable Comments (0)
Skipped Comments (4)
  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [41-45]

    enhancement: "Hardcoded locale in date formatting ignores user preferences."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [160-160]

    possible bug: "Missing error handling for external URL opening."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [246-252]

    possible issue: "Hardcoded fee values may not reflect actual transaction fees."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [221-221]

    possible bug: "Potential display of undefined address values."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 5671cdc: fix: remove network fee row from activity detail screen

Network fee data is not available from the API.

Closes #1195

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Files Processed (1)
  • packages/screens/src/activity/ActivityDetailScreen.query.tsx (1 hunk)
Actionable Comments (0)
Skipped Comments (4)
  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [244-251]

    possible issue: "Hardcoded transaction fee values may not reflect actual transaction costs."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [40-46]

    enhancement: "Date formatting uses hardcoded locale instead of user's locale."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [220-220]

    possible bug: "Missing null check for sender/receiver addresses before truncation."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [195-196]

    maintainability: "Type assertion as any reduces type safety."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 528af0f: feat: add NFT support to activity detail screen with translations

Add NFT-specific display support for activity detail screen:

  • Display NFT title as "NFTS from {collection}"
  • Show NFT count with +/- prefix
  • Add Account row for profile info
  • Add missing translations to all locale files (en, es, jp, ru, zh)

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Closes #1195

Files Processed (6)
  • packages/screens/src/activity/ActivityDetailScreen.query.tsx (1 hunk)
  • packages/screens/src/locales/en.json (1 hunk)
  • packages/screens/src/locales/es.json (1 hunk)
  • packages/screens/src/locales/jp.json (1 hunk)
  • packages/screens/src/locales/ru.json (1 hunk)
  • packages/screens/src/locales/zh.json (1 hunk)
Actionable Comments (0)
Skipped Comments (5)
  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [40-45]

    possible issue: "Date formatting ignores user's locale preference."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [81-82]

    maintainability: "Unused translation variable for NFT count."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [148-148]

    best practice: "Manual string interpolation instead of using i18n interpolation."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [338-345]

    possible issue: "Hardcoded transaction fee values may not reflect actual fees."

  • packages/screens/src/activity/ActivityDetailScreen.query.tsx [153-153]

    possible issue: "Hardcoded NFT/NFTS strings bypass i18n."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • be9040c: fix(react-native): fix missing and mismatched i18n translation keys

  • Add missing activity.loadMore and claim.title keys to all 5 locales

  • Fix ActivityScreen to use existing activity.empty/error/common.retry keys

  • Add ActivityCardLabels prop to ActivityCard for translated status/direction labels

  • Fix ClaimTokenDetailScreen claim.nft.* keys to use existing claimNFTDetail.* keys

Closes #1195

Files Processed (9)
  • packages/screens/src/activity/ActivityScreen.query.tsx (4 hunks)
  • packages/screens/src/locales/en.json (2 hunks)
  • packages/screens/src/locales/es.json (2 hunks)
  • packages/screens/src/locales/jp.json (2 hunks)
  • packages/screens/src/locales/ru.json (2 hunks)
  • packages/screens/src/locales/zh.json (2 hunks)
  • packages/screens/src/tokens/ClaimTokenDetailScreen.query.tsx (3 hunks)
  • packages/ui/src/components/ActivityCard.tsx (6 hunks)
  • packages/ui/src/types/index.ts (1 hunk)
Actionable Comments (0)
Skipped Comments (3)
  • packages/screens/src/activity/ActivityScreen.query.tsx [55-62]

    possible issue: "Memoization dependency may not trigger re-computation on language change."

  • packages/screens/src/activity/ActivityScreen.query.tsx [160-161]

    possible issue: "Missing fallback values for translation keys."

  • packages/screens/src/activity/ActivityScreen.query.tsx [171-171]

    possible issue: "Missing fallback value for translation key."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 34d62af: chore(react-native): remove unused ClaimSenderRow component and dead translation keys

  • Delete ClaimSenderRow which was never exported or imported

  • Remove unused activity.today, activity.yesterday from all locales

  • Remove unused claim.drawer.from, claim.drawer.token from all locales

  • Remove unused claimNFTDetail.claimButton from all locales

Closes #1195

Files Processed (6)
  • packages/screens/src/locales/en.json (4 hunks)
  • packages/screens/src/locales/es.json (4 hunks)
  • packages/screens/src/locales/jp.json (4 hunks)
  • packages/screens/src/locales/ru.json (4 hunks)
  • packages/screens/src/locales/zh.json (4 hunks)
  • packages/ui/src/components/ClaimSenderRow.tsx (1 hunk)
Actionable Comments (0)
Skipped Comments (0)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • fcf1b6b: fix(extension): broaden transaction success status regex in cadence and ft tests

Transactions can settle as 'success' or 'Finalized' before the polling
window, causing the /Executed|Sealed/ regex to miss them. Use the same
comprehensive pattern already used by nft-transaction tests.

Closes #1195

Files Processed (2)
  • apps/extension/e2e/transaction/cadence-transaction.test.ts (3 hunks)
  • apps/extension/e2e/transaction/ft-transaction.test.ts (1 hunk)
Actionable Comments (1)
  • apps/extension/e2e/transaction/cadence-transaction.test.ts [33-33]

    typo: "Typo in parameter name."

Skipped Comments (1)
  • apps/extension/e2e/transaction/cadence-transaction.test.ts [33-33]

    possible issue: "Inconsistent casing in regex pattern."

const txId = await waitForTransaction({ page, successtext: /Executed|Sealed/, ingoreFlowCharge });
const txId = await waitForTransaction({
page,
successtext: /success|Finalized|Executed|Sealed/,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the parameter name ingoreFlowCharge - it should be ignoreFlowCharge. This typo appears to be pre-existing in the codebase, but it's being propagated in the new code.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • 85ffd54: fix(extension): ensure stable data-testid and case-insensitive tx lookup

  • Use cadenceTxId || hash as the stable data-testid on activity list items
    so the e2e locator survives the pending→confirmed transition

  • Make pending item lookup in setTransaction case-insensitive so cadenceTxId
    is always preserved regardless of API/FCL hash casing differences

Closes #1195

Files Processed (2)
  • apps/extension/src/core/service/transaction-activity.ts (2 hunks)
  • apps/extension/src/ui/views/TransferList/index.tsx (1 hunk)
Actionable Comments (2)
  • apps/extension/src/core/service/transaction-activity.ts [435-437]

    possible bug: "Hash comparison using includes() may cause false positive matches."

  • apps/extension/src/core/service/transaction-activity.ts [448-450]

    possible bug: "Hash comparison using includes() may cause false positive matches."

Skipped Comments (0)

Comment on lines +435 to +437
item.hash.toLowerCase().includes(normalizedTxid) ||
item.cadenceTxId?.toLowerCase().includes(normalizedTxid) ||
item.evmTxIds?.some((id) => id.toLowerCase().includes(normalizedTxid))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using includes() for hash comparison is potentially problematic. If normalizedTxid is a substring of another hash, this could lead to false positive matches. Consider using strict equality (===) instead of includes() for hash comparisons to ensure exact matches.

Comment on lines +448 to +450
item.hash.toLowerCase().includes(normalizedTxid) ||
item.cadenceTxId?.toLowerCase().includes(normalizedTxid) ||
item.evmTxIds?.some((id) => id.toLowerCase().includes(normalizedTxid))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as above - using includes() for hash comparison could match unintended transactions if one hash is a substring of another. Consider using strict equality (===) for reliable hash matching.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • e07b6c9: fix(extension): increase e2e test timeouts from 120s to 600s

Sequential transactions each require up to 160s (pending + success wait),
making 120s insufficient for tests sending multiple transactions.

Closes #1195

Files Processed (2)
  • apps/extension/e2e/transaction/cadence-transaction.test.ts (6 hunks)
  • apps/extension/e2e/transaction/ft-transaction.test.ts (6 hunks)
Actionable Comments (1)
  • apps/extension/e2e/transaction/cadence-transaction.test.ts [33-33]

    typo: "Typo in parameter name - inconsistent casing."

Skipped Comments (2)
  • apps/extension/e2e/transaction/cadence-transaction.test.ts [94-94]

    possible issue: "Significant test timeout increase may hide underlying issues."

  • apps/extension/e2e/transaction/cadence-transaction.test.ts [33-33]

    possible issue: "Inconsistent casing in regex pattern."

const txId = await waitForTransaction({ page, successtext: /Executed|Sealed/, ingoreFlowCharge });
const txId = await waitForTransaction({
page,
successtext: /success|Finalized|Executed|Sealed/,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in successtext - it should be successText (camelCase). This inconsistency in naming convention could cause confusion.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • ed421f9: fix(extension): increase success check timeout and recover pending items after SW restart

  • Increase waitForTransaction success check timeout from 100s to 200s to
    account for slow testnet confirmation times in CI

  • In setTransaction, recover pending items from the cached list when the
    in-memory store is empty (e.g. after MV3 service worker restart), preventing
    pending transactions from disappearing from the activity list before the
    indexer picks them up

Closes #1195

Files Processed (2)
  • apps/extension/e2e/utils/helper.ts (1 hunk)
  • apps/extension/src/core/service/transaction-activity.ts (3 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • apps/extension/src/core/service/transaction-activity.ts [400-407]

    enhancement: "Redundant length check before filtering."

  • apps/extension/e2e/utils/helper.ts [641-641]

    maintainability: "Large timeout increase may hide underlying issues."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 156e52f: fix(extension): poll activity list while transactions are pending

When pending transactions exist, trigger a background refresh every 5s.
This ensures the UI updates even when chrome.storage.onChanged events
from the service worker are not reliably delivered to the popup,
which caused the activity item to stay at 'Pending' status indefinitely
in CI environments.

Closes #1195

Files Processed (1)
  • apps/extension/src/ui/hooks/useTransferListHook.ts (2 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • apps/extension/src/ui/hooks/useTransferListHook.ts [28-28]

    readability: "Condition may be unclear when checking for zero pending count."

  • apps/extension/src/ui/hooks/useTransferListHook.ts [36-36]

    enhancement: "Effect may restart frequently if pending count changes often."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 7887612: fix(extension): resolve strict mode violation in e2e activity list test

Revert data-testid from txStableId back to txCombinedKey so each
TransferItem has a unique testid (includes transferType/interaction
suffix). This prevents multiple items from the same Cadence tx sharing
identical testids, which caused Playwright strict mode violations.

Add .first() to executedItem assertion in waitForTransaction to handle
cases where multiple activity items match the txId regexp (e.g. when
ingoreFlowCharge is false and fee items are also visible).

Closes #1195

Files Processed (2)
  • apps/extension/e2e/utils/helper.ts (1 hunk)
  • apps/extension/src/ui/views/TransferList/index.tsx (1 hunk)
Actionable Comments (0)
Skipped Comments (1)
  • apps/extension/src/ui/views/TransferList/index.tsx [175-175]

    possible issue: "Unused variable declared."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 564efd7: fix(extension): add .first() to NFT activity item assertions to prevent strict mode violations

Closes #1195

Files Processed (1)
  • apps/extension/e2e/utils/helper.ts (3 hunks)
Actionable Comments (0)
Skipped Comments (3)
  • apps/extension/e2e/utils/helper.ts [551-551]

    possible issue: "Using .first() may hide issues with multiple matching elements."

  • apps/extension/e2e/utils/helper.ts [594-594]

    possible issue: "Using .first() may hide issues with multiple matching elements."

  • apps/extension/e2e/utils/helper.ts [640-641]

    maintainability: "Significant timeout increase may slow down test feedback."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 3a47123: fix(extension): recover in-progress transactions (Executed/Finalized) after SW restart

Previously only PENDING items were recovered from cache when the service
worker restarted. For EVM/Cadence hybrid transactions (e.g. withdrawCoa),
listenTransaction may have already called updatePending to advance the
status to Executed or Finalized before the SW restarted. Those items were
then excluded from recovery and disappeared from the activity list, causing
the send-from-evm-to-Flow e2e test to time out waiting for a Sealed item.

Extend the recovery filter to include all non-terminal states (excludes
Sealed, Expired, Error) so Executed and Finalized items are also preserved
across SW restarts until the indexer confirms them.

Closes #1195

Files Processed (1)
  • apps/extension/src/core/service/transaction-activity.ts (3 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • apps/extension/src/core/service/transaction-activity.ts [405-412]

    possible bug: "Mutating the pending list array directly may cause side effects."

  • apps/extension/src/core/service/transaction-activity.ts [407-407]

    possible bug: "Missing null check before calling toUpperCase() on status."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 5fa8621: fix(extension): guard against undefined status in pending item recovery

Closes #1195

Files Processed (1)
  • apps/extension/src/core/service/transaction-activity.ts (3 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • apps/extension/src/core/service/transaction-activity.ts [405-412]

    possible bug: "Mutating the pending list in-place may cause unintended side effects."

  • apps/extension/src/core/service/transaction-activity.ts [404-404]

    performance: "Constant defined inside function scope could be moved to module level."

lealobanov and others added 13 commits March 17, 2026 14:31
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Closes #1195
- Add missing activity.loadMore and claim.title keys to all 5 locales
- Fix ActivityScreen to use existing activity.empty/error/common.retry keys
- Add ActivityCardLabels prop to ActivityCard for translated status/direction labels
- Fix ClaimTokenDetailScreen claim.nft.* keys to use existing claimNFTDetail.* keys

Closes #1195
…translation keys

- Delete ClaimSenderRow which was never exported or imported
- Remove unused activity.today, activity.yesterday from all locales
- Remove unused claim.drawer.from, claim.drawer.token from all locales
- Remove unused claimNFTDetail.claimButton from all locales

Closes #1195
…nd ft tests

Transactions can settle as 'success' or 'Finalized' before the polling
window, causing the /Executed|Sealed/ regex to miss them. Use the same
comprehensive pattern already used by nft-transaction tests.

Closes #1195
- Use cadenceTxId || hash as the stable data-testid on activity list items
  so the e2e locator survives the pending→confirmed transition
- Make pending item lookup in setTransaction case-insensitive so cadenceTxId
  is always preserved regardless of API/FCL hash casing differences

Closes #1195
Sequential transactions each require up to 160s (pending + success wait),
making 120s insufficient for tests sending multiple transactions.

Closes #1195
…ems after SW restart

- Increase waitForTransaction success check timeout from 100s to 200s to
  account for slow testnet confirmation times in CI
- In setTransaction, recover pending items from the cached list when the
  in-memory store is empty (e.g. after MV3 service worker restart), preventing
  pending transactions from disappearing from the activity list before the
  indexer picks them up

Closes #1195
When pending transactions exist, trigger a background refresh every 5s.
This ensures the UI updates even when chrome.storage.onChanged events
from the service worker are not reliably delivered to the popup,
which caused the activity item to stay at 'Pending' status indefinitely
in CI environments.

Closes #1195
Revert data-testid from txStableId back to txCombinedKey so each
TransferItem has a unique testid (includes transferType/interaction
suffix). This prevents multiple items from the same Cadence tx sharing
identical testids, which caused Playwright strict mode violations.

Add .first() to executedItem assertion in waitForTransaction to handle
cases where multiple activity items match the txId regexp (e.g. when
ingoreFlowCharge is false and fee items are also visible).

Closes #1195
… after SW restart

Previously only PENDING items were recovered from cache when the service
worker restarted. For EVM/Cadence hybrid transactions (e.g. withdrawCoa),
listenTransaction may have already called updatePending to advance the
status to Executed or Finalized before the SW restarted. Those items were
then excluded from recovery and disappeared from the activity list, causing
the send-from-evm-to-Flow e2e test to time out waiting for a Sealed item.

Extend the recovery filter to include all non-terminal states (excludes
Sealed, Expired, Error) so Executed and Finalized items are also preserved
across SW restarts until the indexer confirms them.

Closes #1195
When the service worker restarts, all in-memory FCL onceExecuted/onceSealed
promise chains are lost. Transactions that were pending at restart time are
left permanently stuck in a non-terminal status (PENDING, Executed, Finalized)
because the EVM transfers API does not return Cadence transactions like
withdrawCoa.

Add resumePendingTransactions to userWalletService which runs after init and
re-attaches FCL monitoring for any cached non-terminal transactions. This uses
a direct FCL subscription (reattachFclMonitoring) that updates the cached
store via updatePending without duplicating the pending item.

Closes #1195

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • eea7e13: fix(extension): resume FCL monitoring for pending txs after SW restart

When the service worker restarts, all in-memory FCL onceExecuted/onceSealed
promise chains are lost. Transactions that were pending at restart time are
left permanently stuck in a non-terminal status (PENDING, Executed, Finalized)
because the EVM transfers API does not return Cadence transactions like
withdrawCoa.

Add resumePendingTransactions to userWalletService which runs after init and
re-attaches FCL monitoring for any cached non-terminal transactions. This uses
a direct FCL subscription (reattachFclMonitoring) that updates the cached
store via updatePending without duplicating the pending item.

Closes #1195

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Files Processed (3)
  • apps/extension/src/background/index.ts (1 hunk)
  • apps/extension/src/core/service/transaction-activity.ts (4 hunks)
  • apps/extension/src/core/service/userWallet.ts (1 hunk)
Actionable Comments (1)
  • apps/extension/src/core/service/userWallet.ts [1198-1202]

    possible issue: "Potential indefinite hang if FCL promises never resolve."

Skipped Comments (4)
  • apps/extension/src/background/index.ts [108-108]

    best practice: "Silent error swallowing hides potential issues."

  • apps/extension/src/core/service/transaction-activity.ts [404-404]

    maintainability: "Duplicated constant definition."

  • apps/extension/src/core/service/userWallet.ts [1182-1182]

    best practice: "Silent error swallowing in loop."

  • apps/extension/src/core/service/userWallet.ts [1194-1194]

    possible bug: "Regex validation may be too permissive."

Comment on lines +1198 to +1202
const txStatusExecuted = await fclTx.onceExecuted();
await transactionActivityService.updatePending(network, address, txId, txStatusExecuted);
const txStatusSealed = await fclTx.onceSealed();
await transactionActivityService.updatePending(network, address, txId, txStatusSealed);
await transactionActivityService.pollTransferList(address, txId, network);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If fclTx.onceExecuted() or fclTx.onceSealed() never resolves (e.g., transaction is already in a terminal state or network issues), this function will hang indefinitely. Consider adding a timeout mechanism to prevent blocking.

unlock() forcibly switches FCL to mainnet regardless of the wallet's
persisted network. listenTransaction() then calls fcl.tx(txId).onceExecuted()
while FCL is still configured for mainnet, so testnet transactions are
never found and onceExecuted/onceSealed never resolve. This leaves
EVM-to-Flow (withdrawCoa) transactions permanently stuck in PENDING
status because getEVMTransfers also does not return Cadence txs.

Add fclEnsureNetwork(network) before the fcl.tx() call in both
listenTransaction and reattachFclMonitoring to guarantee FCL is on
the right network before subscribing to transaction status events.

Closes #1195

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • e889f5a: fix(extension): ensure FCL uses correct network before tx monitoring

unlock() forcibly switches FCL to mainnet regardless of the wallet's
persisted network. listenTransaction() then calls fcl.tx(txId).onceExecuted()
while FCL is still configured for mainnet, so testnet transactions are
never found and onceExecuted/onceSealed never resolve. This leaves
EVM-to-Flow (withdrawCoa) transactions permanently stuck in PENDING
status because getEVMTransfers also does not return Cadence txs.

Add fclEnsureNetwork(network) before the fcl.tx() call in both
listenTransaction and reattachFclMonitoring to guarantee FCL is on
the right network before subscribing to transaction status events.

Closes #1195

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Files Processed (1)
  • apps/extension/src/core/service/userWallet.ts (2 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • apps/extension/src/core/service/userWallet.ts [1204-1204]

    possible bug: "Regex pattern may match invalid transaction IDs."

  • apps/extension/src/core/service/userWallet.ts [1192-1192]

    maintainability: "Silent error swallowing hinders debugging."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add activity detail page for Flow and Flow-EVM transactions

2 participants