@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.
package/dist/index.js CHANGED
@@ -5624,23 +5624,28 @@ function PersonaEvaluation(_ref) {
5624
5624
  createNewWallet();
5625
5625
  }, [account, campaign, isDev, isWalletOwnershipVerified, pointsTestnetExperience]);
5626
5626
  const approveLender = useCallback(async () => {
5627
+ isActionOngoingRef.current = true;
5628
+ setLoadingType('approveLender');
5627
5629
  try {
5628
- isActionOngoingRef.current = true;
5629
- setLoadingType('approveLender');
5630
5630
  await IdentityServiceV2.approveLender(account, chainId, poolInfo.juniorTrancheVault, isDev, chainSpecificData);
5631
- if (!isUniTranche) {
5631
+ } catch (e) {
5632
+ console.error(e);
5633
+ }
5634
+ if (!isUniTranche) {
5635
+ try {
5632
5636
  await IdentityServiceV2.approveLender(account, chainId, poolInfo.seniorTrancheVault, isDev, chainSpecificData);
5637
+ } catch (e) {
5638
+ console.error(e);
5633
5639
  }
5634
- if (isUniTranche) {
5635
- changeTranche('junior');
5636
- dispatch(setStep(WIDGET_STEP.ChooseAmount));
5637
- } else {
5638
- dispatch(setStep(WIDGET_STEP.ChooseTranche));
5639
- }
5640
- } finally {
5641
- isActionOngoingRef.current = false;
5642
- setLoadingType(undefined);
5643
5640
  }
5641
+ if (isUniTranche) {
5642
+ changeTranche('junior');
5643
+ dispatch(setStep(WIDGET_STEP.ChooseAmount));
5644
+ } else {
5645
+ dispatch(setStep(WIDGET_STEP.ChooseTranche));
5646
+ }
5647
+ isActionOngoingRef.current = false;
5648
+ setLoadingType(undefined);
5644
5649
  }, [account, chainId, chainSpecificData, changeTranche, dispatch, isDev, isUniTranche, poolInfo.juniorTrancheVault, poolInfo.seniorTrancheVault]);
5645
5650
  const checkVerificationStatus = useCallback(async () => {
5646
5651
  if (isActionOngoingRef.current || isKYCResumedRef.current) {