Skip to content

Commit

Permalink
Merge fix (#888)
Browse files Browse the repository at this point in the history
* fix: addliquidity calculation (#728) (#729)

* updated early withdraw vault

* chore: merge fix from main

---------

Co-authored-by: Nicho <[email protected]>
Co-authored-by: jebsley3 <[email protected]>
Co-authored-by: Marshall <[email protected]>
  • Loading branch information
4 people authored Nov 6, 2023
1 parent e05c73f commit 57ce190
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions apps/dapp/src/components/Pages/Core/NewUI/ClaimModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { BigNumber } from 'ethers';
import { useWithdrawFromVault } from 'hooks/core/use-withdraw-from-vault';
import { VaultButton } from '../VaultPages/VaultContent';
import { useTokenContractAllowance } from 'hooks/core/use-token-contract-allowance';
import { getBigNumberFromString } from 'components/Vault/utils';
import env from 'constants/env';
import _ from 'lodash';

Expand All @@ -22,6 +23,9 @@ const EMPTY_CLAIM_STATE = {
claimAmount: '',
};

// The early withdrawal vault minimum withdrawal amount
const MIN_WITHDRAWAL_AMOUNT = BigNumber.from(1_000);

export const ClaimModal: React.FC<IProps> = ({ isOpen, onClose }) => {
const {
balances: { balances, isLoading: balancesIsLoading },
Expand Down Expand Up @@ -109,13 +113,10 @@ export const ClaimModal: React.FC<IProps> = ({ isOpen, onClose }) => {
<ErrorLabel>{formatErrorMessage(earlyWithdrawError.message) || 'Something went wrong'}</ErrorLabel>
)}

{Number(claimState.claimAmount) === 0 ? (
{getBigNumberFromString(claimState.claimAmount).lt(MIN_WITHDRAWAL_AMOUNT) ? (
<ClaimButton
label={`Nothing to Claim`}
disabled={true}
onClick={async () => {
await earlyWithdraw(claimState.claimSubvaultAddress, claimState.claimAmount);
}}
/>
) : earlyWithdrawAllowance === 0 ? (
<ClaimButton
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/src/constants/env/production.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const env: Environment = {
treasuryIv: '0xae8a796bd9437Bd266664e8e9B8428B25A7D2477',
vaultOps: '0x65fE8BaBF7DA367b2B45cBD748F0490713f84828',
vaultProxy: '0x6f5bB7cC4F3D6628d0095545552757AB377FE15C',
vaultEarlyExit: '0x7C6f1b4891ff8CAcCeC97DbbD9Df3b773d88A03E',
vaultEarlyExit: '0x24719d3AF60e1B622a29317d29E5Ce283617DeEC',
ramos: '0xDdF499e726Bfde29Ce035F6B355e55757F08B5EF',
ramosStrategy: '0xDA5CeF575eaEF14032C5006eb5cbEbE7eE0E347b',
ramosPoolHelper: '0xe32089bf9724aF09C026BeC36a7d8a81500cd58A',
Expand Down

0 comments on commit 57ce190

Please sign in to comment.