Skip to content

Commit 977a8c5

Browse files
committed
refactor: move emailSubscription to subscription
1 parent 37a0014 commit 977a8c5

File tree

7 files changed

+8
-20
lines changed

7 files changed

+8
-20
lines changed

src/schemas/profile.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@
5151
"title": "farcaster",
5252
"pattern": "^[a-z0-9-]*$",
5353
"maxLength": 17
54-
},
55-
"emailSubscriptions": {
56-
"type": "array",
57-
"title": "email subscriptions",
58-
"uniqueItems": true,
59-
"items": { "type": "string" }
6054
}
6155
},
6256
"required": [],

src/schemas/subscription.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"type": "string",
1515
"title": "value",
1616
"maxLength": 256
17+
},
18+
"metadata": {
19+
"type": "string",
20+
"title": "metadata"
1721
}
1822
},
1923
"required": ["type", "value"],

src/sign/hashedTypes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@
6363
"4288d50b713081aae77d60d596d75864bff7acf7791a00183401e58658ee9da5": "statement",
6464
"d56782e3b50ac86c25ae292923da8c367e3c9e8e7ea9d8baa435051fe2f430fa": "proposal",
6565
"df10a7eeabe19301d6018be8b6c5d13231320d7ece64d021043fa172b64f3796": "update-proposal",
66-
"3c211382d04e80cbd21f3275e0674387bde366bbb885215e3735151763ca2813": "subscription"
66+
"499ff7269df478dede66b3c0b96a0b90286c479b4013b423ac7cf8628a94e6db": "subscription"
6767
}

src/sign/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ export const subscriptionTypes = {
351351
{ name: 'from', type: 'address' },
352352
{ name: 'type', type: 'string' },
353353
{ name: 'value', type: 'string' },
354+
{ name: 'metadata', type: 'string' },
354355
{ name: 'timestamp', type: 'uint64' }
355356
]
356357
};

test/examples/profile-updateEmailSubscription.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/examples/subscription.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"type": "email",
3-
"value": "[email protected]"
3+
"value": "[email protected]",
4+
"metadata": "['summary', 'newProposal']"
45
}

test/schema.spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import spaceStarknetDelegation from './examples/space-starknet-delegation.json';
77
import proposalTurbo from './examples/proposal-turbo.json';
88
import vote from './examples/vote.json';
99
import profile from './examples/profile.json';
10-
import profileUpdateEmailSubscription from './examples/profile-updateEmailSubscription.json';
1110
import subscription from './examples/subscription.json';
1211
import statement from './examples/statement.json';
1312
import alias from './examples/alias.json';
@@ -26,11 +25,6 @@ describe.each([
2625
{ schemaType: 'proposal', schema: schemas.proposal, example: proposal },
2726
{ schemaType: 'vote', schema: schemas.vote, example: vote },
2827
{ schemaType: 'profile', schema: schemas.profile, example: profile },
29-
{
30-
schemaType: 'profile',
31-
schema: schemas.profile,
32-
example: profileUpdateEmailSubscription
33-
},
3428
{
3529
schemaType: 'subscription',
3630
schema: schemas.subscription,

0 commit comments

Comments
 (0)