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

[Feature] Close accounts #11

Merged
merged 2 commits into from
Jan 6, 2023

Conversation

obi-ewan
Copy link
Contributor

@obi-ewan obi-ewan commented Jan 6, 2023

Add instructions to close accounts after market settlement; returning rent costs to account purchasers

Comment on lines +631 to +645
// accounts being closed --------------------------------------------
#[account(
mut,
seeds = [
market.key().as_ref(),
market_outcome.index.to_string().as_ref(),
b"-".as_ref(),
format!("{:.3}", _price).as_ref(),
_for_outcome.to_string().as_ref(),
],
bump,
has_one = purchaser @ CoreError::CloseAccountPurchaserMismatch,
close = purchaser,
)]
pub market_matching_pool: Account<'info, MarketMatchingPool>,
Copy link
Contributor

Choose a reason for hiding this comment

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

style: not really need to be fixed but i've noticed that account that is being closed goes first in other contexts

@obi-ewan obi-ewan merged commit 4df1e80 into MonacoProtocol:main Jan 6, 2023
@obi-ewan obi-ewan deleted the feature/closing-accounts branch January 6, 2023 15:28
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