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: handle referrer not registered in divvi integration #6496

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

kathaypacific
Copy link
Collaborator

Description

This PR ensures that the registration tx only contains protocolId's that the referrer is registered for. This prevents the prepared transaction from containing a protocolId that would cause the tx to revert (thereby blocking the rest of the transaction flow). A builder could be in this situation if they are developing before they are added to the registration contract.

Test plan

Setting the referrer id to a random string or adding a random protocol id to the app config does not affect the transaction flow.

Related issues

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
Member

@jeanregisser jeanregisser left a comment

Choose a reason for hiding this comment

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

Great! 🚀

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.08%. Comparing base (5fba34e) to head (1bfeebb).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #6496    +/-   ##
========================================
  Coverage   89.07%   89.08%            
========================================
  Files         732      732            
  Lines       31932    31944    +12     
  Branches     5833     6152   +319     
========================================
+ Hits        28445    28456    +11     
+ Misses       3440     3291   -149     
- Partials       47      197   +150     
Files with missing lines Coverage Δ
src/divviProtocol/registerReferral.ts 95.55% <100.00%> (+0.68%) ⬆️

... and 67 files with indirect coverage changes


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 5fba34e...1bfeebb. Read the comment docs.

@kathaypacific kathaypacific added this pull request to the merge queue Feb 19, 2025
Merged via the queue into main with commit 6e91517 Feb 19, 2025
15 checks passed
@kathaypacific kathaypacific deleted the kathy/fl-integration-4 branch February 19, 2025 10:28
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.

2 participants