diff --git a/apps/dispatcher/src/services/triggers/offchain-vote-cast-trigger.service.test.ts b/apps/dispatcher/src/services/triggers/offchain-vote-cast-trigger.service.test.ts index 6e20d94c..c0678d32 100644 --- a/apps/dispatcher/src/services/triggers/offchain-vote-cast-trigger.service.test.ts +++ b/apps/dispatcher/src/services/triggers/offchain-vote-cast-trigger.service.test.ts @@ -75,7 +75,6 @@ function buildExpectedMessage(vote: OffchainVoteWithDaoId): string { : offchainVoteCastMessages.withoutReason; return replacePlaceholders(template, { - address: vote.voter, daoId: vote.daoId, proposalTitle: vote.proposalTitle, ...(hasReason && { reason: vote.reason! }), @@ -89,7 +88,7 @@ function buildExpectedPayload(vote: OffchainVoteWithDaoId): NotificationPayload channelUserId: STUB_USER.channel_user_id, message: buildExpectedMessage(vote), bot_token: undefined, - metadata: undefined, + metadata: { addresses: { address: vote.voter } }, }; } diff --git a/apps/dispatcher/src/services/triggers/offchain-vote-cast-trigger.service.ts b/apps/dispatcher/src/services/triggers/offchain-vote-cast-trigger.service.ts index deb13044..9d859170 100644 --- a/apps/dispatcher/src/services/triggers/offchain-vote-cast-trigger.service.ts +++ b/apps/dispatcher/src/services/triggers/offchain-vote-cast-trigger.service.ts @@ -114,7 +114,8 @@ export class OffchainVoteCastTriggerHandler extends BaseTriggerHandler { expect(message.text).toContain('🗳️'); expect(message.text).toContain(proposalTitle); expect(message.text).toContain('Reason: "Fully support this initiative!"'); + expect(message.text).toContain('vitalik.eth'); + expect(message.text).not.toContain(voterAddress); }); test('should NOT send duplicate notifications for same offchain vote', async () => {