import { Injectable } from '@nestjs/common' ; import { OnEvent } from '@nestjs/event-emitter' ; import { EventPayload , IndexerEvent } from '../indexer/events' ; @ Injectable ( ) export class ReadyService { private _ready : boolean ; constructor ( ) { this . _ready = false ; } @ OnEvent ( IndexerEvent . Ready ) handleReady ( { value } ) { this . _ready = value ; } get ready ( ) { return this . _ready ; } }