@huma-finance/widgets 0.0.69-beta.849 → 0.0.69-beta.852

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.69-beta.849+4131838",
3
+ "version": "0.0.69-beta.852+a236951",
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.69-beta.849+4131838",
33
- "@huma-finance/shared": "^0.0.69-beta.849+4131838",
34
- "@huma-finance/web-shared": "^0.0.69-beta.849+4131838",
32
+ "@huma-finance/sdk": "^0.0.69-beta.852+a236951",
33
+ "@huma-finance/shared": "^0.0.69-beta.852+a236951",
34
+ "@huma-finance/web-shared": "^0.0.69-beta.852+a236951",
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": "413183899f2115fb2ff8979f796d862320b2a01e"
204
+ "gitHead": "a236951daae2037da9ce774c784042af102e6c48"
205
205
  }
@@ -33,6 +33,7 @@ type Props = {
33
33
  }
34
34
  networkType: NETWORK_TYPE
35
35
  chainType: CHAIN_TYPE
36
+ documentHash: string
36
37
  campaign?: Campaign
37
38
  handleClose: (options?: CloseModalOptions) => void
38
39
  }
@@ -42,6 +43,7 @@ export function PersonaEvaluation({
42
43
  campaign,
43
44
  networkType,
44
45
  chainType,
46
+ documentHash,
45
47
  handleClose,
46
48
  }: Props): React.ReactElement | null {
47
49
  const theme = useTheme()
@@ -74,7 +76,11 @@ export function PersonaEvaluation({
74
76
  isActionOngoingRef.current = true
75
77
  setLoadingType('verificationStatus')
76
78
  const verificationStatus =
77
- await IdentityServiceV2.getVerificationStatusV2(networkType, isDev)
79
+ await IdentityServiceV2.getVerificationStatusV2(
80
+ networkType,
81
+ documentHash,
82
+ isDev,
83
+ )
78
84
  setVerificationStatus(verificationStatus)
79
85
  setInquiryId(verificationStatus.personaInquiryId)
80
86
 
@@ -168,7 +174,7 @@ export function PersonaEvaluation({
168
174
  } finally {
169
175
  isActionOngoingRef.current = false
170
176
  }
171
- }, [KYCCopies, dispatch, isDev, networkType, setAuthError])
177
+ }, [KYCCopies, dispatch, isDev, networkType, documentHash, setAuthError])
172
178
 
173
179
  useEffect(() => {
174
180
  checkVerificationStatus()
@@ -8,6 +8,7 @@ type Props = {
8
8
  poolInfo: SolanaPoolInfo
9
9
  networkType: NETWORK_TYPE
10
10
  campaign?: Campaign
11
+ documentHash: string
11
12
  handleClose: () => void
12
13
  }
13
14
 
@@ -15,6 +16,7 @@ export function Evaluation({
15
16
  poolInfo,
16
17
  networkType,
17
18
  campaign,
19
+ documentHash,
18
20
  handleClose,
19
21
  }: Props): React.ReactElement | null {
20
22
  if (poolInfo.KYC?.Persona) {
@@ -29,6 +31,7 @@ export function Evaluation({
29
31
  networkType={networkType}
30
32
  chainType={CHAIN_TYPE.SOLANA}
31
33
  campaign={campaign}
34
+ documentHash={documentHash}
32
35
  />
33
36
  )
34
37
  }
@@ -37,12 +37,14 @@ export interface Campaign {
37
37
  * @typedef {Object} SolanaLendSupplyProps
38
38
  * @property {SolanaPoolInfo} poolInfo The metadata of the pool.
39
39
  * @property {SolanaPoolState} poolState The current state config of the pool.
40
+ * @param {string} documentHash The subscription file hash.
40
41
  * @property {function((CloseModalOptions|undefined)):void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
41
42
  * @property {function():void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
42
43
  */
43
44
  export interface SolanaLendSupplyProps {
44
45
  poolInfo: SolanaPoolInfo
45
46
  poolState: SolanaPoolState
47
+ documentHash: string
46
48
  handleClose: (options?: CloseModalOptions) => void
47
49
  handleSuccess?: () => void
48
50
  }
@@ -50,6 +52,7 @@ export interface SolanaLendSupplyProps {
50
52
  export function SolanaLendSupply({
51
53
  poolInfo,
52
54
  poolState,
55
+ documentHash,
53
56
  handleClose,
54
57
  handleSuccess,
55
58
  }: SolanaLendSupplyProps): React.ReactElement | null {
@@ -127,6 +130,7 @@ export function SolanaLendSupply({
127
130
  <Evaluation
128
131
  poolInfo={poolInfo}
129
132
  campaign={poolState.campaign}
133
+ documentHash={documentHash}
130
134
  networkType={getSolanaNetworkType(poolInfo.chainId)}
131
135
  handleClose={handleClose}
132
136
  />
@@ -14,13 +14,15 @@ type Props = {
14
14
  poolInfo: PoolInfoV2
15
15
  networkType: NETWORK_TYPE
16
16
  campaign?: Campaign
17
+ documentHash: string
17
18
  handleClose: (options?: CloseModalOptions) => void
18
19
  }
19
20
 
20
21
  export function Evaluation({
21
22
  poolInfo,
22
- campaign,
23
23
  networkType,
24
+ campaign,
25
+ documentHash,
24
26
  handleClose,
25
27
  }: Props): React.ReactElement | null {
26
28
  if (poolInfo.KYC?.Securitize) {
@@ -36,6 +38,7 @@ export function Evaluation({
36
38
  campaign={campaign}
37
39
  networkType={networkType}
38
40
  chainType={CHAIN_TYPE.EVM}
41
+ documentHash={documentHash}
39
42
  />
40
43
  )
41
44
  }
@@ -14,7 +14,6 @@ import {
14
14
  import { useWeb3React } from '@web3-react/core'
15
15
  import React, { useEffect, useState } from 'react'
16
16
  import { useDispatch } from 'react-redux'
17
-
18
17
  import { useAppSelector } from '../../../hooks/useRedux'
19
18
  import { setStep } from '../../../store/widgets.reducers'
20
19
  import { selectWidgetState } from '../../../store/widgets.selectors'
@@ -41,12 +40,14 @@ export interface Campaign {
41
40
  * @typedef {Object} LendSupplyPropsV2
42
41
  * @property {POOL_NAME} poolName The name of the pool.
43
42
  * @property {Campaign} campaign The campaign info.
43
+ * @param {string} documentHash The subscription file hash.
44
44
  * @property {function((CloseModalOptions|undefined)):void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
45
45
  * @property {function((number|undefined)):void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
46
46
  */
47
47
  export interface LendSupplyPropsV2 {
48
48
  poolName: keyof typeof POOL_NAME
49
49
  campaign?: Campaign
50
+ documentHash: string
50
51
  handleClose: (options?: CloseModalOptions) => void
51
52
  handleSuccess?: (blockNumber?: number) => void
52
53
  }
@@ -54,6 +55,7 @@ export interface LendSupplyPropsV2 {
54
55
  export function LendSupplyV2({
55
56
  poolName: poolNameStr,
56
57
  campaign,
58
+ documentHash,
57
59
  handleClose,
58
60
  handleSuccess,
59
61
  }: LendSupplyPropsV2): React.ReactElement | null {
@@ -171,6 +173,7 @@ export function LendSupplyV2({
171
173
  handleClose={handleClose}
172
174
  campaign={campaign}
173
175
  networkType={getEvmNetworkType(poolInfo.chainId)}
176
+ documentHash={documentHash}
174
177
  />
175
178
  )}
176
179
  {step === WIDGET_STEP.ApproveLender && (