Skip to content

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.

2 participants