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

Manually add BPT in CS API Provider #122

Merged
merged 2 commits into from
Nov 9, 2023
Merged

Manually add BPT in CS API Provider #122

merged 2 commits into from
Nov 9, 2023

Conversation

johngrantuk
Copy link
Member

We are working on assumption that API will return BPT token in token list (as current SG does) It does not currently do this so we have to add it manually.

…oken list (as current SG does) It does not currently do this so we have to add it manually
* It does not currently do this so we have to add it manually
*/
if (poolGetPool.type === 'PHANTOM_STABLE') {
let missingBPTIndex = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Since they are still experimenting with adding/removing the BPT on v3-canary branch, we could make this code resilient by simply checking if pool tokens contains the pool address. If yes, then BPT is present and we don't need to add it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good suggestion! Added that check now.

Copy link
Member

@brunoguerios brunoguerios left a comment

Choose a reason for hiding this comment

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

I added a small suggestion, but not something critical if we are able to sync with the API team on updates on their side. Otherwise LGTM!

@johngrantuk johngrantuk merged commit 2eca71b into join Nov 9, 2023
3 of 4 checks passed
@johngrantuk johngrantuk deleted the cs-api-missing-bpt branch November 9, 2023 13:51
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