mirror of https://github.com/certusone/oyster.git
chore: rename timelockType
This commit is contained in:
parent
4f9798abd9
commit
6394bf7a88
|
@ -144,7 +144,7 @@ export const registerProgramGovernance = async (
|
||||||
|
|
||||||
uninitializedGovernance.voteThreshold!,
|
uninitializedGovernance.voteThreshold!,
|
||||||
uninitializedGovernance.executionType || ExecutionType.Independent,
|
uninitializedGovernance.executionType || ExecutionType.Independent,
|
||||||
uninitializedGovernance.timelockType || GovernanceType.Governance,
|
uninitializedGovernance.governanceType || GovernanceType.Governance,
|
||||||
uninitializedGovernance.votingEntryRule || VotingEntryRule.Anytime,
|
uninitializedGovernance.votingEntryRule || VotingEntryRule.Anytime,
|
||||||
uninitializedGovernance.minimumSlotWaitingPeriod || new BN(0),
|
uninitializedGovernance.minimumSlotWaitingPeriod || new BN(0),
|
||||||
uninitializedGovernance.timeLimit || new BN(0),
|
uninitializedGovernance.timeLimit || new BN(0),
|
||||||
|
|
|
@ -66,7 +66,7 @@ export interface Governance {
|
||||||
/// Execution type
|
/// Execution type
|
||||||
executionType: ExecutionType;
|
executionType: ExecutionType;
|
||||||
/// Governance Type
|
/// Governance Type
|
||||||
timelockType: GovernanceType;
|
governanceType: GovernanceType;
|
||||||
/// Voting entry rule
|
/// Voting entry rule
|
||||||
votingEntryRule: VotingEntryRule;
|
votingEntryRule: VotingEntryRule;
|
||||||
/// Minimum slot time-distance from creation of proposal for an instruction to be placed
|
/// 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('accountType'),
|
||||||
BufferLayout.u8('voteThreshold'),
|
BufferLayout.u8('voteThreshold'),
|
||||||
BufferLayout.u8('executionType'),
|
BufferLayout.u8('executionType'),
|
||||||
BufferLayout.u8('timelockType'),
|
BufferLayout.u8('governanceType'),
|
||||||
BufferLayout.u8('votingEntryRule'),
|
BufferLayout.u8('votingEntryRule'),
|
||||||
Layout.uint64('minimumSlotWaitingPeriod'),
|
Layout.uint64('minimumSlotWaitingPeriod'),
|
||||||
Layout.publicKey('governanceMint'),
|
Layout.publicKey('governanceMint'),
|
||||||
|
@ -432,7 +432,7 @@ export const GovernanceParser = (
|
||||||
accountType: data.accountType,
|
accountType: data.accountType,
|
||||||
voteThreshold: data.voteThreshold,
|
voteThreshold: data.voteThreshold,
|
||||||
executionType: data.executionType,
|
executionType: data.executionType,
|
||||||
timelockType: data.timelockType,
|
governanceType: data.governanceType,
|
||||||
votingEntryRule: data.votingEntryRule,
|
votingEntryRule: data.votingEntryRule,
|
||||||
minimumSlotWaitingPeriod: data.minimumSlotWaitingPeriod,
|
minimumSlotWaitingPeriod: data.minimumSlotWaitingPeriod,
|
||||||
governanceMint: data.governanceMint,
|
governanceMint: data.governanceMint,
|
||||||
|
|
|
@ -33,7 +33,7 @@ export const initGovernanceInstruction = (
|
||||||
BufferLayout.u8('instruction'),
|
BufferLayout.u8('instruction'),
|
||||||
BufferLayout.u8('voteThreshold'),
|
BufferLayout.u8('voteThreshold'),
|
||||||
BufferLayout.u8('executionType'),
|
BufferLayout.u8('executionType'),
|
||||||
BufferLayout.u8('timelockType'),
|
BufferLayout.u8('governanceType'),
|
||||||
BufferLayout.u8('votingEntryRule'),
|
BufferLayout.u8('votingEntryRule'),
|
||||||
Layout.uint64('minimumSlotWaitingPeriod'),
|
Layout.uint64('minimumSlotWaitingPeriod'),
|
||||||
Layout.uint64('timeLimit'),
|
Layout.uint64('timeLimit'),
|
||||||
|
@ -52,7 +52,7 @@ export const initGovernanceInstruction = (
|
||||||
instruction: GovernanceInstruction.InitGovernance,
|
instruction: GovernanceInstruction.InitGovernance,
|
||||||
voteThreshold,
|
voteThreshold,
|
||||||
executionType,
|
executionType,
|
||||||
timelockType: governanceType,
|
governanceType,
|
||||||
votingEntryRule,
|
votingEntryRule,
|
||||||
minimumSlotWaitingPeriod,
|
minimumSlotWaitingPeriod,
|
||||||
timeLimit,
|
timeLimit,
|
||||||
|
|
|
@ -40,8 +40,8 @@ const columns = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: LABELS.PROPOSAL_TYPE,
|
title: LABELS.PROPOSAL_TYPE,
|
||||||
dataIndex: 'timelockType',
|
dataIndex: 'governanceType',
|
||||||
key: 'timelockType',
|
key: 'governanceType',
|
||||||
render: (number: number) => <span>{GovernanceType[number]}</span>,
|
render: (number: number) => <span>{GovernanceType[number]}</span>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -120,7 +120,7 @@ export function NewForm({
|
||||||
}
|
}
|
||||||
|
|
||||||
const uninitializedGovernance = {
|
const uninitializedGovernance = {
|
||||||
timelockType: values.governanceType,
|
governanceType: values.governanceType,
|
||||||
executionType: values.executionType,
|
executionType: values.executionType,
|
||||||
voteThreshold: values.voteThreshold,
|
voteThreshold: values.voteThreshold,
|
||||||
votingEntryRule: values.votingEntryRule,
|
votingEntryRule: values.votingEntryRule,
|
||||||
|
@ -215,7 +215,7 @@ export function NewForm({
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="timelockType"
|
name="governanceType"
|
||||||
label={LABELS.PROPOSAL_TYPE}
|
label={LABELS.PROPOSAL_TYPE}
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
initialValue={GovernanceType.Governance}
|
initialValue={GovernanceType.Governance}
|
||||||
|
|
|
@ -132,7 +132,7 @@ export function NewForm({
|
||||||
<Input maxLength={DESC_SIZE} placeholder={LABELS.GIST_PLACEHOLDER} />
|
<Input maxLength={DESC_SIZE} placeholder={LABELS.GIST_PLACEHOLDER} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="timelockConfigKey"
|
name="governanceKey"
|
||||||
label={LABELS.CONFIG}
|
label={LABELS.CONFIG}
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue