File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
payjoin/src/core/receive/v2 Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1244,7 +1244,7 @@ impl Receiver<Monitor> {
12441244 tx. input . get ( i) . expect ( "sender_input_indexes should return valid indices" ) ;
12451245 sender_witnesses. push ( ( input. script_sig . clone ( ) , input. witness . clone ( ) ) ) ;
12461246 }
1247- // Payjoin transaction with segwit inputs was detected. Log the signatures and complete the session
1247+ // Payjoin transaction with SegWit inputs was detected. Log the signatures and complete the session.
12481248 return MaybeFatalOrSuccessTransition :: success ( SessionEvent :: Closed (
12491249 SessionOutcome :: Success ( sender_witnesses) ,
12501250 ) ) ;
@@ -1435,9 +1435,15 @@ pub mod test {
14351435 assert ! ( matches!( res, OptionalTransitionOutcome :: Progress ( _) ) ) ;
14361436 assert ! ( persister. inner. read( ) . expect( "Shouldn't be poisoned" ) . is_closed) ;
14371437 assert_eq ! ( persister. inner. read( ) . expect( "Shouldn't be poisoned" ) . events. len( ) , 1 ) ;
1438- // TODO: check for exact events
1438+ assert_eq ! (
1439+ persister. inner. read( ) . expect( "Shouldn't be poisoned" ) . events. last( ) ,
1440+ Some ( & SessionEvent :: Closed ( SessionOutcome :: Success ( vec![ (
1441+ ScriptBuf :: default ( ) ,
1442+ Witness :: default ( )
1443+ ) ] ) ) )
1444+ ) ;
14391445
1440- // fallback was broadcasted, should progress to success
1446+ // Fallback was broadcasted, should progress to success
14411447 let persister = InMemoryTestPersister :: default ( ) ;
14421448 let res = monitor
14431449 . check_payment (
You can’t perform that action at this time.
0 commit comments