Skip to content

Allow resetting the solutions object, or setting it to undefined for any subsequent call. #139

@Tbaut

Description

@Tbaut

When using the react sdk and our hooks, I figured that the fact that we have no promise for the getPoolAssetOnDestination for instance, and rather wait for solutions to not be undefined makes it so that if the user changes their input (and hence it changes the params for the api calls) then the solutions will be outdated for the time until the api responds.

Ideally, we should have a reset param that we could call, and that would set the solutions to undefined.
Or we should make sure the solutions is undefined before we do a call to the api, just like we set the loading to true.

What do you think?

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