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

Fix placeBid errors #172

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

basvanberckel
Copy link

@basvanberckel basvanberckel commented Feb 2, 2022

Fixes both errors in metaplex-foundation/js#155

The bidder pot account should be created, it should be a PDA passed to the program.

The revoke instruction for the transfer approval is sent after the transfer account is already closed. This reverses that order.

@basvanberckel
Copy link
Author

It's possible that the revoke operation is not necessary at all if the source account is closed right away, but I am not 100% sure about this

AmmarKhalid123
AmmarKhalid123 previously approved these changes Feb 2, 2022
Copy link

@AmmarKhalid123 AmmarKhalid123 left a comment

Choose a reason for hiding this comment

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

Seems fine, should be accepted ASAP.

@basvanberckel basvanberckel changed the title Fix instruction order in placeBid Fix placeBid errors Feb 2, 2022
@yamijuan
Copy link

@austbot

@turcol
Copy link

turcol commented Mar 23, 2022

@basvanberckel thanks for the PR, as it really fixed (partially) the issue we were facing. Do you know who can move forward this PR to be accepted?

I noticed it was already approved by 3 reviewers, and I wonder if @yamijuan can review and accept it or who can do the last approval?

Thanks in advance !!

@checho1989
Copy link

Trying to placeBid or InstantSale Im facing same issue with the UnitializedAccount:

Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 4: instruction requires an initialized account

Maybe the PR could fix it? Thanks

@nurav97
Copy link

nurav97 commented Apr 21, 2022

@checho1989 where you able to solve this issue, i am getting the same error

@turcol
Copy link

turcol commented Apr 25, 2022

@nurav97 be sure that in anyplace your are using the SDK you do have the closeTokenAccountTx at the end of your mulitple transations, as in many places on the SDK the closeTokenAccountTx is before than the payingAccount and the createRevokeTx

An example (it is part of this PR):

txBatch.addTransaction(createTokenAccountTx);
txBatch.addAfterTransaction(closeTokenAccountTx);
txBatch.addSigner(payingAccount);

txBatch.addAfterTransaction(createRevokeTx);
txBatch.addSigner(transferAuthority);

txBatch.addAfterTransaction(closeTokenAccountTx);

@nurav97
Copy link

nurav97 commented Apr 26, 2022

@turcol i made that change but i am now getting custom Error

failed to send transaction: Transaction simulation failed: Error processing Instruction 5: custom program error: 0x1f

i have also set flag in transaction.ts to skipPreflight:true but still the preflight check is happning i want to check the same error on explorer to check if i get any more info in the logs about this error

do you have any idea about why i am getting the error or the preflight is not setting to true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants