Commit bdce7ce3 authored by lynn's avatar lynn Committed by GitHub

feat: remove unnecessary user properties (#4308)

init
parent 9b9d6aff
......@@ -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({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment