Skip to content

Commit

Permalink
fix: use compatible axios (#874)
Browse files Browse the repository at this point in the history
* fix: use compatible axios

* style: add blank line
  • Loading branch information
Cafe137 authored Oct 31, 2023
1 parent e7d0a02 commit ad8f5d2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
18 changes: 6 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"dependencies": {
"@ethersphere/swarm-cid": "^0.1.0",
"@types/readable-stream": "^2.3.13",
"axios": "^1.3.4",
"axios": "^0.27.2",
"cafe-utility": "^10.8.1",
"elliptic": "^6.5.4",
"fetch-blob": "2.1.2",
Expand Down
7 changes: 6 additions & 1 deletion src/modules/debug/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ export async function cancelTransaction(
transactionHash: TransactionHash,
gasPrice?: NumberString,
): Promise<TransactionHash> {
const headers: Record<string, string | number> = {}

if (gasPrice) {
headers['gas-price'] = gasPrice
}
const response = await http<TransactionResponse>(requestOptions, {
method: 'delete',
headers: { 'gas-price': gasPrice },
headers,
url: `${transactionsEndpoint}/${transactionHash}`,
responseType: 'json',
})
Expand Down

0 comments on commit ad8f5d2

Please sign in to comment.