Skip to content

fix: migrate DID method from did:pkh:stellar to did:stellar - #44

Merged
DanielCotoJ merged 1 commit into
ACTA-Team:developfrom
Fran19-09:fix/issue-34-migrate-did-pkh-stellar-to-did-stellar
Jul 16, 2026
Merged

DanielCotoJ merged 1 commit into
ACTA-Team:developfrom
Fran19-09:fix/issue-34-migrate-did-pkh-stellar-to-did-stellar

Conversation

@Fran19-09

@Fran19-09 Fran19-09 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Closes #34

  • Added tests (if necessary)
  • Run tests
  • Run formatting
  • Evidence attached
  • Commented the code

📌 Type of Change

  • Documentation (updates to README, docs, or comments)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

📝 Changes Description

Renames the Stellar DID method from did:pkh:stellar to did:stellar across the entire codebase, as defined in the ACTA protocol docs.

packages/acta/src/did.ts

  • DID_PKH_STELLAR_PREFIX = 'did:pkh:stellar'DID_STELLAR_PREFIX = 'did:stellar'
  • didPkhStellar(network, address)didStellar(network, address) (same signature)

packages/acta/src/mock.ts

  • Import updated to didStellar; all 7 fixture calls (issuerDid, holderDid) updated

apps/credit-history/src/session/session-provider.tsx

  • Import updated to didStellar; call site at line 110 updated; JSDoc comment updated

apps/credit-history/src/app/page.tsx

  • Import updated to DID_STELLAR_PREFIX; badge render and vault card copy updated

apps/credit-history/src/types/index.ts

  • issuerDid format comment updated

apps/credit-history/src/components/wallet-button.tsx

  • JSDoc and inline comment updated; truncateDid index adjusted from 4→3 parts for the shorter did:stellar:{network}:{address} format (4 segments vs old 5)

Grep verification: zero pkh matches remain in apps/ or packages/ (excluding node_modules).


📸 Evidence

No visual change — this is a data/identifier migration. The identity method badge on the home page now shows did:stellar instead of did:pkh:stellar.

Pre-existing typecheck errors (26 in develop before this branch): unrelated to this PR — caused by missing lucide-react in app deps and @acta-products/types module resolution. None of my 6 changed files produce new errors.


🌌 Comments

truncateDid in wallet-button.tsx was adjusted: the old format had 5 colon-segments (did:pkh:stellar:{network}:{addr}), the new one has 4 (did:stellar:{network}:{addr}), so the guard and slice indices were updated accordingly.


Thank you for contributing to ACTA! We hope you can continue contributing to this project.

Summary by CodeRabbit

  • Improvements
    • Updated Stellar identity identifiers to use the did:stellar format.
    • Credit Vault descriptions and displayed identity-method information now reflect the updated format.
    • Connected wallet identity displays now correctly truncate the new DID structure.
    • Credit credentials and session-derived identities now use the updated Stellar DID format.

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

@Fran19-09 is attempting to deploy a commit to the ACTA Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3b738dfa-759c-42e7-bdad-7b5348510a7d

📥 Commits

Reviewing files that changed from the base of the PR and between 1b30c83 and 29f95ea.

📒 Files selected for processing (6)
  • apps/credit-history/src/app/page.tsx
  • apps/credit-history/src/components/wallet-button.tsx
  • apps/credit-history/src/session/session-provider.tsx
  • apps/credit-history/src/types/index.ts
  • packages/acta/src/did.ts
  • packages/acta/src/mock.ts

📝 Walkthrough

Walkthrough

The PR migrates Stellar DID construction and display from did:pkh:stellar to did:stellar, updating the shared helper, session derivation, fixtures, UI text, DID truncation, and format documentation.

Changes

Stellar DID migration

Layer / File(s) Summary
DID contract and fixture generation
packages/acta/src/did.ts, packages/acta/src/mock.ts
Renames the Stellar DID prefix and constructor, and updates fixture issuer and holder DID generation.
Session DID derivation
apps/credit-history/src/session/session-provider.tsx
Derives connected-wallet session DIDs with didStellar and documents the did:stellar format.
Credit-history DID display
apps/credit-history/src/app/page.tsx, apps/credit-history/src/components/wallet-button.tsx, apps/credit-history/src/types/index.ts
Updates displayed resolver text and identity prefix, adjusts DID truncation for the new segment layout, and updates credential format documentation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: josuebrenes, sotoj24

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: migrating the Stellar DID method from did:pkh:stellar to did:stellar.
Linked Issues check ✅ Passed The changes cover the DID helper rename, session/fixture/UI updates, and truncation logic needed for the did:stellar migration.
Out of Scope Changes check ✅ Passed All shown edits support the DID migration; the wallet-button change is part of the updated display and truncation behavior.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DanielCotoJ
DanielCotoJ merged commit e622774 into ACTA-Team:develop Jul 16, 2026
3 of 4 checks 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.

Migrate DID method did:pkh:stellar → did:stellar

2 participants