@huma-finance/widgets 0.0.44 → 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.
@@ -2845,7 +2845,7 @@ function ChooseAmount$6(_ref) {
2845
2845
  var nextStep = approved ? WIDGET_STEP.Transfer : WIDGET_STEP.ApproveAllowance;
2846
2846
  dispatch(setBorrowInfo({
2847
2847
  borrowAmount: currentAmount,
2848
- borrowAmountBN: ethers.BigNumber.from(currentAmount).mul(ethers.BigNumber.from(10).pow(decimals)).toJSON(),
2848
+ borrowAmountBN: ethers.ethers.utils.parseUnits(currentAmount.toString(), decimals).toJSON(),
2849
2849
  chargedFees: chargedFees,
2850
2850
  nextStep: nextStep
2851
2851
  }));
@@ -3671,7 +3671,7 @@ function ChooseAmount$4(_ref) {
3671
3671
  var handleAction = React.useCallback(function () {
3672
3672
  dispatch(setBorrowInfo({
3673
3673
  borrowAmount: currentAmount,
3674
- borrowAmountBN: ethers.BigNumber.from(currentAmount).mul(ethers.BigNumber.from(10).pow(ethers.BigNumber.from(approval === null || approval === void 0 ? void 0 : approval.token.decimal))).toJSON(),
3674
+ borrowAmountBN: ethers.ethers.utils.parseUnits(currentAmount.toString(), approval === null || approval === void 0 ? void 0 : approval.token.decimal).toJSON(),
3675
3675
  chargedFees: chargedFees,
3676
3676
  remainder: Number(remainder),
3677
3677
  nextStep: WIDGET_STEP.ConfirmTransfer