@orderly.network/ui-transfer 2.11.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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
package/dist/index.mjs
CHANGED
|
@@ -1991,7 +1991,7 @@ function useDepositFee(options2) {
|
|
|
1991
1991
|
}
|
|
1992
1992
|
var useMaxDepositAmount = (sourceToken, balance) => {
|
|
1993
1993
|
const maxDepositAmount = useMemo(() => {
|
|
1994
|
-
const balanceDecimal = new Decimal(balance
|
|
1994
|
+
const balanceDecimal = new Decimal(balance).todp(
|
|
1995
1995
|
sourceToken?.precision ?? 2,
|
|
1996
1996
|
Decimal.ROUND_DOWN
|
|
1997
1997
|
);
|
|
@@ -2022,7 +2022,7 @@ var useDepositFormQuantities = ({
|
|
|
2022
2022
|
getIndexPrice
|
|
2023
2023
|
}) => {
|
|
2024
2024
|
const maxQuantity = useMemo(
|
|
2025
|
-
() => new Decimal(balance
|
|
2025
|
+
() => new Decimal(balance).todp(sourceToken?.precision ?? 2, Decimal.ROUND_DOWN).toString(),
|
|
2026
2026
|
[balance, sourceToken?.precision]
|
|
2027
2027
|
);
|
|
2028
2028
|
const maxDepositAmount = useMaxDepositAmount(sourceToken, balance);
|
|
@@ -3774,7 +3774,7 @@ var useDepositFormScript = (options2) => {
|
|
|
3774
3774
|
} = useDepositFormQuantities({
|
|
3775
3775
|
sourceToken,
|
|
3776
3776
|
targetToken,
|
|
3777
|
-
balance,
|
|
3777
|
+
balance: balance || "0",
|
|
3778
3778
|
quantity,
|
|
3779
3779
|
needSwap,
|
|
3780
3780
|
swapQuantity,
|