@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.
package/dist/index.js CHANGED
@@ -3436,8 +3436,8 @@ function ChooseAmount$5(_ref) {
3436
3436
  }));
3437
3437
  }, [dispatch]);
3438
3438
  var handleAction = useCallback(function () {
3439
- var payAmount = upScale(currentAmount, decimals);
3440
- var step = toBigNumber(payAmount).gt(allowance) ? WIDGET_STEP.ApproveAllowance : WIDGET_STEP.Transfer;
3439
+ var payAmount = upScale(toBigNumber(currentAmount), decimals);
3440
+ var step = payAmount.gt(allowance) ? WIDGET_STEP.ApproveAllowance : WIDGET_STEP.Transfer;
3441
3441
  dispatch(setStep(step));
3442
3442
  }, [allowance, currentAmount, decimals, dispatch]);
3443
3443
  return jsx(ChooseAmountModal, {
@@ -3474,7 +3474,7 @@ function Transfer$5(_ref) {
3474
3474
  var _useAppSelector = useAppSelector(selectWidgetState),
3475
3475
  paymentAmount = _useAppSelector.paymentAmount;
3476
3476
  var decimals = poolInfo.poolUnderlyingToken.decimals;
3477
- var paymentBigNumber = toBigNumber(upScale(paymentAmount, decimals));
3477
+ var paymentBigNumber = upScale(toBigNumber(paymentAmount), decimals);
3478
3478
  var handleSuccess = useCallback(function () {
3479
3479
  dispatch(setStep(WIDGET_STEP.Done));
3480
3480
  }, [dispatch]);
@@ -4902,7 +4902,7 @@ function LendWithdraw(_ref) {
4902
4902
  children: [(!step || step === WIDGET_STEP.CheckWithdrawable) && jsx(CheckWithdrawable, {
4903
4903
  poolInfo: poolInfo,
4904
4904
  handleClose: handleClose
4905
- }), step === WIDGET_STEP.ChooseAmount && jsx(ChooseAmount$1, {
4905
+ }), step === WIDGET_STEP.ChooseAmount && lenderPosition && poolBalance && jsx(ChooseAmount$1, {
4906
4906
  poolInfo: poolInfo,
4907
4907
  lenderPosition: lenderPosition,
4908
4908
  poolBalance: poolBalance