-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TransactionView: summary of transaction effects #4943
Merged
Merged
Changes from 23 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
9935b89
proto(balance): define Balance message
TalDerei 30138f8
regenerate protos for Balance message
TalDerei 7174118
proto(TransactionSummary): define TransactionSummary message
TalDerei 06bf641
regenerate protos for TransactionSummary message
TalDerei 9add44d
add corresponding domain types to Balance
TalDerei abd9a29
modify message and regenerate protos for Balance
TalDerei 8c12d8e
stub fallible conversion (proto message to domain type)
TalDerei 8382e6a
add corresponding domain types to TransactionSummary and Effects
TalDerei ff86c9a
stub summary method in TransactionView
TalDerei 425e549
proto(TransactionSummary): combine into a sub-message
TalDerei 95aacc0
domain type (TransactionSummary): combine into a sub-message
TalDerei 78741f8
proto(Balance): encapsulate list of value pairs
TalDerei 36e9e5e
domain type (Balance): refactor conversions
TalDerei e434fa4
fix infinite recursion
TalDerei 7b5670c
fill other action views
TalDerei f812330
proto(Balance): modify serialization and add unit testing
TalDerei f2142d8
proto(Balance): fix negation flag
TalDerei 746d981
TransactionSummary: add unit testing
TalDerei 86ede41
cargo clippy
TalDerei 0ef739a
change visibility to private
TalDerei ef70e9c
simplify accumulate_summary method
TalDerei 6b59390
swap unit test and dummy data
TalDerei 2544232
remove log statements
TalDerei ee48a48
simplify accumulate effects helper
TalDerei d59033e
proto(Balance): handle zero cases in fallible conversion
TalDerei 02b18d0
serialization: explicitely define ordering
TalDerei a37c046
testing: add proptest and filter zero amounts in fallible conversion
TalDerei f34601f
Simplify balance conversion
cronokirby 74aa056
Simplify manual PartialOrd for AdressView
cronokirby 28c8e70
core(balance): fix typo
erwanor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, we should explicitly write down the PartialOrd instance, so that someone refactoring the order of the enums or something doesn't accidentally change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, is it even necessary here? if so, then I think a comment like this one:
would be helpful. Can put a pin on doing a lookup on the rest of the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's necessary to satisfy other trait bounds in
accumulate_effects
. I added the proposed commentThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, also we want a canonical serialization for balances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
PartialOrd
andOrd
impls forAddressView