@@ -201,26 +201,29 @@ impl From<&PayloadError> for JsonReply {
201201 use InternalPayloadError :: * ;
202202
203203 match & e. 0 {
204- Utf8 ( _) => JsonReply :: new ( OriginalPsbtRejected , e) ,
205- ParsePsbt ( _) => JsonReply :: new ( OriginalPsbtRejected , e) ,
204+ Utf8 ( _)
205+ | ParsePsbt ( _)
206+ | InconsistentPsbt ( _)
207+ | PrevTxOut ( _)
208+ | MissingPayment
209+ | OriginalPsbtNotBroadcastable
210+ | InputOwned ( _)
211+ | InputWeight ( _)
212+ | InputSeen ( _)
213+ | PsbtBelowFeeRate ( _, _) => JsonReply :: new ( OriginalPsbtRejected , e) ,
214+
215+ FeeTooHigh ( _, _) => JsonReply :: new ( NotEnoughMoney , e) ,
216+
206217 SenderParams ( e) => match e {
207218 super :: optional_parameters:: Error :: UnknownVersion { supported_versions } => {
208219 let supported_versions_json =
209220 serde_json:: to_string ( supported_versions) . unwrap_or_default ( ) ;
210221 JsonReply :: new ( VersionUnsupported , "This version of payjoin is not supported." )
211222 . with_extra ( "supported" , supported_versions_json)
212223 }
213- _ => JsonReply :: new ( OriginalPsbtRejected , e) ,
224+ super :: optional_parameters:: Error :: FeeRate =>
225+ JsonReply :: new ( OriginalPsbtRejected , e) ,
214226 } ,
215- InconsistentPsbt ( _) => JsonReply :: new ( OriginalPsbtRejected , e) ,
216- PrevTxOut ( _) => JsonReply :: new ( OriginalPsbtRejected , e) ,
217- MissingPayment => JsonReply :: new ( OriginalPsbtRejected , e) ,
218- OriginalPsbtNotBroadcastable => JsonReply :: new ( OriginalPsbtRejected , e) ,
219- InputOwned ( _) => JsonReply :: new ( OriginalPsbtRejected , e) ,
220- InputWeight ( _) => JsonReply :: new ( OriginalPsbtRejected , e) ,
221- InputSeen ( _) => JsonReply :: new ( OriginalPsbtRejected , e) ,
222- PsbtBelowFeeRate ( _, _) => JsonReply :: new ( OriginalPsbtRejected , e) ,
223- FeeTooHigh ( _, _) => JsonReply :: new ( NotEnoughMoney , e) ,
224227 }
225228 }
226229}
0 commit comments