Skip to content

Commit

Permalink
change === and !== to == and != for null checks in assembly script
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjgit committed Oct 12, 2022
1 parent d2174a4 commit a9f6db9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/nouns-subgraph/src/nouns-dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/nouns-subgraph/src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions packages/nouns-subgraph/tests/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand All @@ -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);
Expand Down

0 comments on commit a9f6db9

Please sign in to comment.