Skip to content

Commit

Permalink
QF Toast for Stellar
Browse files Browse the repository at this point in the history
  • Loading branch information
HrithikSampson committed Sep 19, 2024
1 parent 52006a6 commit 2393dd5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 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 @@ -220,7 +220,7 @@ const DonateIndex: FC = () => {
<>
<DonateHeader />
<DonateContainer>
<SuccessView />
<SuccessView isStellar={isQRDonation} />
</DonateContainer>
</>
) : (
Expand Down
14 changes: 11 additions & 3 deletions src/components/views/donate/SuccessView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ import QFToast from './QFToast';
import { DonationInfo } from './DonationInfo';
import { ManageRecurringDonation } from './Recurring/ManageRecurringDonation';
import EndaomentProjectsInfo from '../project/EndaomentProjectsInfo';
import { ChainType } from '@/types/config';

export const SuccessView: FC = () => {
interface ISuccessView {
isStellar?: boolean;
}
export const SuccessView: FC<ISuccessView> = ({ isStellar }) => {
const { formatMessage } = useIntl();
const { successDonation, hasActiveQFRound, project } = useDonateData();
const {
Expand Down Expand Up @@ -71,8 +75,12 @@ export const SuccessView: FC = () => {

const { activeStartedRound } = getActiveRound(project.qfRounds);

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

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

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

0 comments on commit 2393dd5

Please sign in to comment.