Skip to content

Commit 33f0a10

Browse files
committed
fix
1 parent 6a9321d commit 33f0a10

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/pallet/nomination-pools/processors/created.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ export async function created(ctx: CommonContext, block: Block, item: EventItem)
2727
}
2828

2929
const token = await ctx.store.findOneOrFail(Token, {
30-
where: { id: `2-${callData.tokenId}` },
30+
where: { id: `2-${callData.tokenId}`, tokenAccounts: { balance: 1n } },
31+
relations: {
32+
tokenAccounts: {
33+
account: true,
34+
},
35+
},
3136
})
3237

3338
const pool = new NominationPool({
@@ -71,7 +76,7 @@ export async function created(ctx: CommonContext, block: Block, item: EventItem)
7176

7277
QueueUtils.dispatchComputePoolOffers(pool.id.toString())
7378

74-
const owner: string = pool.degenToken.tokenAccounts[0].account.id
79+
const owner: string = token.tokenAccounts[0].account.id
7580

7681
return mappings.nominationPools.events.createdEventModel(item, eventData, callData.tokenId, owner)
7782
}

0 commit comments

Comments
 (0)