diff --git a/examples/cosmos/chain_core_test.go b/examples/cosmos/chain_core_test.go index 3cb60f134..795ba8078 100644 --- a/examples/cosmos/chain_core_test.go +++ b/examples/cosmos/chain_core_test.go @@ -558,7 +558,7 @@ func testGov(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users require.EqualValues(t, v.Options[0].Option, govv1.VoteOption_VOTE_OPTION_YES) // pass vote with all validators - err = chain.VoteOnProposalAllValidators(ctx, "1", "yes") + err = chain.VoteOnProposalAllValidators(ctx, 1, "yes") require.NoError(t, err) // GovQueryProposalsV1 diff --git a/examples/cosmos/chain_param_change_test.go b/examples/cosmos/chain_param_change_test.go index d49713f4b..65a6c9222 100644 --- a/examples/cosmos/chain_param_change_test.go +++ b/examples/cosmos/chain_param_change_test.go @@ -74,14 +74,14 @@ func CosmosChainParamChangeTest(t *testing.T, name, version string) { paramTx, err := chain.ParamChangeProposal(ctx, chainUser.KeyName(), ¶m_change) require.NoError(t, err, "error submitting param change proposal tx") - err = chain.VoteOnProposalAllValidators(ctx, paramTx.ProposalID, cosmos.ProposalVoteYes) + propId, err := strconv.ParseUint(paramTx.ProposalID, 10, 64) + require.NoError(t, err, "failed to convert proposal ID to uint64") + + err = chain.VoteOnProposalAllValidators(ctx, propId, cosmos.ProposalVoteYes) require.NoError(t, err, "failed to submit votes") height, _ := chain.Height(ctx) - propId, err := strconv.ParseUint(paramTx.ProposalID, 10, 64) - require.NoError(t, err, "failed to convert proposal ID to uint64") - _, err = cosmos.PollForProposalStatus(ctx, chain, height, height+10, propId, govv1beta1.StatusPassed) require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") diff --git a/examples/cosmos/chain_upgrade_ibc_test.go b/examples/cosmos/chain_upgrade_ibc_test.go index fc62f0d77..8d2ba6ec3 100644 --- a/examples/cosmos/chain_upgrade_ibc_test.go +++ b/examples/cosmos/chain_upgrade_ibc_test.go @@ -131,12 +131,12 @@ func CosmosChainUpgradeIBCTest(t *testing.T, chainName, initialVersion, upgradeC upgradeTx, err := chain.UpgradeProposal(ctx, chainUser.KeyName(), proposal) require.NoError(t, err, "error submitting software upgrade proposal tx") - err = chain.VoteOnProposalAllValidators(ctx, upgradeTx.ProposalID, cosmos.ProposalVoteYes) - require.NoError(t, err, "failed to submit votes") - propId, err := strconv.ParseUint(upgradeTx.ProposalID, 10, 64) require.NoError(t, err, "failed to convert proposal ID to uint64") + err = chain.VoteOnProposalAllValidators(ctx, propId, cosmos.ProposalVoteYes) + require.NoError(t, err, "failed to submit votes") + _, err = cosmos.PollForProposalStatus(ctx, chain, height, height+haltHeightDelta, propId, govv1beta1.StatusPassed) require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") diff --git a/examples/hyperspace/hyperspace_test.go b/examples/hyperspace/hyperspace_test.go index 0dd738aad..615f80245 100644 --- a/examples/hyperspace/hyperspace_test.go +++ b/examples/hyperspace/hyperspace_test.go @@ -360,12 +360,12 @@ func pushWasmContractViaGov(t *testing.T, ctx context.Context, cosmosChain *cosm height, err := cosmosChain.Height(ctx) require.NoError(t, err, "error fetching height before submit upgrade proposal") - err = cosmosChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes) - require.NoError(t, err, "failed to submit votes") - propId, err := strconv.ParseUint(proposalTx.ProposalID, 10, 64) require.NoError(t, err, "failed to convert proposal ID to uint64") + err = cosmosChain.VoteOnProposalAllValidators(ctx, propId, cosmos.ProposalVoteYes) + require.NoError(t, err, "failed to submit votes") + _, err = cosmos.PollForProposalStatus(ctx, cosmosChain, height, height+heightDelta, propId, govv1beta1.StatusPassed) require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") diff --git a/examples/polkadot/push_wasm_client_code_test.go b/examples/polkadot/push_wasm_client_code_test.go index f7ce8265d..2233b1f8b 100644 --- a/examples/polkadot/push_wasm_client_code_test.go +++ b/examples/polkadot/push_wasm_client_code_test.go @@ -138,12 +138,12 @@ func TestPushWasmClientCode(t *testing.T) { height, err := simdChain.Height(ctx) require.NoError(t, err, "error fetching height before submit upgrade proposal") - err = simdChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes) - require.NoError(t, err, "failed to submit votes") - propId, err := strconv.ParseUint(proposalTx.ProposalID, 10, 64) require.NoError(t, err, "failed to convert proposal ID to uint64") + err = simdChain.VoteOnProposalAllValidators(ctx, propId, cosmos.ProposalVoteYes) + require.NoError(t, err, "failed to submit votes") + _, err = cosmos.PollForProposalStatus(ctx, simdChain, height, height+heightDelta, propId, govv1beta1.StatusPassed) require.NoError(t, err, "proposal status did not change to passed in expected number of blocks")