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

fix: fillMissingTokenAddress function doesn't work as expected #422

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NaijaCoderGirl
Copy link

Description:

The return conditions in fillMissingTokenAddress incorrectly trigger an exit when token.L1 or token.L2 are null. The intended behavior should only allow an exit if a non-null, non-zeroAddress token.L1 is found, and thus the function exhausts all possibilities before terminating. I believe this was a mistake that went undetected.

Changes:

-       if (!token.L1 || token.L1 !== zeroAddress) return;
+       if (token.L1 && token.L1 !== zeroAddress) return;
...
-       if (!token.L2 || token.L2 !== zeroAddress) return;
+       if (token.L2 && token.L2 !== zeroAddress) return;

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • I have informed the team of any breaking changes if there are any.

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.

1 participant