File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
fmo_server/src/federation Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -750,18 +750,21 @@ impl FederationObserver {
750750 ( Some ( amount_msat) , None )
751751 }
752752 "wallet" => {
753- // TODO: recognize v1 wallet inputs
754- if let Some ( v0_input) = input
753+ let amount = match input
755754 . as_any ( )
756755 . downcast_ref :: < WalletInput > ( )
757756 . expect ( "Not Wallet input" )
758- . maybe_v0_ref ( )
759757 {
760- let amount_msat = v0_input. 0 . tx_output ( ) . value * 1000 ;
761- ( Some ( amount_msat) , None )
762- } else {
763- ( None , None )
764- }
758+ WalletInput :: V0 ( wallet_input) => wallet_input. tx_output ( ) . value ,
759+ WalletInput :: V1 ( wallet_input) => wallet_input. tx_out . value ,
760+ _ => {
761+ panic ! ( "Unsupported WalletInput version" ) ;
762+ }
763+ } ;
764+
765+ let amount_msat = amount. to_sat ( ) * 1000 ;
766+
767+ ( Some ( amount_msat) , None )
765768 }
766769 _ => ( None , None ) ,
767770 } ;
You can’t perform that action at this time.
0 commit comments