File tree 1 file changed +3
-3
lines changed 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(
175
175
}
176
176
177
177
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 ) ;
180
180
181
181
let amt_msat = match ( offer. amount ( ) , user_provided_amt) {
182
182
( Some ( offer:: Amount :: Bitcoin { amount_msats } ) , _) => * amount_msats,
@@ -818,7 +818,7 @@ fn send_payment(
818
818
let ( payment_hash, recipient_onion, route_params) = match pay_params_opt {
819
819
Ok ( res) => res,
820
820
Err ( e) => {
821
- println ! ( "Failed to parse invoice" ) ;
821
+ println ! ( "Failed to parse invoice: {:?}" , e ) ;
822
822
print ! ( "> " ) ;
823
823
return ;
824
824
}
You can’t perform that action at this time.
0 commit comments