@huma-finance/widgets 0.0.62-beta.719 → 0.0.62-beta.720
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huma-finance/widgets",
|
|
3
|
-
"version": "0.0.62-beta.
|
|
3
|
+
"version": "0.0.62-beta.720+a8e676c",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@ethersproject/units": "^5.6.0",
|
|
32
32
|
"@huma-finance/sdk": "^0.0.61",
|
|
33
33
|
"@huma-finance/shared": "^0.0.61",
|
|
34
|
-
"@huma-finance/web-shared": "^0.0.62-beta.
|
|
34
|
+
"@huma-finance/web-shared": "^0.0.62-beta.720+a8e676c",
|
|
35
35
|
"@mui/icons-material": "^5.3.0",
|
|
36
36
|
"@mui/material": "^5.0.6",
|
|
37
37
|
"@mui/styles": "^5.0.2",
|
|
@@ -203,5 +203,5 @@
|
|
|
203
203
|
"optionalDependencies": {
|
|
204
204
|
"encoding": "^0.1.13"
|
|
205
205
|
},
|
|
206
|
-
"gitHead": "
|
|
206
|
+
"gitHead": "a8e676c365b2ad2658475a83b59f04a95ad2fd18"
|
|
207
207
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { timeUtil } from '@huma-finance/shared'
|
|
2
|
-
import { SolanaPoolState } from '@huma-finance/web-shared'
|
|
3
|
-
import dayjs from 'dayjs'
|
|
2
|
+
import { getLenderLockupDates, SolanaPoolState } from '@huma-finance/web-shared'
|
|
4
3
|
import React, { useCallback } from 'react'
|
|
5
4
|
import { Box, css, useTheme } from '@mui/material'
|
|
6
5
|
import { useAppDispatch } from '../../../hooks/useRedux'
|
|
@@ -38,10 +37,9 @@ export function ApproveAllowance({ poolState }: Props): React.ReactElement {
|
|
|
38
37
|
`,
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const withdrawTime = lockupEndTime.add(1, 'month')
|
|
40
|
+
const { lockupEndTimeUnix, withdrawTimeUnix } = getLenderLockupDates(
|
|
41
|
+
poolState.withdrawalLockupPeriodDays ?? 0,
|
|
42
|
+
)
|
|
45
43
|
|
|
46
44
|
return (
|
|
47
45
|
<WrapperModal title='Auto-Redemption'>
|
|
@@ -51,9 +49,9 @@ export function ApproveAllowance({ poolState }: Props): React.ReactElement {
|
|
|
51
49
|
<Box css={styles.description}>
|
|
52
50
|
This allowance transaction will enable auto-redemption for your existing
|
|
53
51
|
tranche shares. Redemption requests will be automatically submitted on{' '}
|
|
54
|
-
{timeUtil.timestampToLL(
|
|
52
|
+
{timeUtil.timestampToLL(lockupEndTimeUnix)}. Your deposit can be
|
|
55
53
|
redeemed and yield rewards will stop on{' '}
|
|
56
|
-
{timeUtil.timestampToLL(
|
|
54
|
+
{timeUtil.timestampToLL(withdrawTimeUnix)}.
|
|
57
55
|
</Box>
|
|
58
56
|
<BottomButton variant='contained' onClick={handleNext}>
|
|
59
57
|
APPROVE ALLOWANCE
|