diff --git a/src/pages/index.tsx b/src/pages/index.tsx index a3ef6ff..5ab3b39 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -29,7 +29,7 @@ import { useCoretimeApi } from '@/contexts/apis'; import { ApiState } from '@/contexts/apis/types'; import { useNetwork } from '@/contexts/network'; import { useSaleInfo } from '@/contexts/sales'; -import { ContextStatus, PurchaseType } from '@/models'; +import { PurchaseType } from '@/models'; const Home = () => { const theme = useTheme(); @@ -40,7 +40,6 @@ const Home = () => { state: { decimals, symbol, apiState }, } = useCoretimeApi(); const { - status, saleInfo: { regionBegin, coresSold, coresOffered }, phase: { currentPrice }, } = useSaleInfo(); @@ -156,9 +155,7 @@ const Home = () => { }, ]; - return apiState !== ApiState.READY || - loadingBurnInfo || - loadingPurchaseHistory ? ( + return apiState !== ApiState.READY || loadingBurnInfo || loadingPurchaseHistory ? ( @@ -277,7 +274,7 @@ const Home = () => { ))} - {( + { @@ -291,7 +288,7 @@ const Home = () => { - )} + } ); }; diff --git a/src/pages/purchase.tsx b/src/pages/purchase.tsx index c07959e..e2e9388 100644 --- a/src/pages/purchase.tsx +++ b/src/pages/purchase.tsx @@ -1,13 +1,11 @@ -import { Backdrop, Box, Button, CircularProgress, Typography, useTheme } from '@mui/material'; +import { Box, Button, Typography, useTheme } from '@mui/material'; import { useRouter } from 'next/router'; import { useState } from 'react'; import { useSubmitExtrinsic } from '@/hooks/submitExtrinsic'; -import { isNewPricing } from '@/utils/sale'; import { Balance, - Banner, CoreDetailsPanel, ProgressButton, SaleInfoPanel, @@ -21,7 +19,7 @@ import { useNetwork } from '@/contexts/network'; import { useRegions } from '@/contexts/regions'; import { useSaleInfo } from '@/contexts/sales'; import { useToast } from '@/contexts/toast'; -import { ContextStatus, SalePhase } from '@/models'; +import { SalePhase } from '@/models'; const Purchase = () => { const theme = useTheme(); @@ -35,12 +33,11 @@ const Purchase = () => { const { saleInfo, - status, phase: { currentPhase, currentPrice }, fetchSaleInfo, } = useSaleInfo(); const { - state: { api, apiState, height, symbol, decimals }, + state: { api, apiState, symbol, decimals }, } = useCoretimeApi(); const router = useRouter(); const { network } = useNetwork();