From 41776f67cfe84ea82be3a544be768c94a9394b0c Mon Sep 17 00:00:00 2001 From: ANISH-SR Date: Thu, 1 Jan 2026 15:23:33 +0530 Subject: [PATCH] feat: verification in accept link --- .../doublezero-serviceability/src/processors/link/accept.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/smartcontract/programs/doublezero-serviceability/src/processors/link/accept.rs b/smartcontract/programs/doublezero-serviceability/src/processors/link/accept.rs index bc27c93f9..e30baee7b 100644 --- a/smartcontract/programs/doublezero-serviceability/src/processors/link/accept.rs +++ b/smartcontract/programs/doublezero-serviceability/src/processors/link/accept.rs @@ -75,6 +75,11 @@ pub fn process_accept_link( return Err(DoubleZeroError::InvalidStatus.into()); } + // Validate that the stored side_z_pk matches the provided side_z_account + if link.side_z_pk != *side_z_account.key { + return Err(DoubleZeroError::InvalidAccountOwner.into()); + } + // Validate Side Z Device let side_z_dev = Device::try_from(side_z_account)?; if side_z_dev.contributor_pk != *contributor_account.key {