Skip to content

Conversation

@johnsaigle
Copy link
Contributor

  • Modify computeValue to validate its parameters. The callers are already safe in each instance, but this helps to facilitate unit tests and refactoring
  • Add Price validation for mainnet tokens (must be non-nil and non-negative)
  • Try to avoid unnecessary copies of tokens and chains in unit tests

@johnsaigle johnsaigle added node governor quality doesn't fix a known bug, doesn't change behavior, but increase code quality labels Dec 11, 2025
- Modify computeValue to validate its parameters. The callers are
  already safe in each instance, but this helps to facilitate unit tests
  and refactoring
- Add Price validation for mainnet tokens (must be non-nil and
  non-negative)
@johnsaigle johnsaigle force-pushed the gov-computevalue-checks branch from 6e991d5 to 6812e46 Compare December 12, 2025 15:09
@johnsaigle johnsaigle marked this pull request as ready for review December 12, 2025 15:26
djb15
djb15 previously approved these changes Dec 13, 2025
@johnsaigle johnsaigle requested a review from bemic December 15, 2025 14:14
bemic
bemic previously approved these changes Dec 15, 2025
- Fix comment for computeValue to avoid confusion with the `transfer`
  type
- Rename function to `usdValue()` (presumably most of what we are doing
  here is computing things)
@johnsaigle johnsaigle dismissed stale reviews from bemic and djb15 via 7af950c December 15, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

governor node quality doesn't fix a known bug, doesn't change behavior, but increase code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants