Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/graphql/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,11 @@ export type ColonyMotion = {
/** A list of all of the votes cast within in the motion */
voterRecord: Array<VoterRecord>;
voterRewards?: Maybe<ModelVoterRewardsHistoryConnection>;
/**
* In case of motions cancelling a staked expenditure, boolean indicating
* whether the expenditure staker will be punished by losing their stake
*/
willPunishExpenditureStaker?: Maybe<Scalars['Boolean']>;
};

/** Represents a Motion within a Colony */
Expand Down Expand Up @@ -1588,6 +1593,7 @@ export type CreateColonyMotionInput = {
userMinStake: Scalars['String'];
usersStakes: Array<UserMotionStakesInput>;
voterRecord: Array<VoterRecordInput>;
willPunishExpenditureStaker?: InputMaybe<Scalars['Boolean']>;
};

export type CreateColonyMultiSigInput = {
Expand Down Expand Up @@ -3242,6 +3248,7 @@ export type ModelColonyMotionConditionInput = {
skillRep?: InputMaybe<ModelStringInput>;
transactionHash?: InputMaybe<ModelIdInput>;
userMinStake?: InputMaybe<ModelStringInput>;
willPunishExpenditureStaker?: InputMaybe<ModelBooleanInput>;
};

export type ModelColonyMotionConnection = {
Expand Down Expand Up @@ -3271,6 +3278,7 @@ export type ModelColonyMotionFilterInput = {
skillRep?: InputMaybe<ModelStringInput>;
transactionHash?: InputMaybe<ModelIdInput>;
userMinStake?: InputMaybe<ModelStringInput>;
willPunishExpenditureStaker?: InputMaybe<ModelBooleanInput>;
};

export type ModelColonyMultiSigConditionInput = {
Expand Down Expand Up @@ -4412,6 +4420,7 @@ export type ModelSubscriptionColonyMotionFilterInput = {
skillRep?: InputMaybe<ModelSubscriptionStringInput>;
transactionHash?: InputMaybe<ModelSubscriptionIdInput>;
userMinStake?: InputMaybe<ModelSubscriptionStringInput>;
willPunishExpenditureStaker?: InputMaybe<ModelSubscriptionBooleanInput>;
};

export type ModelSubscriptionColonyMultiSigFilterInput = {
Expand Down Expand Up @@ -9354,6 +9363,7 @@ export type UpdateColonyMotionInput = {
userMinStake?: InputMaybe<Scalars['String']>;
usersStakes?: InputMaybe<Array<UserMotionStakesInput>>;
voterRecord?: InputMaybe<Array<VoterRecordInput>>;
willPunishExpenditureStaker?: InputMaybe<Scalars['Boolean']>;
};

export type UpdateColonyMultiSigInput = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default async (
{ name, args: actionArgs }: TransactionDescription,
): Promise<void> => {
const { args } = event;
const [, , , , expenditureId] = actionArgs;
const [, , , , expenditureId, willPunishExpenditureStaker] = actionArgs;
const [, , domainId] = args;

await createMotionInDB(colonyAddress, event, {
Expand All @@ -25,5 +25,6 @@ export default async (
colonyAddress,
toNumber(expenditureId),
),
willPunishExpenditureStaker,
});
};
7 changes: 6 additions & 1 deletion src/handlers/motions/motionCreated/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ type MotionFields = Omit<
> &
Pick<
CreateColonyMotionInput,
'expenditureSlotIds' | 'editedExpenditureSlots' | 'expenditureFunding'
| 'expenditureSlotIds'
| 'editedExpenditureSlots'
| 'expenditureFunding'
| 'willPunishExpenditureStaker'
>;

export const createMotionInDB = async (
Expand All @@ -195,6 +198,7 @@ export const createMotionInDB = async (
expenditureSlotIds,
editedExpenditureSlots,
expenditureFunding,
willPunishExpenditureStaker,
...actionFields
} = motionFields;

Expand Down Expand Up @@ -245,6 +249,7 @@ export const createMotionInDB = async (
expenditureSlotIds,
editedExpenditureSlots,
expenditureFunding,
willPunishExpenditureStaker,
}),
createMotionMessage(initialMotionMessage),
createColonyAction(actionData, timestamp),
Expand Down