Skip to content

Add helper for detecting whether a Stellar address belongs to the connected wallet #530

Description

@Chucks1093

Summary

Several UI interactions — showing edit controls, hiding sell buttons for non-holders — depend on whether the viewing wallet is the owner of a resource. A shared helper that compares a target address against the connected wallet address should be used consistently across these checks.

Scope

  • Add isOwnWallet(address: string, connectedAddress: string | null): boolean utility
  • Returns false when connectedAddress is null (wallet not connected)
  • Comparison is case-insensitive to handle address casing differences
  • Add unit tests for: matching addresses, non-matching, null connected address, different casing

Acceptance Criteria

  • Returns true for matching addresses
  • Returns false for non-matching addresses
  • Returns false when connected address is null
  • Case-insensitive comparison

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions