diff --git a/.changeset/giant-geckos-glow.md b/.changeset/giant-geckos-glow.md new file mode 100644 index 00000000..c86704a2 --- /dev/null +++ b/.changeset/giant-geckos-glow.md @@ -0,0 +1,5 @@ +--- +"@stakekit/widget": patch +--- + +feat: delay response instead of request diff --git a/packages/widget/src/common/delay-api-requests.ts b/packages/widget/src/common/delay-api-requests.ts index 6ff2e0cd..df2c5ece 100644 --- a/packages/widget/src/common/delay-api-requests.ts +++ b/packages/widget/src/common/delay-api-requests.ts @@ -27,10 +27,10 @@ const checkDelay = () => { }; export const attachDelayInterceptor = (apiClient: AxiosInstance) => - apiClient.interceptors.request.use(async (config) => { + apiClient.interceptors.response.use(async (response) => { await checkDelay(); - return config; + return response; }); /**