File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -175,8 +175,8 @@ pub(crate) fn poll_for_user_input(
175175 }
176176
177177 if let Ok ( offer) = Offer :: from_str ( invoice_str. unwrap ( ) ) {
178- let offer_hash = Sha256 :: hash ( invoice_str . unwrap ( ) . as_bytes ( ) ) ;
179- let payment_id = PaymentId ( * offer_hash . as_ref ( ) ) ;
178+ let random_bytes = keys_manager . get_secure_random_bytes ( ) ;
179+ let payment_id = PaymentId ( random_bytes ) ;
180180
181181 let amt_msat = match ( offer. amount ( ) , user_provided_amt) {
182182 ( Some ( offer:: Amount :: Bitcoin { amount_msats } ) , _) => * amount_msats,
@@ -818,7 +818,7 @@ fn send_payment(
818818 let ( payment_hash, recipient_onion, route_params) = match pay_params_opt {
819819 Ok ( res) => res,
820820 Err ( e) => {
821- println ! ( "Failed to parse invoice" ) ;
821+ println ! ( "Failed to parse invoice: {:?}" , e ) ;
822822 print ! ( "> " ) ;
823823 return ;
824824 }
You can’t perform that action at this time.
0 commit comments