parent
9b9d6aff78
commit
bdce7ce32c
@ -46,12 +46,6 @@ export enum CUSTOM_USER_PROPERTY_SUFFIXES {
|
||||
WALLET_TOKEN_AMOUNT_SUFFIX = '_token_amount',
|
||||
}
|
||||
|
||||
export enum CUSTOM_USER_PROPERTY_PREFIXES {
|
||||
WALLET_CHAIN_IDS_PREFIX = 'wallet_chain_ids_',
|
||||
WALLET_FIRST_SEEN_DATE_PREFIX = 'first_seen_date_',
|
||||
WALLET_LAST_SEEN_DATE_PREFIX = 'last_seen_date_',
|
||||
}
|
||||
|
||||
export enum BROWSER {
|
||||
FIREFOX = 'Mozilla Firefox',
|
||||
SAMSUNG = 'Samsung Internet',
|
||||
|
@ -5,7 +5,6 @@ import { Connector } from '@web3-react/types'
|
||||
import { sendAnalyticsEvent, user } from 'components/AmplitudeAnalytics'
|
||||
import {
|
||||
CUSTOM_USER_PROPERTIES,
|
||||
CUSTOM_USER_PROPERTY_PREFIXES,
|
||||
CUSTOM_USER_PROPERTY_SUFFIXES,
|
||||
EventName,
|
||||
WALLET_CONNECTION_RESULT,
|
||||
@ -163,16 +162,12 @@ const sendAnalyticsEventAndUserInfo = (
|
||||
wallet_type: walletType,
|
||||
is_reconnect: isReconnect,
|
||||
})
|
||||
const currentDate = new Date().toISOString()
|
||||
user.set(CUSTOM_USER_PROPERTIES.WALLET_ADDRESS, account)
|
||||
user.set(CUSTOM_USER_PROPERTIES.WALLET_TYPE, walletType)
|
||||
if (chainId) {
|
||||
user.postInsert(CUSTOM_USER_PROPERTIES.ALL_WALLET_CHAIN_IDS, chainId)
|
||||
user.postInsert(`${CUSTOM_USER_PROPERTY_PREFIXES.WALLET_CHAIN_IDS_PREFIX}${account}`, chainId)
|
||||
}
|
||||
user.postInsert(CUSTOM_USER_PROPERTIES.ALL_WALLET_ADDRESSES_CONNECTED, account)
|
||||
user.setOnce(`${CUSTOM_USER_PROPERTY_PREFIXES.WALLET_FIRST_SEEN_DATE_PREFIX}${account}`, currentDate)
|
||||
user.set(`${CUSTOM_USER_PROPERTY_PREFIXES.WALLET_LAST_SEEN_DATE_PREFIX}${account}`, currentDate)
|
||||
}
|
||||
|
||||
export default function WalletModal({
|
||||
|
Loading…
Reference in New Issue
Block a user