airgap-wallet
airgap-wallet copied to clipboard
Broken FA2 transfer transaction
I'm trying to facilitate a standard FA2 transfer operation. However, whenever the transaction contains more than two token transfers at once, the app breaks completely. This is the payload I'm trying to send:
[
{
"from_":"tz1PqooZUtCQqP539PmMzUWHtaUX6EQtFY5S",
"txs":[
{
"to_":"tz2MRhfAKUyNZDKH8XBzmXyCwd2h5ySbgZJJ",
"token_id":"53220",
"amount":"1"
},
{
"to_":"tz1fhd4k1jSJRRcNVbkMwVzkKEhX3kzApsfk",
"token_id":"53220",
"amount":"1"
},
{
"to_":"tz1aVgxdSRcHZZK9BSmEPHjMA6eM7dsiboN5",
"token_id":"53220",
"amount":"1"
}
]
}
]
And this is what the app does after trying to fetch the confirmation details:
Thanks for the report. I'll look into this as soon as possible.
Are you using any website / public snippet to do this? That would help me reproduce it more quickly.
It's a tool I'm building that facilitates mass distribution of FA2 NFTs. I can provide a sample payload with about 50 transfers, if that would help? I'm using taquitos with the beacon-wallet
to build the transaction.
Unless it's an interactive website I don't think it will be of much help, because I actually need to own the NFTs to get past the "run_operation" simulation. I'll try to reproduce it on my end and let you know if I need any help. Thanks!
I don't own the NFTs either - it breaks at the confirmation step, so the transaction doesn't even get on the blockchain.
You can reproduce it like this:
- Go to https://better-call.dev/mainnet/KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton/interact?entrypoint=transfer
- Setup a transaction in this fashion (data from the initial JSON, even though the actual token IDs don't matter):
- Select "Execute" and then "Wallet", and connect your airgap wallet
At the following transaction confirmation step, the app breaks.
I'll try that as soon as I'm back on my computer. If you try the same thing with Spire, what happens?
Same error when using my airgap wallet through spire.
As suspected, the operation fails because of a contract error.
The latest AirGap Wallet version seems to have a bug that prevents the contract error from being displayed properly. Instead, it displays this generic message.
If you try it with a local mnemonic in Spire, you will see the correct error message.
We will fix the UI bug in the next release, but I'm quite confident that the valid transaction would work with AirGap. (Valid meaning that you actually own the FA2 tokens).
How come that when I try the transaction with only the first two elements (of which I own neither token), the confirmation shows fine?