Skip to content

Commit

Permalink
add new callback afterEveryTxSend
Browse files Browse the repository at this point in the history
  • Loading branch information
abrzezinski94 committed Jul 10, 2024
1 parent 43bc5cf commit c4003e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ export type sendSignAndConfirmTransactionsProps = {
notProcessedTransactions: TransactionInstructionWithType[],
originalProps: sendSignAndConfirmTransactionsProps,
) => void;
afterEveryTxSend?: ({ txid }: { txid: string }) => void;
};
config?: {
maxTxesInBatch: number;
Expand Down Expand Up @@ -507,6 +508,7 @@ export type sendSignAndConfirmTransactionsProps = {
* @param callbacks.afterAllTxConfirmed callback will run after all transaction batches are confirmed
* @param callbacks.afterEveryTxConfirmation callback will run on every single transaction confirmation
* @param callbacks.onError callback will run on error
* @param callbacks.afterEveryTxSend callback will run after every sended tx has tx signature as param
*
* @param config.maxTxesInBatch max transactions in one batch of transactions, there is limitation on how much wallet can sign in one go depending on used wallet. default 40
* @param config.autoRetry auto retry on any error approve and send of transaction after error
Expand Down Expand Up @@ -624,6 +626,7 @@ export const sendSignAndConfirmTransactions = async ({
},
callbacks: {
afterTxConfirmation: callbacks?.afterEveryTxConfirmation,
postSendTxCallback: callbacks?.afterEveryTxSend,
},
config,
backupConnections,
Expand Down Expand Up @@ -659,6 +662,7 @@ export const sendSignAndConfirmTransactions = async ({
},
callbacks: {
afterTxConfirmation: callbacks?.afterEveryTxConfirmation,
postSendTxCallback: callbacks?.afterEveryTxSend,
},
config,
backupConnections,
Expand Down

0 comments on commit c4003e7

Please sign in to comment.