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

Trust relationships ordering update #493

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

pranavkparti
Copy link
Collaborator

Description

Updated the ordering of endpoint GET /wallets/{wallet_id}/trust_relationships to display requested state records at the top of the returned results.

What kind of change(s) does this PR introduce?

  • Enhancement
  • Bug fix
  • Refactor

Please check if the PR fulfils these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Issue

What is the current behavior?
The endpoint returns results without prioritizing records by requested state.

What is the new behavior?

Records with state requested and target_wallet as the current wallet or one of its managed wallets will be returned at the top of the results.

Breaking change

Does this PR introduce a breaking change?
No.

Other useful information

None.

@@ -74,42 +74,56 @@ const walletGetTrustRelationships = async (req, res) => {
});
const validatedQuery = await walletGetTrustRelationshipsSchema.validateAsync(
req.query,
{ abortEarly: false },
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we shourd force code format on committing, so it makes review easier

@Kpoke
Copy link
Collaborator

Kpoke commented Dec 11, 2024

@pranavkparti there are merge conflicts

@Kpoke Kpoke merged commit 7beb8c2 into Greenstand:master Dec 12, 2024
1 check passed
Copy link

🎉 This PR is included in version 1.41.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants