From fd2d126ec472de87967abca65497ffdfe6d69153 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sun, 30 Jan 2022 16:28:49 +0100 Subject: [PATCH] cln-grpc: Add conversion from pb Amount to json Amount --- cln-grpc/src/pb.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/cln-grpc/src/pb.rs b/cln-grpc/src/pb.rs index c02710361..6d72730cf 100644 --- a/cln-grpc/src/pb.rs +++ b/cln-grpc/src/pb.rs @@ -13,20 +13,3 @@ impl From for JAmount { JAmount::from_msat(a.msat) } } - -impl From<&Amount> for JAmount { - fn from(a: &Amount) -> Self { - match a { - Amount { - unit: Some(amount::Unit::Millisatoshi(v)), - } => JAmount::Millisatoshi(*v), - Amount { - unit: Some(amount::Unit::Satoshi(v)), - } => JAmount::Satoshi(*v), - Amount { - unit: Some(amount::Unit::Bitcoin(v)), - } => JAmount::Bitcoin(*v), - o => panic!("Unhandled conversion from pb:Amount to json:Amount: {:?}", o), - } - } -}