Skip to content

[#134] Format royalties with dynamic token decimals#141

Merged
realproject7 merged 1 commit intomainfrom
task/134-format-royalties
Mar 15, 2026
Merged

[#134] Format royalties with dynamic token decimals#141
realproject7 merged 1 commit intomainfrom
task/134-format-royalties

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Formats unclaimed royalties using formatUnits() with dynamically fetched token decimals via ERC-20 decimals(). Falls back to 18 if call fails. Fixes #134

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@realproject7 realproject7 merged commit f55aa03 into main Mar 15, 2026
1 check passed
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.

[Bug] CLI: claim command shows raw bigint instead of formatted value

2 participants