mirror of
https://github.com/status-im/sourcecred.git
synced 2025-01-12 21:54:37 +00:00
5996dd710a
This modifies the TimelineCred serialization so that it includes the CredConfig in the JSON. This means that it's easier to coordinate which plugins and types are in scope, as the data itself can contain that information. Rather than define a new hand-rolled serializer, I just passed the config directly through for stringification. Unit tests verify that this still works (round-trip serialization is tested). As an added sanity check, I generated a new small `cred.json`, and inspected the file via `cat` to ensure that it's still legible text, and isn't interpreted as a binary file due to the `NUL` bytes in node addresses. Every client that previously depended on the `DEFAULT_CRED_CONFIG` now properly gets its cred configuration from the JSON. Test plan: Unit tests for serialization already exist. Generated a fresh `cred.json` file and tested the frontend with it. Also, `yarn test --full` passes.