@huma-finance/widgets 0.0.69-beta.847 → 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/dist/cjs/index.cjs +17 -7
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/components/Lend/components/PersonaEvaluation.tsx +8 -2
- package/src/components/Lend/solanaSupply/1-Evaluation.tsx +3 -0
- package/src/components/Lend/solanaSupply/index.tsx +4 -0
- package/src/components/Lend/stellarSupply/4-Transfer.tsx +1 -1
- package/src/components/Lend/supplyV2/2-Evaluation.tsx +4 -1
- package/src/components/Lend/supplyV2/index.tsx +4 -1
- package/src/components/StellarTxSendModal.tsx +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -246,12 +246,14 @@ interface SolanaEnableAutoRedemptionProps {
|
|
|
246
246
|
* @typedef {Object} SolanaLendSupplyProps
|
|
247
247
|
* @property {SolanaPoolInfo} poolInfo The metadata of the pool.
|
|
248
248
|
* @property {SolanaPoolState} poolState The current state config of the pool.
|
|
249
|
+
* @param {string} documentHash The subscription file hash.
|
|
249
250
|
* @property {function((CloseModalOptions|undefined)):void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
|
|
250
251
|
* @property {function():void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
|
|
251
252
|
*/
|
|
252
253
|
interface SolanaLendSupplyProps {
|
|
253
254
|
poolInfo: SolanaPoolInfo;
|
|
254
255
|
poolState: SolanaPoolState;
|
|
256
|
+
documentHash: string;
|
|
255
257
|
handleClose: (options?: CloseModalOptions) => void;
|
|
256
258
|
handleSuccess?: () => void;
|
|
257
259
|
}
|
|
@@ -316,12 +318,14 @@ interface Campaign {
|
|
|
316
318
|
* @typedef {Object} LendSupplyPropsV2
|
|
317
319
|
* @property {POOL_NAME} poolName The name of the pool.
|
|
318
320
|
* @property {Campaign} campaign The campaign info.
|
|
321
|
+
* @param {string} documentHash The subscription file hash.
|
|
319
322
|
* @property {function((CloseModalOptions|undefined)):void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
|
|
320
323
|
* @property {function((number|undefined)):void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
|
|
321
324
|
*/
|
|
322
325
|
interface LendSupplyPropsV2 {
|
|
323
326
|
poolName: keyof typeof POOL_NAME;
|
|
324
327
|
campaign?: Campaign;
|
|
328
|
+
documentHash: string;
|
|
325
329
|
handleClose: (options?: CloseModalOptions) => void;
|
|
326
330
|
handleSuccess?: (blockNumber?: number) => void;
|
|
327
331
|
}
|
package/dist/index.js
CHANGED
|
@@ -6193,6 +6193,7 @@ function PersonaEvaluation(_ref) {
|
|
|
6193
6193
|
campaign,
|
|
6194
6194
|
networkType,
|
|
6195
6195
|
chainType,
|
|
6196
|
+
documentHash,
|
|
6196
6197
|
handleClose
|
|
6197
6198
|
} = _ref;
|
|
6198
6199
|
const theme = useTheme();
|
|
@@ -6222,7 +6223,7 @@ function PersonaEvaluation(_ref) {
|
|
|
6222
6223
|
try {
|
|
6223
6224
|
isActionOngoingRef.current = true;
|
|
6224
6225
|
setLoadingType('verificationStatus');
|
|
6225
|
-
const verificationStatus = await IdentityServiceV2.getVerificationStatusV2(networkType, isDev);
|
|
6226
|
+
const verificationStatus = await IdentityServiceV2.getVerificationStatusV2(networkType, documentHash, isDev);
|
|
6226
6227
|
setVerificationStatus(verificationStatus);
|
|
6227
6228
|
setInquiryId(verificationStatus.personaInquiryId);
|
|
6228
6229
|
switch (verificationStatus.status) {
|
|
@@ -6307,7 +6308,7 @@ function PersonaEvaluation(_ref) {
|
|
|
6307
6308
|
} finally {
|
|
6308
6309
|
isActionOngoingRef.current = false;
|
|
6309
6310
|
}
|
|
6310
|
-
}, [KYCCopies, dispatch, isDev, networkType, setAuthError]);
|
|
6311
|
+
}, [KYCCopies, dispatch, isDev, networkType, documentHash, setAuthError]);
|
|
6311
6312
|
useEffect(() => {
|
|
6312
6313
|
checkVerificationStatus();
|
|
6313
6314
|
}, [checkVerificationStatus]);
|
|
@@ -6461,6 +6462,7 @@ function Evaluation$3(_ref) {
|
|
|
6461
6462
|
poolInfo,
|
|
6462
6463
|
networkType,
|
|
6463
6464
|
campaign,
|
|
6465
|
+
documentHash,
|
|
6464
6466
|
handleClose
|
|
6465
6467
|
} = _ref;
|
|
6466
6468
|
if ((_poolInfo$KYC = poolInfo.KYC) !== null && _poolInfo$KYC !== void 0 && _poolInfo$KYC.Persona) {
|
|
@@ -6473,7 +6475,8 @@ function Evaluation$3(_ref) {
|
|
|
6473
6475
|
handleClose: handleClose,
|
|
6474
6476
|
networkType: networkType,
|
|
6475
6477
|
chainType: CHAIN_TYPE.SOLANA,
|
|
6476
|
-
campaign: campaign
|
|
6478
|
+
campaign: campaign,
|
|
6479
|
+
documentHash: documentHash
|
|
6477
6480
|
});
|
|
6478
6481
|
}
|
|
6479
6482
|
return null;
|
|
@@ -6893,6 +6896,7 @@ function SolanaLendSupply(_ref) {
|
|
|
6893
6896
|
let {
|
|
6894
6897
|
poolInfo,
|
|
6895
6898
|
poolState,
|
|
6899
|
+
documentHash,
|
|
6896
6900
|
handleClose,
|
|
6897
6901
|
handleSuccess
|
|
6898
6902
|
} = _ref;
|
|
@@ -6953,6 +6957,7 @@ function SolanaLendSupply(_ref) {
|
|
|
6953
6957
|
children: [step === WIDGET_STEP.Evaluation && jsx(Evaluation$3, {
|
|
6954
6958
|
poolInfo: poolInfo,
|
|
6955
6959
|
campaign: poolState.campaign,
|
|
6960
|
+
documentHash: documentHash,
|
|
6956
6961
|
networkType: getSolanaNetworkType(poolInfo.chainId),
|
|
6957
6962
|
handleClose: handleClose
|
|
6958
6963
|
}), step === WIDGET_STEP.ApproveLender && jsx(ApproveLender$1, {
|
|
@@ -7363,6 +7368,7 @@ function StellarTxSendModal(_ref) {
|
|
|
7363
7368
|
handleSuccess();
|
|
7364
7369
|
} catch (error) {
|
|
7365
7370
|
const err = error;
|
|
7371
|
+
console.error(err);
|
|
7366
7372
|
dispatch(setError({
|
|
7367
7373
|
errorMessage: (err === null || err === void 0 ? void 0 : err.message) || ''
|
|
7368
7374
|
}));
|
|
@@ -7405,7 +7411,7 @@ function Transfer$7(_ref) {
|
|
|
7405
7411
|
const trancheVaultClient = new Client({
|
|
7406
7412
|
publicKey: stellarAddress,
|
|
7407
7413
|
contractId: selectedTranche === 'senior' ? poolInfo.seniorTranche : poolInfo.juniorTranche,
|
|
7408
|
-
...getClientCommonParams(chainMetadata)
|
|
7414
|
+
...getClientCommonParams(chainMetadata, stellarAddress)
|
|
7409
7415
|
});
|
|
7410
7416
|
const tx = await trancheVaultClient.deposit({
|
|
7411
7417
|
lender: stellarAddress,
|
|
@@ -8553,8 +8559,9 @@ function Evaluation$1(_ref) {
|
|
|
8553
8559
|
var _poolInfo$KYC, _poolInfo$KYC2;
|
|
8554
8560
|
let {
|
|
8555
8561
|
poolInfo,
|
|
8556
|
-
campaign,
|
|
8557
8562
|
networkType,
|
|
8563
|
+
campaign,
|
|
8564
|
+
documentHash,
|
|
8558
8565
|
handleClose
|
|
8559
8566
|
} = _ref;
|
|
8560
8567
|
if ((_poolInfo$KYC = poolInfo.KYC) !== null && _poolInfo$KYC !== void 0 && _poolInfo$KYC.Securitize) {
|
|
@@ -8569,7 +8576,8 @@ function Evaluation$1(_ref) {
|
|
|
8569
8576
|
handleClose: handleClose,
|
|
8570
8577
|
campaign: campaign,
|
|
8571
8578
|
networkType: networkType,
|
|
8572
|
-
chainType: CHAIN_TYPE.EVM
|
|
8579
|
+
chainType: CHAIN_TYPE.EVM,
|
|
8580
|
+
documentHash: documentHash
|
|
8573
8581
|
});
|
|
8574
8582
|
}
|
|
8575
8583
|
return null;
|
|
@@ -8833,6 +8841,7 @@ function LendSupplyV2(_ref) {
|
|
|
8833
8841
|
let {
|
|
8834
8842
|
poolName: poolNameStr,
|
|
8835
8843
|
campaign,
|
|
8844
|
+
documentHash,
|
|
8836
8845
|
handleClose,
|
|
8837
8846
|
handleSuccess
|
|
8838
8847
|
} = _ref;
|
|
@@ -8912,7 +8921,8 @@ function LendSupplyV2(_ref) {
|
|
|
8912
8921
|
poolInfo: poolInfo,
|
|
8913
8922
|
handleClose: handleClose,
|
|
8914
8923
|
campaign: campaign,
|
|
8915
|
-
networkType: getEvmNetworkType(poolInfo.chainId)
|
|
8924
|
+
networkType: getEvmNetworkType(poolInfo.chainId),
|
|
8925
|
+
documentHash: documentHash
|
|
8916
8926
|
}), step === WIDGET_STEP.ApproveLender && jsx(ApproveLender, {
|
|
8917
8927
|
poolInfo: poolInfo,
|
|
8918
8928
|
isUniTranche: isUniTranche,
|