Skip to content

Commit a8d673d

Browse files
committed
fixed gov test
1 parent 1a1e6c2 commit a8d673d

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

libs/interchain-react/src/cosmos/bundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export { getParams as getParamsCosmosMintV1beta1, getInflation, getAnnualProvisi
177177
export { useGetParams as useGetParamsCosmosMintV1beta1, useGetInflation, useGetAnnualProvisions } from "./mint/v1beta1/query.rpc.react";
178178
export { getGroupInfo, getGroupPolicyInfo, getGroupMembers, getGroupsByAdmin, getGroupPoliciesByGroup, getGroupPoliciesByAdmin, getProposal as getProposalCosmosGroupV1, getProposalsByGroupPolicy, getVoteByProposalVoter, getVotesByProposal, getVotesByVoter, getGroupsByMember, getTallyResult as getTallyResultCosmosGroupV1, getGroups } from "./group/v1/query.rpc.func";
179179
export { useGetGroupInfo, useGetGroupPolicyInfo, useGetGroupMembers, useGetGroupsByAdmin, useGetGroupPoliciesByGroup, useGetGroupPoliciesByAdmin, useGetProposal as useGetProposalCosmosGroupV1, useGetProposalsByGroupPolicy, useGetVoteByProposalVoter, useGetVotesByProposal, useGetVotesByVoter, useGetGroupsByMember, useGetTallyResult as useGetTallyResultCosmosGroupV1, useGetGroups } from "./group/v1/query.rpc.react";
180-
export { getProposal, getProposals, getVote as getVoteCosmosGovV1beta1, getVotes as getVotesCosmosGovV1beta1, getParams as getParamsCosmosGovV1beta1, getDeposit, getDeposits, getTallyResult } from "./gov/v1beta1/query.rpc.func";
180+
export { getProposal, getProposals, getVote, getVotes as getVotesCosmosGovV1beta1, getParams as getParamsCosmosGovV1beta1, getDeposit, getDeposits, getTallyResult } from "./gov/v1beta1/query.rpc.func";
181181
export { useGetProposal as useGetProposalCosmosGovV1beta1, useGetProposals as useGetProposalsCosmosGovV1beta1, useGetVote as useGetVoteCosmosGovV1beta1, useGetVotes as useGetVotesCosmosGovV1beta1, useGetParams as useGetParamsCosmosGovV1beta1, useGetDeposit as useGetDepositCosmosGovV1beta1, useGetDeposits as useGetDepositsCosmosGovV1beta1, useGetTallyResult as useGetTallyResultCosmosGovV1beta1 } from "./gov/v1beta1/query.rpc.react";
182182
export { getConstitution, getProposal as getProposalCosmosGovV1, getProposals as getProposalsCosmosGovV1, getVote as getVoteCosmosGovV1, getVotes as getVotesCosmosGovV1, getParams as getParamsCosmosGovV1, getDeposit as getDepositCosmosGovV1, getDeposits as getDepositsCosmosGovV1, getTallyResult as getTallyResultCosmosGovV1 } from "./gov/v1/query.rpc.func";
183183
export { useGetConstitution, useGetProposal as useGetProposalCosmosGovV1, useGetProposals as useGetProposalsCosmosGovV1, useGetVote as useGetVoteCosmosGovV1, useGetVotes as useGetVotesCosmosGovV1, useGetParams as useGetParamsCosmosGovV1, useGetDeposit as useGetDepositCosmosGovV1, useGetDeposits as useGetDepositsCosmosGovV1, useGetTallyResult as useGetTallyResultCosmosGovV1 } from "./gov/v1/query.rpc.react";

libs/interchain-vue/src/cosmos/bundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export { getParams as getParamsCosmosMintV1beta1, getInflation, getAnnualProvisi
177177
export { useGetParams as useGetParamsCosmosMintV1beta1, useGetInflation, useGetAnnualProvisions } from "./mint/v1beta1/query.rpc.vue";
178178
export { getGroupInfo, getGroupPolicyInfo, getGroupMembers, getGroupsByAdmin, getGroupPoliciesByGroup, getGroupPoliciesByAdmin, getProposal as getProposalCosmosGroupV1, getProposalsByGroupPolicy, getVoteByProposalVoter, getVotesByProposal, getVotesByVoter, getGroupsByMember, getTallyResult as getTallyResultCosmosGroupV1, getGroups } from "./group/v1/query.rpc.func";
179179
export { useGetGroupInfo, useGetGroupPolicyInfo, useGetGroupMembers, useGetGroupsByAdmin, useGetGroupPoliciesByGroup, useGetGroupPoliciesByAdmin, useGetProposal as useGetProposalCosmosGroupV1, useGetProposalsByGroupPolicy, useGetVoteByProposalVoter, useGetVotesByProposal, useGetVotesByVoter, useGetGroupsByMember, useGetTallyResult as useGetTallyResultCosmosGroupV1, useGetGroups } from "./group/v1/query.rpc.vue";
180-
export { getProposal, getProposals, getVote as getVoteCosmosGovV1beta1, getVotes as getVotesCosmosGovV1beta1, getParams as getParamsCosmosGovV1beta1, getDeposit, getDeposits, getTallyResult } from "./gov/v1beta1/query.rpc.func";
180+
export { getProposal, getProposals, getVote, getVotes as getVotesCosmosGovV1beta1, getParams as getParamsCosmosGovV1beta1, getDeposit, getDeposits, getTallyResult } from "./gov/v1beta1/query.rpc.func";
181181
export { useGetProposal as useGetProposalCosmosGovV1beta1, useGetProposals as useGetProposalsCosmosGovV1beta1, useGetVote as useGetVoteCosmosGovV1beta1, useGetVotes as useGetVotesCosmosGovV1beta1, useGetParams as useGetParamsCosmosGovV1beta1, useGetDeposit as useGetDepositCosmosGovV1beta1, useGetDeposits as useGetDepositsCosmosGovV1beta1, useGetTallyResult as useGetTallyResultCosmosGovV1beta1 } from "./gov/v1beta1/query.rpc.vue";
182182
export { getConstitution, getProposal as getProposalCosmosGovV1, getProposals as getProposalsCosmosGovV1, getVote as getVoteCosmosGovV1, getVotes as getVotesCosmosGovV1, getParams as getParamsCosmosGovV1, getDeposit as getDepositCosmosGovV1, getDeposits as getDepositsCosmosGovV1, getTallyResult as getTallyResultCosmosGovV1 } from "./gov/v1/query.rpc.func";
183183
export { useGetConstitution, useGetProposal as useGetProposalCosmosGovV1, useGetProposals as useGetProposalsCosmosGovV1, useGetVote as useGetVoteCosmosGovV1, useGetVotes as useGetVotesCosmosGovV1, useGetParams as useGetParamsCosmosGovV1, useGetDeposit as useGetDepositCosmosGovV1, useGetDeposits as useGetDepositsCosmosGovV1, useGetTallyResult as useGetTallyResultCosmosGovV1 } from "./gov/v1/query.rpc.vue";

libs/interchainjs/src/cosmos/bundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export { getParams as getParamsCosmosParamsV1beta1, getSubspaces } from "./param
167167
export { getBalance as getBalanceCosmosNftV1beta1, getOwner, getSupply, getNFTs, getNFT, getClass, getClasses } from "./nft/v1beta1/query.rpc.func";
168168
export { getParams as getParamsCosmosMintV1beta1, getInflation, getAnnualProvisions } from "./mint/v1beta1/query.rpc.func";
169169
export { getGroupInfo, getGroupPolicyInfo, getGroupMembers, getGroupsByAdmin, getGroupPoliciesByGroup, getGroupPoliciesByAdmin, getProposal as getProposalCosmosGroupV1, getProposalsByGroupPolicy, getVoteByProposalVoter, getVotesByProposal, getVotesByVoter, getGroupsByMember, getTallyResult as getTallyResultCosmosGroupV1, getGroups } from "./group/v1/query.rpc.func";
170-
export { getProposal, getProposals, getVote as getVoteCosmosGovV1beta1, getVotes as getVotesCosmosGovV1beta1, getParams as getParamsCosmosGovV1beta1, getDeposit, getDeposits, getTallyResult } from "./gov/v1beta1/query.rpc.func";
170+
export { getProposal, getProposals, getVote, getVotes as getVotesCosmosGovV1beta1, getParams as getParamsCosmosGovV1beta1, getDeposit, getDeposits, getTallyResult } from "./gov/v1beta1/query.rpc.func";
171171
export { getConstitution, getProposal as getProposalCosmosGovV1, getProposals as getProposalsCosmosGovV1, getVote as getVoteCosmosGovV1, getVotes as getVotesCosmosGovV1, getParams as getParamsCosmosGovV1, getDeposit as getDepositCosmosGovV1, getDeposits as getDepositsCosmosGovV1, getTallyResult as getTallyResultCosmosGovV1 } from "./gov/v1/query.rpc.func";
172172
export * from "./feegrant/v1beta1/query.rpc.func";
173173
export * from "./evidence/v1beta1/query.rpc.func";

networks/cosmos/starship/__tests__/gov.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import {
1414
MsgDelegate,
1515
MsgSubmitProposal,
1616
MsgVote,
17-
getBalance
17+
getBalance,
18+
getVote
1819
} from 'interchainjs';
1920
// Using built-in Buffer for base64 and utf8 conversion
2021
const fromBase64 = (str: string) => Buffer.from(str, 'base64');
@@ -25,11 +26,6 @@ import { useChain } from 'starshipjs';
2526
import { waitUntil } from '../src';
2627
import { getProposal, getValidators, delegate, submitProposal, vote } from 'interchainjs';
2728

28-
// Note: getVote function might have a different name in the exports, using client.query directly
29-
const getVote = async (client: any, params: any) => {
30-
return await client.query.cosmos.gov.v1beta1.vote(params);
31-
};
32-
3329
const cosmosHdPath = "m/44'/118'/0'/0/0";
3430

3531
describe('Governance tests for osmosis', () => {

scripts/codegen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export const options: TelescopeInput = {
125125
// Gov module v1beta1
126126
{ package: "cosmos.gov.v1beta1", name: "getProposal" },
127127
{ package: "cosmos.gov.v1beta1", name: "getProposals" },
128+
{ package: "cosmos.gov.v1beta1", name: "getVote" },
128129
{ package: "cosmos.gov.v1beta1", name: "vote" },
129130
{ package: "cosmos.gov.v1beta1", name: "deposit" },
130131
{ package: "cosmos.gov.v1beta1", name: "submitProposal" },

0 commit comments

Comments
 (0)