File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
packages/round-manager/src/features/round Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,13 @@ export function PayProjectsTable(props: {
295295 </ div >
296296 ) ;
297297
298+ const getAnchorAddress = async ( chainId ?: number , poolId ?: string ) => {
299+ if ( chainId === 42220 && poolId === "27" ) {
300+ return "0x91F824424Ec66F129E0DaCA8151eaD5e3bD89E5F" ;
301+ }
302+ return "" ;
303+ } ;
304+
298305 const handleFundGrantees = async ( ) => {
299306 setShowConfirmationModal ( false ) ;
300307 setOpenReadyForDistributionProgressModal ( true ) ;
@@ -304,6 +311,22 @@ export function PayProjectsTable(props: {
304311 }
305312
306313 if ( roundId ) {
314+ // check if all anchoraddresses are set, if undefined, console.log please
315+ const anchorAddresses = selectedProjects . map ( ( p ) => p . anchorAddress ) ;
316+ if ( anchorAddresses . some ( ( address ) => address === undefined ) ) {
317+ const anchorAddress = await getAnchorAddress (
318+ props . round . chainId ,
319+ props . round . payoutStrategy . id
320+ ) ;
321+
322+ const updatedProjects = selectedProjects . map ( ( p ) => ( {
323+ ...p ,
324+ anchorAddress : anchorAddress ,
325+ } ) ) ;
326+
327+ setSelectedProjects ( updatedProjects ) ;
328+ }
329+
307330 const result = await allo
308331 . batchDistributeFunds ( {
309332 payoutStrategyOrPoolId :
You can’t perform that action at this time.
0 commit comments