diff --git a/README.md b/README.md index db077d8..dc7b924 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,17 @@ Some parameters are common to every event: } ``` +## Multisig transaction deleted + +```json +{ + "address": "", + "type": "DELETED_MULTISIG_TRANSACTION", + "safeTxHash": "<0x-prefixed-hex-string>", + "chainId": "" +} +``` + ### Incoming Ether ```json diff --git a/src/routes/events/event.dto.ts b/src/routes/events/event.dto.ts index 24b60c4..3f1a40f 100644 --- a/src/routes/events/event.dto.ts +++ b/src/routes/events/event.dto.ts @@ -10,7 +10,8 @@ export type TxServiceEventType = | 'OUTGOING_ETHER' | 'OUTGOING_TOKEN' | 'MESSAGE_CREATED' - | 'MESSAGE_CONFIRMATION'; + | 'MESSAGE_CONFIRMATION' + | 'DELETED_MULTISIG_TRANSACTION'; export interface TxServiceEvent { chainId: string; diff --git a/src/routes/webhook/entities/webhook.entity.spec.ts b/src/routes/webhook/entities/webhook.entity.spec.ts index 45a5206..9bb1608 100644 --- a/src/routes/webhook/entities/webhook.entity.spec.ts +++ b/src/routes/webhook/entities/webhook.entity.spec.ts @@ -65,6 +65,13 @@ describe('Webhook entity', () => { expect(webhook.isEventRelevant(txServiceEvent)).toBe(false); }); + it('DELETED_MULTISIG_TRANSACTION should not be relevant if sendMultisigTxs is disabled', async () => { + txServiceEvent.type = 'DELETED_MULTISIG_TRANSACTION' as TxServiceEventType; + expect(webhook.isEventRelevant(txServiceEvent)).toBe(true); + webhook.sendMultisigTxs = false; + expect(webhook.isEventRelevant(txServiceEvent)).toBe(false); + }); + it('INCOMING_ETHER should not be relevant if sendEtherTransfers is disabled', async () => { txServiceEvent.type = 'INCOMING_ETHER' as TxServiceEventType; expect(webhook.isEventRelevant(txServiceEvent)).toBe(true); diff --git a/src/routes/webhook/entities/webhook.entity.ts b/src/routes/webhook/entities/webhook.entity.ts index cdde1c0..05978d4 100644 --- a/src/routes/webhook/entities/webhook.entity.ts +++ b/src/routes/webhook/entities/webhook.entity.ts @@ -58,7 +58,8 @@ export class Webhook extends BaseEntity { message.type === 'CONFIRMATION_REQUEST')) || (this.sendMultisigTxs && (message.type === 'PENDING_MULTISIG_TRANSACTION' || - message.type === 'EXECUTED_MULTISIG_TRANSACTION')) || + message.type === 'EXECUTED_MULTISIG_TRANSACTION' || + message.type === 'DELETED_MULTISIG_TRANSACTION')) || (this.sendEtherTransfers && (message.type === 'INCOMING_ETHER' || message.type === 'OUTGOING_ETHER')) ||