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: {
295
295
</ div >
296
296
) ;
297
297
298
+ const getAnchorAddress = async ( chainId ?: number , poolId ?: string ) => {
299
+ if ( chainId === 42220 && poolId === "27" ) {
300
+ return "0x91F824424Ec66F129E0DaCA8151eaD5e3bD89E5F" ;
301
+ }
302
+ return "" ;
303
+ } ;
304
+
298
305
const handleFundGrantees = async ( ) => {
299
306
setShowConfirmationModal ( false ) ;
300
307
setOpenReadyForDistributionProgressModal ( true ) ;
@@ -304,6 +311,22 @@ export function PayProjectsTable(props: {
304
311
}
305
312
306
313
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
+
307
330
const result = await allo
308
331
. batchDistributeFunds ( {
309
332
payoutStrategyOrPoolId :
You can’t perform that action at this time.
0 commit comments