-
Notifications
You must be signed in to change notification settings - Fork 2
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
program: add pause deposit state and guard in deposit & deposit_spl_token #14
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14 +/- ##
========================================
- Coverage 9.42% 9.17% -0.25%
========================================
Files 1 1
Lines 191 218 +27
========================================
+ Hits 18 20 +2
- Misses 173 198 +25 ☔ View full report in Codecov by Sentry. |
pub fn deposit(ctx: Context<Deposit>, amount: u64, memo: Vec<u8>) -> Result<()> { | ||
require!(memo.len() >= 20, Errors::MemoLengthTooShort); | ||
require!(memo.len() <= 512, Errors::MemoLengthExceeded); | ||
|
||
let pda = &mut ctx.accounts.pda; |
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.
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.
looks good. left minor comment
Co-authored-by: Lucas Bertrand <[email protected]>
So that the program can be paused when zeta blockchain is undergoing upgrade or downtime, or TSS migration.
Only user deposits are paused to prevent users losing or experiencing delay in their assets during downtime;
Withdraws are not paused because:
The new guards and instructions are part of the test suite; to run