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

Remove class initialization, use global cache #70

Open
mpetrunic opened this issue Oct 24, 2024 · 0 comments
Open

Remove class initialization, use global cache #70

mpetrunic opened this issue Oct 24, 2024 · 0 comments

Comments

@mpetrunic
Copy link
Member

          Why do we need this `new Sprinter` intialization?

Wouldn't it be more intuitive and dev friendly to do:

import {getUserBalances} from "@chainsafe/sprinter-sdk"

balance = await getUserBalances(address, optionalConfigWithBaseUrl)

?

Originally posted by @mpetrunic in #61 (comment)

  • remove class initialization, somewhat function approach
  • use global cache to cache tokens, chains and routes
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

No branches or pull requests

1 participant