From f4c1c539b35647da4859ed68ce836080be812b43 Mon Sep 17 00:00:00 2001 From: Keshinro Tanitoluwa Joseph Date: Sat, 1 Aug 2026 23:58:15 +0100 Subject: [PATCH] Fix #1370: Correct ownership check for remittances --- backend/src/controllers/remittanceController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/controllers/remittanceController.ts b/backend/src/controllers/remittanceController.ts index aeb31d59..943c7158 100644 --- a/backend/src/controllers/remittanceController.ts +++ b/backend/src/controllers/remittanceController.ts @@ -205,7 +205,7 @@ export const getRemittance = asyncHandler(async (req: Request, res: Response) => const remittance = await remittanceService.getRemittance(id); // Verify the user owns this remittance - if (senderAddress !== senderAddress) { + if (remittance.senderId !== senderAddress) { throw AppError.forbidden('You do not have access to this remittance'); } @@ -242,7 +242,7 @@ export const submitRemittanceTransaction = asyncHandler(async (req: Request, res try { const remittance = await remittanceService.getRemittance(id); - if (remittance.senderId !== remittance.senderId) { + if (remittance.senderId !== senderAddress) { throw AppError.forbidden('You do not have access to this remittance'); }