@huma-finance/widgets 0.0.51-beta.387 → 0.0.51-beta.394

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.
@@ -4662,7 +4662,7 @@ function Done$1(_ref) {
4662
4662
  handleAction
4663
4663
  } = _ref;
4664
4664
  const shares = ethers.ethers.utils.formatUnits(redemptionInfo.shares, poolUnderlyingToken.decimals);
4665
- const content = ["You successfully canceled ".concat(shares, " shares redemption request.")];
4665
+ const content = ["Your request to cancel the redemption of ".concat(shared.formatNumber(shares), " shares has been successfully processed.")];
4666
4666
  return jsxRuntime.jsx(TxDoneModal, {
4667
4667
  handleAction: handleAction,
4668
4668
  content: content
@@ -5137,8 +5137,8 @@ function ChooseAmount$5(_ref) {
5137
5137
  decimals
5138
5138
  } = poolUnderlyingToken;
5139
5139
  const [currentAmount, setCurrentAmount] = React.useState(0);
5140
- const depositAmount = shared.upScale(currentAmount, decimals);
5141
- const needApprove = shared.toBigNumber(depositAmount).gt(allowance);
5140
+ const depositAmount = shared.upScale(ethers.BigNumber.from(currentAmount), decimals);
5141
+ const needApprove = depositAmount.gt(allowance);
5142
5142
  const withdrawlLockoutDays = shared.timeUtil.secondsToDays(withdrawlLockoutSeconds);
5143
5143
  const handleChangeAmount = React.useCallback(newAmount => {
5144
5144
  setCurrentAmount(newAmount);
@@ -5189,7 +5189,7 @@ function Transfer$6(_ref) {
5189
5189
  const {
5190
5190
  decimals
5191
5191
  } = poolInfo.poolUnderlyingToken;
5192
- const supplyBigNumber = shared.toBigNumber(shared.upScale(supplyAmount, decimals));
5192
+ const supplyBigNumber = shared.upScale(ethers.BigNumber.from(supplyAmount), decimals);
5193
5193
  const handleSuccess = React.useCallback(() => {
5194
5194
  dispatch(setStep(WIDGET_STEP.Done));
5195
5195
  }, [dispatch]);
@@ -5855,9 +5855,10 @@ function LendSupplyV2(_ref) {
5855
5855
  }
5856
5856
  if (poolInfo.supplyLink) {
5857
5857
  shared.openInNewTab(poolInfo.supplyLink);
5858
+ handleClose();
5858
5859
  }
5859
5860
  }
5860
- }, [dispatch, lenderApproveStatusFetched, lenderApprovedJunior, lenderApprovedSenior, poolInfo, step]);
5861
+ }, [dispatch, handleClose, lenderApproveStatusFetched, lenderApprovedJunior, lenderApprovedSenior, poolInfo, step]);
5861
5862
  if (!poolInfo || !poolUnderlyingToken || !lenderApproveStatusFetched) {
5862
5863
  return jsxRuntime.jsx(WidgetWrapper, {
5863
5864
  isOpen: true,