feat: add integration tests for isOwnWallet and implement isOwnWallet…#535
Merged
Chucks1093 merged 1 commit intoJul 19, 2026
Conversation
… utility function
Stanley-Owoh
force-pushed
the
add-integration-test-for-isownwallet-edit-controls-533
branch
from
July 19, 2026 11:00
a4dbe5f to
5ee57e3
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add integration test for isOwnWallet helper controlling visibility of edit controls
Summary
Edit controls on the creator profile (update bio, change avatar) should only be visible when the viewing wallet matches the creator's own wallet. This PR adds the
isOwnWallethelper, wires it intoCreatorProfileHeader, and covers the behaviour with integration tests.Changes
New
src/utils/isOwnWallet.ts— Pure helper that case-insensitively compares a connected wallet address against a creator address; returnsfalsewhen either is missing.src/utils/__tests__/isOwnWallet.test.ts— Unit tests for the helper (exact match, case-insensitive match, mismatch, null/undefined/empty inputs).src/components/common/__tests__/CreatorProfileHeader.isOwnWallet.integration.test.tsx— Integration tests verifying:Modified
src/components/common/CreatorProfileHeader.tsx— AddedconnectedWalletAddressprop. Edit buttons ("Edit Bio", "Change Avatar") render conditionally via{own && (...)}so they are absent from the DOM for non-owners.Acceptance Criteria
Closes #533