Skip to content

Commit 8c6423a

Browse files
johnleteycvpfus
andauthored
fix: include Content-Type in Sidecar request (#2)
* fixing bug * chore: prepare for release Co-authored-by: Yusuf Praditya <47532266+yusufpraditya@users.noreply.github.com>
1 parent c9dd9de commit 8c6423a

4 files changed

Lines changed: 4 additions & 2690 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Install yarn.
6565
run: npm install -g yarn
6666
- name: Install dependencies.
67-
run: yarn install
67+
run: yarn add webhook-discord
6868

6969
- name: Run script.
7070
run: DISCORD=${{ secrets.DISCORD }} VERSION=${GITHUB_REF#refs/tags/} node .github/webhook.js

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kyve/substrate",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"license": "MIT",
55
"scripts": {
66
"build": "rimraf dist && tsc",
@@ -29,7 +29,6 @@
2929
"pkg": "^5.7.0",
3030
"prettier": "^2.7.1",
3131
"rimraf": "^3.0.2",
32-
"typescript": "^4.7.3",
33-
"webhook-discord": "^3.7.8"
32+
"typescript": "^4.7.4"
3433
}
3534
}

src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export function isHeightOutOfRange(err: any): boolean {
2626
async function requestSidecarAPI(endpoint: string, signature: Signature) {
2727
const { data } = await axios.get(endpoint, {
2828
headers: {
29+
'Content-Type': 'application/json',
2930
Signature: signature.signature,
3031
'Public-Key': signature.pubKey,
3132
'Pool-ID': signature.poolId,

0 commit comments

Comments
 (0)