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

Release 2.4.1 #206

Merged
merged 4 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "safe-dao-governance-app",
"homepage": "https://github.com/safe-global/safe-dao-governance-app",
"license": "GPL-3.0",
"version": "2.4.0",
"version": "2.4.1",
"scripts": {
"build": "next build && next export",
"lint": "tsc && next lint",
Expand Down
27 changes: 23 additions & 4 deletions src/components/Points/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { TokenAmount } from '@/components/TokenAmount'

const Points = () => {
const [sealedResult, setSealedResult] = useState<SealedRequest>()
const [fingerprintError, setFingerprintError] = useState<string>()
const { data: eligibility, isLoading } = useUnsealedResult(sealedResult)
const { sdk, safe } = useSafeAppsSDK()
const globalCampaignId = useGlobalCampaignId()
Expand All @@ -46,9 +47,14 @@ const Points = () => {
fpPromise
.then((fp) => fp.get({ extendedResult: true }))
.then((fingerprint) => {
setFingerprintError(undefined)
setSealedResult({ requestId: fingerprint.requestId, sealedResult: fingerprint.sealedResult })
})
.catch((err) => console.error('Failed to fetch sealed client results: ', err))
.catch((err) =>
setFingerprintError(
"It looks like some content isn't loading correctly. Please try disabling your AdBlocker and reload the page.",
),
)
}, [])

const startClaiming = async () => {
Expand Down Expand Up @@ -126,6 +132,14 @@ const Points = () => {
</Grid>
</Grid>

{fingerprintError && (
<Grid container>
<Grid item width={1} mb={2}>
<Alert severity="error">{fingerprintError}</Alert>
</Grid>
</Grid>
)}

<Grid container>
<Grid item width={1}>
<PaperContainer
Expand All @@ -144,9 +158,14 @@ const Points = () => {
<Stack gap={2} alignItems="flex-start" p={4}>
<Typography variant="h3" fontWeight={700} fontSize="32px">
{isSAPClaimed ? 'Congratulations, you claimed your rewards!' : 'Rewards Await! 🏆'}
<br />
<br />
{isSAPClaimed && <TokenAmount amount={totalSAP.allocation} label="Claimed" loading={false} />}

{isSAPClaimed && (
<>
<br />
<br />
<TokenAmount amount={totalSAP.allocation} label="Claimed" loading={false} />
</>
)}
</Typography>

{!isSAPClaimed && (
Expand Down
Loading