From f5870e8b5f4f56651a371bc1e3fb269b2d59db58 Mon Sep 17 00:00:00 2001 From: Stas Leshchina <66851165+Sorizen@users.noreply.github.com> Date: Tue, 30 Jul 2024 18:39:17 +0300 Subject: [PATCH] Fix/datetime and multiplier (#78) * fix datetime autofill * fix datetime autofill --- src/common/modals/compositions/ChangeLockModal.vue | 3 ++- src/forms/DepositForm.vue | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/modals/compositions/ChangeLockModal.vue b/src/common/modals/compositions/ChangeLockModal.vue index 8454f92..65bf14e 100644 --- a/src/common/modals/compositions/ChangeLockModal.vue +++ b/src/common/modals/compositions/ChangeLockModal.vue @@ -178,13 +178,14 @@ watch( form.lockPeriod, web3ProvidersStore.provider.selectedAddress, web3ProvidersStore.provider.chainId, + userPoolData.value?.claimLockEnd, ], () => fetchExpectedMultiplier(form.lockPeriod), { immediate: true }, ) watch( - () => props.isShown, + () => [props.isShown, userPoolData.value?.claimLockEnd], () => { form.lockPeriod = String(userPoolData.value?.claimLockEnd.toNumber() || '') }, diff --git a/src/forms/DepositForm.vue b/src/forms/DepositForm.vue index a29f5fa..604e7a6 100644 --- a/src/forms/DepositForm.vue +++ b/src/forms/DepositForm.vue @@ -119,7 +119,6 @@ const emit = defineEmits<{ const props = defineProps<{ poolId: number minStake: BigNumber - lockEnd: string }>() const uid = uuidv4() @@ -315,17 +314,17 @@ watch( web3ProvidersStore.erc1967ProxyContract.providerBased.value.address, web3ProvidersStore.provider.selectedAddress, form.lockPeriod, + userPoolData.value?.claimLockEnd, ], () => fetchExpectedMultiplier(form.lockPeriod), { immediate: true }, ) watch( - () => props.lockEnd, + () => userPoolData.value?.claimLockEnd, () => { - form.lockPeriod = props.lockEnd + form.lockPeriod = String(userPoolData.value?.claimLockEnd.toNumber() || '') }, - { immediate: true }, ) onMounted(() => {