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

Add message that OGV rewards will be collected on stake/extend #281

Merged
merged 1 commit into from
Jul 27, 2022
Merged
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
27 changes: 25 additions & 2 deletions client/components/vote-escrow/LockupForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CardStat from "components/CardStat";
import CardDescription from "components/CardDescription";
import CardGroup from "components/CardGroup";
import moment from "moment";
import { mdiArrowRight } from "@mdi/js";
import { mdiArrowRight, mdiAlertCircle } from "@mdi/js";
import Icon from "@mdi/react";
import ApyToolTip from "components/claim/claim/ApyTooltip";
import { getRewardsApy } from "utils/apy";
Expand Down Expand Up @@ -526,7 +526,30 @@ const LockupForm: FunctionComponent<LockupFormProps> = ({ existingLockup }) => {
{transactionError}
</div>
)}
<div className="flex pt-6">
{balances?.accruedRewards.gt(0) && (
<div className="pt-2">
<div className="flex space-x-4 bg-gray-100 p-4 pb-5 border-t-4 border-gray-300">
<Icon
path={mdiAlertCircle}
size={1}
className="text-accent flex-shrink-0"
/>
<div>
<span className="block text-md font-bold text-gray-900">
OGV rewards will be collected
</span>
<span className="block text-sm text-gray-700">
You have accrued{" "}
{<TokenAmount amount={balances?.accruedRewards} />} OGV in
staking rewards. This OGV will be transferred to your wallet
immediately when you {existingLockup ? "extend" : "create"}{" "}
your stake.
</span>
</div>
</div>
</div>
)}
<div className="flex pt-2">
<button
className="btn btn-primary md:btn-lg rounded-full mr-4 flex-1"
disabled={
Expand Down