@orderly.network/ui-transfer 2.11.0-alpha.0 → 2.11.1-alpha.0

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
@@ -1993,7 +1993,7 @@ function useDepositFee(options2) {
1993
1993
  }
1994
1994
  var useMaxDepositAmount = (sourceToken, balance) => {
1995
1995
  const maxDepositAmount = react.useMemo(() => {
1996
- const balanceDecimal = new utils.Decimal(balance || 0).todp(
1996
+ const balanceDecimal = new utils.Decimal(balance).todp(
1997
1997
  sourceToken?.precision ?? 2,
1998
1998
  utils.Decimal.ROUND_DOWN
1999
1999
  );
@@ -2024,7 +2024,7 @@ var useDepositFormQuantities = ({
2024
2024
  getIndexPrice
2025
2025
  }) => {
2026
2026
  const maxQuantity = react.useMemo(
2027
- () => new utils.Decimal(balance || 0).todp(sourceToken?.precision ?? 2, utils.Decimal.ROUND_DOWN).toString(),
2027
+ () => new utils.Decimal(balance).todp(sourceToken?.precision ?? 2, utils.Decimal.ROUND_DOWN).toString(),
2028
2028
  [balance, sourceToken?.precision]
2029
2029
  );
2030
2030
  const maxDepositAmount = useMaxDepositAmount(sourceToken, balance);
@@ -3776,7 +3776,7 @@ var useDepositFormScript = (options2) => {
3776
3776
  } = useDepositFormQuantities({
3777
3777
  sourceToken,
3778
3778
  targetToken,
3779
- balance,
3779
+ balance: balance || "0",
3780
3780
  quantity,
3781
3781
  needSwap,
3782
3782
  swapQuantity,