fix: allow numeric lockExpires in push notification validation#384
Conversation
Joi .valid(null) creates a whitelist that only accepts null, rejecting valid numeric timestamps for time-locked outputs. Changed to .allow(null) so both null and non-negative integers are accepted. Fixes Opsgenie alert #50062. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change modifies the wallet service's transaction push notification API by adjusting how null values are validated for the lockExpires parameter using Joi's Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
.valid(null)forlockExpires, which creates a whitelist accepting onlynull— rejecting valid numeric timestamps from time-locked outputs.allow(null)so bothnulland non-negative integers are acceptedlockExpiresvaluesTest plan
lockExpirespasses🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests