type UseGetSwapPriceReturnType = {
data: | GetSwapPriceResult
| SwapUnavailableResult
| undefined;
status: Status;
error: Error | undefined;
refetch: () => void;
reset: () => void;
};
useGetSwapPrice hook.
Properties
| Property | Type | Description |
|---|---|---|
data | | GetSwapPriceResult | SwapUnavailableResult | undefined | The most recent result from getSwapPrice. Cleared when the token pair, network, account, or userId changes. Preserved as stale data during re-fetches triggered by amount or slippage changes. |
status | Status | The status of the getSwapPrice function. |
error | Error | undefined | The error returned from the getSwapPrice function. |
refetch | () => void | A function to refetch the swap price. |
reset | () => void | A function to reset the state of the hook. |