I’m starting a project in Flow following this tutorial. I have a problem trying to transfer the NFT to another owner that I can’t solve. According to all the references I have seen on the internet, everything seems to be fine.
The problem occurs in the TransferToken transaction (transaction/TransferToken.cdc) when it try to execute the “borrow” method of the “capability”.
I made this repository with the steps to reproduce the error, any help you can give me is very useful. Thanks in advance.
I have converted your code to Playground, and run all the steps to mint and transfer the NFT, everything is working fine in the flow playground.
You can check it out here.
Steps to run.
- deploy PetStore to account 1
- run initCollection transaction by account 2
- Mint the nft to account 1 as signer as account 1
- you can check the owner of your nft in the script, it will be account 1
- Transfer the token from account 1 to account 2
- now you can again check the owner of your nft account in script, it will be account 2
Thanks Nasir, it was really helpfully, I can solved Thanks again