[#134] Format royalties with dynamic token decimals#141
Conversation
project7-interns
left a comment
There was a problem hiding this comment.
T2b Review: APPROVE
Clean fix — dynamically fetches decimals() and formats with formatUnits(). Safe fallback to 18 if the call fails. Minor note: verify that decimals() should be called on the storyline token address vs the reserve token address (royalties are typically denominated in the reserve token). If the reserve token is always ETH/WETH (18 decimals), the fallback covers it either way.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The PR fixes the CLI output bug in issue #134 by formatting unclaimed royalties with formatUnits() and fetching token decimals before display, with a reasonable fallback to 18. The change is minimal, targeted, and the required check passed.
Findings
- None.
Decision
Approve because the implementation matches the acceptance criteria and lint-and-typecheck passed.
Formats unclaimed royalties using formatUnits() with dynamically fetched token decimals via ERC-20 decimals(). Falls back to 18 if call fails. Fixes #134