Opus finding
BigInt coercion of totalClaimable will throw on decimal strings or scientific notation
mediumbughigh
- src/commands/query/emissions-due.ts:117-123
BigInt() throws SyntaxError if given a string with a decimal point or 'e' (e.g. '1.5' or '1e18'). If the platform ever returns totalClaimable as a JS number that serializes with decimals (very common when REST APIs format BigInts as strings inconsistently), the command crashes with a raw SyntaxError rather than the structured PLATFORM_API_INVALID_RESPONSE / PLATFORM_API_ERROR contract. Same risk for `e.amount` though that one is preserved as a string and not BigInt'd until display — actually it's never BigInt'd, but totalClaimable is.
Recommendation
Validate via a try/catch around the BigInt() call, throwing cliError('PLATFORM_API_INVALID_RESPONSE') with the offending field.