feat(profiles): add multi-profile switching within one wallet - #171
feat(profiles): add multi-profile switching within one wallet#171fwseyi wants to merge 2 commits into
Conversation
|
Someone is attempting to deploy a commit to the truthixify's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@fwseyi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
truthixify
left a comment
There was a problem hiding this comment.
@fwseyi this one cannot go in as it stands, and I want to be precise about why because the diff looks like a normal feature PR.
The branch is cut from the current tip of develop (a2ef560), but it removes 15 files that are already on develop, most of them merged in the last day or two. Net effect is 1368 added against 3317 deleted.
Deleted here:
src/wallets/stellar/PasskeyAdapter.ts,src/lib/stellar/passkey.ts,passkey.test.ts,PasskeyUnsupportedCard.tsx,PasskeyUnsupportedCard.stories.tsx(passkey mode, #166)src/components/PrivacyPostureChip.tsx,src/lib/privacy-posture.ts,privacy-posture.test.ts,src/lib/telemetry.test.ts(privacy chip, #167)src/pages/NamesAuctions.tsx,src/store/nameWatchlistStore.tsx,nameWatchlistStore.test.ts, plus the/names/auctionsroute out ofApp.tsx(auction UI, #164)src/lib/stellar/recoveryKit.ts,recoveryKit.test.ts(recovery kit, #163)src/lib/idleLock.ts(idle relock, #162)
That is five separate contributors' merged work. The failing build check is consistent with it: PrivacyPostureChip is deleted while one file still imports it.
This usually means a local checkout that predates those merges got copied over the top of a fresh branch, rather than a rebase. The multi-profile work itself is not the problem, ProfileSwitcher.tsx at +327 looks like real progress.
Cleanest way out, keeping only your own commits:
git fetch origin
git rebase --onto origin/develop <first-commit-of-your-work>^ HEAD
Or start a branch from origin/develop and reapply just your profile changes onto it. Either way, git diff --diff-filter=D --name-only origin/develop HEAD should print nothing before you push. Happy to help work through it if the rebase gets awkward.
Lets users derive multiple stealth-key profiles from the same wallet signature by domain-separating STEALTH_SIGNING_MESSAGE per profile, and switch between them from the header.
Changes
Correctness
The default profile's signing message is byte-for-byte unchanged, so existing users' meta-addresses and on-chain announcements remain reachable — verified explicitly in tests/profile-domain-separation.spec.ts, including a pure-function test proving deriveStealthKeys is deterministic for the default case.
Tests
tests/profile-domain-separation.spec.ts — 6 pure-JS assertions proving two profiles derive cryptographically distinct meta-addresses from the same wallet, plus a browser test verifying the UI swaps meta-address on profile switch without a reload.
Merge note
This branch was rebased against develop mid-implementation to pick up 6 PRs that landed upstream, including issue #148 (Portfolio) and a recovery-kit restore feature that also touched StealthKeysContext.tsx. Both were merged in cleanly — recovery-kit's isRecoveryMode/restoreFromRecoveryKit now operate on the active profile's key slot rather than flat state.
Known pre-existing failure (unrelated)
recoveryKit.test.ts has 2 failing assertions (string-format mismatch) that predate this branch — confirmed via git show against develop directly. Out of scope here.
Validation
pnpm exec tsc --noEmit → 0 errors
pnpm test:unit → 164 passed, 2 pre-existing failures (recoveryKit.test.ts)
pnpm format:check → clean
Closes #149