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

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]);