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

feat: Query By Recipient #1125

Merged
merged 7 commits into from
Jan 14, 2025
Merged

feat: Query By Recipient #1125

merged 7 commits into from
Jan 14, 2025

Conversation

AshtonStephens
Copy link
Collaborator

@AshtonStephens AshtonStephens commented Dec 13, 2024

Description

Closes: #1122

Changes

This PR adds a new endpoint to emily. Unfortunately, the client autogeneration stopped working when I made the status optional in the get_deposits query, and I couldn't find any autogenerated solution, so to resolve this I've added a new endpoint:

https://{base_url}/deposit/recipient/{recipient}.

It works much like the other query but has the recipient in the path. This is a departure from the rest implementation, but it's the only way I could get it working.

In order to support this, there's now a new deposit table index that can be accessed by recipient.

Testing Information

Tested with an integration test in this PR.

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@AshtonStephens AshtonStephens force-pushed the query-deposits-by-recipient branch from 3e3ac32 to bf7315b Compare December 19, 2024 13:45
@AshtonStephens AshtonStephens requested a review from Jiloc December 19, 2024 14:07
@AshtonStephens AshtonStephens self-assigned this Dec 19, 2024
@AshtonStephens AshtonStephens added the emily API that communicates with Signers to trigger sBTC operations. label Dec 19, 2024
@AshtonStephens AshtonStephens marked this pull request as ready for review December 19, 2024 14:10
@djordon djordon added this to the sBTC: Nice to have milestone Dec 19, 2024
@AshtonStephens AshtonStephens changed the title feat: Query By Recipient without tests feat: Query By Recipient Dec 20, 2024
Copy link
Collaborator

@Jiloc Jiloc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we are not rushing this feature, would it make sense to have another time-gated effort to try it to make it work with the get_deposits endpoint as a query? If you think that's just time wasted, I am fine with going forward as it is

@Jiloc
Copy link
Collaborator

Jiloc commented Jan 13, 2025

Given that we are not rushing this feature, would it make sense to have another time-gated effort to try it to make it work with the get_deposits endpoint as a query? If you think that's just time wasted, I am fine with going forward as it is

As discussed, an important time was already allocated for this and there was no apparent workaround. We are fine with the current approach after @MCJOHN974 comments are solved

Copy link
Collaborator

@MCJOHN974 MCJOHN974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (But since I'm new for the repo suggest to wait until @Jiloc adds a review)

@AshtonStephens AshtonStephens merged commit 2d1249e into main Jan 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emily API that communicates with Signers to trigger sBTC operations.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature]: Add a way to filter deposits by recipient in Emily
4 participants