[Bug] capabilities field incorrectly shown as array in ERC-5792 code examples

Open Beginner friendly
#1,473 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
javascript

Research direction

Open tmp-builder-codes-outline.mdx and search all code examples for capabilities: [{ dataSuffix }]. Compare each occurrence with the ERC-5792 object format described in the issue. Done means every capabilities example uses the object form with the erc8021 key and no array form remains.

Written by the indexing model from the issue text.

Description

Description

In tmp-builder-codes-outline.mdx, the capabilities field is used as an
array in all code examples:

capabilities: [{ dataSuffix }]

However, the ERC-5792 spec defines capabilities as an object (key-value
map), not an array. The correct format should be:

capabilities: {
  "erc8021": { dataSuffix }
}

Location

tmp-builder-codes-outline.mdx — multiple code examples throughout the file

Impact

  • Developers following these examples will produce invalid ERC-5792 calls
  • Wallets that strictly follow the spec will reject these calls
  • Could cause silent attribution failures

Suggested Fix

Update all capabilities examples to use the correct object format as
defined in the ERC-5792 specification.

Dominant language
JavaScript
Stars
337
Forks
798
Avg merge
7h 24m
Merged PRs (30d)
51

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from base/docs

All issues in base/docs

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.