Skip to content
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

Merged
merged 6 commits into from
Dec 18, 2024
Merged

Deposit limit #52

merged 6 commits into from
Dec 18, 2024

Conversation

vito-kovalione
Copy link
Contributor

No description provided.

# Conflicts:
#	programs/tokenized_vault/src/instructions/deposit.rs
#	programs/tokenized_vault/src/instructions/withdraw.rs
TonioMacaronio
TonioMacaronio previously approved these changes Dec 12, 2024
@@ -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(())

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.

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.

Copy link
Contributor Author

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;

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

event was added

# Conflicts:
#	programs/tokenized_vault/src/instructions/deposit.rs
#	programs/tokenized_vault/src/instructions/direct_deposit.rs
#	programs/tokenized_vault/src/instructions/withdraw.rs
@vito-kovalione vito-kovalione merged commit e634688 into dev Dec 18, 2024
1 check passed
@vito-kovalione vito-kovalione deleted the deposit_limit branch December 18, 2024 11:40
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.

3 participants