File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
programs/drift/src/instructions Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
1515### Fixes
1616
17+ - program: fix user stats check for transfer_perp_position ([ #1557 ] ( https://github.com/drift-labs/protocol-v2/pull/1557 ) )
18+
1719### Breaking
1820
1921## [ 2.116.0] - 2025-03-21
Original file line number Diff line number Diff line change @@ -4404,18 +4404,15 @@ pub struct TransferPools<'info> {
44044404pub struct TransferPerpPosition < ' info > {
44054405 #[ account(
44064406 mut ,
4407- constraint = can_sign_for_user( & from_user, & authority) ?
4407+ constraint = can_sign_for_user( & from_user, & authority) ? && is_stats_for_user ( & from_user , & user_stats ) ?
44084408 ) ]
44094409 pub from_user : AccountLoader < ' info , User > ,
44104410 #[ account(
44114411 mut ,
4412- constraint = can_sign_for_user( & to_user, & authority) ?
4412+ constraint = can_sign_for_user( & to_user, & authority) ? && is_stats_for_user ( & to_user , & user_stats ) ?
44134413 ) ]
44144414 pub to_user : AccountLoader < ' info , User > ,
4415- #[ account(
4416- mut ,
4417- has_one = authority
4418- ) ]
4415+ #[ account( mut ) ]
44194416 pub user_stats : AccountLoader < ' info , UserStats > ,
44204417 pub authority : Signer < ' info > ,
44214418 pub state : Box < Account < ' info , State > > ,
You can’t perform that action at this time.
0 commit comments