Skip to content

Commit 9befe07

Browse files
committed
chore: update gov params to include expedited fields
1 parent 47ba17b commit 9befe07

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

packages/sdk-ts/src/client/chain/transformers/ChainGrpcGovTransformer.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,26 @@ export class ChainGrpcGovTransformer {
2828

2929
return {
3030
depositParams: {
31-
minDepositList: params?.minDeposit || [],
31+
minDeposit: params?.minDeposit || [],
32+
expeditedMinDeposit: params?.expeditedMinDeposit || [],
3233
maxDepositPeriod: parseInt(
3334
params?.maxDepositPeriod?.seconds || '0',
3435
10,
3536
),
3637
},
3738
votingParams: {
3839
votingPeriod: parseInt(params?.votingPeriod?.seconds || '0'),
40+
expeditedVotingPeriod: parseInt(
41+
params?.expeditedVotingPeriod?.seconds || '0',
42+
),
3943
},
4044
tallyParams: {
4145
quorum: uint8ArrayToString(params?.quorum || '0'),
4246
threshold: uint8ArrayToString(params?.threshold || '0'),
4347
vetoThreshold: uint8ArrayToString(params?.vetoThreshold || '0'),
48+
expeditedThreshold: uint8ArrayToString(
49+
params?.expeditedThreshold || '0',
50+
),
4451
},
4552
}
4653
}
@@ -56,19 +63,24 @@ export class ChainGrpcGovTransformer {
5663
}): GovModuleStateParams {
5764
return {
5865
depositParams: {
59-
minDepositList: depositParams?.minDeposit,
66+
minDeposit: depositParams?.minDeposit,
67+
expeditedMinDeposit: depositParams?.expeditedMinDeposit,
6068
maxDepositPeriod: parseInt(
6169
depositParams?.maxDepositPeriod?.seconds || '0',
6270
10,
6371
),
6472
},
6573
votingParams: {
6674
votingPeriod: parseInt(votingParams.votingPeriod?.seconds || '0'),
75+
expeditedVotingPeriod: parseInt(
76+
votingParams.expeditedVotingPeriod?.seconds || '0',
77+
),
6778
},
6879
tallyParams: {
6980
quorum: uint8ArrayToString(tallyParams.quorum),
7081
threshold: uint8ArrayToString(tallyParams.threshold),
7182
vetoThreshold: uint8ArrayToString(tallyParams.vetoThreshold),
83+
expeditedThreshold: uint8ArrayToString(tallyParams.expeditedThreshold),
7284
},
7385
}
7486
}

packages/sdk-ts/src/client/chain/types/gov.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ import { Coin } from '@injectivelabs/ts-types'
44
export interface GovModuleStateParams {
55
votingParams: {
66
votingPeriod: number
7+
expeditedVotingPeriod: number
78
}
89
tallyParams: {
910
quorum: string
1011
threshold: string
1112
vetoThreshold: string
13+
expeditedThreshold: string
1214
}
1315
depositParams: {
14-
minDepositList: Coin[]
16+
minDeposit: Coin[]
1517
maxDepositPeriod: number
18+
expeditedMinDeposit: Coin[]
1619
}
1720
}
1821

@@ -60,9 +63,9 @@ export type ProposalDeposit = {
6063

6164
export type GrpcProposal = CosmosGovV1Gov.Proposal
6265
export type GrpcProposalDeposit = CosmosGovV1Gov.Deposit
63-
export type GrpcGovernanceTallyParams = CosmosGovV1Gov.TallyParams
64-
export type GrpcGovernanceVotingParams = CosmosGovV1Gov.VotingParams
65-
export type GrpcGovernanceDepositParams = CosmosGovV1Gov.DepositParams
66+
export type GrpcGovernanceTallyParams = CosmosGovV1Gov.Params
67+
export type GrpcGovernanceVotingParams = CosmosGovV1Gov.Params
68+
export type GrpcGovernanceDepositParams = CosmosGovV1Gov.Params
6669
export type GrpcTallyResult = CosmosGovV1Gov.TallyResult
6770
export type GrpcVote = CosmosGovV1Gov.Vote
6871

0 commit comments

Comments
 (0)