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

Add human friendly fetching endpoints #252

Open
jkbpvsc opened this issue Sep 28, 2023 · 1 comment
Open

Add human friendly fetching endpoints #252

jkbpvsc opened this issue Sep 28, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jkbpvsc
Copy link
Member

jkbpvsc commented Sep 28, 2023

Power users have asked to bring back the Bank.getByLabel(string) apis

@losman0s
Copy link
Member

losman0s commented Oct 11, 2023

This requires bringing back the bank/token metadata fetching to the marginfi-client-v2 package.
They were previously fetched as first-class data in each bank, which was annoying due how decoupled they are from the bank creation process (off-chain vs on-chain).

We should bring it back in a non intrusive way, e.g.:

  • add a dedicated but optional metadata field to Bank
  • fetch metadata upon instantiation, that can silently fail (although we can issue a warning log if it does, as it should be up)
  • bring back the convenience getters which will throw if required metadata is not filled, or succeed and return the right bank

@losman0s losman0s added the enhancement New feature or request label Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants