@@ -64,20 +64,20 @@ export function registerPaymentDelegationTicketSuite() {
6464 aliceBeforeBalance
6565 ) ;
6666
67- // 3 . Now, Bob tries to sign with his PKP using Alice's sponsorship
67+ // 4 . Now, Bob tries to sign with his PKP using Alice's sponsorship
6868 await testEnv . litClient . chain . ethereum . pkpSign ( {
6969 authContext : bobAccount . eoaAuthContext ! ,
7070 pubKey : bobAccount . pkp ?. pubkey ! ,
7171 toSign : 'Hello, world!' ,
7272 userMaxPrice : 1000000000000000000n , // 0.05 ETH in Wei
7373 } ) ;
7474
75- // 4 . Now, Alice removes Bob from her sponsorship
75+ // 5 . Now, Alice removes Bob from her sponsorship
7676 await alice . paymentManager ! . undelegatePaymentsBatch ( {
7777 userAddresses : [ bobAccount . account . address ] ,
7878 } ) ;
7979
80- // 5 . Bob should now fail to sign with his PKP due to lack of sponsorship
80+ // 6 . Bob should now fail to sign with his PKP due to lack of sponsorship
8181 let didFail = false ;
8282 try {
8383 await testEnv . litClient . chain . ethereum . pkpSign ( {
@@ -96,7 +96,9 @@ export function registerPaymentDelegationTicketSuite() {
9696
9797 expect ( didFail ) . toBe ( true ) ;
9898
99- // 6. Finally, check that Alice's Ledger balance has decreased
99+ // 7. Finally, check that Alice's Ledger balance has decreased
100+ // let's wait a big longer for the payment to be processed
101+ await new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) ) ;
100102 const aliceBalanceAfter = await testEnv . masterPaymentManager . getBalance ( {
101103 userAddress : alice . account . address ,
102104 } ) ;
0 commit comments