Skip to content

Conversation

@yosriady
Copy link
Contributor

@yosriady yosriady commented Aug 27, 2025

Merge #116 first

@linear
Copy link

linear bot commented Aug 27, 2025

@yosriady yosriady requested a review from Copilot August 27, 2025 12:49
@yosriady
Copy link
Contributor Author

bugbot run

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@yosriady yosriady requested a review from Copilot August 27, 2025 13:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements wallet provider switching improvements and deduplication logic for analytics tracking. The changes focus on better handling of provider switching scenarios and preventing duplicate identify events within the same session.

  • Adds session-based tracking to prevent duplicate identify events for the same wallet/provider combination
  • Improves provider switching logic with better state management and race condition prevention
  • Enhances event tracking with provider identification through RDNS inclusion

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/utils/base.ts Enhanced action descriptor generation to include RDNS for connect/disconnect events
src/constants/base.ts Added new session key constant for wallet identification tracking
src/FormoAnalytics.ts Major refactoring of provider switching logic, added duplicate prevention, and improved state management
Comments suppressed due to low confidence (2)

src/FormoAnalytics.ts:912

  • Missing closing brace for the if statement. The code block starting with this condition is not properly closed.
      hasChainId: !!nextChainId

src/FormoAnalytics.ts:913

  • The condition check for duplicate RDNS values is added but the existing logic inside is not properly wrapped. This will cause the push operation to always execute regardless of the condition, defeating the purpose of the duplicate check.
    });

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@yosriady
Copy link
Contributor Author

bugbot run

@yosriady yosriady changed the title P 1447 fix: Fix duplicate connect events when multiple providers are available Aug 27, 2025
@yosriady yosriady marked this pull request as ready for review August 27, 2025 13:05
cursor[bot]

This comment was marked as outdated.

@yosriady yosriady requested a review from TamHuynhTee August 28, 2025 02:18
@yosriady
Copy link
Contributor Author

bugbot run

cursor[bot]

This comment was marked as outdated.

@yosriady yosriady changed the title fix: Fix duplicate connect events when multiple providers are available fix: Fix duplicate identify events in a session Aug 28, 2025
@yosriady
Copy link
Contributor Author

bugbot run

@yosriady yosriady merged commit e540da2 into main Aug 28, 2025
6 checks passed
@yosriady yosriady deleted the p-1447 branch August 28, 2025 03:00
@github-actions
Copy link

🎉 This PR is included in version 1.19.9 🎉

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants