NovaDAOx / homepage

https://novadaodev.vercel.app
1 stars 4 forks source link

setApproveAll should only be done once #23

Closed jb4earth closed 2 years ago

jb4earth commented 2 years ago

check out the object returned by getStakerWallet - there should be a toggle whether the account is Approved for interaction on chain

if approved do not show the setApprove button, instead allow staking interaction

dave-16 commented 2 years ago

this is the function that check's if approved . and if return "True" allows interaction with staking contract if not returns "Allow setApprovalForAll btn that allows user to approve (approval is only once)

https://github.com/NovaDAOx/homepage/blob/dae79b1ff17f882c8e2aaf95fdaee51fd4ef3bb8/src/app/index/staking/stake.component.ts#L104-L134