Developer-DAO / create-dao

MIT License
94 stars 15 forks source link

Remove the static stuff from the mint page #36

Closed Dhaiwat10 closed 2 years ago

Dhaiwat10 commented 2 years ago

Right now due to the nature of the useTransaction hook, the ether being passed to the transaction is statically set to 0.05 ether. This should be changed to be dynamic and adaptive to the contract.

We should wait for the useTransaction hook to be updated to support passing in params when it is called (https://github.com/Developer-DAO/web3-ui/issues/174).

e-roy commented 2 years ago

When PR the useTransaction hook was removed. Currently the mint price is updated from the useContract hook getting the data from .cost()

      const response = await nftContract.mint(1, {
        value: ethers.utils.parseEther(mintPrice),
      });

Found here

which is the same value as displayed on UI next to the mint button.

@Dhaiwat10 does this resolve this issue, or will there be a need to utilize the useTransaction hook instead when it is working properly?

Dhaiwat10 commented 2 years ago

I think so, closing this one. Thanks!