function pollForTicket() {
    return new Promise(function (resolve) {
      // eslint-disable-next-line consistent-return
      async function verify() {
        const ticket = await getTicket(ticketId);
        const timeoutId = setTimeout(verify, 3000);

        if (ticket.verified) {
          clearTimeout(timeoutId);
          return resolve(ticket);
        }
      }

      verify();
    });
  }
// Poll until the ticket has been verified, and should have the token attached
Poll until the ticket has been verified, and should have the token attached
Poll until the ticket has been verified and should have the token attached
function pollForTicket() {
    return new Promise(function (resolve) {
      async function verify() {
        const ticket = await getTicket(ticketId);
        const timeoutId = setTimeout(verify, 3000);
        if (ticket.verified) {
          clearTimeout(timeoutId);
          return resolve(ticket);
        }
      }
      verify();
    });
  }
function pollForTicket ( ) { return new Promise ( function ( resolve ) { async function verify ( ) { const ticket = await getTicket ( ticketId ) ; const timeoutId = setTimeout ( verify , 3000 ) ; if ( ticket . verified ) { clearTimeout ( timeoutId ) ; return resolve ( ticket ) ; } } verify ( ) ; } ) ; }
Poll until the ticket has been verified, and should have the token attached
Poll until the ticket has been verified and should have the token attached
// eslint-disable-next-line consistent-return