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

Epic: Token locking #57

Merged
merged 184 commits into from
Apr 18, 2024
Merged

Epic: Token locking #57

merged 184 commits into from
Apr 18, 2024

Conversation

schmanu
Copy link
Member

@schmanu schmanu commented Mar 12, 2024

What this epic is about

This epic transforms the Safe DAO governance app into the Safe {Pass} | {DAO} app.

Overall the app is split in 2 parts:

  • Activity & Rewards
  • Governance & Claiming

While the second remains mostly the same the Activity & Rewards page is completely new.
It offers

  • Locking Safe tokens to boost points
  • A Leaderboard of top Safe token lock amounts
  • A page to unlock & withdraw locked tokens
  • Information about the Safe{Pass} Program

The Activity & Rewards part of the app is usable as Safe App and via WalletConnect as a standalone application.

Copy link

github-actions bot commented Mar 12, 2024

Branch preview

✅ Deploy successful!

https://token_locking--governance.review-react-br.5afe.dev

Copy link

github-actions bot commented Mar 12, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

Copy link

github-actions bot commented Apr 18, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@schmanu schmanu marked this pull request as ready for review April 18, 2024 12:45
pages/boost.tsx Outdated Show resolved Hide resolved
Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

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

Only minor nits. Looks good otherwise!

Comment on lines 44 to 62
export type SingleUnlock = {
unlockAmount: BigNumber
unlockedAt: BigNumber
isUnlocked: boolean
}

export const useSafeTokenLockUserInfo = () => {
const QUERY_KEY = 'safe-token-locked'
const web3 = useWeb3()
const chainId = useChainId()
const address = useAddress()

return useSWR(web3 && address ? QUERY_KEY : null, (): Promise<[BigNumber, BigNumber, number, number] | undefined> => {
if (!address || !web3) {
return Promise.resolve([BigNumber.from(0), BigNumber.from(0), 0, 0])
}
return fetchLockedAmount(chainId, address, web3)
})
}
Copy link
Member

Choose a reason for hiding this comment

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

I think this is unused

* @param index index of the unlock
* @returns Unlock data for index: [amount, unlockedAt (in seconds)] or undefined
*/
export const fetchUnlockData = async (
Copy link
Member

Choose a reason for hiding this comment

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

Also seems unused

@schmanu schmanu merged commit f5895b0 into dev Apr 18, 2024
4 of 5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants