diff --git a/packages/nouns-subgraph/src/nouns-dao.ts b/packages/nouns-subgraph/src/nouns-dao.ts index 6c1cd50fe4..aff36cd1bc 100644 --- a/packages/nouns-subgraph/src/nouns-dao.ts +++ b/packages/nouns-subgraph/src/nouns-dao.ts @@ -161,7 +161,7 @@ export function handleVoteCast(event: VoteCast): void { const dqParams = getOrCreateDynamicQuorumParams(); const usingDynamicQuorum = - dqParams.dynamicQuorumStartBlock !== null && + dqParams.dynamicQuorumStartBlock != null && dqParams.dynamicQuorumStartBlock!.lt(proposal.createdBlock); if (usingDynamicQuorum) { diff --git a/packages/nouns-subgraph/src/utils/helpers.ts b/packages/nouns-subgraph/src/utils/helpers.ts index 8de4ae6105..9a7cdab3e9 100644 --- a/packages/nouns-subgraph/src/utils/helpers.ts +++ b/packages/nouns-subgraph/src/utils/helpers.ts @@ -134,7 +134,7 @@ export function getOrCreateDynamicQuorumParams(block: BigInt | null = null): Dyn params.save(); } - if (params.dynamicQuorumStartBlock === null && block !== null) { + if (params.dynamicQuorumStartBlock == null && block != null) { params.dynamicQuorumStartBlock = block; params.save(); diff --git a/packages/nouns-subgraph/tests/helpers.test.ts b/packages/nouns-subgraph/tests/helpers.test.ts index d74e257826..e04254f807 100644 --- a/packages/nouns-subgraph/tests/helpers.test.ts +++ b/packages/nouns-subgraph/tests/helpers.test.ts @@ -6,7 +6,7 @@ import { getOrCreateDynamicQuorumParams } from '../src/utils/helpers'; test('getOrCreateDynamicQuorumParams: sets dynamicQuorumStartBlock to null', () => { const params = getOrCreateDynamicQuorumParams(); - assert.assertTrue(params.dynamicQuorumStartBlock === null); + assert.assertTrue(params.dynamicQuorumStartBlock == null); clearStore(); }); @@ -21,7 +21,7 @@ test('getOrCreateDynamicQuorumParams: sets dynamicQuorumStartBlock to input bloc test('getOrCreateDynamicQuorumParams: sets dynamicQuorumStartBlock first number after first being null, and later attempt to set to a different number', () => { let params = getOrCreateDynamicQuorumParams(); - assert.assertTrue(params.dynamicQuorumStartBlock === null); + assert.assertTrue(params.dynamicQuorumStartBlock == null); params = getOrCreateDynamicQuorumParams(BIGINT_ONE); assert.bigIntEquals(BIGINT_ONE, params.dynamicQuorumStartBlock as BigInt);