From febc36bbd341a39130d05abdd5f695a85f1b197f Mon Sep 17 00:00:00 2001 From: Davide Segullo Date: Fri, 6 Sep 2024 16:14:15 +0200 Subject: [PATCH] fix: :rotating_light: address CodeQL suggestions --- .../cosmwasm-stargate/src/signingcosmwasmclient.spec.ts | 2 +- packages/cosmwasm-stargate/src/signingcosmwasmclient.ts | 4 ++-- packages/stargate/src/signingstargateclient.spec.ts | 2 +- packages/stargate/src/signingstargateclient.ts | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts b/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts index ae5bbde101..9ad835db53 100644 --- a/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts +++ b/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts @@ -121,7 +121,7 @@ describe("SigningCosmWasmClient", () => { }), }; const memo = "Go go go"; - const { sequence } = await client.getSequence(alice.address0) + const { sequence } = await client.getSequence(alice.address0); const gasUsed = await client.simulate(alice.address0, [executeContractMsg], memo, { sequence }); expect(gasUsed).toBeGreaterThanOrEqual(70_000); diff --git a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts index f2e7416c44..de335e53da 100644 --- a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts +++ b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts @@ -285,7 +285,7 @@ export class SigningCosmWasmClient extends CosmWasmClient { } const pubkey = encodeSecp256k1Pubkey(accountFromSigner.pubkey); - let sequence: number + let sequence: number; if (explicitSignerData?.sequence !== undefined) { sequence = explicitSignerData.sequence; @@ -625,7 +625,7 @@ export class SigningCosmWasmClient extends CosmWasmClient { ): Promise { let usedFee: StdFee; - let signerData: SignerData | undefined = explicitSignerData + let signerData: SignerData | undefined = explicitSignerData; const { sequence, accountNumber } = explicitSignerData ? explicitSignerData : await this.getSequence(signerAddress); if (fee == "auto" || typeof fee === "number") { diff --git a/packages/stargate/src/signingstargateclient.spec.ts b/packages/stargate/src/signingstargateclient.spec.ts index c631192105..4760b7ee5e 100644 --- a/packages/stargate/src/signingstargateclient.spec.ts +++ b/packages/stargate/src/signingstargateclient.spec.ts @@ -108,7 +108,7 @@ describe("SigningStargateClient", () => { }; const memo = "Use your power wisely"; - const { sequence } = await client.getSequence(faucet.address0) + const { sequence } = await client.getSequence(faucet.address0); const gasUsed = await client.simulate(faucet.address0, [msgAny], memo, { sequence }); expect(gasUsed).toBeGreaterThanOrEqual(101_000); expect(gasUsed).toBeLessThanOrEqual(200_000); diff --git a/packages/stargate/src/signingstargateclient.ts b/packages/stargate/src/signingstargateclient.ts index 27e8964168..f8915189da 100644 --- a/packages/stargate/src/signingstargateclient.ts +++ b/packages/stargate/src/signingstargateclient.ts @@ -50,7 +50,7 @@ import { createStakingAminoConverters, createVestingAminoConverters, } from "./modules"; -import { DeliverTxResponse, SequenceResponse, StargateClient, StargateClientOptions } from "./stargateclient"; +import { DeliverTxResponse, StargateClient, StargateClientOptions } from "./stargateclient"; export const defaultRegistryTypes: ReadonlyArray<[string, GeneratedType]> = [ ["/cosmos.base.v1beta1.Coin", Coin], @@ -190,7 +190,7 @@ export class SigningStargateClient extends StargateClient { } const pubkey = encodeSecp256k1Pubkey(accountFromSigner.pubkey); - let sequence: number + let sequence: number; if (explicitSignerData?.sequence !== undefined) { sequence = explicitSignerData.sequence; @@ -319,7 +319,7 @@ export class SigningStargateClient extends StargateClient { ): Promise { let usedFee: StdFee; - let signerData: SignerData | undefined = explicitSignerData + let signerData: SignerData | undefined = explicitSignerData; const { sequence, accountNumber } = explicitSignerData ? explicitSignerData : await this.getSequence(signerAddress); if (fee == "auto" || typeof fee === "number") {