File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -182,12 +182,12 @@ impl UnifiedPayment {
182182
183183 let resolved = match instructions {
184184 PaymentInstructions :: ConfigurableAmount ( instr) => {
185- let amount = amount_msat. ok_or_else ( || {
185+ let amount_msat = amount_msat. ok_or_else ( || {
186186 log_error ! ( self . logger, "No amount specified. Aborting the payment." ) ;
187187 Error :: InvalidAmount
188188 } ) ?;
189189
190- let amt = BPIAmount :: from_milli_sats ( amount ) . map_err ( |e| {
190+ let amt = BPIAmount :: from_milli_sats ( amount_msat ) . map_err ( |e| {
191191 log_error ! ( self . logger, "Error while converting amount : {:?}" , e) ;
192192 Error :: InvalidAmount
193193 } ) ?;
@@ -210,8 +210,8 @@ impl UnifiedPayment {
210210 } ) ?
211211 } ,
212212 PaymentInstructions :: FixedAmount ( instr) => {
213- if let Some ( user_amount ) = amount_msat {
214- if instr. max_amount ( ) . map_or ( false , |amt| user_amount < amt. milli_sats ( ) ) {
213+ if let Some ( user_amount_msat ) = amount_msat {
214+ if instr. max_amount ( ) . map_or ( false , |amt| user_amount_msat < amt. milli_sats ( ) ) {
215215 log_error ! ( self . logger, "Amount specified is less than the amount in the parsed URI. Aborting the payment." ) ;
216216 return Err ( Error :: InvalidAmount ) ;
217217 }
You can’t perform that action at this time.
0 commit comments