Skip to content

Commit

Permalink
[KARMA GAP] API change - externalAddresses to external in GrantPerPro…
Browse files Browse the repository at this point in the history
…gram type (#613)
  • Loading branch information
aziolek authored Jan 3, 2025
2 parents 0b2e5c1 + 4392a29 commit 103fb17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions client/src/api/calls/karmaGap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export type Milestone = {
};

export type GrantPerProgram = {
// externalAddresses is set only when recipient does not match project has in Octant.
externalAddresses?: {
octant?: string;
// external is set only when recipient does not match project has in Octant.
external?: {
octant?: string[];
};
milestones: Milestone[];
project: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export default function useMilestonesPerGrantPerProgram(
}
return response.data.find(
element =>
element.externalAddresses?.octant?.toLowerCase() === projectAddressToLowerCase ||
element.external?.octant
?.map(octant => octant.toLowerCase())
.includes(projectAddressToLowerCase) ||
element.project.recipient.toLowerCase() === projectAddressToLowerCase ||
element.project.details.recipient.toLowerCase() === projectAddressToLowerCase,
);
Expand Down

0 comments on commit 103fb17

Please sign in to comment.