From b697b1a8572c74c29c852dff51e951e4187bcdaf Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Sat, 7 Oct 2023 10:46:37 +0300 Subject: [PATCH] Update contracts context --- contexts/contracts.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contexts/contracts.tsx b/contexts/contracts.tsx index b498185..13790ff 100644 --- a/contexts/contracts.tsx +++ b/contexts/contracts.tsx @@ -6,6 +6,8 @@ import type { UseBaseMinterContractProps } from 'contracts/baseMinter' import { useBaseMinterContract } from 'contracts/baseMinter' import { type UseOpenEditionFactoryContractProps, useOpenEditionFactoryContract } from 'contracts/openEditionFactory' import { type UseOpenEditionMinterContractProps, useOpenEditionMinterContract } from 'contracts/openEditionMinter' +import type { UseRoyaltyRegistryContractProps } from 'contracts/royaltyRegistry' +import { useRoyaltyRegistryContract } from 'contracts/royaltyRegistry' import type { UseSG721ContractProps } from 'contracts/sg721' import { useSG721Contract } from 'contracts/sg721' import type { UseVendingFactoryContractProps } from 'contracts/vendingFactory' @@ -36,6 +38,7 @@ export interface ContractsStore extends State { openEditionFactory: UseOpenEditionFactoryContractProps | null badgeHub: UseBadgeHubContractProps | null splits: UseSplitsContractProps | null + royaltyRegistry: UseRoyaltyRegistryContractProps | null } /** @@ -52,6 +55,7 @@ export const defaultValues: ContractsStore = { openEditionFactory: null, badgeHub: null, splits: null, + royaltyRegistry: null, } /** @@ -85,6 +89,7 @@ const ContractsSubscription: VFC = () => { const openEditionFactory = useOpenEditionFactoryContract() const badgeHub = useBadgeHubContract() const splits = useSplitsContract() + const royaltyRegistry = useRoyaltyRegistryContract() useEffect(() => { useContracts.setState({ @@ -98,8 +103,9 @@ const ContractsSubscription: VFC = () => { openEditionFactory, badgeHub, splits, + royaltyRegistry, }) - }, [sg721, vendingMinter, baseMinter, whitelist, vendingFactory, baseFactory, badgeHub, splits]) + }, [sg721, vendingMinter, baseMinter, whitelist, vendingFactory, baseFactory, badgeHub, splits, royaltyRegistry]) return null }