0

I developed a program that mints nfts. I added in the UI the possibility of minting more than one nft at once. To accomplish this I create a transaction for each nft that the user wants to mint.

Each transaction has 2 instructions in order to create the nft. Each instruction has 7 and 13 accounts on their context struct. In total, each transaction has 20 accounts.

The multi minting goes fine when minting up to 3 nfts. By fine I mean that my Phantom wallet shows the total price of all the minting, I approve the transactions and the nfts are minted correctly.

But when I try to mint more than 3 nfts at once, lets say 4, my Phantom wallet shows the error "Unable to fetch balance changes". For my surprise, if I approve this transaction despite the error message, the nfts are created succesfully, all 4 transactions succeed on-chain. I can mint lets say 10 nfts at once and the transactions on-chain are completed but Phantom shows the error and not the transaction price.

Any suggestions on this? Thank you.

1 Answer 1

2

Unable to fetch balance changes means just that. The phantom wallet transaction parser wasn't able to figure out exactly what your transaction would do to the user's account and display the outputs. It doesn't mean it thinks the transaction will fail.

Phantom has another error for transaction it actually expects to fail Transaction may fail to confirm

3
  • Thanks! And would you say there is something wrong on the program code, or client code which makes phantom unable to make the calculations? I mean.. is anything i could do to get the right output on phantom?
    – mfa13
    Jul 29, 2022 at 8:50
  • That's probably a different question / a question for one of the phantom devs / dev rel people like brian friel
    – Henry E
    Jul 29, 2022 at 9:16
  • Hey @mfa13 you likely aren't doing anything wrong here. Phantom is working on a few improvements to the simulator. More info here: solana.stackexchange.com/a/507/47 Jul 30, 2022 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.