Skip to content

Commit 9345a3e

Browse files
committed
Merge branch 'crispheaney/support-deposits-on-behalf-of-user' into devnet
2 parents dad1a54 + 2df49ea commit 9345a3e

File tree

1 file changed

+2
-4
lines changed
  • programs/drift/src/instructions

1 file changed

+2
-4
lines changed

programs/drift/src/instructions/user.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ pub fn handle_deposit<'c: 'info, 'info>(
793793
} else {
794794
DepositExplanation::None
795795
};
796-
let signer = if ctx.accounts.authority.key() == user.authority {
796+
let signer = if ctx.accounts.authority.key() != user.authority {
797797
Some(ctx.accounts.authority.key())
798798
} else {
799799
None
@@ -4338,9 +4338,7 @@ pub struct InitializeReferrerName<'info> {
43384338
#[instruction(market_index: u16,)]
43394339
pub struct Deposit<'info> {
43404340
pub state: Box<Account<'info, State>>,
4341-
#[account(
4342-
mut
4343-
)]
4341+
#[account(mut)]
43444342
pub user: AccountLoader<'info, User>,
43454343
#[account(
43464344
mut,

0 commit comments

Comments
 (0)