Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Jun 25, 2025

What do these changes do?

Reported by @bisgaard-itis ft. @matusdrobuliak66

This PR fixes a hacky situation where the wallets are created manually in the DB.

If the user gets access to two wallets without having a preferred wallet, this PR improves the logic by traying to choose the personal one.

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this Jun 25, 2025
@odeimaiz odeimaiz added this to the Engage milestone Jun 25, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Jun 25, 2025
@odeimaiz odeimaiz marked this pull request as ready for review June 25, 2025 09:55
@odeimaiz odeimaiz requested a review from Copilot June 25, 2025 09:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Enhances the preferred wallet selection logic to handle missing or invalid preference settings by preferring a personal wallet and falling back to the first available one.

  • Broaden condition to apply when any wallets exist, not just a single one
  • Introduce lookup for the user’s personal wallet in the group
  • Add fallback to the first wallet if no personal wallet is found

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

👍

@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 25, 2025
@odeimaiz
Copy link
Member Author

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Jun 25, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 98caa3a

@matusdrobuliak66
Copy link
Collaborator

It doesn't need to be hacky, since groups are not product-bound — that's why you can have access to multiple wallets when you're added to a second product and your user already belongs to some groups.

@sonarqubecloud
Copy link

@mergify mergify bot merged commit 98caa3a into ITISFoundation:master Jun 26, 2025
60 checks passed
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:frontend issue affecting the front-end (area group) t:enhancement Improvement or request on an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants