We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 839fc6d commit 2381e7cCopy full SHA for 2381e7c
packages/subgraph/src/mappingHelpers.ts
@@ -463,8 +463,13 @@ export function getOrInitSubscription(
463
}
464
465
export function getOrInitPool(event: ethereum.Event, poolId: string): Pool {
466
- // get existing pool
467
- let pool = Pool.load(poolId);
+ // get existing pool from block including in memory updates
+ let pool = Pool.loadInBlock(poolId);
468
+
469
+ if (pool == null) {
470
+ // get existing pool from store
471
+ pool = Pool.load(poolId);
472
+ }
473
474
// init new pool if non-existent
475
if (pool == null) {
0 commit comments