-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deposit limit #52
base: dev
Are you sure you want to change the base?
Deposit limit #52
Conversation
# Conflicts: # programs/tokenized_vault/src/instructions/deposit.rs # programs/tokenized_vault/src/instructions/withdraw.rs
@@ -48,6 +48,6 @@ pub struct Whitelist<'info> { | |||
|
|||
|
|||
pub fn handle_whitelist(ctx: Context<Whitelist>, _user: Pubkey) -> Result<()> { | |||
ctx.accounts.whitelisted.is_whitelisted = true; | |||
ctx.accounts.user_data.whitelisted = true; | |||
Ok(()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice if a whitelist event gets emitted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Front-end engineers were asking how to check whether a user was whitelisted, I had to tell them a way to check whether a PDA initialized or not when there was whitelist PDa. Ideally it's good if the subgraph can provide such info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event was added, checking if PDA initialized won't work, cause now we have UserData PDA istead
|
||
pub fn handle_revoke_whitelisting(_ctx: Context<RevokeWhitelisting>, _user: Pubkey) -> Result<()> { | ||
pub fn handle_revoke_whitelisting(ctx: Context<RevokeWhitelisting>, _user: Pubkey) -> Result<()> { | ||
ctx.accounts.user_data.whitelisted = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice of revoke whitelist event gets emitted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event was added
No description provided.