Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to include the rewards per share in the rewards manifests.
The fields are represented as string types in this draft in an attempt to include the same precision in the protos as that used in the internal rewarder calculations. In the rewarder these values are represented as Decimal types.
On the IOT side the rewards per share values are rounded to a precision of 15. On the mobile side no rounding takes place and we end up with decimal value such as
dec!(1713882.1655472017013743978648)
If the corresponding proto field is represented as a float or double this corresponds to a f64 in rust and as such when going from the rewarder's internal decimal value to an f64 we will loose precision on the mobile rewards side. Any consumers of those protos will not be able to arrive at the same final reward values as the mobile rewarder generated.
Alternative options to consider: