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

Fix REST endpoint for escrows lookup #218

Open
xpt1x opened this issue May 8, 2023 · 2 comments
Open

Fix REST endpoint for escrows lookup #218

xpt1x opened this issue May 8, 2023 · 2 comments

Comments

@xpt1x
Copy link

xpt1x commented May 8, 2023

Currently GET /escrow/escrows only care about state being OPEN | EXPIRED

Whereas actually escrow object supports Refunded and Completed as well and might be very handy for integrations with client applications, so they should be considered as well and REST needs to be fixed for this query

@LeCodeurDuDimanche
Copy link
Contributor

We can only filter by open and expired states because no escrow with the Completed or Refunded state is actually persisted, they are deleted from the store. So no escrow would be returned if filtering by Completed or Refunded states was authorized.
These states are actually only used for internal logic.
IIRC, the idea was to use transaction events to deal with these completetion and refund action on escrows.
I think we can persist the refunded and completed escrow to query them if needed, without too much hassle, but I cannot vouch for it.

@xpt1x
Copy link
Author

xpt1x commented May 17, 2023

Yes I too understood it by looking at implementation, but I believe for front-end clients, these status are somewhat essential for building a marketplace like application, so will be great if these are persisted for historic data

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

2 participants