src/Accounts/eventScanner.js
// fetch ticket details and redeem the code simultaneously
fetch ticket details and redeem the code simultaneously
fetch ticket details and redeem the code simultaneously
async _startAutomatic(scannedCode) {
    this.setState({scannedCode, ticketDetails: null}) 
    await Promise.all([
      this._getTicketDetails(scannedCode),
      this._redeem(scannedCode),
    ])
  }
async _startAutomatic ( scannedCode ) { this . setState ( { scannedCode , ticketDetails : null } ) await Promise . all ( [ this . _getTicketDetails ( scannedCode ) , this . _redeem ( scannedCode ) , ] ) }
fetch ticket details and redeem the code simultaneously
fetch ticket details and redeem the code simultaneously
// previous ticketDetails should get cleared out while we're waiting to reduce confusion