Skip to content

Commit

Permalink
Merge pull request #759 from tonkeeper/develop
Browse files Browse the repository at this point in the history
release/4.0.0
  • Loading branch information
sorokin0andrey authored Mar 11, 2024
2 parents 8ab4535 + 4c8a50d commit fab7c6e
Show file tree
Hide file tree
Showing 629 changed files with 18,343 additions and 15,686 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
matrix:
os: [macos-13]
node-version: [18.18.0]
ruby-version: [3.2]
ruby-version: [2.7]
xcode: [15.0.1]

runs-on: ${{ matrix.os }}
Expand All @@ -32,16 +32,25 @@ jobs:
max_attempts: 3
command: yarn

- name: Install pods dependencies
run: yarn pods

- name: Set up Ruby and Gemfile dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
working-directory: './packages/mobile'

- name: Cache Pods directory
uses: actions/cache@v3
with:
path: ./packages/mobile/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install pods dependencies
working-directory: './packages/mobile/ios'
run: bundle exec pod install

- name: Decode signing certificate into a file
working-directory: './packages/mobile/ios'
env:
Expand Down Expand Up @@ -83,7 +92,7 @@ jobs:
matrix:
os: [macos-13]
node-version: [18.18.0]
ruby-version: [3.2]
ruby-version: [2.7]
java-version: [11.0.12]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -159,7 +168,7 @@ jobs:
matrix:
os: [macos-13]
node-version: [18.18.0]
ruby-version: [3.2]
ruby-version: [2.7]
java-version: [11.0.12]

runs-on: ${{ matrix.os }}
Expand Down
12 changes: 6 additions & 6 deletions packages/@core-js/src/TonAPI/HttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type CancelToken = Symbol | string | number;

export type HttpClientOptions = {
baseUrl: string | (() => string);
token?: string | (() => string);
baseHeaders?: { [key: string]: string } | (() => { [key: string]: string });
};

export class HttpClient {
Expand Down Expand Up @@ -143,18 +143,18 @@ export class HttpClient {
typeof this.options.baseUrl === 'function'
? this.options.baseUrl()
: this.options.baseUrl;
const token =
typeof this.options.token === 'function'
? this.options.token()
: this.options.token;
const baseHeaders =
typeof this.options.baseHeaders === 'function'
? this.options.baseHeaders()
: this.options.baseHeaders;

const response = await this.customFetch(
`${baseUrl}${path}${queryString ? `?${queryString}` : ''}`,
{
method,
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
...(baseHeaders ?? {}),
...(headers ?? {}),
},
signal: cancelToken ? this.createAbortSignal(cancelToken) : null,
Expand Down
Loading

0 comments on commit fab7c6e

Please sign in to comment.