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

Purify get functions #75

Open
dohaki opened this issue May 22, 2018 · 3 comments
Open

Purify get functions #75

dohaki opened this issue May 22, 2018 · 3 comments

Comments

@dohaki
Copy link
Contributor

dohaki commented May 22, 2018

Most of the getter functions in the library are not pure. They depend on which user is loaded in the state and restrict the functionality of the relay REST API.

Refactor getter functions to be pure, i.e.

// not pure
tlNetwork.trustline.get(network, counterpartyAddress)

// pure
tlNetwork.trustline.get(network, user, counterpartyAddress)
@berndbohmeier
Copy link
Contributor

But the clientlib is not just a lib for easy querying the relay server. We should only make that change if it is not harder for the normal user to use the lib.

@dohaki
Copy link
Contributor Author

dohaki commented May 24, 2018

The user of the clientlib would have to additionally pass in one more parameter in the getter functions. Would you consider this as harder to use?
@jensneuber what is your opinion on this?

@andfletcher
Copy link

Needs to be handled within a bigger issue that we need to create to handle refactoring of the client lib. If that issue is created this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants