Skip to content

Commit

Permalink
Feat: add deleteTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Feb 7, 2024
1 parent fa2f370 commit dd80279
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,20 @@ export function getTransactionDetails(chainId: string, transactionId: string): P
})
}

/**
* Delete a transaction by its safeTxHash
*/
export function deleteTransaction(
chainId: string,
safeTxHash: string,
signature: operations['delete_transaction']['parameters']['body']['signature'],
): Promise<void> {
return deleteEndpoint(baseUrl, '/v1/chains/{chainId}/transactions/{safeTxHash}', {
path: { chainId, safeTxHash },
body: { signature },
})
}

/**
* Request a gas estimate & recommmended tx nonce for a created transaction
*/
Expand Down
23 changes: 23 additions & 0 deletions src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ export interface paths extends PathRegistry {
}
}
}
'/v1/chains/{chainId}/transactions/{safeTxHash}': {
delete: operations['delete_transaction']
parameters: {
path: {
chainId: string
safeTxHash: string
}
}
}
'/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations': {
post: operations['post_safe_gas_estimation']
parameters: {
Expand Down Expand Up @@ -554,6 +563,20 @@ export interface operations {
}
}
}
delete_transaction: {
parameters: {
path: {
chainId: string
safeTxHash: string
}
body: { signature: string }
}
responses: {
200: {
schema: void
}
}
}
post_safe_gas_estimation: {
parameters: {
path: {
Expand Down

0 comments on commit dd80279

Please sign in to comment.