mintNFT Bugfix#2
Conversation
Change NFT minting block to wrap state var logic inside .then instead of .finally. Code will still be called and set hasClaimedNFT to true even if minting fails when in a finally block.
nachoiacovino
left a comment
There was a problem hiding this comment.
setIsClaiming should go inside the finally since we want if it fails we also want to setIsClaiming to false!
You're thinking keep the finally but only call setIsClaiming there? If it fails, setIsClaiming is called inside the catch, but could definitely be simplified to only call it once inside a finally |
nachoiacovino
left a comment
There was a problem hiding this comment.
there's an error here, and the error got into the content, you need to delete the semicolon on line 374/368.
Can you also add a PR to content?
…tion to match project content structure
Fixed the compilation issue here and verified it compiles locally. I have prettier formatter in my VS Code env though so it reformatted the whole file. Feel free to reformat before merging with whatever formatter your team is using. The content PR doesn't have the semicolon before catch and looks correct to me. |
Change NFT minting block to wrap state var logic inside .then instead of .finally. Code will still be called and set hasClaimedNFT to true even if minting fails when in a finally block.