Skip to content

Fix incorrect Memo length limit in B20 tooltip - #56

Open
t0mw4lker wants to merge 1 commit into
base:mainfrom
t0mw4lker:patch-1
Open

Fix incorrect Memo length limit in B20 tooltip#56
t0mw4lker wants to merge 1 commit into
base:mainfrom
t0mw4lker:patch-1

Conversation

@t0mw4lker

Copy link
Copy Markdown

What

Fix the B20 Memo tooltip to describe the actual 32-byte UTF-8 limit instead of a 32-character limit.

Why

The current tooltip says that memos can contain up to 32 characters:

app/demos/b20/lib/glossary.ts

Screen:
image

However, memoToBytes32() encodes the input with stringToHex() and rejects values exceeding 32 UTF-8 bytes:

app/demos/b20/lib/protocol.ts

Screen:
image

The Memo UI uses this same validation function for user input:

app/demos/b20/components/MemoModule.tsx

Screen:
image

Since UTF-8 characters can occupy multiple bytes, a 32-character string can exceed the 32-byte limit. The tooltip therefore does not accurately describe the implemented constraint.

Change

Update the tooltip from:

Notes can be up to 32 characters.

to:

Notes can be up to 32 UTF-8 bytes.

This makes the user-facing description match the actual validation performed by the demo.

@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@t0mw4lker is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

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