Skip to content

Commit

Permalink
Obligation_owner should be readonly (solana-labs#87)
Browse files Browse the repository at this point in the history
Issue: As in description `WithdrawObligationCollateralAndRedeemReserveCollateral` combines `WithdrawObligationCollateral` and `RedeemReserveCollateral`. While `obligation_owner` in `WithdrawObligationCollateral` is readonly, it is writable in `WithdrawObligationCollateralAndRedeemReserveCollateral` is writable. 

Solution: Update `obligation_owner` readonly in `WithdrawObligationCollateralAndRedeemReserveCollateral`
  • Loading branch information
andrewsource147 authored Sep 16, 2022
1 parent 1cb0135 commit 075972c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion token-lending/program/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ pub fn withdraw_obligation_collateral_and_redeem_reserve_collateral(
AccountMeta::new(destination_liquidity_pubkey, false),
AccountMeta::new(reserve_collateral_mint_pubkey, false),
AccountMeta::new(reserve_liquidity_supply_pubkey, false),
AccountMeta::new(obligation_owner_pubkey, true),
AccountMeta::new_readonly(obligation_owner_pubkey, true),
AccountMeta::new_readonly(user_transfer_authority_pubkey, true),
AccountMeta::new_readonly(spl_token::id(), false),
],
Expand Down

0 comments on commit 075972c

Please sign in to comment.