Skip to content

Commit

Permalink
Adjust claim card
Browse files Browse the repository at this point in the history
  • Loading branch information
vkulinich-cl committed Dec 23, 2024
1 parent c5f705f commit 2ce2965
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
1 change: 0 additions & 1 deletion src/i18n/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@
"farms.claimCard.button.label": "Claim all",
"farms.claimCard.claim.asset": "{{num}}{{denom}} {{symbol}}",
"farms.claimCard.claim.usd": "Total of ≈ <0/>",
"farms.claimCard.claim.diffRewards": "Locked rewards ≈ <0/>",
"farms.claimCard.toast.onLoading": "<0>Claiming farm rewards for </0>",
"farms.claimCard.toast.onSuccess": "<0>Farm rewards claimed for </0>",
"farms.claimCard.toast.asset": "<1>{{num}}{{denom}} {{symbol}}</1>.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const ClaimAllContent = forwardRef<HTMLDivElement, Props>(
)
: []

const { claimableTotal, claimableAssetValues, diffRewards } =
const { claimableTotal, claimableAssetValues } =
useSummarizeClaimableValues(claimableValues)

const claimableAssets = Object.keys(claimableAssetValues ?? {}).map(
Expand Down Expand Up @@ -101,25 +101,12 @@ export const ClaimAllContent = forwardRef<HTMLDivElement, Props>(
</div>
))}

<Text fs={14} sx={{ mt: 6 }}>
<Text fs={14} sx={{ mt: 6, mb: 24 }}>
<Trans t={t} i18nKey="farms.claimCard.claim.usd">
<DisplayValue value={BigNumber(claimableTotal)} />
</Trans>
</Text>

<Text
fs={14}
sx={{ py: 8, mt: 8, mb: 10 }}
fw={300}
css={{
borderTop: `1px solid rgba(${theme.rgbColors.white}, 0.06)`,
}}
>
<Trans t={t} i18nKey="farms.claimCard.claim.diffRewards">
<DisplayValue value={BigNumber(diffRewards)} />
</Trans>
</Text>

<SClaimButton
disabled={
!claimableValues ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ export const ClaimRewardsCard = (props: {
)
: poolClaimableValues

const { claimableTotal, diffRewards, claimableAssetValues } =
useSummarizeClaimableValues(claimableDepositValues ?? [])
const { claimableTotal, claimableAssetValues } = useSummarizeClaimableValues(
claimableDepositValues ?? [],
)

const { claimableAssets, toastValue } = useMemo(() => {
const claimableAssets = []
Expand Down Expand Up @@ -145,19 +146,6 @@ export const ClaimRewardsCard = (props: {
<DisplayValue value={BN(claimableTotal)} />
</Trans>
</Text>

<Text
fs={14}
sx={{ py: 8, mt: 8, mb: 10 }}
fw={300}
css={{
borderTop: `1px solid rgba(${theme.rgbColors.white}, 0.06)`,
}}
>
<Trans t={t} i18nKey="farms.claimCard.claim.diffRewards">
<DisplayValue value={BN(diffRewards)} />
</Trans>
</Text>
</div>
<div sx={{ flex: "column", gap: 12, width: ["100%", 275] }}>
<Button
Expand Down

0 comments on commit 2ce2965

Please sign in to comment.