Skip to content

Commit

Permalink
fix: elena reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanNeiverth committed Oct 7, 2024
1 parent 89e2261 commit 27146a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/claim-vesting/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default function Page() {
const {
errorMessage,
formattedClaimableAmount,
formattedClaimableAmountFullDecimals,
tokenSymbol,
loading,
callData,
Expand Down Expand Up @@ -89,7 +90,7 @@ export default function Page() {
<div className="flex flex-col w-full">
<ClaimableAmountContainer>
<span>Claimable amount</span>
<span>
<span title={formattedClaimableAmountFullDecimals}>
{formattedClaimableAmount} {tokenSymbol && tokenSymbol}
</span>
</ClaimableAmountContainer>
Expand Down
12 changes: 12 additions & 0 deletions apps/claim-vesting/src/hooks/useClaimVestingData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const useClaimVestingData = ({
}: useClaimVestingDataParams): {
errorMessage: string | undefined;
formattedClaimableAmount: string;
formattedClaimableAmountFullDecimals: string;
tokenSymbol: string;
loading: boolean;
callData: string | undefined;
Expand Down Expand Up @@ -97,6 +98,16 @@ export const useClaimVestingData = ({
0.000001
)
: "0.0";
const formattedClaimableAmountFullDecimals =
recipient === account && claimableAmountWei && decimals
? formatNumber(
Number(claimableAmountWei) / 10 ** Number(decimals),
Number(decimals),
"decimal",
"standard",
Number(`0.${"0".repeat(Number(decimals) - 1)}1`)
)
: "0.0";
const loading = isLoadingToken || isLoadingVesting || isLoadingGasLimit;

const callData =
Expand All @@ -111,6 +122,7 @@ export const useClaimVestingData = ({
return {
errorMessage,
formattedClaimableAmount,
formattedClaimableAmountFullDecimals,
tokenSymbol,
loading,
callData,
Expand Down
2 changes: 1 addition & 1 deletion packages/cow-hooks-ui/src/ButtonPrimary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const ButtonPrimary: React.FC<
!disabled,
},
{
"border-transparent outline-none cursor-auto shadow-none opacity-80 bg-color-primary text-color-button-text text-opacity-80":
"border-transparent outline-none cursor-auto shadow-none bg-color-primary text-color-button-text":
disabled,
}
)}
Expand Down

0 comments on commit 27146a1

Please sign in to comment.