@@ -2,14 +2,11 @@ import { api } from "@core/api";
22import type { MerklServerContext } from "@core/app/server/context" ;
33import { ErrorContent } from "@core/components/layout/ErrorContent" ;
44import { ChainService } from "@core/modules/chain/chain.service" ;
5- import { InteractionService } from "@core/modules/interaction/interaction.service" ;
65import type { OutletContextOpportunity } from "@core/modules/opportunity/routes/opportunity.$chain.$type.$id.header" ;
7- import type { Opportunity } from "@merkl/api" ;
86import { Container , Group } from "dappkit" ;
97import { Outlet , useLoaderData , useOutletContext } from "react-router" ;
108import type { LoaderFunctionArgs } from "react-router" ;
119import OpportunityBoxParticipate from "../components/element/OpportunityBoxParticipate" ;
12- import { OpportunityService } from "../opportunity.service" ;
1310
1411export async function loader ( {
1512 context : { backend } ,
@@ -19,16 +16,16 @@ export async function loader({
1916 if ( ! chainId || ! id || ! type ) throw "" ;
2017
2118 const chain = await ChainService ( { api, request, backend } ) . get ( { name : chainId } ) ;
22- const opportunity = ( await OpportunityService ( { api , request , backend } ) . getCampaignsByParams ( {
23- chainId : chain . id ,
24- type : type ,
25- identifier : id ,
26- } ) ) as unknown as Opportunity ;
27-
28- const targets = await InteractionService ( { api, backend } ) . getTargetsByOpportunity ( opportunity as Opportunity ) ;
19+ // DISABLED FOR NOW (Crashing on opp identifier different from blockchain address)
20+ // const opportunity = (await OpportunityService({ api, request, backend }).getCampaignsByParams({
21+ // chainId: chain.id ,
22+ // type: type ,
23+ // identifier: id,
24+ // })) as unknown as Opportunity;
25+ // const targets = await InteractionService({ api, backend }).getTargetsByOpportunity(opportunity as Opportunity);
2926
3027 return {
31- targets,
28+ targets : [ ] ,
3229 } ;
3330}
3431
0 commit comments