@huma-finance/widgets 0.0.44-beta.158 → 0.0.45-beta.163

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
@@ -2806,7 +2806,7 @@ function ChooseAmount$6(_ref) {
2806
2806
  var nextStep = approved ? WIDGET_STEP.Transfer : WIDGET_STEP.ApproveAllowance;
2807
2807
  dispatch(setBorrowInfo({
2808
2808
  borrowAmount: currentAmount,
2809
- borrowAmountBN: BigNumber.from(currentAmount).mul(BigNumber.from(10).pow(decimals)).toJSON(),
2809
+ borrowAmountBN: ethers.utils.parseUnits(currentAmount.toString(), decimals).toJSON(),
2810
2810
  chargedFees: chargedFees,
2811
2811
  nextStep: nextStep
2812
2812
  }));
@@ -3632,7 +3632,7 @@ function ChooseAmount$4(_ref) {
3632
3632
  var handleAction = useCallback(function () {
3633
3633
  dispatch(setBorrowInfo({
3634
3634
  borrowAmount: currentAmount,
3635
- borrowAmountBN: BigNumber.from(currentAmount).mul(BigNumber.from(10).pow(BigNumber.from(approval === null || approval === void 0 ? void 0 : approval.token.decimal))).toJSON(),
3635
+ borrowAmountBN: ethers.utils.parseUnits(currentAmount.toString(), approval === null || approval === void 0 ? void 0 : approval.token.decimal).toJSON(),
3636
3636
  chargedFees: chargedFees,
3637
3637
  remainder: Number(remainder),
3638
3638
  nextStep: WIDGET_STEP.ConfirmTransfer