@huma-finance/widgets 0.0.62-beta.597 → 0.0.62-beta.601
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.601+64ba9d6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@ethersproject/experimental": "^5.7.0",
|
|
31
31
|
"@ethersproject/providers": "^5.6.0",
|
|
32
32
|
"@ethersproject/units": "^5.6.0",
|
|
33
|
-
"@huma-finance/sdk": "^0.0.
|
|
34
|
-
"@huma-finance/shared": "^0.0.
|
|
33
|
+
"@huma-finance/sdk": "^0.0.61",
|
|
34
|
+
"@huma-finance/shared": "^0.0.61",
|
|
35
35
|
"@huma-finance/web-shared": "^0.0.61",
|
|
36
36
|
"@mui/icons-material": "^5.3.0",
|
|
37
37
|
"@mui/material": "^5.0.6",
|
|
@@ -195,5 +195,5 @@
|
|
|
195
195
|
"optionalDependencies": {
|
|
196
196
|
"encoding": "^0.1.13"
|
|
197
197
|
},
|
|
198
|
-
"gitHead": "
|
|
198
|
+
"gitHead": "64ba9d6eaa66705f7eda34178d7445760806de72"
|
|
199
199
|
}
|
|
@@ -68,13 +68,18 @@ export function ChooseAmount({
|
|
|
68
68
|
lpConfig.withdrawalLockoutPeriodInDays * SECONDS_IN_A_DAY
|
|
69
69
|
if (nextEpochStartTime < lockupEndTime) {
|
|
70
70
|
const lockupEndTimeDayjs = dayjs.unix(lockupEndTime).date(1)
|
|
71
|
+
const withdrawTime = lockupEndTimeDayjs.add(1, 'month')
|
|
71
72
|
dispatch(setStep(WIDGET_STEP.Error))
|
|
72
73
|
dispatch(
|
|
73
74
|
setError({
|
|
74
75
|
errorReason: 'Redemption too soon',
|
|
75
76
|
errorMessage: `Your last deposit was on ${timestampToLL(
|
|
76
77
|
depositRecord!.lastDepositTime.toNumber(),
|
|
77
|
-
)}. You can
|
|
78
|
+
)}. You can begin submitting redemption requests on ${timestampToLL(
|
|
79
|
+
lockupEndTimeDayjs.unix(),
|
|
80
|
+
)}, which can be redeemed starting ${timestampToLL(
|
|
81
|
+
withdrawTime.unix(),
|
|
82
|
+
)}.`,
|
|
78
83
|
}),
|
|
79
84
|
)
|
|
80
85
|
}
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import { sendTxAtom } from '@huma-finance/web-shared'
|
|
10
10
|
import { useWeb3React } from '@web3-react/core'
|
|
11
11
|
import { useAtom } from 'jotai'
|
|
12
|
-
import moment from 'moment'
|
|
13
12
|
import React, { useCallback, useEffect, useState } from 'react'
|
|
14
13
|
import { useDispatch } from 'react-redux'
|
|
15
14
|
|
|
15
|
+
import dayjs from 'dayjs'
|
|
16
16
|
import { Campaign } from '.'
|
|
17
17
|
import {
|
|
18
18
|
useDoesChainSupportNotifi,
|
|
@@ -90,14 +90,16 @@ export function Success({
|
|
|
90
90
|
]
|
|
91
91
|
|
|
92
92
|
const getSubContent = () => {
|
|
93
|
-
const
|
|
94
|
-
lpConfig.withdrawalLockoutPeriodInDays,
|
|
95
|
-
|
|
96
|
-
)
|
|
93
|
+
const redemptionTime = dayjs()
|
|
94
|
+
.add(lpConfig.withdrawalLockoutPeriodInDays, 'day')
|
|
95
|
+
.date(1)
|
|
96
|
+
const withdrawTime = redemptionTime.add(1, 'month')
|
|
97
97
|
return [
|
|
98
|
-
`
|
|
99
|
-
|
|
100
|
-
)}
|
|
98
|
+
`You can begin submitting redemption requests on ${timeUtil.timestampToLL(
|
|
99
|
+
redemptionTime.unix(),
|
|
100
|
+
)}, which can be redeemed starting ${timeUtil.timestampToLL(
|
|
101
|
+
withdrawTime.unix(),
|
|
102
|
+
)}.`,
|
|
101
103
|
]
|
|
102
104
|
}
|
|
103
105
|
|