@huma-finance/widgets 0.0.62-beta.705 → 0.0.62-beta.710

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.
@@ -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
- if (!isUniTranche) {
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) {