diff --git a/src/services/auto-claim.ts b/src/services/auto-claim.ts index 4bc6d94..eeab98d 100644 --- a/src/services/auto-claim.ts +++ b/src/services/auto-claim.ts @@ -91,11 +91,10 @@ export default class AutoClaimService { if ( this.slackNotify && failedTx[transaction.counter] && - (failedTx[transaction.counter] - 1) % 10 === 0 && - failedTx[transaction.counter] < 100 + (failedTx[transaction.counter] - 1) % 25 === 0 && + failedTx[transaction.counter] <= 51 ) { await this.slackNotify.notifyAdminForError({ - network: this.network, claimType: transaction.dataType as string, bridgeTxHash: transaction.transactionHash as string, sourceNetwork: transaction.sourceNetwork, diff --git a/src/services/slack-notify.ts b/src/services/slack-notify.ts index deea552..7730a55 100644 --- a/src/services/slack-notify.ts +++ b/src/services/slack-notify.ts @@ -8,58 +8,21 @@ export default class SlackNotify { async notifyAdminForError(params: INotifyParams) { await axios.post(this.slackWebhookUrl, { blocks: [ - { - type: "header", - text: { - type: "plain_text", - text: "Claim " + params.claimType + " Details: " + params.sourceNetwork + "-" + params.depositIndex, - } - }, - { - type: "section", - text: { - type: "mrkdwn", - text: "*Network:* " + params.network, - }, - }, { type: "section", text: { type: "mrkdwn", - text: "*sourceNetwork:* " + params.sourceNetwork, - }, - }, - { - type: "section", - text: { - type: "mrkdwn", - text: "*bridgeTxHash:* " + params.bridgeTxHash, - }, - }, - { - type: "section", - text: { - type: "mrkdwn", - text: "*destinationNetwork:* " + params.destinationNetwork, - }, - }, - { - type: "section", - text: { - type: "mrkdwn", - text: "*depositIndex:* " + params.depositIndex, - }, - }, - { - type: "section", - text: { - type: "mrkdwn", - text: "*Error:* " + params.error, - }, + text: + "```SourceNetwork: " + params.sourceNetwork + " \n" + + "BridgeTxHash: " + params.bridgeTxHash + "\n" + + "DestinationNetwork: " + params.destinationNetwork + "\n" + + "DepositIndex: " + params.depositIndex + "\n" + + "Error: " + params.error + "```" + } }, { type: "divider" - }, + } ], }); } diff --git a/src/services/transaction.ts b/src/services/transaction.ts index 18a42f4..c5b251f 100644 --- a/src/services/transaction.ts +++ b/src/services/transaction.ts @@ -58,14 +58,14 @@ export default class TransactionService { } async getProof(sourceNetwork: number, depositCount: number): Promise { - Logger.info({ - location: 'TransactionService', - function: 'getProof', - call: 'started', - data: { - depositCount - } - }) + // Logger.info({ + // location: 'TransactionService', + // function: 'getProof', + // call: 'started', + // data: { + // depositCount + // } + // }) let proof: IProof | null = null; try { let headers = {}; @@ -96,11 +96,11 @@ export default class TransactionService { } }); } - Logger.info({ - location: 'TransactionService', - function: 'getProof', - call: 'completed' - }) + // Logger.info({ + // location: 'TransactionService', + // function: 'getProof', + // call: 'completed' + // }) return proof; } } diff --git a/src/types/index.ts b/src/types/index.ts index c05eef6..d27300a 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,5 +1,4 @@ export interface INotifyParams { - network: string claimType: string bridgeTxHash: string sourceNetwork: number