chore: handle referrer not registered in divvi integration #6496
+84
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: