@huma-finance/widgets 0.0.51-beta.225 → 0.0.51-beta.229

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.
@@ -3475,8 +3475,8 @@ function ChooseAmount$5(_ref) {
3475
3475
  }));
3476
3476
  }, [dispatch]);
3477
3477
  var handleAction = React.useCallback(function () {
3478
- var payAmount = shared.upScale(currentAmount, decimals);
3479
- var step = shared.toBigNumber(payAmount).gt(allowance) ? WIDGET_STEP.ApproveAllowance : WIDGET_STEP.Transfer;
3478
+ var payAmount = shared.upScale(shared.toBigNumber(currentAmount), decimals);
3479
+ var step = payAmount.gt(allowance) ? WIDGET_STEP.ApproveAllowance : WIDGET_STEP.Transfer;
3480
3480
  dispatch(setStep(step));
3481
3481
  }, [allowance, currentAmount, decimals, dispatch]);
3482
3482
  return jsxRuntime.jsx(ChooseAmountModal, {
@@ -3513,7 +3513,7 @@ function Transfer$5(_ref) {
3513
3513
  var _useAppSelector = useAppSelector(selectWidgetState),
3514
3514
  paymentAmount = _useAppSelector.paymentAmount;
3515
3515
  var decimals = poolInfo.poolUnderlyingToken.decimals;
3516
- var paymentBigNumber = shared.toBigNumber(shared.upScale(paymentAmount, decimals));
3516
+ var paymentBigNumber = shared.upScale(shared.toBigNumber(paymentAmount), decimals);
3517
3517
  var handleSuccess = React.useCallback(function () {
3518
3518
  dispatch(setStep(WIDGET_STEP.Done));
3519
3519
  }, [dispatch]);
@@ -4941,7 +4941,7 @@ function LendWithdraw(_ref) {
4941
4941
  children: [(!step || step === WIDGET_STEP.CheckWithdrawable) && jsxRuntime.jsx(CheckWithdrawable, {
4942
4942
  poolInfo: poolInfo,
4943
4943
  handleClose: handleClose
4944
- }), step === WIDGET_STEP.ChooseAmount && jsxRuntime.jsx(ChooseAmount$1, {
4944
+ }), step === WIDGET_STEP.ChooseAmount && lenderPosition && poolBalance && jsxRuntime.jsx(ChooseAmount$1, {
4945
4945
  poolInfo: poolInfo,
4946
4946
  lenderPosition: lenderPosition,
4947
4947
  poolBalance: poolBalance