close condition

This commit is contained in:
Hardhat Chad
2024-09-27 07:07:21 +00:00
parent 5bd4a467d6
commit d41c07c999

View File

@@ -13,7 +13,7 @@ pub fn process_close(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul
.is_writable()?
.to_account::<Proof>(&ore_api::ID)?
.check(|p| p.authority == *signer_info.key)?
.check(|p| p.balance > 0)?;
.check(|p| p.balance == 0)?;
system_program.is_program(&system_program::ID)?;
// Realloc data to zero.