This repository was archived by the owner on Nov 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 "repoDriver" : {
99 "address" : " 0xa71bdf410D48d4AA9aE1517A69D7E1Ef0c179b2B"
1010 },
11+ "repoDeadlineDriver" : {
12+ "address" : " 0x0000000000000000000000000000000000000000"
13+ },
1114 "repoSubAccountDriver" : {
1215 "address" : " 0x0000000000000000000000000000000000000000"
1316 },
Original file line number Diff line number Diff line change 88 "repoDriver" : {
99 "address" : " 0x770023d55D09A9C110694827F1a6B32D5c2b373E"
1010 },
11+ "repoDeadlineDriver" : {
12+ "address" : " 0x8324ea3538f12895c941a625b7f15df2d7dbfdff"
13+ },
1114 "repoSubAccountDriver" : {
1215 "address" : " 0xc219395880fa72e3ad9180b8878e0d39d144130b"
1316 },
Original file line number Diff line number Diff line change 88 "nftDriver" : {
99 "address" : " 0xDafd9Ab96E62941808caa115D184D30A200FA777"
1010 },
11+ "repoDeadlineDriver" : {
12+ "address" : " 0x0000000000000000000000000000000000000000"
13+ },
1114 "repoSubAccountDriver" : {
1215 "address" : " 0x0000000000000000000000000000000000000000"
1316 },
Original file line number Diff line number Diff line change 1+ import z from 'zod' ;
2+ import { addressDriverSplitReceiverSchema } from '../repo-driver/v2' ;
3+ import { dripListSplitReceiverSchema } from '../nft-driver/v2' ;
4+ import { repoSubAccountDriverSplitReceiverSchema } from '../common/repoSubAccountDriverSplitReceiverSchema' ;
5+ import { deadlineSplitReceiverSchema } from '../repo-driver/v6' ;
6+ import { subListSplitReceiverSchema , subListMetadataSchemaV1 } from './v1' ;
7+
8+ export const subListMetadataSchemaV2 = subListMetadataSchemaV1 . extend ( {
9+ recipients : z . array (
10+ z . union ( [
11+ addressDriverSplitReceiverSchema ,
12+ dripListSplitReceiverSchema ,
13+ repoSubAccountDriverSplitReceiverSchema ,
14+ subListSplitReceiverSchema ,
15+ deadlineSplitReceiverSchema , // New in v2
16+ ] ) ,
17+ ) ,
18+ isVisible : z . boolean ( ) . optional ( ) ,
19+ } ) ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { subListMetadataSchemaV1 } from './immutable-splits-driver/v1';
1414import { nftDriverAccountMetadataSchemaV6 } from './nft-driver/v6' ;
1515import { nftDriverAccountMetadataSchemaV7 } from './nft-driver/v7' ;
1616import { repoDriverAccountMetadataSchemaV6 } from './repo-driver/v6' ;
17+ import { subListMetadataSchemaV2 } from './immutable-splits-driver/v2' ;
1718
1819export const nftDriverAccountMetadataParser = createVersionedParser ( [
1920 nftDriverAccountMetadataSchemaV7 . parse ,
@@ -39,5 +40,6 @@ export const repoDriverAccountMetadataParser = createVersionedParser([
3940] ) ;
4041
4142export const immutableSplitsDriverMetadataParser = createVersionedParser ( [
43+ subListMetadataSchemaV2 . parse ,
4244 subListMetadataSchemaV1 . parse ,
4345] ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,14 @@ export const deadlineSplitReceiverSchema = z.object({
2424 } ) ,
2525 recipientAccountId : z . string ( ) ,
2626 refundAccountId : z . string ( ) ,
27- deadline : z . coerce . date ( ) ,
27+ deadline : z . coerce
28+ . date ( )
29+ . refine ( ( date ) => ! Number . isNaN ( date . getTime ( ) ) , 'Invalid date' )
30+ . refine ( ( date ) => date > new Date ( ) , 'Deadline must be in the future' )
31+ . refine (
32+ ( date ) => date < new Date ( Date . now ( ) + 365 * 24 * 60 * 60 * 1000 ) ,
33+ 'Deadline cannot be more than 1 year in the future' ,
34+ ) ,
2835} ) ;
2936
3037const repoDriverAccountSplitsSchemaV6 = z . object ( {
You can’t perform that action at this time.
0 commit comments