Skip to content

fix(automint): username errors, marketplace getters, admin getter names, not-found page - #1469

Merged
ada-nwali merged 4 commits into
ada-nwali:testnet-implementationfrom
precious-akpan:fix/1218-1195-1193-1161-automint-cleanup
Oct 24, 2026
Merged

ada-nwali merged 4 commits into
ada-nwali:testnet-implementationfrom
precious-akpan:fix/1218-1195-1193-1161-automint-cleanup

Conversation

@precious-akpan

Copy link
Copy Markdown
Contributor

Closes #1218
Closes #1195
Closes #1193
Closes #1161

Summary

One commit per issue. The commits target testnet-implementation, the repo's default branch.

Test evidence

  • cargo test -p automint-registry: 109 passed.
  • cargo test -p automint-accrual: 72 passed.
  • cargo test -p automint-marketplace: 126 passed, 3 failed. The same three fail on the base branch, so they predate this PR: set_bot_nft_succeeds_once_every_listing_has_settled, test_error_variant_overflow, test_fee_boundary_prices.
  • npx tsc --noEmit in frontend: clean.
  • frontend Jest: the new notFound.test.tsx and errors.test.ts pass except for one test (below). The errorBoundaries suite passes. Five frontend suites fail with 12 tests in total (useMarketplace, transaction, dashboard.integration, TierSupplyBadge, and errors). The same five fail on the base branch.

Notes for reviewers

  • Redeploy required: get_admin → admin, get_accrual_admin → admin, and the marketplace config/bot_nft return types change the contract interfaces. Redeploy registry, accrual, and marketplace before the frontend uses the new names.
  • Bindings: the marketplace, accrual, and registry bindings under frontend/src/lib/bindings were edited by hand to match. They should be regenerated with stellar contract bindings typescript from the built wasm so they match the contracts exactly.
  • Pre-existing test gap: errors.test.ts ("has a message for every explicitly numbered Rust contract error") still fails on the base branch. It is missing entries for bot_nft codes 16–19, accrual code 14, and marketplace code 34. This PR adds the registry gap (ImplausiblePoints, code 11), which is also what the test needed for the registry enum.
  • Test snapshots: running the accrual and marketplace tests rewrote many unrelated snapshot files. Those were reverted, and only the registry snapshots for the changed tests are included.
  • Toolchain: rust-toolchain.toml pins Rust 1.95.0, which I installed to run the tests.

…loses ada-nwali#1218)

register() reported UsernameTaken when the username was empty or longer than
32 bytes, so the frontend told users a valid name was already in use. Add a
distinct InvalidUsername error (code 12) for those cases and keep
UsernameTaken for real collisions.

- Update the register doc comment, the registry contract doc, and the two
  affected tests.
- Map InvalidUsername in the frontend error table, reword the UsernameTaken
  message to "already in use", and add the missing entry for
  ImplausiblePoints (code 11), which the table test requires.
- Add InvalidUsername to the generated registry binding error table.
…g and bot_nft (Closes ada-nwali#1195)

config() and bot_nft() unwrapped the stored Config, so calling them before
initialize trapped with an opaque host error. They now return
Result<_, MarketplaceError> with NotInitialized, matching accrual::config().

This commit also adds marketplace admin(), which returns the admin recorded in
Config, so every contract exposes the same getter for the admin address. The
admin getter name is standardized across contracts in the next commit.

Updates the generated marketplace binding to the new return types.
…da-nwali#1193)

The admin address was exposed under three different names: registry
get_admin(), accrual get_accrual_admin(), and admin() on token and bot_nft.
deploy.sh's verify_contract() calls admin() on every contract, so it already
failed for registry and accrual.

- registry: rename get_admin() to admin()
- accrual: rename get_accrual_admin() to admin()
- marketplace: admin() was added in the previous commit

Updates the registry and accrual bindings and the frontend preflight check
to the new name. Test snapshots are regenerated for the renamed calls.

Redeploy registry and accrual before relying on the new names.
Unknown routes and notFound() calls, such as a missing bot id, fell back to
Next.js's default 404, which dropped the AutoMint layout and styling.

app/not-found.tsx renders inside the root layout, so the header and footer stay
mounted. It reuses the RouteError panel style and links back to the dashboard
and marketplace. A small test covers the heading and both links.
@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

@precious-akpan is attempting to deploy a commit to the Ada's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ada-nwali
ada-nwali merged commit b6379f5 into ada-nwali:testnet-implementation Oct 24, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants