Skip to content
Merged
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
4 changes: 2 additions & 2 deletions backend/src/controllers/remittanceController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down Expand Up @@ -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');
}

Expand Down
Loading