@shipengine/alchemy 5.1.2 → 5.1.4

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.
Files changed (3) hide show
  1. package/index.js +2 -1
  2. package/index.mjs +2 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -16889,6 +16889,7 @@ const ShipEngine = ({
16889
16889
  getToken,
16890
16890
  onApiError
16891
16891
  }) => {
16892
+ const [queryClient] = React.useState(() => new reactQuery.QueryClient());
16892
16893
  const [client, setClient] = React.useState(() => {
16893
16894
  const token = getToken();
16894
16895
  if (typeof token === "string")
@@ -16910,7 +16911,6 @@ const ShipEngine = ({
16910
16911
  );
16911
16912
  return void 0;
16912
16913
  });
16913
- const queryClient = new reactQuery.QueryClient();
16914
16914
  if (!client) {
16915
16915
  return /* @__PURE__ */ jsxRuntime.jsx(
16916
16916
  "div",
@@ -17684,6 +17684,7 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
17684
17684
  return reactQuery.useQuery({
17685
17685
  enabled: !!fundingSourceId,
17686
17686
  keepPreviousData: true,
17687
+ onError,
17687
17688
  queryFn: () => client.fundingSources.transactions(fundingSourceId, params),
17688
17689
  queryKey: ["useGetFundingSourceTransactions", fundingSourceId, params],
17689
17690
  select: (result) => result.data
package/index.mjs CHANGED
@@ -16867,6 +16867,7 @@ const ShipEngine = ({
16867
16867
  getToken,
16868
16868
  onApiError
16869
16869
  }) => {
16870
+ const [queryClient] = useState(() => new QueryClient());
16870
16871
  const [client, setClient] = useState(() => {
16871
16872
  const token = getToken();
16872
16873
  if (typeof token === "string")
@@ -16888,7 +16889,6 @@ const ShipEngine = ({
16888
16889
  );
16889
16890
  return void 0;
16890
16891
  });
16891
- const queryClient = new QueryClient();
16892
16892
  if (!client) {
16893
16893
  return /* @__PURE__ */ jsx$1(
16894
16894
  "div",
@@ -17662,6 +17662,7 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
17662
17662
  return useQuery({
17663
17663
  enabled: !!fundingSourceId,
17664
17664
  keepPreviousData: true,
17665
+ onError,
17665
17666
  queryFn: () => client.fundingSources.transactions(fundingSourceId, params),
17666
17667
  queryKey: ["useGetFundingSourceTransactions", fundingSourceId, params],
17667
17668
  select: (result) => result.data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/alchemy",
3
- "version": "5.1.2",
3
+ "version": "5.1.4",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {