@huma-finance/widgets 0.0.51-beta.385 → 0.0.51-beta.393

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
@@ -4623,7 +4623,7 @@ function Done$1(_ref) {
4623
4623
  handleAction
4624
4624
  } = _ref;
4625
4625
  const shares = ethers.utils.formatUnits(redemptionInfo.shares, poolUnderlyingToken.decimals);
4626
- const content = ["Your request to cancel the redemption of ".concat(formatNumber(shares), " shares has been successfully processed.")];
4626
+ const content = ["You successfully canceled ".concat(shares, " shares redemption request.")];
4627
4627
  return jsx(TxDoneModal, {
4628
4628
  handleAction: handleAction,
4629
4629
  content: content
@@ -5098,8 +5098,8 @@ function ChooseAmount$5(_ref) {
5098
5098
  decimals
5099
5099
  } = poolUnderlyingToken;
5100
5100
  const [currentAmount, setCurrentAmount] = useState(0);
5101
- const depositAmount = upScale(currentAmount, decimals);
5102
- const needApprove = toBigNumber(depositAmount).gt(allowance);
5101
+ const depositAmount = upScale(BigNumber.from(currentAmount), decimals);
5102
+ const needApprove = depositAmount.gt(allowance);
5103
5103
  const withdrawlLockoutDays = timeUtil.secondsToDays(withdrawlLockoutSeconds);
5104
5104
  const handleChangeAmount = useCallback(newAmount => {
5105
5105
  setCurrentAmount(newAmount);
@@ -5150,7 +5150,7 @@ function Transfer$6(_ref) {
5150
5150
  const {
5151
5151
  decimals
5152
5152
  } = poolInfo.poolUnderlyingToken;
5153
- const supplyBigNumber = toBigNumber(upScale(supplyAmount, decimals));
5153
+ const supplyBigNumber = upScale(BigNumber.from(supplyAmount), decimals);
5154
5154
  const handleSuccess = useCallback(() => {
5155
5155
  dispatch(setStep(WIDGET_STEP.Done));
5156
5156
  }, [dispatch]);
@@ -5816,10 +5816,9 @@ function LendSupplyV2(_ref) {
5816
5816
  }
5817
5817
  if (poolInfo.supplyLink) {
5818
5818
  openInNewTab(poolInfo.supplyLink);
5819
- handleClose();
5820
5819
  }
5821
5820
  }
5822
- }, [dispatch, handleClose, lenderApproveStatusFetched, lenderApprovedJunior, lenderApprovedSenior, poolInfo, step]);
5821
+ }, [dispatch, lenderApproveStatusFetched, lenderApprovedJunior, lenderApprovedSenior, poolInfo, step]);
5823
5822
  if (!poolInfo || !poolUnderlyingToken || !lenderApproveStatusFetched) {
5824
5823
  return jsx(WidgetWrapper, {
5825
5824
  isOpen: true,