Skip to content

Commit

Permalink
OCT-1498 Can't unlock GLM on M-C without going to lock view & back (#107
Browse files Browse the repository at this point in the history
)
  • Loading branch information
aziolek authored Mar 28, 2024
1 parent 5073dfe commit 62c9909
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Earn/EarnGlmLock/EarnGlmLock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const EarnGlmLock: FC<EarnGlmLockProps> = ({ currentMode, onCurrentModeChange, o

return (
<Formik
initialValues={formInitialValues}
initialValues={formInitialValues(currentMode)}
isInitialValid={false}
onSubmit={onApproveOrDeposit}
validateOnChange
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/Earn/EarnGlmLock/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { string, object, ObjectSchema } from 'yup';
import i18n from 'i18n';
import { parseUnitsBigInt } from 'utils/parseUnitsBigInt';

import { FormFields } from './types';
import { CurrentMode, FormFields } from './types';

export const formInitialValues: FormFields = {
currentMode: 'lock',
export const formInitialValues = (currentMode: CurrentMode): FormFields => ({
currentMode,
valueToDeposeOrWithdraw: '',
};
});

export const validationSchema = (
dataAvailableFunds: bigint | undefined,
Expand Down

0 comments on commit 62c9909

Please sign in to comment.