Skip to content

Conversation

@crispheaney
Copy link
Member

No description provided.

let signer = if ctx.accounts.authority.key() == user.authority {
Some(ctx.accounts.authority.key())
} else {
None
Copy link
Member

@wphan wphan Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this just always be ctx.accounts.authority? i guess that would make all events larger

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer keeping it None for normal deposit to match historical schema

} else {
DepositExplanation::None
};
let signer = if ctx.accounts.authority.key() == user.authority {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you want to flip this and log if it's a third party making the deposit?

Suggested change
let signer = if ctx.accounts.authority.key() == user.authority {
let signer = if ctx.accounts.authority.key() != user.authority {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a newly named instruction to lower chance of accidental deposit into wrong account?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants