@show-karma/karma-gap-sdk 0.1.39 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -317,9 +317,14 @@ class GapEasClient extends Fetcher_1.Fetcher {
|
|
|
317
317
|
const { attestations: projectAttestations } = await this.query(projectsQuery);
|
|
318
318
|
const projects = Attestation_1.Attestation.fromInterface(projectAttestations);
|
|
319
319
|
const milestones = await this.milestonesOf(grants);
|
|
320
|
+
const getSummaryProject = (project) => ({
|
|
321
|
+
title: project.details?.title,
|
|
322
|
+
uid: project.uid,
|
|
323
|
+
slug: project.details?.slug,
|
|
324
|
+
});
|
|
320
325
|
return grants
|
|
321
326
|
.map((grant) => {
|
|
322
|
-
grant.project = projects.find((p) => p.uid === grant.refUID);
|
|
327
|
+
grant.project = getSummaryProject(projects.find((p) => p.uid === grant.refUID));
|
|
323
328
|
grant.details = (deps.find((d) => d.refUID === grant.uid &&
|
|
324
329
|
d.schema.uid === grantDetails.uid &&
|
|
325
330
|
typeof d.amount !== undefined &&
|
|
@@ -4,12 +4,16 @@ import { IMilestone, Milestone } from './Milestone';
|
|
|
4
4
|
import { GapSchema } from '../GapSchema';
|
|
5
5
|
import { Hex, MultiAttestPayload, SignerOrProvider } from 'core/types';
|
|
6
6
|
import { Community } from './Community';
|
|
7
|
-
import { Project } from './Project';
|
|
8
7
|
interface _Grant extends Grant {
|
|
9
8
|
}
|
|
10
9
|
export interface IGrant {
|
|
11
10
|
communityUID: Hex;
|
|
12
11
|
}
|
|
12
|
+
export interface ISummaryProject {
|
|
13
|
+
title: string;
|
|
14
|
+
slug?: string;
|
|
15
|
+
uid: Hex;
|
|
16
|
+
}
|
|
13
17
|
export declare class Grant extends Attestation<IGrant> {
|
|
14
18
|
details?: GrantDetails;
|
|
15
19
|
communityUID: Hex;
|
|
@@ -20,7 +24,7 @@ export declare class Grant extends Attestation<IGrant> {
|
|
|
20
24
|
updates: GrantUpdate[];
|
|
21
25
|
members: string[];
|
|
22
26
|
completed?: GrantCompleted;
|
|
23
|
-
project?:
|
|
27
|
+
project?: ISummaryProject;
|
|
24
28
|
verify(signer: SignerOrProvider): Promise<void>;
|
|
25
29
|
/**
|
|
26
30
|
* Add milestones to the grant.
|
|
@@ -10,7 +10,6 @@ const SchemaError_1 = require("../SchemaError");
|
|
|
10
10
|
const consts_1 = require("../../consts");
|
|
11
11
|
const GapContract_1 = require("../contract/GapContract");
|
|
12
12
|
const Community_1 = require("./Community");
|
|
13
|
-
const Project_1 = require("./Project");
|
|
14
13
|
class Grant extends Attestation_1.Attestation {
|
|
15
14
|
constructor() {
|
|
16
15
|
super(...arguments);
|
|
@@ -182,7 +181,7 @@ class Grant extends Attestation_1.Attestation {
|
|
|
182
181
|
}
|
|
183
182
|
if (attestation.project) {
|
|
184
183
|
const { project } = attestation;
|
|
185
|
-
grant.project =
|
|
184
|
+
grant.project = project;
|
|
186
185
|
}
|
|
187
186
|
if (attestation.community) {
|
|
188
187
|
const { community } = attestation;
|