-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: v50 chain upgrade #480
Changes from 37 commits
dd71181
c1b472f
2c46332
4accbb2
2f85724
4ac9df5
744846a
41dc414
058c2e6
b370102
7784ca7
05d8156
8d075dd
d1f31e5
d4e0cfc
5c9e79c
cf41efd
a462cf7
a1e0c06
65a005c
dd32511
b572e23
5aef61e
59e8163
eb60b8b
dff2f6c
902a1f0
5ac179f
0d95d45
4d11055
b479223
5d7b001
55a6198
3213f1e
4d71d68
b813000
29758d1
bf19b4c
0561ad8
d953bea
4c535a2
0ee449f
80546db
8bd257d
60f1703
8984591
8bd91a8
253737c
7966105
c9bf21c
00711b2
b88ecb0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,18 @@ on: | |
jobs: | ||
publish-canary: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
if: contains(github.ref_name, 'canary') | ||
steps: | ||
- name: 'Checkout' # Download code from the repository | ||
uses: actions/checkout@v2 # Public action | ||
with: | ||
fetch-depth: 0 # Checkout all branches and tags | ||
|
||
- name: 'Use NodeJS 16' # Setup node using version 14 | ||
- name: 'Use NodeJS 18' # Setup node using version 14 | ||
uses: actions/setup-node@v2 # Public action | ||
with: | ||
node-version: '16.18.1' | ||
node-version: '18.17.0' | ||
|
||
- name: 'Setup [email protected]' | ||
run: yarn global add [email protected] --ignore-engines | ||
|
@@ -31,6 +32,7 @@ jobs: | |
|
||
- name: Build dependencies | ||
run: | | ||
lerna clean --yes | ||
node etc/bootstrapEnv | ||
yarn install --ignore-engines | ||
yarn build | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,7 +2,7 @@ import { getNetworkEndpoints, Network } from '@injectivelabs/networks' | |||||
import { ChainGrpcIbcApi } from './ChainGrpcIbcApi' | ||||||
import { sha256 } from '../../../utils/crypto' | ||||||
import { fromUtf8 } from '../../../utils/utf8' | ||||||
import { IbcApplicationsTransferV1Transfer } from '@injectivelabs/core-proto-ts' | ||||||
import { IbcApplicationsTransferV2Token } from '@injectivelabs/core-proto-ts' | ||||||
|
||||||
const endpoints = getNetworkEndpoints(Network.MainnetSentry) | ||||||
const chainGrpcIbcApi = new ChainGrpcIbcApi(endpoints.grpc) | ||||||
|
@@ -17,7 +17,7 @@ describe('ChainGrpcIbcApi', () => { | |||||
|
||||||
expect(response).toBeDefined() | ||||||
expect(response).toEqual( | ||||||
expect.objectContaining<IbcApplicationsTransferV1Transfer.DenomTrace[]>( | ||||||
expect.objectContaining<IbcApplicationsTransferV2Token.Denom[]>( | ||||||
response, | ||||||
), | ||||||
) | ||||||
|
@@ -30,13 +30,13 @@ describe('ChainGrpcIbcApi', () => { | |||||
try { | ||||||
const [trace] = await chainGrpcIbcApi.fetchDenomsTrace() | ||||||
const ibcHash = Buffer.from( | ||||||
sha256(fromUtf8(`${trace.path}/${trace.baseDenom}`)), | ||||||
sha256(fromUtf8(`${trace.trace}/${trace.base}`)), | ||||||
).toString('hex') | ||||||
const response = await chainGrpcIbcApi.fetchDenomTrace(ibcHash) | ||||||
|
||||||
expect(response).toBeDefined() | ||||||
expect(response).toEqual( | ||||||
expect.objectContaining<IbcApplicationsTransferV1Transfer.DenomTrace>( | ||||||
expect.objectContaining<IbcApplicationsTransferV2Token.Denom>( | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Refine Test Assertion for Specificity Similar to the previous comment, ensure the individual item in the response matches the expected type - expect.objectContaining<IbcApplicationsTransferV2Token.Denom>(
- response,
- ),
+ expect(response).toEqual(expect.objectContaining<IbcApplicationsTransferV2Token.Denom>()) Committable suggestion
Suggested change
|
||||||
response, | ||||||
), | ||||||
) | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure Correct Type Assertion in Test
The type assertion using
IbcApplicationsTransferV2Token.Denom[]
should directly check the elements of the response array rather than the response itself to ensure that each item meets the expected structure.Committable suggestion