@liberfi.io/react-predict 0.1.9 → 0.1.10

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.mjs CHANGED
@@ -1092,13 +1092,13 @@ function dflowQuoteQueryKey(params) {
1092
1092
  }
1093
1093
  function useDFlowQuote(params, queryOptions = {}) {
1094
1094
  const client = usePredictClient();
1095
- const enabled = Boolean(params.inputMint) && Boolean(params.outputMint) && Boolean(params.userPublicKey) && params.amount !== "0" && params.amount !== "";
1095
+ const paramsValid = Boolean(params.inputMint) && Boolean(params.outputMint) && Boolean(params.userPublicKey) && params.amount !== "0" && params.amount !== "";
1096
1096
  return useQuery({
1097
1097
  queryKey: dflowQuoteQueryKey(params),
1098
1098
  queryFn: () => client.createDFlowQuote(params),
1099
- enabled,
1100
1099
  staleTime: 1e4,
1101
- ...queryOptions
1100
+ ...queryOptions,
1101
+ enabled: paramsValid && (queryOptions.enabled ?? true)
1102
1102
  });
1103
1103
  }
1104
1104
  function useDFlowSubmit(mutationOptions = {}) {