Skip to content

Commit 41776f6

Browse files
committed
feat: verification in accept link
1 parent db85799 commit 41776f6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

smartcontract/programs/doublezero-serviceability/src/processors/link/accept.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ pub fn process_accept_link(
7575
return Err(DoubleZeroError::InvalidStatus.into());
7676
}
7777

78+
// Validate that the stored side_z_pk matches the provided side_z_account
79+
if link.side_z_pk != *side_z_account.key {
80+
return Err(DoubleZeroError::InvalidAccountOwner.into());
81+
}
82+
7883
// Validate Side Z Device
7984
let side_z_dev = Device::try_from(side_z_account)?;
8085
if side_z_dev.contributor_pk != *contributor_account.key {

0 commit comments

Comments
 (0)