Skip to content

Commit c9f468e

Browse files
committed
fix authz tests
1 parent b15e2b5 commit c9f468e

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

packages/starship/__tests__/v0/gov.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { generateMnemonic } from '@confio/relayer/build/lib/helpers';
22
import { assertIsDeliverTxSuccess } from '@cosmjs/stargate';
33
import { DirectSecp256k1HdWallet } from '@cosmjs/proto-signing';
4+
import Long from 'long';
45
import BigNumber from 'bignumber.js';
56

67
import { cosmos, getSigningOsmosisClient } from '../../src/codegen';
@@ -158,7 +159,7 @@ describe('Governance tests for osmosis', () => {
158159

159160
it('query proposal', async () => {
160161
const result = await queryClient.cosmos.gov.v1beta1.proposal({
161-
proposalId: BigInt(proposalId)
162+
proposalId: Long.fromString(proposalId)
162163
});
163164

164165
expect(result.proposal.proposalId.toString()).toEqual(proposalId);
@@ -173,7 +174,7 @@ describe('Governance tests for osmosis', () => {
173174

174175
// Vote on proposal from genesis mnemonic address
175176
const msg = cosmos.gov.v1beta1.MessageComposer.withTypeUrl.vote({
176-
proposalId: BigInt(proposalId),
177+
proposalId: Long.fromString(proposalId),
177178
voter: address,
178179
option: cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_YES
179180
});
@@ -194,7 +195,7 @@ describe('Governance tests for osmosis', () => {
194195

195196
it('verify vote', async () => {
196197
const { vote } = await queryClient.cosmos.gov.v1beta1.vote({
197-
proposalId: BigInt(proposalId),
198+
proposalId: Long.fromString(proposalId),
198199
voter: address
199200
});
200201

@@ -205,15 +206,15 @@ describe('Governance tests for osmosis', () => {
205206
it('wait for voting period to end', async () => {
206207
// wait for the voting period to end
207208
const { proposal } = await queryClient.cosmos.gov.v1beta1.proposal({
208-
proposalId: BigInt(proposalId)
209+
proposalId: Long.fromString(proposalId)
209210
});
210211

211212
await expect(waitUntil(proposal.votingEndTime)).resolves.not.toThrow();
212213
}, 200000);
213214

214215
it('verify proposal passed', async () => {
215216
const { proposal } = await queryClient.cosmos.gov.v1beta1.proposal({
216-
proposalId: BigInt(proposalId)
217+
proposalId: Long.fromString(proposalId)
217218
});
218219

219220
expect(proposal.status).toEqual(

packages/starship/__tests__/v1/authz.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ describe("Authz testing", () => {
115115
amount: [
116116
{
117117
denom,
118-
amount: "100000",
118+
amount: "1000000",
119119
},
120120
],
121121
gas: "550000",
@@ -174,7 +174,7 @@ describe("Authz testing", () => {
174174
amount: [
175175
{
176176
denom,
177-
amount: "100000",
177+
amount: "1000000",
178178
},
179179
],
180180
gas: "550000",
@@ -228,7 +228,7 @@ describe("Authz testing", () => {
228228
amount: [
229229
{
230230
denom,
231-
amount: "100000",
231+
amount: "1000000",
232232
},
233233
],
234234
gas: "550000",
@@ -300,7 +300,7 @@ describe("Authz testing", () => {
300300
amount: [
301301
{
302302
denom,
303-
amount: "100000",
303+
amount: "1000000",
304304
},
305305
],
306306
gas: "550000",
@@ -339,7 +339,7 @@ describe("Authz testing", () => {
339339

340340
console.log(balance)
341341

342-
expect(balance?.amount).toEqual("9999990000"); // not 10000000000, due to fees deduction
342+
expect(balance?.amount).toEqual("9999090000"); // not 10000000000, due to fees deduction
343343
}, 2000000);
344344

345345
it("revoke address2 vote auth", async () => {
@@ -356,7 +356,7 @@ describe("Authz testing", () => {
356356
amount: [
357357
{
358358
denom,
359-
amount: "100000",
359+
amount: "1000000",
360360
},
361361
],
362362
gas: "550000",
@@ -405,7 +405,7 @@ describe("Authz testing", () => {
405405
amount: [
406406
{
407407
denom,
408-
amount: "100000",
408+
amount: "1000000",
409409
},
410410
],
411411
gas: "550000",
@@ -446,7 +446,7 @@ describe("Authz testing", () => {
446446
amount: [
447447
{
448448
denom,
449-
amount: "100000",
449+
amount: "1000000",
450450
},
451451
],
452452
gas: "550000",

0 commit comments

Comments
 (0)