Skip to content

Commit

Permalink
chore: add method & url to swapper mixpanel events (#4977)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xApotheosis authored and 0xdef1cafe committed Jul 31, 2023
1 parent e317af7 commit a1bf2d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/swapper/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const makeSwapperAxiosServiceMonadic = (service: AxiosInstance, swapperNa
get: (trappedAxios, method: 'get' | 'post') => {
const originalMethodPromise = trappedAxios[method]
return async (...args: [url: string, dataOrConfig?: any, dataOrConfig?: any]) => {
getMixPanel()?.track('Swapper API request', { swapper: swapperName })
getMixPanel()?.track('Swapper API request', { swapper: swapperName, url: args[0], method })
const result = await AsyncResultOf(originalMethodPromise(...args))

return result
Expand Down

0 comments on commit a1bf2d9

Please sign in to comment.