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

Add unapprove instruction #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

archseer
Copy link

@archseer archseer commented Mar 7, 2022

Reverse of approve (I just copied approve and flipped the bool), allows a signer to undo a previous approval.

@fanatid
Copy link
Contributor

fanatid commented Mar 7, 2022

Maybe will better to change approve for accepting bool as second argument?

pub fn approve(ctx: Context<Approve>, state: bool) -> Result<()> {
    ctx.accounts.transaction.signers[owner_index] = state;

@archseer
Copy link
Author

We could but it would be a breaking change to the current API

@fanatid
Copy link
Contributor

fanatid commented Mar 14, 2022

If we want to skip breaking change we can introduce approve2 like initialize_account2 in spl-token.

@archseer
Copy link
Author

I can implement it either way, let me know if you'd like me to change it.

@fanatid
Copy link
Contributor

fanatid commented Mar 18, 2022

ping @armaniferrante

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.

None yet

2 participants