File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -169,16 +169,20 @@ export function createUser(address: Address): void {
169169}
170170
171171export function createLiquiditySnapshot ( position : LiquidityPosition , event : EthereumEvent ) : void {
172- let timestamp = event . block . timestamp . toI32 ( )
173172 let bundle = Bundle . load ( '1' )
174173 let pair = Pair . load ( position . pair )
175174 let token0 = Token . load ( pair . token0 )
176175 let token1 = Token . load ( pair . token1 )
177176
178177 // create new snapshot
179- let snapshot = new LiquidityPositionSnapshot ( position . id . concat ( timestamp . toString ( ) ) )
178+ let id = position . id
179+ . concat ( "-" )
180+ . concat ( event . transaction . hash . toHexString ( ) )
181+ . concat ( "-" )
182+ . concat ( event . logIndex . toString ( ) )
183+ let snapshot = new LiquidityPositionSnapshot ( id )
180184 snapshot . liquidityPosition = position . id
181- snapshot . timestamp = timestamp
185+ snapshot . timestamp = event . block . timestamp . toI32 ( )
182186 snapshot . block = event . block . number . toI32 ( )
183187 snapshot . user = position . user
184188 snapshot . pair = position . pair
You can’t perform that action at this time.
0 commit comments