Skip to content

Commit

Permalink
Check For Stellar Chain
Browse files Browse the repository at this point in the history
  • Loading branch information
HrithikSampson committed Sep 19, 2024
1 parent 2393dd5 commit d88b5cc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/views/donate/DonateIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const DonateIndex: FC = () => {
/>

<ImageWrapper>
{isQRDonation ? (
{isQRDonation && isStellarIncludedInQF ? (

Check failure on line 280 in src/components/views/donate/DonateIndex.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `·` with `⏎↹↹↹↹↹↹↹↹↹↹↹`
<>
<ProjectImage
src={
Expand Down
10 changes: 9 additions & 1 deletion src/components/views/donate/DonatePageProjectDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { ProjectCardUserName } from '@/components/project-card/ProjectCardUserNa
import { ORGANIZATION } from '@/lib/constants/organizations';
import { useDonateData } from '@/context/donate.context';
import { ChainType } from '@/types/config';
import config from '@/configuration';
import { calculateTotalEstimatedMatching, getActiveRound } from '@/helpers/qf';

interface IDonatePageProjectDescriptionProps {
Expand All @@ -46,6 +47,7 @@ export const DonatePageProjectDescription: FC<
organization,
estimatedMatching,
} = projectData || {};

Check failure on line 50 in src/components/views/donate/DonatePageProjectDescription.tsx

View workflow job for this annotation

GitHub Actions / build

Delete `↹⏎`

const { allProjectsSum, matchingPool, projectDonationsSqrtRootSum } =
estimatedMatching || {};
Expand All @@ -60,6 +62,12 @@ export const DonatePageProjectDescription: FC<
const { activeStartedRound, activeQFRound } = getActiveRound(
project.qfRounds,
);

const stellarNetworkId =
config.NON_EVM_NETWORKS_CONFIG[ChainType.STELLAR].networkId;
const isStellarIncludedInQF =
activeStartedRound?.eligibleNetworks?.includes(stellarNetworkId);

const {
allocatedFundUSDPreferred,
allocatedFundUSD,
Expand All @@ -73,7 +81,7 @@ export const DonatePageProjectDescription: FC<
<VerifiedBadge />
</Flex>
)}
{isQRDonation ? (
{(isQRDonation && isStellarIncludedInQF) ? (

Check failure on line 84 in src/components/views/donate/DonatePageProjectDescription.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `(isQRDonation·&&·isStellarIncludedInQF)` with `isQRDonation·&&·isStellarIncludedInQF`
<>
<AmountRaisedText>
<Subline color={neutralColors.gray[700]}>
Expand Down
9 changes: 5 additions & 4 deletions src/components/views/donate/SuccessView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { ChainType } from '@/types/config';
interface ISuccessView {
isStellar?: boolean;
}
export const SuccessView: FC<ISuccessView> = ({ isStellar }) => {
export const SuccessView: FC<ISuccessView> = ({isStellar}) => {

Check failure on line 43 in src/components/views/donate/SuccessView.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `isStellar` with `·isStellar·`
const { formatMessage } = useIntl();
const { successDonation, hasActiveQFRound, project } = useDonateData();
const {
Expand Down Expand Up @@ -78,9 +78,10 @@ export const SuccessView: FC<ISuccessView> = ({ isStellar }) => {
const stellarNetworkId =
config.NON_EVM_NETWORKS_CONFIG[ChainType.STELLAR].networkId;

const isOnEligibleNetworks = activeStartedRound?.eligibleNetworks?.includes(
(isStellar ? stellarNetworkId : chainId) || 0,
);
const isOnEligibleNetworks =

Check failure on line 81 in src/components/views/donate/SuccessView.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `⏎↹↹` with `·`
activeStartedRound?.eligibleNetworks?.includes(
(isStellar ? stellarNetworkId : chainId) || 0,

Check failure on line 83 in src/components/views/donate/SuccessView.tsx

View workflow job for this annotation

GitHub Actions / build

Delete `↹`
);

Check failure on line 84 in src/components/views/donate/SuccessView.tsx

View workflow job for this annotation

GitHub Actions / build

Delete `↹`

useEffect(() => {
if (!hasMultipleTxs) return;
Expand Down

0 comments on commit d88b5cc

Please sign in to comment.