Skip to content

Commit

Permalink
fix: ibc url, tests and security issue
Browse files Browse the repository at this point in the history
  • Loading branch information
emidev98 committed Mar 28, 2023
1 parent 1d759c1 commit 1bf3d75
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
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
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
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
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 1bf3d75

Please sign in to comment.