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

hicommonwealth / commonwealth / 17809359186

17 Sep 2025 08:06PM UTC coverage: 37.51% (-0.1%) from 37.656%
17809359186

push

github

web-flow
Claim Allocations (#12965)

* add claim token command, service, test, model changes

* Adds claim token and get allocation routes and UI

* fix lint

* fix test

* fix cache times

* Fix imports and paths

* include status

* fix claim

* fix cast

* fix test

* Persist claim data and update tx hash after signing

* update model

* disable when not ack

* restructure the form

* more reorg

* add sign token claim helper and hook

* fix claim command

* fix test

* fix lints

* composite claim mutation

* formatting

* fix type

* claim tokens from magna

* fix ui

* fix lint

* fix lint

* fix sign

* fix lint

* update flow

* add more config vars to softcode token/desc/event

* get tx hash from claim address too

---------

Co-authored-by: rotorsoft <rotorsoft@outlook.com>
Co-authored-by: Malik Zulqurnain <malikzulqurnain2121@gmail.com>

1955 of 5633 branches covered (34.71%)

Branch coverage included in aggregate %.

11 of 36 new or added lines in 6 files covered. (30.56%)

9 existing lines in 1 file now uncovered.

3440 of 8750 relevant lines covered (39.31%)

44.8 hits per line

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

0.0
/libs/model/src/aggregates/token-allocation/UpdateClaimTransactionHash.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 UpdateClaimTransactionHash(): 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_claim_tx_hash = :transaction_hash
20
          WHERE
21
            user_id = :user_id
22
            AND magna_claimed_at IS NOT NULL
23
            AND magna_claim_data IS NOT NULL
24
            AND magna_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