diff --git a/src/components/Paras/ParaDisplay/index.tsx b/src/components/Paras/ParaDisplay/index.tsx
index 7ba70904..480824a9 100644
--- a/src/components/Paras/ParaDisplay/index.tsx
+++ b/src/components/Paras/ParaDisplay/index.tsx
@@ -4,6 +4,8 @@ import Image from 'next/image';
import { chainData } from '@/chaindata';
import { NetworkType } from '@/models';
+import Unknown from '../../../assets/unknown.svg';
+
interface ParaDisplayProps {
paraId: number;
network: NetworkType;
@@ -11,13 +13,24 @@ interface ParaDisplayProps {
export const ParaDisplay = ({ paraId, network }: ParaDisplayProps) => {
const data = chainData[network][paraId];
- if (data === undefined) return <>{paraId}>;
+ if (data === undefined)
+ return (
+
+
+ Parachain #{paraId}
+
+ );
const { name, logo } = data;
return (
- {paraId}
{logo === undefined ? (
<>>
) : (
@@ -30,6 +43,7 @@ export const ParaDisplay = ({ paraId, network }: ParaDisplayProps) => {
/>
)}
{name}
+ #{paraId}
);
};
diff --git a/src/contexts/orders/index.tsx b/src/contexts/orders/index.tsx
index 6309379a..5900c5d9 100644
--- a/src/contexts/orders/index.tsx
+++ b/src/contexts/orders/index.tsx
@@ -112,7 +112,7 @@ const OrderProvider = ({ children }: Props) => {
...item,
totalContribution: parseInt(item.contribution),
contribution: await getContribution(item.orderId),
- } as Order)
+ }) as Order
)
)
);
diff --git a/src/hooks/order/processed.ts b/src/hooks/order/processed.ts
index 677b1864..80f05f81 100644
--- a/src/hooks/order/processed.ts
+++ b/src/hooks/order/processed.ts
@@ -58,7 +58,7 @@ export const useProcessedOrders = () => {
mask,
account: seller,
reward,
- } as OrderItem)
+ }) as OrderItem
)
);
}
diff --git a/src/pages/paras/renewal.tsx b/src/pages/paras/renewal.tsx
index 89b265bb..94fdd6e5 100644
--- a/src/pages/paras/renewal.tsx
+++ b/src/pages/paras/renewal.tsx
@@ -20,12 +20,13 @@ import { useRenewableParachains } from '@/hooks/renewableParas';
import { useSubmitExtrinsic } from '@/hooks/submitExtrinsic';
import { getBalanceString, timesliceToTimestamp } from '@/utils/functions';
-import { Balance, ParaDisplay, ProgressButton } from '@/components';
+import { Balance, Banner, ParaDisplay, ProgressButton } from '@/components';
import { useAccounts } from '@/contexts/account';
import { useCoretimeApi, useRelayApi } from '@/contexts/apis';
import { ApiState } from '@/contexts/apis/types';
import { useNetwork } from '@/contexts/network';
+import { useSaleInfo } from '@/contexts/sales';
import { useToast } from '@/contexts/toast';
import { BrokerStatus, ContextStatus } from '@/models';
@@ -37,6 +38,7 @@ const Renewal = () => {
state: { activeAccount, activeSigner },
} = useAccounts();
const { status, parachains } = useRenewableParachains();
+ const { saleInfo } = useSaleInfo();
const {
state: { api: relayApi, apiState: relayApiState },
@@ -248,6 +250,37 @@ const Renewal = () => {
/>
+ {saleInfo.coresSold === saleInfo.coresOffered && (
+
+
+
+ )}
+ {/* If not all cores are sold inform the user: */}
+ {saleInfo.coresSold < saleInfo.coresOffered && (
+
+
+
+ )}