diff --git a/apps/nextjs/src/app/_components/StarkName.tsx b/apps/nextjs/src/app/_components/StarkName.tsx index 9db2542d..48983a14 100644 --- a/apps/nextjs/src/app/_components/StarkName.tsx +++ b/apps/nextjs/src/app/_components/StarkName.tsx @@ -11,7 +11,7 @@ export const StarkName = ({ address }: { address?: string }) => { }, [address]); const { data: starkName, refetch } = useStarkName({ - address: address, + address: address as `0x${string}`, }); useEffect(() => { diff --git a/apps/nextjs/src/app/_components/modal/TransactionSubmittedModal/TransactionSubmittedModalButton.tsx b/apps/nextjs/src/app/_components/modal/TransactionSubmittedModal/TransactionSubmittedModalButton.tsx index dac2c18a..733d387b 100644 --- a/apps/nextjs/src/app/_components/modal/TransactionSubmittedModal/TransactionSubmittedModalButton.tsx +++ b/apps/nextjs/src/app/_components/modal/TransactionSubmittedModal/TransactionSubmittedModalButton.tsx @@ -34,6 +34,7 @@ const TransactionSubmittedModalButton = ({ const { type, l2hash, l1hash } = transfer; const isTransferCompleted = l1hash && l2hash; + if (l1hash === undefined || l2hash === undefined) return null; let explorers; if (type === ActionType.TRANSFER_TO_L2 || isTransferCompleted) { diff --git a/apps/nextjs/src/app/_components/wallet/transactions/TransactionAction.tsx b/apps/nextjs/src/app/_components/wallet/transactions/TransactionAction.tsx index d07a28d8..0e5ebc26 100644 --- a/apps/nextjs/src/app/_components/wallet/transactions/TransactionAction.tsx +++ b/apps/nextjs/src/app/_components/wallet/transactions/TransactionAction.tsx @@ -31,7 +31,7 @@ export const TransactionAction = ({ tx }: { tx: CombinedTransaction }) => { type: TransactionType.BRIDGE_REALMS_L2_TO_L1_CONFIRM, chainId: SUPPORTED_L2_CHAIN_ID, status: "complete", - timestamp: new Date().getTime(), + timestamp: new Date().getTime().toString(), }); toast({ title: TransactionType.BRIDGE_REALMS_L2_TO_L1_CONFIRM, diff --git a/apps/nextjs/src/app/_components/wallet/transactions/TransactionStatusL2.tsx b/apps/nextjs/src/app/_components/wallet/transactions/TransactionStatusL2.tsx index c0799f8b..325fc0e8 100644 --- a/apps/nextjs/src/app/_components/wallet/transactions/TransactionStatusL2.tsx +++ b/apps/nextjs/src/app/_components/wallet/transactions/TransactionStatusL2.tsx @@ -18,8 +18,11 @@ export function TransactionStatusL2({ hash }: { hash: string }) { ? "Loading..." : isError ? error?.message + // @ts-expect-error TODO: check types with apibara : data?.status === "REJECTED" + // @ts-expect-error TODO: check types with apibara ? `${data.status}` + // @ts-expect-error TODO: check types with apibara : `${data?.execution_status}`} ); diff --git a/apps/nextjs/src/app/_components/wallet/utils.tsx b/apps/nextjs/src/app/_components/wallet/utils.tsx index 91b4e8d5..62f7ff34 100644 --- a/apps/nextjs/src/app/_components/wallet/utils.tsx +++ b/apps/nextjs/src/app/_components/wallet/utils.tsx @@ -11,9 +11,9 @@ export const RenderExplorers = ({ isL1 = true }) => { const { address } = useAccount(); const { address: l2address } = useL2Account(); - const explorersL1 = [{ text: address, url: ETHERSCAN_ACCOUNT_URL(address) }]; + const explorersL1 = [{ text: address, url: ETHERSCAN_ACCOUNT_URL(address as string) }]; const explorersL2 = [ - { text: l2address, url: STARKSCAN_ACCOUNT_URL(l2address) }, + { text: l2address, url: STARKSCAN_ACCOUNT_URL(l2address as string) }, ]; const explorers = isL1 ? explorersL1 : explorersL2; diff --git a/apps/nextjs/src/app/account/assets/BridgeNftWrapper.tsx b/apps/nextjs/src/app/account/assets/BridgeNftWrapper.tsx index 9ef998ee..2addd2a8 100644 --- a/apps/nextjs/src/app/account/assets/BridgeNftWrapper.tsx +++ b/apps/nextjs/src/app/account/assets/BridgeNftWrapper.tsx @@ -23,13 +23,14 @@ import { import AssetL1CollectionPreview from "./AssetL1CollectionPreview"; import AssetL2CollectionPreview from "./AssetL2CollectionPreview"; +import { TransactionFinalityStatus } from "starknet"; export const BridgeNftWrapper = () => { const [activeChain, setActiveChain] = useState("l1"); const { address } = useAccount(); const { data: pendingWithdrawals } = usePendingRealmsWithdrawals({ address, - status: "ACCEPTED_ON_L1", + status: TransactionFinalityStatus.ACCEPTED_ON_L1, }); const { toggleAccount } = useUIStore((state) => state); diff --git a/apps/nextjs/src/app/account/delegates/DelegateCard.tsx b/apps/nextjs/src/app/account/delegates/DelegateCard.tsx index 7f3e7efd..d2932b76 100644 --- a/apps/nextjs/src/app/account/delegates/DelegateCard.tsx +++ b/apps/nextjs/src/app/account/delegates/DelegateCard.tsx @@ -1,5 +1,5 @@ // TODO: fix types on delegate.delegateProfileL54+ -/* eslint-disable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment */ + import Image from "next/image"; import { ReadMore } from "@/app/_components/ReadMore"; import { StarkName } from "@/app/_components/StarkName"; @@ -20,11 +20,19 @@ import { import { SocialIcons } from "../../_components/SocialIcons"; import { DelegateActions } from "./DelegateActions"; +interface DelegateCardProps { + delegate: RouterOutputs["delegates"]["all"]["items"][0] & { + delegateProfile?: NonNullable<{ + interests: string[]; + statement: string; + github: string; + twitter: string; + }>; + } +} export function DelegateCard({ delegate, -}: { - delegate: RouterOutputs["delegates"]["all"]["items"][0]; -}) { +}: DelegateCardProps) { //const { data, isLoading, isError } = useStarkProfile({ address: delegate.id }); //const starkName = useStarkDisplayName(delegate.id); @@ -51,51 +59,55 @@ export function DelegateCard({ - {delegate.delegateProfile && ( -
+ You must have at least one Realm on Starknet to create a + delegate profile. Either bridge a Realm from Etherum or + purchase on the marketplace to get started +
+ + + > + )} +- You must have at least one Realm on Starknet to create a - delegate profile. Either bridge a Realm from Etherum or - purchase on the marketplace to get started -
- - - > - )} -