Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(points): add track points event to transaction watcher #5441

Merged
merged 6 commits into from
May 23, 2024

Conversation

kathaypacific
Copy link
Collaborator

@kathaypacific kathaypacific commented May 21, 2024

Description

In case the transaction is not settled within the same app session, we should add the points tracking to the transaction watcher as well.

I added the network to the tracked event, in preparation for network specific activities.

Test plan

n/a

Related issues

n/a

Backwards compatibility

Y

Network scalability

If a new NetworkId and/or Network are added in the future, the changes in this PR will:

  • Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)

Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.35%. Comparing base (d35a51b) to head (a96f4a4).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5441   +/-   ##
=======================================
  Coverage   86.34%   86.35%           
=======================================
  Files         756      756           
  Lines       31266    31271    +5     
  Branches     5376     5378    +2     
=======================================
+ Hits        26998    27004    +6     
+ Misses       4035     4034    -1     
  Partials      233      233           
Files Coverage Δ
src/points/types.ts 100.00% <ø> (ø)
src/swap/saga.ts 94.35% <ø> (ø)
src/transactions/saga.ts 58.59% <100.00%> (+2.01%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d35a51b...a96f4a4. Read the comment docs.

@@ -84,6 +85,7 @@ interface PointsEventCreateWallet {
interface PointsEventSwap {
activityId: 'swap'
transactionHash: string
network: Network
Copy link
Member

Choose a reason for hiding this comment

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

What do you think of using NetworkId to remove any ambiguity?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes fair, i updated to use networkId. i thought i was saving some computation by using the network but i was mistaken (reading the wallet code i thought that we need only the network to create the viem client, but we've a couple of layers of mappings in between!)

@kathaypacific kathaypacific added this pull request to the merge queue May 23, 2024
Merged via the queue into main with commit cb1b97b May 23, 2024
16 checks passed
@kathaypacific kathaypacific deleted the kathy/fix-track-points-event branch May 23, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants