pancakeswap / pancake-subgraph

📊 Pancake subgraph (blocks, profile, prediction, NFT's, ...)
GNU General Public License v3.0
336 stars 583 forks source link

Pair seems to be saved twice in `handleSwap` #52

Open maoueh opened 3 years ago

maoueh commented 3 years ago

This line:

https://github.com/pancakeswap/pancake-subgraph/blob/a84f47800d251148ff35513f711ce63bae75ec6c/src/exchange/core.ts#L409

Is already performed few lines above:

https://github.com/pancakeswap/pancake-subgraph/blob/a84f47800d251148ff35513f711ce63bae75ec6c/src/exchange/core.ts#L399

This feels superfluous, since it's done 10 lines above and nothing change in between.

maoueh commented 3 years ago

While at it, https://github.com/pancakeswap/pancake-subgraph/blob/a84f47800d251148ff35513f711ce63bae75ec6c/src/exchange/core.ts#L430 also is duplicated with https://github.com/pancakeswap/pancake-subgraph/blob/a84f47800d251148ff35513f711ce63bae75ec6c/src/exchange/core.ts#L427

ChefKai commented 3 years ago

Thank you for opening an issue; as we weren't able to deploy a subgraph for a long time, we haven't been able to deep-dive on the exchange subgraph for a while. We will start improving it soon, based on performance upgrade done on exchange-lite!