Skip to content

Commit

Permalink
chore: ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosantangelo committed May 18, 2021
1 parent 12eb143 commit fb8fbd7
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions webapp/src/modules/analytics/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import {
FixRevertedTransactionAction,
ReplaceTransactionSuccessAction
} from 'decentraland-dapps/dist/modules/transaction/actions'
import {
GrantTokenSuccessAction,
GRANT_TOKEN_SUCCESS,
RevokeTokenSuccessAction,
REVOKE_TOKEN_SUCCESS
} from 'decentraland-dapps/dist/modules/authorization/actions'
import { TransactionStatus } from 'decentraland-dapps/dist/modules/transaction/types'
import { add } from 'decentraland-dapps/dist/modules/analytics/utils'
import { PayloadAction } from 'typesafe-actions'
Expand Down Expand Up @@ -39,12 +45,6 @@ import {
ArchiveBidAction,
UnarchiveBidAction
} from '../bid/actions'
import {
GrantTokenSuccessAction,
GRANT_TOKEN_SUCCESS,
RevokeTokenSuccessAction,
REVOKE_TOKEN_SUCCESS
} from 'decentraland-dapps/dist/modules/authorization/actions'

function track<T extends PayloadAction<string, any>>(
actionType: string,
Expand Down Expand Up @@ -117,13 +117,9 @@ track<ReplaceTransactionSuccessAction>(
'Transaction Replaced'
)

track<GrantTokenSuccessAction>(GRANT_TOKEN_SUCCESS, () => {
return `Authorize`
})
track<GrantTokenSuccessAction>(GRANT_TOKEN_SUCCESS, () => 'Authorize')

track<RevokeTokenSuccessAction>(REVOKE_TOKEN_SUCCESS, () => {
return `Unauthorize`
})
track<RevokeTokenSuccessAction>(REVOKE_TOKEN_SUCCESS, () => 'Unauthorize')

track<PlaceBidSuccessAction>(
PLACE_BID_SUCCESS,
Expand Down

0 comments on commit fb8fbd7

Please sign in to comment.