fix: add explicit serde/strum rename for MAKER_REBATE#17
fix: add explicit serde/strum rename for MAKER_REBATE#17yovanoc wants to merge 1 commit intoPolymarket:mainfrom
Conversation
MakerRebate was deserializing to Unknown("MAKER_REBATE") because
rename_all = "UPPERCASE" produces "MAKERREBATE" not "MAKER_REBATE".
Added explicit serde/strum rename attributes.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f9523b9. Configure here.
| /// Yield | ||
| Yield, | ||
| /// Maker rebate (fee rebate for providing liquidity). | ||
| #[serde(rename = "MAKER_REBATE")] |
There was a problem hiding this comment.
Wrong rename_all rule invites repeat of same bug
Low Severity
The ActivityType enum uses rename_all = "UPPERCASE", which doesn't insert underscores between words — that's exactly what caused the MakerRebate bug this PR fixes. Using rename_all = "SCREAMING_SNAKE_CASE" (and serialize_all = "SCREAMING_SNAKE_CASE" for strum) would produce identical results for all existing single-word variants while correctly handling multi-word variants automatically. This would eliminate the need for the explicit rename on MakerRebate and prevent any future multi-word variant from silently falling through to Unknown.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f9523b9. Configure here.


MakerRebate was deserializing to Unknown("MAKER_REBATE") because rename_all = "UPPERCASE" produces "MAKERREBATE" not "MAKER_REBATE". Added explicit serde/strum rename attributes.
Note
Low Risk
Low risk: a small serialization/deserialization mapping fix limited to
ActivityType, with no logic or data-flow changes beyond correcting the wire-format string.Overview
Fixes
ActivityType::MakerRebatestring mapping by adding explicitserdeandstrumrenames toMAKER_REBATE, ensuring the enum correctly serializes/deserializes this API value instead of falling back toUnknown.Reviewed by Cursor Bugbot for commit f9523b9. Bugbot is set up for automated code reviews on this repo. Configure here.