Bug
PR #141 (claim.ts) and PR #142 (status.ts) fetch decimals() from the storyline token address to format royalty amounts. However, getRoyaltyInfo returns amounts denominated in the reserve token, which may have different decimals (e.g., USDC = 6 vs storyline token = 18).
On testnet with WETH (18 decimals for both) this works, but will display incorrect values on mainnet if the reserve token differs.
Fix:
- Use
tokenBond() to get the reserveToken address
- Fetch
decimals() and symbol() from the reserve token, not the storyline token
- Apply to both
packages/cli/src/commands/claim.ts and packages/cli/src/commands/status.ts
Rules for T3:
- NEVER store keys/secrets in plain text without .gitignore protection
- NEVER hardcode addresses, keys, or sensitive values
- Communicate via AgentChattr MCP chat by tagging agents. Your terminal is NOT visible.
Checklist:
Bug
PR #141 (
claim.ts) and PR #142 (status.ts) fetchdecimals()from the storyline token address to format royalty amounts. However,getRoyaltyInforeturns amounts denominated in the reserve token, which may have different decimals (e.g., USDC = 6 vs storyline token = 18).On testnet with WETH (18 decimals for both) this works, but will display incorrect values on mainnet if the reserve token differs.
Fix:
tokenBond()to get thereserveTokenaddressdecimals()andsymbol()from the reserve token, not the storyline tokenpackages/cli/src/commands/claim.tsandpackages/cli/src/commands/status.tsRules for T3:
Checklist:
claim.tsreads decimals/symbol from reserve token (viatokenBond())status.tsreads decimals/symbol from reserve token (viatokenBond())npm run lintandnpm run typecheckpass