• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hicommonwealth / commonwealth / 18474403399

13 Oct 2025 06:06PM UTC coverage: 37.354% (-0.1%) from 37.457%
18474403399

push

github

web-flow
Refactors claims with cliff (#13084)

* Add env vars

* Add magna notifs channel to config

* Add cliff commands

* Add cliff commands

---------

Co-authored-by: rotorsoft <rotorsoft@outlook.com>

1984 of 5727 branches covered (34.64%)

Branch coverage included in aggregate %.

0 of 21 new or added lines in 3 files covered. (0.0%)

3476 of 8890 relevant lines covered (39.1%)

44.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/libs/model/src/aggregates/token-allocation/UpdateClaimCliffTransactionHash.command.ts
1
import { type Command } from '@hicommonwealth/core';
2
import * as schemas from '@hicommonwealth/schemas';
3
import { QueryTypes } from 'sequelize';
4
import { models } from '../../database';
5

6
export function UpdateClaimCliffTransactionHash(): Command<
7
  typeof schemas.UpdateClaimTransactionHash
8
> {
NEW
9
  return {
×
10
    ...schemas.UpdateClaimTransactionHash,
11
    auth: [],
12
    secure: true,
13
    body: async ({ payload, actor }) => {
NEW
14
      const { transaction_hash } = payload;
×
15

NEW
16
      const [, updated] = await models.sequelize.query(
×
17
        `
18
          UPDATE "ClaimAddresses"
19
          SET magna_cliff_claim_tx_hash = :transaction_hash
20
          WHERE
21
            user_id = :user_id
22
            AND magna_cliff_claimed_at IS NOT NULL
23
            AND magna_cliff_claim_data IS NOT NULL
24
            AND magna_cliff_claim_tx_hash IS NULL;
25
        `,
26
        {
27
          type: QueryTypes.UPDATE,
28
          replacements: {
29
            user_id: actor.user.id,
30
            transaction_hash,
31
          },
32
        },
33
      );
34

NEW
35
      return updated > 0;
×
36
    },
37
  };
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc