Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staking UI #128

Merged
merged 10 commits into from
Dec 20, 2021
Merged

Staking UI #128

merged 10 commits into from
Dec 20, 2021

Conversation

JakeHartnell
Copy link
Member

@JakeHartnell JakeHartnell commented Dec 19, 2021

Adds UI for staking gov tokens. This is needed to support the newest version of the DAO contracts.

@vercel
Copy link

vercel bot commented Dec 19, 2021

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/da0da0/dao-dao/CRUivbphAbahpXdnM1hzBWevnaEj
✅ Preview: https://dao-dao-git-staking-ui-da0da0.vercel.app

pages/dao/[contractAddress]/index.tsx Outdated Show resolved Hide resolved
<div className="card bordered shadow-lg card-side m-2 inline-flex">
<div className="card-body py-6">
<h2 className="card-title">
{title} <HelpTooltip text={tooltip} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is sadly an issue with card and HelpTooltip where the message gets hidden. I tried to work around it a little a while ago but didn't have much success. Maybe we could just move this info to some text on the page for now?

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! You have to make sure the card or container has overflow-visible

stake,
stakedBalance,
unstake,
} = useStaking(daoInfo?.gov_token as string)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Playing around with this it seems like staking / unstaking won't trigger this state to be updated. I don't think this is something that needs to block the PR but something to note. Not even sure how you'd tell react that pressing that button should cause this hook to be re run..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps @ebaker or @gavindoughtie would know how to do that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this too... it's not ideal and I don't expect it to last long.

Why I think we should ship this now:

  • Will soon have lots of examples and patterns for using recoil (can just wait until those are ready)
  • Allows us to update the contracts on Juno Testnet (which are out of date and lead to some frontend bugs)
  • Sidebar / 3 column layout is coming... really want some of this to potentially live there

Ideally, when you're visiting a DAO, it shows how many DAO tokens you have and how many are staked in the third column.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great , am also looking forward to learning more about recoil to hopefully fix these kinds of issues :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants