Skip to content

Commit fc985e7

Browse files
committed
feat: add Invalid Contributor verification
1 parent db85799 commit fc985e7

File tree

1 file changed

+3
-0
lines changed
  • smartcontract/programs/doublezero-serviceability/src/processors/device

1 file changed

+3
-0
lines changed

smartcontract/programs/doublezero-serviceability/src/processors/device/closeaccount.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ pub fn process_closeaccount_device(
8484
if device.exchange_pk != *exchange_account.key {
8585
return Err(DoubleZeroError::InvalidExchangePubkey.into());
8686
}
87+
if device.contributor_pk != *contributor_account.key {
88+
return Err(DoubleZeroError::InvalidContributorPubkey.into());
89+
}
8790
let mut contributor = Contributor::try_from(contributor_account)?;
8891
let mut location = Location::try_from(location_account)?;
8992
let mut exchange = Exchange::try_from(exchange_account)?;

0 commit comments

Comments
 (0)