Skip to content

Commit

Permalink
Local testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mxiao-cll committed Dec 5, 2024
1 parent 4c2583c commit b2a2569
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changeset/selfish-eagles-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/bx-digital-adapter': patch
---

Lol
58 changes: 29 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Release

on:
push:
branches:
- main
# The only commits that will contain changes to the masterlist will be releases
pull_request:
paths:
- MASTERLIST.md
- 'packages/sources/**'
- 'packages/composites/**'
- 'packages/targets/**'
- 'packages/core/**'
workflow_dispatch:
inputs:
# For this workflow, build-all will cause all adapters to have their image pulled and republished to the public ECR
Expand Down Expand Up @@ -86,27 +86,27 @@ jobs:
aws-role: ${{ secrets.AWS_OIDC_IAM_ROLE_ARN }}
aws-ecr-private: false

gh-release:
name: GH Release
runs-on: ubuntu-latest
needs:
- publish-adapter-images
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get release version
id: get-version
run: |
echo "result=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
- name: Get release body
run: |
# Get the PR body to use in the GH release body
gh pr list --search "$(git rev-parse HEAD)" --state merged --json number,body --jq '"This release was merged in PR #" + (.[0].number | tostring) + "\n" + (.[0].body | split("\n\n\n# Releases") | .[1])' > pr_body.tmp
- name: Create release
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9
with:
tag_name: v${{ steps.get-version.outputs.result }}
name: Release v${{ steps.get-version.outputs.result }}
body_path: pr_body.tmp
# gh-release:
# name: GH Release
# runs-on: ubuntu-latest
# needs:
# - publish-adapter-images
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# steps:
# - name: Checkout Repo
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# - name: Get release version
# id: get-version
# run: |
# echo "result=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
# - name: Get release body
# run: |
# # Get the PR body to use in the GH release body
# gh pr list --search "$(git rev-parse HEAD)" --state merged --json number,body --jq '"This release was merged in PR #" + (.[0].number | tostring) + "\n" + (.[0].body | split("\n\n\n# Releases") | .[1])' > pr_body.tmp
# - name: Create release
# uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9
# with:
# tag_name: v${{ steps.get-version.outputs.result }}
# name: Release v${{ steps.get-version.outputs.result }}
# body_path: pr_body.tmp
11 changes: 10 additions & 1 deletion packages/sources/bx-digital/src/transport/price.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { HttpTransport } from '@chainlink/external-adapter-framework/transports'
import { BaseEndpointTypes } from '../endpoint/price'
import { makeLogger } from '@chainlink/external-adapter-framework/util'

const logger = makeLogger('apy-finance-test allocations')

export interface ResponseSchema {
securityId: string
Expand All @@ -16,13 +19,19 @@ export type HttpTransportTypes = BaseEndpointTypes & {
export const httpTransport = new HttpTransport<HttpTransportTypes>({
prepareRequests: (params, config) => {
return params.map((param) => {
logger.error('Use custome header')
return {
params: [param],
request: {
baseURL: config.API_ENDPOINT,
headers: {
'API-key': config.API_KEY,
'User-Agent': config.API_USER_AGENT,
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
Accept:
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.5',
Referer: 'https://example.com',
},
},
}
Expand Down

0 comments on commit b2a2569

Please sign in to comment.