starknet-jvm
starknet-jvm copied to clipboard
Allow integer `revision` in `TypedData.Domain`
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 typeJsonPrimitive?
instead ofTypedData.Revision?
. UseTypedData.Domain.resolvedRevision
to access revision asTypedData.Revision
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.
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.