Day 35/100 — Cleanup, a near-miss staging catch, and honest limitations documented
A consolidation day on BrowseMe, fixing real issues and being honest about what’s still broken.
Contract and tests: fixed the duplicate-attester check and aligned the app’s private state with the updated contract. Removed attesterType and attesterRand from deploy.ts and corrected emptyInvestorForm to the contract’s actual fields, name, region, businessId, taxId. All 7 tests pass with yarn test. Pinned compact compile to +0.31.1 in the root package.json.
Frontend: committed WalletContext.tsx, pages/, and the routing changes, my first staging list had missed them, which would have broken a fresh clone silently. Added react-router-dom. Reverted a compact-runtime bump to 0.19.0, since the compiled contract calls checkRuntimeVersion('0.16.0'), so the frontend now matches the root and the compiler. Type check (tsc --noEmit -p tsconfig.app.json) is clean after installing frontend dependencies.
License, README, and comments: added the Apache 2.0 LICENSE and a NOTICE, set the license field in the root package.json. Updated the README with a license badge, the new files in the project tree, a routing status line, and a runtime-mismatch troubleshooting entry. Added compact update 0.31.1 to the fresh-clone steps. Rewrote Known Limitations to honestly cover the silent 32-byte truncation in toBytes32 and the empty contactInfo. Replaced stale “Stage 2” placeholder comments in both registration forms, since the pages now actually encode the fields and call ContractAPI.
Merge: the remote had its own README changes, conflicting in three places. Kept my license edits and the remote’s Privacy Model section. Rewrote the remote’s placeholderCommitment() paragraph, since that code doesn’t exist anymore, commitments are computed in-circuit now. Pasted extra commands into the merge message by accident, fixed with git commit --amend. Everything’s pushed to origin/main.
Still open:
-
deploy.ts has 9 type errors, all from Midnight SDK drift (URL vs string for indexer URLs, a missing waitForGeneratedDust on the dust wallet, a new args requirement on deployContract). Pre-existing, haven’t touched them yet.
-
Neither registration form validates input length. Business descriptions are the worst case, the form requires 20+ characters but only the first 32 bytes get committed. Need to decide between a length limit or hashing longer text down.