@@ -60,16 +60,12 @@ export class UpdateLiquidityPoolTicks extends BaseJob {
6060 . limit ( 1 )
6161 . getOne ( ) ?? undefined ;
6262 } ) ;
63- if ( this . _liquidityPoolState . liquidityPool . identifier === 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c9b65707373c4cec488b16151a64d7102dbae16857c500652b5c513650b8d604e' ) {
64- logInfo ( `ddddd here 1` )
65- }
63+
6664 if ( ! existingTick ) {
6765 if ( ! this . _liquidityPoolState . liquidityPool ) {
6866 return Promise . reject ( 'Liquidity Pool not found for liquidity pool state' ) ;
6967 }
70- if ( this . _liquidityPoolState . liquidityPool . identifier === 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c9b65707373c4cec488b16151a64d7102dbae16857c500652b5c513650b8d604e' ) {
71- logInfo ( `ddddd here 2` )
72- }
68+
7369 const lastTick : LiquidityPoolTick | undefined = await dbService . query ( ( manager : EntityManager ) => {
7470 return manager . createQueryBuilder ( LiquidityPoolTick , 'ticks' )
7571 . where ( 'resolution = :resolution' , { resolution } )
@@ -82,9 +78,7 @@ logInfo(`ddddd here 2`)
8278 } ) ;
8379
8480 const open : number = lastTick ? lastTick . close : price ;
85- if ( this . _liquidityPoolState . liquidityPool . identifier === 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c9b65707373c4cec488b16151a64d7102dbae16857c500652b5c513650b8d604e' ) {
86- logInfo ( `ddddd here 3 ${ Math . abs ( lastTick ? this . _liquidityPoolState . tvl - lastTick . tvl : this . _liquidityPoolState . tvl ) } ` )
87- }
81+
8882 return dbService . transaction ( ( manager : EntityManager ) => {
8983 return manager . save (
9084 LiquidityPoolTick . make (
@@ -100,9 +94,7 @@ logInfo(`ddddd here 3 ${Math.abs(lastTick ? this._liquidityPoolState.tvl - lastT
10094 )
10195 ) . then ( ( tick : LiquidityPoolTick ) => {
10296 operationWs . broadcast ( tick ) ;
103- if ( this . _liquidityPoolState . liquidityPool . identifier === 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c9b65707373c4cec488b16151a64d7102dbae16857c500652b5c513650b8d604e' ) {
104- logInfo ( `ddddd here 3.5 ${ tick . time } ` )
105- }
97+
10698 eventService . pushEvent ( {
10799 type : 'LiquidityPoolTickCreated' ,
108100 data : tick ,
@@ -112,9 +104,7 @@ logInfo(`ddddd here 3.5 ${tick.time}`)
112104 } ) . catch ( ( reason : any ) => this . createOrUpdateTick ( startOfTick , resolution ) ) ;
113105 } ) ;
114106 }
115- if ( this . _liquidityPoolState . liquidityPool . identifier === 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c9b65707373c4cec488b16151a64d7102dbae16857c500652b5c513650b8d604e' ) {
116- logInfo ( `ddddd here 4` )
117- }
107+
118108 if ( price < existingTick . low ) {
119109 existingTick . low = price ;
120110 }
@@ -131,9 +121,7 @@ logInfo(`ddddd here 4`)
131121 return manager . save ( existingTick )
132122 . then ( ( tick : LiquidityPoolTick ) => {
133123 operationWs . broadcast ( tick ) ;
134- if ( this . _liquidityPoolState . liquidityPool . identifier === 'f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c9b65707373c4cec488b16151a64d7102dbae16857c500652b5c513650b8d604e' ) {
135- logInfo ( `ddddd here 5` )
136- }
124+
137125 eventService . pushEvent ( {
138126 type : 'LiquidityPoolTickUpdated' ,
139127 data : tick ,
0 commit comments