-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves a bug introduced with the PR #282 which upgrades the starknetjs version but ignores @starknet-react/core and @starknet-react/chains packages. I had to make changes to a few files to be able upgrade it, since there are API changes with the newer versions. I also fixed minor warnings in the tg-bot package. I also created 2 new CI jobs for core & hooks packages. ## Package version changes - starknet peer dependency upgraded from >=5.0.0 to >=6.8.0 - @starknet-react/core dependency upgraded from 2.2.4 to 3.6.2 - @starknet-react/core peer dependency upgraded from >=2.0.0 to >=3.0.0 - @starknet-react/chains dependency upgraded from 0.1.0 to 3.1.0 - @tanstack/react-query dependency upgraded from 5.0.1 to 5.25.0 - @starknet-io/types-js dependency installed with version ^0.7.10
- Loading branch information
Showing
21 changed files
with
314 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Core | ||
|
||
on: | ||
push: | ||
paths: [packages/core/**] | ||
pull_request: | ||
paths: [packages/core/**] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
check: | ||
defaults: | ||
run: | ||
working-directory: packages/core | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
working-directory: ./ | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Test | ||
run: yarn test | ||
|
||
- name: Build | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Hooks | ||
|
||
on: | ||
push: | ||
paths: [packages/hooks/**] | ||
pull_request: | ||
paths: [packages/hooks/**] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
check: | ||
defaults: | ||
run: | ||
working-directory: packages/hooks | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
working-directory: ./ | ||
|
||
# Core package is required for hooks to test and build | ||
- name: Build Core | ||
run: yarn build | ||
working-directory: ./packages/core | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Test | ||
run: yarn test | ||
|
||
- name: Build Hooks | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { starknetChainId, useNetwork } from '@starknet-react/core' | ||
import { useMemo } from 'react' | ||
import { constants } from 'starknet' | ||
|
||
export default function useChainId() { | ||
export default function useChainId(): constants.StarknetChainId | undefined { | ||
const { chain } = useNetwork() | ||
return useMemo(() => (chain.id ? starknetChainId(chain.id) : undefined), [chain.id]) | ||
} |
Oops, something went wrong.