Skip to content

Prevent self-referencing in trusted wallets list#162

Merged
samwel141 merged 2 commits intoGreenstand:v2from
samwel141:v2
Nov 16, 2025
Merged

Prevent self-referencing in trusted wallets list#162
samwel141 merged 2 commits intoGreenstand:v2from
samwel141:v2

Conversation

@samwel141
Copy link
Collaborator

Summary

This PR fixes an issue where the trusted wallets list could incorrectly include the logged-in wallet itself.
The fix adds helper functions that check the trust relationship against the logged-in wallet to ensure only the "other" wallet in the relationship is returned, preventing the logged-in wallet from appearing in its own trusted wallets list.

Tasks Completed

  • Added checkLoggedInWalletId helper function to determine the correct wallet ID (the other wallet in the relationship)
  • Added checkLoggedInWalletName helper function to determine the correct wallet name
  • Updated getTrustedWallets to use the new helper functions
  • Ensured trusted wallets list only displays wallets that trust or are trusted by the logged-in wallet, excluding the wallet itself

samwel141 and others added 2 commits November 11, 2025 04:39
Check trust relationships against the logged-in wallet to ensure the
trusted wallets list never includes the wallet itself. Previously used
actor_wallet_id which could incorrectly include the logged-in wallet.

- Add checkLoggedInWalletId to return the other wallet in the relationship
- Add checkLoggedInWalletName to return the other wallet's name
- Ensures trusted wallets list only shows wallets that trust or are
  trusted by the logged-in wallet, not the wallet itself
@samwel141 samwel141 merged commit 3e64473 into Greenstand:v2 Nov 16, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant