mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-06-10 02:09:49 +00:00
fix(stablecoin): leave position_post.program_owner default so the runtime sets it through Claim::Pda
This commit is contained in:
parent
a0a1e08dfb
commit
7da110a616
@ -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,
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user