-
Notifications
You must be signed in to change notification settings - Fork 955
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
Murisi/unconstrained transfers #3459
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3459 +/- ##
==========================================
- Coverage 53.92% 53.86% -0.07%
==========================================
Files 317 317
Lines 107575 107746 +171
==========================================
+ Hits 58011 58032 +21
- Misses 49564 49714 +150 ☔ View full report in Codecov by Sentry. |
08025d9
to
7d2bdf7
Compare
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.
Conceptual ACK, but this should receive careful review for correct arithmetic.
7d2bdf7
to
424d0f6
Compare
424d0f6
to
67130f8
Compare
43541f3
to
987253d
Compare
987253d
to
317b3ad
Compare
e4da8c0
to
98c88ec
Compare
impl serde::Serialize for UserAccount { | ||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> | ||
where | ||
S: serde::Serializer, | ||
{ | ||
serializer.collect_str(&self.to_string()) | ||
} | ||
} | ||
|
||
impl<'de> Deserialize<'de> for UserAccount { | ||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> | ||
where | ||
D: Deserializer<'de>, | ||
{ | ||
let s = <String as Deserialize>::deserialize(deserializer)?; | ||
FromStr::from_str(&s).map_err(serde::de::Error::custom) | ||
} | ||
} |
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.
replace with namada::core::string_encoding::StringEncoded
, which uses Display
and FromStr
to encode some value with serde
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.
StringEncoded<UserAccount>
that is
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.
@murisi can we try to address any further items related to this PR in a follow-up PR? This has been merged to draft now.
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.
Sure, understood. Thanks.
* origin/murisi/unconstrained-transfers: Generalized the Transfer event to support reporting multiple account changes. Unconstrain transfers and combine transfer amounts. Renamed some data structures. Added a changelog entry. Remove now dead code. Subsumed unshielding transfer into generalized transfer. Subsumed shielding transfer into generalized transfer. Subsumed shielded transfer into generalized transfer. Renamed TransparentTransfer to Transfer. Generalized the TransparentTransfer to support a shielded action.
Describe your changes
An attempt to defragment the inputs and outputs of a transfer to ease the printing of transfers on hardware wallets. More specifically, the following changes have been made:
multi_transfer
function in the transaction prelude that can apply any number of balance changes simultaneously instead of just 2 like the existingtransfer
functionIndicate on which release or other PRs this topic is based on
#3446
Checklist before merging to
draft