@rango-dev/widget-embedded 0.49.1-next.2 → 0.49.1-next.3
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
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
throwErrorIfResponseIsNotValid,
|
|
23
23
|
} from './useConfirmSwap/useConfirmSwap.helpers';
|
|
24
24
|
import { useFetchAllQuotes } from './useFetchAllQuotes';
|
|
25
|
+
import { useSwapMode } from './useSwapMode';
|
|
25
26
|
|
|
26
27
|
const DEBOUNCE_DELAY = 600;
|
|
27
28
|
|
|
@@ -78,6 +79,7 @@ export function useSwapInput({
|
|
|
78
79
|
const disabledLiquiditySources = useAppStore().getDisabledLiquiditySources();
|
|
79
80
|
const excludeLiquiditySources = useAppStore().excludeLiquiditySources();
|
|
80
81
|
const { findToken } = useAppStore();
|
|
82
|
+
const { swapMode } = useSwapMode();
|
|
81
83
|
|
|
82
84
|
const [loading, setLoading] = useState(true);
|
|
83
85
|
const prevInputAmount = useRef(inputAmount);
|
|
@@ -141,6 +143,10 @@ export function useSwapInput({
|
|
|
141
143
|
requestBody.maxLength = routing.maxLength;
|
|
142
144
|
}
|
|
143
145
|
|
|
146
|
+
if (swapMode === 'refuel') {
|
|
147
|
+
requestBody.maxLength = 1;
|
|
148
|
+
}
|
|
149
|
+
|
|
144
150
|
fetchQuote(requestBody)
|
|
145
151
|
.then((res) => {
|
|
146
152
|
const sortQuotes = sortQuotesBy(sortStrategy, res.results);
|