src/blockchain/watcher.js
/**
   * subscribe to the lp vault events
   */
subscribe to the lp vault events
subscribe to the lp vault events
function subscribeVault() {
    subscriptions.push(
      lpVault.$contract.events
        .allEvents({})
        .on('data', newPendingEvent)
        .on('changed', e => e.removed && removeEvent(e))
        .on('error', err => {
          Sentry.captureException(
            new Error(`Error blockchain connection subscribe Vault: ${err.message}`),
          );
          logger.error('SUBSCRIPTION ERROR: ', err);
        }),
    );
  }
function subscribeVault ( ) { subscriptions . push ( lpVault . $contract . events . allEvents ( { } ) . on ( 'data' , newPendingEvent ) . on ( 'changed' , e => e . removed && removeEvent ( e ) ) . on ( 'error' , err => { Sentry . captureException ( new Error ( ` ${ err . message } ` ) , ) ; logger . error ( 'SUBSCRIPTION ERROR: ' , err ) ; } ) , ) ; }
subscribe to the lp vault events
subscribe to the lp vault events
// starts a listener on the vault contract