diff --git a/packages/starship/__tests__/v0/gov.test.ts b/packages/starship/__tests__/v0/gov.test.ts index cb1b85aa7..db7f743ab 100644 --- a/packages/starship/__tests__/v0/gov.test.ts +++ b/packages/starship/__tests__/v0/gov.test.ts @@ -1,6 +1,7 @@ import { generateMnemonic } from '@confio/relayer/build/lib/helpers'; import { assertIsDeliverTxSuccess } from '@cosmjs/stargate'; import { DirectSecp256k1HdWallet } from '@cosmjs/proto-signing'; +import Long from 'long'; import BigNumber from 'bignumber.js'; import { cosmos, getSigningOsmosisClient } from '../../src/codegen'; @@ -158,7 +159,7 @@ describe('Governance tests for osmosis', () => { it('query proposal', async () => { const result = await queryClient.cosmos.gov.v1beta1.proposal({ - proposalId: BigInt(proposalId) + proposalId: Long.fromString(proposalId) }); expect(result.proposal.proposalId.toString()).toEqual(proposalId); @@ -173,7 +174,7 @@ describe('Governance tests for osmosis', () => { // Vote on proposal from genesis mnemonic address const msg = cosmos.gov.v1beta1.MessageComposer.withTypeUrl.vote({ - proposalId: BigInt(proposalId), + proposalId: Long.fromString(proposalId), voter: address, option: cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_YES }); @@ -194,7 +195,7 @@ describe('Governance tests for osmosis', () => { it('verify vote', async () => { const { vote } = await queryClient.cosmos.gov.v1beta1.vote({ - proposalId: BigInt(proposalId), + proposalId: Long.fromString(proposalId), voter: address }); @@ -205,7 +206,7 @@ describe('Governance tests for osmosis', () => { it('wait for voting period to end', async () => { // wait for the voting period to end const { proposal } = await queryClient.cosmos.gov.v1beta1.proposal({ - proposalId: BigInt(proposalId) + proposalId: Long.fromString(proposalId) }); await expect(waitUntil(proposal.votingEndTime)).resolves.not.toThrow(); @@ -213,7 +214,7 @@ describe('Governance tests for osmosis', () => { it('verify proposal passed', async () => { const { proposal } = await queryClient.cosmos.gov.v1beta1.proposal({ - proposalId: BigInt(proposalId) + proposalId: Long.fromString(proposalId) }); expect(proposal.status).toEqual( diff --git a/packages/starship/__tests__/v1/authz.test.ts b/packages/starship/__tests__/v1/authz.test.ts index c38c4644c..3192451f8 100644 --- a/packages/starship/__tests__/v1/authz.test.ts +++ b/packages/starship/__tests__/v1/authz.test.ts @@ -115,7 +115,7 @@ describe("Authz testing", () => { amount: [ { denom, - amount: "100000", + amount: "1000000", }, ], gas: "550000", @@ -174,7 +174,7 @@ describe("Authz testing", () => { amount: [ { denom, - amount: "100000", + amount: "1000000", }, ], gas: "550000", @@ -228,7 +228,7 @@ describe("Authz testing", () => { amount: [ { denom, - amount: "100000", + amount: "1000000", }, ], gas: "550000", @@ -300,7 +300,7 @@ describe("Authz testing", () => { amount: [ { denom, - amount: "100000", + amount: "1000000", }, ], gas: "550000", @@ -339,7 +339,7 @@ describe("Authz testing", () => { console.log(balance) - expect(balance?.amount).toEqual("9999990000"); // not 10000000000, due to fees deduction + expect(balance?.amount).toEqual("9999090000"); // not 10000000000, due to fees deduction }, 2000000); it("revoke address2 vote auth", async () => { @@ -356,7 +356,7 @@ describe("Authz testing", () => { amount: [ { denom, - amount: "100000", + amount: "1000000", }, ], gas: "550000", @@ -405,7 +405,7 @@ describe("Authz testing", () => { amount: [ { denom, - amount: "100000", + amount: "1000000", }, ], gas: "550000", @@ -446,7 +446,7 @@ describe("Authz testing", () => { amount: [ { denom, - amount: "100000", + amount: "1000000", }, ], gas: "550000",