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'); }