@huma-finance/widgets 0.0.62-beta.703 → 0.0.62-beta.706
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
CHANGED
|
@@ -5641,23 +5641,28 @@ function PersonaEvaluation(_ref) {
|
|
|
5641
5641
|
createNewWallet();
|
|
5642
5642
|
}, [account, campaign, isDev, isWalletOwnershipVerified, pointsTestnetExperience]);
|
|
5643
5643
|
const approveLender = React.useCallback(async () => {
|
|
5644
|
+
isActionOngoingRef.current = true;
|
|
5645
|
+
setLoadingType('approveLender');
|
|
5644
5646
|
try {
|
|
5645
|
-
isActionOngoingRef.current = true;
|
|
5646
|
-
setLoadingType('approveLender');
|
|
5647
5647
|
await shared.IdentityServiceV2.approveLender(account, chainId, poolInfo.juniorTrancheVault, isDev, chainSpecificData);
|
|
5648
|
-
|
|
5648
|
+
} catch (e) {
|
|
5649
|
+
console.error(e);
|
|
5650
|
+
}
|
|
5651
|
+
if (!isUniTranche) {
|
|
5652
|
+
try {
|
|
5649
5653
|
await shared.IdentityServiceV2.approveLender(account, chainId, poolInfo.seniorTrancheVault, isDev, chainSpecificData);
|
|
5654
|
+
} catch (e) {
|
|
5655
|
+
console.error(e);
|
|
5650
5656
|
}
|
|
5651
|
-
if (isUniTranche) {
|
|
5652
|
-
changeTranche('junior');
|
|
5653
|
-
dispatch(setStep(WIDGET_STEP.ChooseAmount));
|
|
5654
|
-
} else {
|
|
5655
|
-
dispatch(setStep(WIDGET_STEP.ChooseTranche));
|
|
5656
|
-
}
|
|
5657
|
-
} finally {
|
|
5658
|
-
isActionOngoingRef.current = false;
|
|
5659
|
-
setLoadingType(undefined);
|
|
5660
5657
|
}
|
|
5658
|
+
if (isUniTranche) {
|
|
5659
|
+
changeTranche('junior');
|
|
5660
|
+
dispatch(setStep(WIDGET_STEP.ChooseAmount));
|
|
5661
|
+
} else {
|
|
5662
|
+
dispatch(setStep(WIDGET_STEP.ChooseTranche));
|
|
5663
|
+
}
|
|
5664
|
+
isActionOngoingRef.current = false;
|
|
5665
|
+
setLoadingType(undefined);
|
|
5661
5666
|
}, [account, chainId, chainSpecificData, changeTranche, dispatch, isDev, isUniTranche, poolInfo.juniorTrancheVault, poolInfo.seniorTrancheVault]);
|
|
5662
5667
|
const checkVerificationStatus = React.useCallback(async () => {
|
|
5663
5668
|
if (isActionOngoingRef.current || isKYCResumedRef.current) {
|
|
@@ -8652,7 +8657,7 @@ function ChooseAmount$3(_ref) {
|
|
|
8652
8657
|
let seniorAvailableCapBN = maxSeniorAssetsBN.sub(seniorTrancheAssetsBN);
|
|
8653
8658
|
seniorAvailableCapBN = seniorAvailableCapBN.gt(totalAvailableCapBN) ? totalAvailableCapBN : seniorAvailableCapBN;
|
|
8654
8659
|
return {
|
|
8655
|
-
juniorAvailableCapBN: totalAvailableCapBN
|
|
8660
|
+
juniorAvailableCapBN: totalAvailableCapBN,
|
|
8656
8661
|
seniorAvailableCapBN
|
|
8657
8662
|
};
|
|
8658
8663
|
}, [poolState]);
|