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

(govern) fix: claim button lost #98

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

Tanya-atatakai
Copy link
Collaborator

@Tanya-atatakai Tanya-atatakai commented Sep 9, 2024

Fixes

Fixed the logic of displaying the claim button

the problem was in this function, where balanceData.lockedEnd was in ms, but block.timestamp was in seconds

const canWithdrawVeolas = useMemo(() => {
    if (balanceData === undefined) return false;
    if (block === undefined) return false;
    return Number(balanceData.veOlasBalance) > 0 && balanceData.lockedEnd <= block.timestamp;
  }, [balanceData, block]);

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Copy link

vercel bot commented Sep 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bond ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 0:18am
govern ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 0:18am
launch ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 0:18am
operate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 0:18am
registry ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 0:18am
tokenomics 🔄 Building (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 0:18am

@Tanya-atatakai Tanya-atatakai merged commit 10c477b into main Sep 9, 2024
9 checks passed
@Tanya-atatakai Tanya-atatakai deleted the tanya/fix-claim-veolas branch September 9, 2024 12:53
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.

4 participants