Merge pull request #402 from str4d/amount-to-orchard-valuesum

impl From<Amount> for orchard::ValueSum
This commit is contained in:
Daira Hopwood 2021-06-14 22:46:22 +01:00 committed by GitHub
commit d88e40113c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -182,6 +182,12 @@ impl Neg for Amount {
}
}
impl From<Amount> for orchard::ValueSum {
fn from(v: Amount) -> Self {
orchard::ValueSum::from_raw(v.0)
}
}
impl TryFrom<orchard::ValueSum> for Amount {
type Error = ();