Closed sekaiking closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/curaos/frontend/7G8keYZzwvFtzkaDAtYNF7xzc3k8
✅ Preview: https://frontend-git-improvehooks-curaos.vercel.app
fix #102
:tada: This PR is included in version @cura/hooks-v1.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
The goal from this PR is to optimizing the calling of smart contracts
All view methods (nft_tokens, nft_metadata...), now are being called as a view method using the
useNFTViewMethod
useNFTViewMethod
doesn't require user to be logged in, so it can allow us in the future to let users explore NFTs without having to connect and only ask for login if user is trying a call method.As requested, I tried to cache the contract called in
useNFTViewMethod
. The first time a user call a contract, it generates a new contract instance and save it to a global object inwindow
. This will alow to store any amount of contracts for other calls in the same session.Added
updateStatue
touseNFTViewMethod
because the frontend code already had it foruseNFTMethod