lookupTokenInfo() in src/shared/balances.js caps a symbol read off a contract with String(symbol).slice(0, 12), which counts UTF-16 units. A symbol made of emoji outside the Basic Multilingual Plane (two units each) can be cut between the two halves of one, and the half left over is stored in trackedTokens and shown as U+FFFD on every screen that lists the token.
displaySymbol() got the same fix in #329 (it now counts code points), but it cannot repair a symbol that was already stored broken.
Definition of done
lookupTokenInfo() cuts a symbol on code-point boundaries, never mid-emoji.
A test with a symbol of emoji outside the Basic Multilingual Plane, which fails against current next.
make check green.
Model: opus-5-5
`lookupTokenInfo()` in `src/shared/balances.js` caps a symbol read off a contract with `String(symbol).slice(0, 12)`, which counts UTF-16 units. A symbol made of emoji outside the Basic Multilingual Plane (two units each) can be cut between the two halves of one, and the half left over is stored in `trackedTokens` and shown as U+FFFD on every screen that lists the token.
`displaySymbol()` got the same fix in https://git.eeqj.de/sneak/AutistMask/issues/329 (it now counts code points), but it cannot repair a symbol that was already stored broken.
## Definition of done
- [ ] `lookupTokenInfo()` cuts a symbol on code-point boundaries, never mid-emoji.
- [ ] A test with a symbol of emoji outside the Basic Multilingual Plane, which fails against current `next`.
- [ ] `make check` green.
Model: opus-5-5
Plan: lookupTokenInfo() cuts the symbol on code-point boundaries, the way displaySymbol() already does, and the token name too if it is cut the same way. Jest test with emoji outside the Basic Multilingual Plane. No repair of symbols already stored.
Model: opus-5-5
Plan: `lookupTokenInfo()` cuts the symbol on code-point boundaries, the way `displaySymbol()` already does, and the token name too if it is cut the same way. Jest test with emoji outside the Basic Multilingual Plane. No repair of symbols already stored.
Model: opus-5-5
Fixed in #482: lookupTokenInfo() now cuts both the symbol and the token name on code points.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/AutistMask/pulls/482: `lookupTokenInfo()` now cuts both the symbol and the token name on code points.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
lookupTokenInfo()insrc/shared/balances.jscaps a symbol read off a contract withString(symbol).slice(0, 12), which counts UTF-16 units. A symbol made of emoji outside the Basic Multilingual Plane (two units each) can be cut between the two halves of one, and the half left over is stored intrackedTokensand shown as U+FFFD on every screen that lists the token.displaySymbol()got the same fix in #329 (it now counts code points), but it cannot repair a symbol that was already stored broken.Definition of done
lookupTokenInfo()cuts a symbol on code-point boundaries, never mid-emoji.next.make checkgreen.Model: opus-5-5
Plan:
lookupTokenInfo()cuts the symbol on code-point boundaries, the waydisplaySymbol()already does, and the token name too if it is cut the same way. Jest test with emoji outside the Basic Multilingual Plane. No repair of symbols already stored.Model: opus-5-5
Fixed in #482:
lookupTokenInfo()now cuts both the symbol and the token name on code points.Model: opus-5-5