Skip to content

Commit

Permalink
feat: store initiator of staged payment release action
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubcolony committed Sep 11, 2024
1 parent e5c5df7 commit 5ee2a3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/handlers/expenditures/stagedPaymentReleased.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const handleStagedPaymentReleased: EventHandler = async (
return;
}

const { expenditureId } = event.args;
const { expenditureId, agent: initiatorAddress } = event.args;
const convertedExpenditureId = toNumber(expenditureId);

const { colonyAddress } = listener as ExtensionEventListener;
Expand Down Expand Up @@ -78,8 +78,7 @@ export const handleStagedPaymentReleased: EventHandler = async (

await writeActionFromEvent(event, colonyAddress, {
type: ColonyActionType.ReleaseStagedPayments,
// @TODO: Figure out how to get the initiator address
initiatorAddress: '',
initiatorAddress,
expenditureId: databaseId,
expenditureSlotIds: releasedSlotIds,
});
Expand Down
1 change: 1 addition & 0 deletions src/handlers/motions/motionCreated/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ export const createMotionInDB = async (
blockNumber,
rootHash,
isMotionFinalization: false,
expenditureSlotIds,
...actionFields,
};

Expand Down
4 changes: 2 additions & 2 deletions src/types/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export enum ContractEventsSignatures {
StakeFractionSet = 'StakeFractionSet(address,uint256)',

// Staged Expenditures
ExpenditureMadeStaged = 'ExpenditureMadeStaged(uint256,bool)',
StagedPaymentReleased = 'StagedPaymentReleased(uint256,uint256)',
ExpenditureMadeStaged = 'ExpenditureMadeStaged(address,uint256,bool)',
StagedPaymentReleased = 'StagedPaymentReleased(address,uint256,uint256)',

// Streaming Payments
StreamingPaymentCreated = 'StreamingPaymentCreated(address,uint256)',
Expand Down

0 comments on commit 5ee2a3d

Please sign in to comment.