Skip to content

Commit

Permalink
Merge pull request #351 from terra-money/fix/tests
Browse files Browse the repository at this point in the history
fix: ibc url, tests and security issue
  • Loading branch information
ericHgorski authored Mar 28, 2023
2 parents 1d759c1 + 1bf3d75 commit bcff8fb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"scripts": {
"build": "tsc --module commonjs && webpack --mode production",
"test": "jest",
"test": "jest --runInBand",
"format": "prettier --check ./src/**/*.ts",
"format:fix": "prettier --write ./src/**/*.ts",
"lint": "eslint src --ext .js,.ts",
Expand Down
1 change: 1 addition & 0 deletions src/client/lcd/api/IbcAPI.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { IbcAPI } from './IbcAPI';
const terra = new LCDClient({
chainID: 'pisco-1',
URL: 'https://pisco-lcd.terra.dev',
isClassic: false,
});
const ibc = new IbcAPI(terra);

Expand Down
6 changes: 5 additions & 1 deletion src/client/lcd/api/IbcAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,12 @@ export class IbcAPI extends BaseAPI {
* Gets the current transfer application parameters.
*/
public async parameters(params: APIParams = {}): Promise<IbcClientParams> {
const url = this.lcd.config.isClassic
? `/ibc/client/v1/params`
: `/ibc/core/client/v1/params`;

return this.c
.get<{ params: IbcClientParams.Data }>(`/ibc/client/v1/params`, params)
.get<{ params: IbcClientParams.Data }>(url, params)
.then(({ params: d }) => ({
allowed_clients: d.allowed_clients,
}));
Expand Down
2 changes: 1 addition & 1 deletion src/client/lcd/api/UpgradeAPI.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('UpgradeAPI', () => {

describe('node_versions', () => {
it('module count', async () => {
expect(await upgrade.moduleVersions()).toHaveLength(21);
expect(await upgrade.moduleVersions()).toHaveLength(26);
});
});
});

0 comments on commit bcff8fb

Please sign in to comment.