chore: rename timelockType

This commit is contained in:
Sebastian.Bor 2021-04-24 13:24:28 +01:00
parent 4f9798abd9
commit 6394bf7a88
6 changed files with 11 additions and 11 deletions

View File

@ -144,7 +144,7 @@ export const registerProgramGovernance = async (
uninitializedGovernance.voteThreshold!,
uninitializedGovernance.executionType || ExecutionType.Independent,
uninitializedGovernance.timelockType || GovernanceType.Governance,
uninitializedGovernance.governanceType || GovernanceType.Governance,
uninitializedGovernance.votingEntryRule || VotingEntryRule.Anytime,
uninitializedGovernance.minimumSlotWaitingPeriod || new BN(0),
uninitializedGovernance.timeLimit || new BN(0),

View File

@ -66,7 +66,7 @@ export interface Governance {
/// Execution type
executionType: ExecutionType;
/// Governance Type
timelockType: GovernanceType;
governanceType: GovernanceType;
/// Voting entry rule
votingEntryRule: VotingEntryRule;
/// Minimum slot time-distance from creation of proposal for an instruction to be placed
@ -99,7 +99,7 @@ export const GovernanceLayout: typeof BufferLayout.Structure = BufferLayout.stru
BufferLayout.u8('accountType'),
BufferLayout.u8('voteThreshold'),
BufferLayout.u8('executionType'),
BufferLayout.u8('timelockType'),
BufferLayout.u8('governanceType'),
BufferLayout.u8('votingEntryRule'),
Layout.uint64('minimumSlotWaitingPeriod'),
Layout.publicKey('governanceMint'),
@ -432,7 +432,7 @@ export const GovernanceParser = (
accountType: data.accountType,
voteThreshold: data.voteThreshold,
executionType: data.executionType,
timelockType: data.timelockType,
governanceType: data.governanceType,
votingEntryRule: data.votingEntryRule,
minimumSlotWaitingPeriod: data.minimumSlotWaitingPeriod,
governanceMint: data.governanceMint,

View File

@ -33,7 +33,7 @@ export const initGovernanceInstruction = (
BufferLayout.u8('instruction'),
BufferLayout.u8('voteThreshold'),
BufferLayout.u8('executionType'),
BufferLayout.u8('timelockType'),
BufferLayout.u8('governanceType'),
BufferLayout.u8('votingEntryRule'),
Layout.uint64('minimumSlotWaitingPeriod'),
Layout.uint64('timeLimit'),
@ -52,7 +52,7 @@ export const initGovernanceInstruction = (
instruction: GovernanceInstruction.InitGovernance,
voteThreshold,
executionType,
timelockType: governanceType,
governanceType,
votingEntryRule,
minimumSlotWaitingPeriod,
timeLimit,

View File

@ -40,8 +40,8 @@ const columns = [
},
{
title: LABELS.PROPOSAL_TYPE,
dataIndex: 'timelockType',
key: 'timelockType',
dataIndex: 'governanceType',
key: 'governanceType',
render: (number: number) => <span>{GovernanceType[number]}</span>,
},
{

View File

@ -120,7 +120,7 @@ export function NewForm({
}
const uninitializedGovernance = {
timelockType: values.governanceType,
governanceType: values.governanceType,
executionType: values.executionType,
voteThreshold: values.voteThreshold,
votingEntryRule: values.votingEntryRule,
@ -215,7 +215,7 @@ export function NewForm({
</Select>
</Form.Item>
<Form.Item
name="timelockType"
name="governanceType"
label={LABELS.PROPOSAL_TYPE}
rules={[{ required: true }]}
initialValue={GovernanceType.Governance}

View File

@ -132,7 +132,7 @@ export function NewForm({
<Input maxLength={DESC_SIZE} placeholder={LABELS.GIST_PLACEHOLDER} />
</Form.Item>
<Form.Item
name="timelockConfigKey"
name="governanceKey"
label={LABELS.CONFIG}
rules={[{ required: true }]}
>