Skip to content

Commit

Permalink
feat: Add link to events metadata (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinszuchet authored Aug 27, 2024
1 parent 9e5ff05 commit 7dfeaeb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/platform/events/rewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { BaseEvent, Events } from './base'
type BaseEventMetadata = {
title: string
description: string
link?: string
}

export type RewardEventMetadata = BaseEventMetadata & {
Expand Down Expand Up @@ -79,6 +80,7 @@ const rewardEventMetadataSchema: JSONSchema<RewardEventMetadata> = {
properties: {
title: { type: 'string' },
description: { type: 'string' },
link: { type: 'string', nullable: true },
beneficiary: { type: 'string' },
tokenName: { type: 'string' },
tokenImage: { type: 'string' },
Expand All @@ -94,6 +96,7 @@ const campaignEventMetadataSchema: JSONSchema<CampaignWellKnownIssueEventMetadat
properties: {
title: { type: 'string' },
description: { type: 'string' },
link: { type: 'string', nullable: true },
owner: { type: 'string' },
campaignId: { type: 'string' },
campaignName: { type: 'string' }
Expand Down
6 changes: 6 additions & 0 deletions test/platform/events/rewards.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe('Rewards Events tests', () => {
metadata: {
title: 'title',
description: 'description',
link: 'link',
beneficiary: '0xBeneficiary',
tokenName: 'tokenName',
tokenImage: 'tokenImage',
Expand All @@ -41,6 +42,7 @@ describe('Rewards Events tests', () => {
metadata: {
title: 'title',
description: 'description',
link: 'link',
beneficiary: '0xBeneficiary',
tokenName: 'tokenName',
tokenImage: 'tokenImage',
Expand All @@ -63,6 +65,7 @@ describe('Rewards Events tests', () => {
metadata: {
title: 'title',
description: 'description',
link: 'link',
owner: '0xOwner',
campaignId: 'campaignId',
campaignName: 'campaignName'
Expand All @@ -83,6 +86,7 @@ describe('Rewards Events tests', () => {
metadata: {
title: 'title',
description: 'description',
link: 'link',
owner: '0xOwner',
campaignId: 'campaignId',
campaignName: 'campaignName'
Expand All @@ -103,6 +107,7 @@ describe('Rewards Events tests', () => {
metadata: {
title: 'title',
description: 'description',
link: 'link',
owner: '0xOwner',
campaignId: 'campaignId',
campaignName: 'campaignName'
Expand All @@ -123,6 +128,7 @@ describe('Rewards Events tests', () => {
metadata: {
title: 'title',
description: 'description',
link: 'link',
beneficiary: '0xBeneficiary',
tokenName: 'tokenName',
tokenImage: 'tokenImage',
Expand Down

0 comments on commit 7dfeaeb

Please sign in to comment.