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?
When using the react sdk and our hooks, I figured that the fact that we have no promise for the
getPoolAssetOnDestinationfor instance, and rather wait forsolutionsto not beundefinedmakes it so that if the user changes their input (and hence it changes the params for the api calls) then thesolutionswill be outdated for the time until theapiresponds.Ideally, we should have a
resetparam that we could call, and that would set thesolutionstoundefined.Or we should make sure the
solutionsisundefinedbefore we do a call to the api, just like we set the loading totrue.What do you think?