starknet-jvm icon indicating copy to clipboard operation
starknet-jvm copied to clipboard

Allow integer `revision` in `TypedData.Domain`

Open DelevoXDG opened this issue 11 months ago • 2 comments

Describe your changes

TypedData.Domain can now be decoded from the following json, where revision is an integer:

"domain": {
    "name": "Starknet Example",
    "version": "1",
    "chainId": "SN_MAIN",
    "revision" : 1
  },

Linked issues

Closes #448

Breaking changes

  • [x] This issue contains breaking changes
  • TypedData.Domain.Revision is now of type JsonPrimitive? instead of TypedData.Revision?. Use TypedData.Domain.resolvedRevision to access revision as TypedData.Revision

DelevoXDG avatar Mar 21 '24 12:03 DelevoXDG

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.26%. Comparing base (d28b008) to head (ad53b98). Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #449      +/-   ##
==========================================
- Coverage   71.12%   69.26%   -1.86%     
==========================================
  Files          75       75              
  Lines        3338     3254      -84     
  Branches      367      361       -6     
==========================================
- Hits         2374     2254     -120     
- Misses        798      845      +47     
+ Partials      166      155      -11     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 21 '24 12:03 codecov-commenter

Even though this change is not breaking for typed data where revision is a string, I suppose it's best we wait for https://github.com/starknet-io/SNIPs/pull/79 to be merged.

DelevoXDG avatar Mar 21 '24 12:03 DelevoXDG