Skip to content

feat: use wallet URLs for Herald QR codes#352

Merged
macterra merged 6 commits intomainfrom
codex/use-wallet-url-for-herald-alias-qr
Apr 1, 2026
Merged

feat: use wallet URLs for Herald QR codes#352
macterra merged 6 commits intomainfrom
codex/use-wallet-url-for-herald-alias-qr

Conversation

@macterra
Copy link
Copy Markdown
Collaborator

@macterra macterra commented Apr 1, 2026

Summary

  • expose Herald's configured wallet URL through /api/config
  • use the wallet web URL for member alias QR codes instead of legacy archon://accept links
  • use the wallet web URL for credential QR codes as well

Validation

  • cd apps/herald-client && npx -y npm@10.9.2 run build
  • cd services/herald/server && npx -y npm@10.9.2 run build

@macterra macterra requested a review from Copilot April 1, 2026 19:17
@macterra macterra marked this pull request as ready for review April 1, 2026 19:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Herald to publish its configured wallet web URL to clients and switches Herald Client QR codes away from legacy archon://accept deep links toward wallet web URLs.

Changes:

  • Expose Herald’s configured wallet base URL via GET /api/config (walletUrl).
  • Build wallet web URLs client-side and use them for credential and member-alias QR codes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
services/herald/server/src/index.ts Adds walletUrl to /api/config so clients can generate wallet web URLs consistently.
apps/herald-client/src/App.tsx Introduces buildWalletUrl() and updates QR/link generation in credential/member views to use wallet web URLs.
Comments suppressed due to low confidence (2)

apps/herald-client/src/App.tsx:857

  • fetchCredential() now fetches /config and /credential in the same try/catch, but the error message fallback still says "Failed to fetch credential" even if /config is what fails. Splitting the requests (or adjusting the fallback message) would make failures easier to diagnose; also consider defaulting setWalletUrl(configResponse.data.walletUrl || '') to keep state consistent if the field is missing.
    useEffect(() => {
        const fetchCredential = async () => {
            try {
                const configResponse = await api.get('/config');
                setWalletUrl(configResponse.data.walletUrl);

                const response = await api.get('/credential');
                setCredentialData(response.data);
            }
            catch (err: any) {
                if (err.response?.status === 401) {
                    navigate('/login');
                } else {
                    setError(err.response?.data?.error || 'Failed to fetch credential');
                }

apps/herald-client/src/App.tsx:1069

  • ViewMember now only renders the QR/link when aliasWalletUrl is truthy. If the server is older (no walletUrl in /config) or the value is missing/invalid, the QR code disappears entirely, whereas previously it still rendered an archon://accept?... link. Consider adding a backwards-compatible fallback (legacy URL or at least render the DID without a link) so the page doesn’t silently lose the primary action.
                    {memberData?.didDocument?.id && aliasWalletUrl && (
                        <a href={aliasWalletUrl} style={{ color: 'inherit', textDecoration: 'none' }}>
                            <QRCodeSVG value={aliasWalletUrl} />
                            <Typography variant="body1" sx={{ fontFamily: 'monospace', color: '#666', wordBreak: 'break-all', mt: 2 }}>
                                {memberData.didDocument.id}
                            </Typography>
                        </a>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/herald-client/src/App.tsx Outdated
Comment thread apps/herald-client/src/App.tsx Outdated
@macterra macterra merged commit 09a4950 into main Apr 1, 2026
16 checks passed
@macterra macterra deleted the codex/use-wallet-url-for-herald-alias-qr branch April 1, 2026 20:47
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.

2 participants