Skip to content

Remove class initialization, use global cache #70

@mpetrunic

Description

@mpetrunic
          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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions