@huma-finance/widgets 0.0.72-beta.895 → 0.0.72-beta.901
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/dist/cjs/index.cjs +11 -11
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/components/Lend/components/PersonaEvaluation.tsx +7 -7
- package/src/components/Lend/components/SecuritizeEvaluation.tsx +4 -7
- package/src/components/Lend/supply/1-Evaluation/EvaluationKYC.tsx +2 -5
- package/src/hooks/useEA.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huma-finance/widgets",
|
|
3
|
-
"version": "0.0.72-beta.
|
|
3
|
+
"version": "0.0.72-beta.901+7d33bf5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"@ethersproject/experimental": "^5.7.0",
|
|
30
30
|
"@ethersproject/providers": "^5.6.0",
|
|
31
31
|
"@ethersproject/units": "^5.6.0",
|
|
32
|
-
"@huma-finance/sdk": "^0.0.72-beta.
|
|
33
|
-
"@huma-finance/shared": "^0.0.72-beta.
|
|
34
|
-
"@huma-finance/web-shared": "^0.0.72-beta.
|
|
32
|
+
"@huma-finance/sdk": "^0.0.72-beta.901+7d33bf5",
|
|
33
|
+
"@huma-finance/shared": "^0.0.72-beta.901+7d33bf5",
|
|
34
|
+
"@huma-finance/web-shared": "^0.0.72-beta.901+7d33bf5",
|
|
35
35
|
"@mui/x-date-pickers": "^5.0.7",
|
|
36
36
|
"@notifi-network/notifi-frontend-client": "^1.1.2",
|
|
37
37
|
"@notifi-network/notifi-react": "^1.1.2",
|
|
@@ -201,5 +201,5 @@
|
|
|
201
201
|
"optionalDependencies": {
|
|
202
202
|
"encoding": "^0.1.13"
|
|
203
203
|
},
|
|
204
|
-
"gitHead": "
|
|
204
|
+
"gitHead": "7d33bf5a7b16517545dbbb64cbc5e9ecf45162a7"
|
|
205
205
|
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
NETWORK_TYPE,
|
|
10
10
|
VerificationStatusResultV2,
|
|
11
11
|
} from '@huma-finance/shared'
|
|
12
|
-
import { useAuthErrorHandling } from '@huma-finance/web-shared'
|
|
12
|
+
import { AUTH_ERROR_TYPE, useAuthErrorHandling } from '@huma-finance/web-shared'
|
|
13
13
|
import { Box, css, useTheme } from '@mui/material'
|
|
14
14
|
import Persona, { Client } from 'persona'
|
|
15
15
|
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
@@ -50,8 +50,8 @@ export function PersonaEvaluation({
|
|
|
50
50
|
const isDev = checkIsDev()
|
|
51
51
|
const dispatch = useAppDispatch()
|
|
52
52
|
const {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
authErrorType,
|
|
54
|
+
setAuthError,
|
|
55
55
|
isWalletOwnershipVerified,
|
|
56
56
|
isWalletOwnershipVerificationRequired,
|
|
57
57
|
} = useAuthErrorHandling(isDev, chainType)
|
|
@@ -207,23 +207,23 @@ export function PersonaEvaluation({
|
|
|
207
207
|
}, [checkVerificationStatus, verificationStatus?.status])
|
|
208
208
|
|
|
209
209
|
useEffect(() => {
|
|
210
|
-
if (
|
|
210
|
+
if (authErrorType === AUTH_ERROR_TYPE.NotSignedIn) {
|
|
211
211
|
setLoadingType(undefined)
|
|
212
212
|
setKYCCopy(KYCCopies.signInRequired)
|
|
213
|
-
} else if (
|
|
213
|
+
} else if (authErrorType === AUTH_ERROR_TYPE.UserRejected) {
|
|
214
214
|
dispatch(
|
|
215
215
|
setError({
|
|
216
216
|
errorMessage: 'User has rejected the transaction.',
|
|
217
217
|
}),
|
|
218
218
|
)
|
|
219
|
-
} else if (
|
|
219
|
+
} else if (authErrorType === AUTH_ERROR_TYPE.Other) {
|
|
220
220
|
dispatch(
|
|
221
221
|
setError({
|
|
222
222
|
errorMessage: 'Something went wrong. Please try again later.',
|
|
223
223
|
}),
|
|
224
224
|
)
|
|
225
225
|
}
|
|
226
|
-
}, [KYCCopies.signInRequired, dispatch,
|
|
226
|
+
}, [KYCCopies.signInRequired, dispatch, authErrorType])
|
|
227
227
|
|
|
228
228
|
useEffect(() => {
|
|
229
229
|
const modalElement = document.getElementById('huma-modal')
|
|
@@ -16,11 +16,11 @@ import { useWeb3React } from '@web3-react/core'
|
|
|
16
16
|
import React, { useCallback, useEffect, useMemo, useState } from 'react'
|
|
17
17
|
import { useAppDispatch } from '../../../hooks/useRedux'
|
|
18
18
|
import { setError } from '../../../store/widgets.reducers'
|
|
19
|
+
import { BottomButton } from '../../BottomButton'
|
|
19
20
|
import { HumaSnackBar } from '../../HumaSnackBar'
|
|
21
|
+
import { LoadingModal } from '../../LoadingModal'
|
|
20
22
|
import { WrapperModal } from '../../WrapperModal'
|
|
21
23
|
import { ApproveLenderImg } from '../../images'
|
|
22
|
-
import { BottomButton } from '../../BottomButton'
|
|
23
|
-
import { LoadingModal } from '../../LoadingModal'
|
|
24
24
|
|
|
25
25
|
const LoadingCopiesByType: {
|
|
26
26
|
[key: string]: {
|
|
@@ -49,11 +49,8 @@ export function SecuritizeEvaluation({
|
|
|
49
49
|
const dispatch = useAppDispatch()
|
|
50
50
|
const { account, chainId } = useWeb3React()
|
|
51
51
|
const { kycProvider, code, kycPool } = useParamsSearch()
|
|
52
|
-
const {
|
|
53
|
-
|
|
54
|
-
setError: setAuthError,
|
|
55
|
-
error: authError,
|
|
56
|
-
} = useAuthErrorHandling(isDev)
|
|
52
|
+
const { isWalletOwnershipVerified, setAuthError, authError } =
|
|
53
|
+
useAuthErrorHandling(isDev)
|
|
57
54
|
const [loadingType, setLoadingType] = useState<
|
|
58
55
|
'verificationStatus' | 'sendDocSignatureLink'
|
|
59
56
|
>()
|
|
@@ -86,11 +86,8 @@ export function EvaluationKYC({
|
|
|
86
86
|
const isDev = checkIsDev()
|
|
87
87
|
const { account, chainId } = useWeb3React()
|
|
88
88
|
const { kycProvider, code, kycPool } = useParamsSearch()
|
|
89
|
-
const {
|
|
90
|
-
|
|
91
|
-
setError: setAuthError,
|
|
92
|
-
error: authError,
|
|
93
|
-
} = useAuthErrorHandling(isDev)
|
|
89
|
+
const { isWalletOwnershipVerified, setAuthError, authError } =
|
|
90
|
+
useAuthErrorHandling(isDev)
|
|
94
91
|
const [loadingType, setLoadingType] = useState<
|
|
95
92
|
'verificationStatus' | 'sendDocSignatureLink'
|
|
96
93
|
>()
|
package/src/hooks/useEA.ts
CHANGED