diff --git a/src/mappings/shared/token/tokenAPI.ts b/src/mappings/shared/token/tokenAPI.ts index 94737ac..bb041af 100644 --- a/src/mappings/shared/token/tokenAPI.ts +++ b/src/mappings/shared/token/tokenAPI.ts @@ -44,7 +44,11 @@ export class TokenAPI { debug(OPERATION, { removeNftFromToken: `Unlink NFT ${nft.id} from TOKEN ${token.id}` }) await emOf(this.store).update(NE, nft.id, { token: null }) - const updatedCount = token.count - 1 + const updatedCount = await emOf(this.store).countBy(NE, { + token: { + id: token.id, + }, + }) await emOf(this.store).update(TE, token.id, { supply: token.supply - 1, count: updatedCount,