fix(stablecoin): leave position_post.program_owner default so the runtime sets it through Claim::Pda

This commit is contained in:
Andrea Franz 2026-05-22 11:09:03 +02:00 committed by r4bbit
parent a0a1e08dfb
commit 7da110a616
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,6 @@ pub fn open_position(
verify_position_vault_and_get_seed(&vault, position.account_id, stablecoin_program_id);
let mut position_post = position.account;
position_post.program_owner = stablecoin_program_id;
position_post.data = Data::from(&Position {
collateral_vault_id: vault.account_id,
collateral_definition_id: token_definition.account_id,

View File

@ -173,7 +173,8 @@ fn open_position_claims_pda_and_emits_chained_calls() {
debt_amount: 0,
}
);
assert_eq!(position_post.account().program_owner, STABLECOIN_PROGRAM_ID);
// The runtime sets the program_owner on the claimed account after validating Claim::Pda.
assert_eq!(position_post.account().program_owner, ProgramId::default());
assert_eq!(chained_calls.len(), 2);