@multiversx/sdk-dapp-liquidity 1.1.0-alpha.47 → 1.1.0-alpha.48
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/package.json
CHANGED
|
@@ -261,7 +261,7 @@ const BridgeForm = ({
|
|
|
261
261
|
const hasAmounts = firstAmount !== "" && secondAmount !== "";
|
|
262
262
|
const fetchRateDebounced = React.useCallback(
|
|
263
263
|
debounce(async (amount) => {
|
|
264
|
-
if (!amount || !account.address || !(firstToken == null ? void 0 : firstToken.address) || !(secondToken == null ? void 0 : secondToken.address) || !selectedChainOption || !chainId) {
|
|
264
|
+
if (!amount || !Number(amount) || !account.address || !(firstToken == null ? void 0 : firstToken.address) || !(secondToken == null ? void 0 : secondToken.address) || !selectedChainOption || !chainId) {
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
267
|
getRate({
|
|
@@ -258,7 +258,7 @@ const BridgeForm = ({
|
|
|
258
258
|
const hasAmounts = firstAmount !== "" && secondAmount !== "";
|
|
259
259
|
const fetchRateDebounced = useCallback(
|
|
260
260
|
debounce(async (amount) => {
|
|
261
|
-
if (!amount || !account.address || !(firstToken == null ? void 0 : firstToken.address) || !(secondToken == null ? void 0 : secondToken.address) || !selectedChainOption || !chainId) {
|
|
261
|
+
if (!amount || !Number(amount) || !account.address || !(firstToken == null ? void 0 : firstToken.address) || !(secondToken == null ? void 0 : secondToken.address) || !selectedChainOption || !chainId) {
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
264
|
getRate({
|
|
@@ -69,7 +69,7 @@ const useFetchTokens = ({
|
|
|
69
69
|
const evmTokensWithBalances = React.useMemo(() => {
|
|
70
70
|
return evmTokens == null ? void 0 : evmTokens.map((token) => {
|
|
71
71
|
const foundToken = evmTokensBalances == null ? void 0 : evmTokensBalances.find(
|
|
72
|
-
(evmToken) => evmToken.address === token.address
|
|
72
|
+
(evmToken) => evmToken.address === token.address && evmToken.chainId === token.chainId
|
|
73
73
|
);
|
|
74
74
|
if (!foundToken) {
|
|
75
75
|
return {
|
|
@@ -66,7 +66,7 @@ const useFetchTokens = ({
|
|
|
66
66
|
const evmTokensWithBalances = useMemo(() => {
|
|
67
67
|
return evmTokens == null ? void 0 : evmTokens.map((token) => {
|
|
68
68
|
const foundToken = evmTokensBalances == null ? void 0 : evmTokensBalances.find(
|
|
69
|
-
(evmToken) => evmToken.address === token.address
|
|
69
|
+
(evmToken) => evmToken.address === token.address && evmToken.chainId === token.chainId
|
|
70
70
|
);
|
|
71
71
|
if (!foundToken) {
|
|
72
72
|
return {
|