Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOTFIX] Karma GAP milestones not fetching -- correct address in different field #582

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions client/src/api/calls/karmaGap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import apiService from 'services/apiService';

export type GrantsPerProgram = {
data: {
// externalAddresses is set only when recipient does not match project has in Octant.
externalAddresses?: {
octant: string;
};
milestones: {
createdAt: string;
data: {
Expand All @@ -21,10 +25,6 @@ export type GrantsPerProgram = {
};
recipient: string;
};
// externalAddresses is set only when recipient does not match project has in Octant.
externalAddresses?: {
octant: string;
};
recipient: string;
};
recipient: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ProjectMilestonesSkeleton from 'components/Project/ProjectMilestonesSkele
import Button from 'components/ui/Button';
import Svg from 'components/ui/Svg';
import useMediaQuery from 'hooks/helpers/useMediaQuery';
import useGrantsPerProgram from 'hooks/queries/karmaGap/useMilestonesPerGrantPerProgram';
import useMilestonesPerGrantPerProgram from 'hooks/queries/karmaGap/useMilestonesPerGrantPerProgram';
import { pending, completed } from 'svg/projectMilestones';

import styles from './ProjectMilestones.module.scss';
Expand All @@ -30,7 +30,7 @@ const ProjectMilestones: FC<ProjectMilestonesProps> = ({ projectAddress }) => {

const epochNumber = parseInt(epoch!, 10);

const { data, isFetching } = useGrantsPerProgram(epochNumber, projectAddress);
const { data, isFetching } = useMilestonesPerGrantPerProgram(epochNumber, projectAddress);

const getDateFormatted = (date: string | number): string => format(date, 'd LLL');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function useMilestonesPerGrantPerProgram(
select: response =>
response.data.find(
element =>
element.project.externalAddresses?.octant.toLowerCase() === projectAddressToLowerCase ||
element.externalAddresses?.octant.toLowerCase() === projectAddressToLowerCase ||
element.project.recipient.toLowerCase() === projectAddressToLowerCase ||
element.project.details.recipient.toLowerCase() === projectAddressToLowerCase,
),
Expand Down