add ga event when connectin wallet & disable squarelink (#449)
* add ga event when connectin wallet * disable squarelink
This commit is contained in:
parent
f64ebf99a1
commit
aa063aa92a
|
@ -74,7 +74,6 @@
|
|||
"redux-thunk": "^2.3.0",
|
||||
"reselect": "^4.0.0",
|
||||
"semver": "^7.1.1",
|
||||
"squarelink": "^1.1.4",
|
||||
"web3": "1.2.4",
|
||||
"web3connect": "^1.0.0-beta.25"
|
||||
},
|
||||
|
|
|
@ -5,7 +5,6 @@ import Torus from '@toruslabs/torus-embed'
|
|||
import WalletConnectProvider from '@walletconnect/web3-provider'
|
||||
import Fortmatic from 'fortmatic'
|
||||
import Portis from '@portis/web3'
|
||||
import Squarelink from 'squarelink'
|
||||
import Button from '~/components/layout/Button'
|
||||
import { fetchProvider, removeProvider } from '~/logic/wallets/store/actions'
|
||||
import { getNetwork } from '~/config'
|
||||
|
@ -14,7 +13,7 @@ import { store } from '~/store'
|
|||
const isMainnet = process.env.REACT_APP_NETWORK === 'mainnet'
|
||||
|
||||
const PORTIS_DAPP_ID = isMainnet ? process.env.REACT_APP_PORTIS_ID : '852b763d-f28b-4463-80cb-846d7ec5806b'
|
||||
const SQUARELINK_CLIENT_ID = isMainnet ? process.env.REACT_APP_SQUARELINK_ID : '46ce08fe50913cfa1b78'
|
||||
// const SQUARELINK_CLIENT_ID = isMainnet ? process.env.REACT_APP_SQUARELINK_ID : '46ce08fe50913cfa1b78'
|
||||
const FORTMATIC_API_KEY = isMainnet ? process.env.REACT_APP_FORTMATIC_KEY : 'pk_test_CAD437AA29BE0A40'
|
||||
|
||||
export const web3Connect = new Web3Connect.Core({
|
||||
|
@ -32,12 +31,6 @@ export const web3Connect = new Web3Connect.Core({
|
|||
id: PORTIS_DAPP_ID,
|
||||
},
|
||||
},
|
||||
squarelink: {
|
||||
package: Squarelink,
|
||||
options: {
|
||||
id: SQUARELINK_CLIENT_ID,
|
||||
},
|
||||
},
|
||||
fortmatic: {
|
||||
package: Fortmatic,
|
||||
options: {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// @flow
|
||||
import type { Dispatch as ReduxDispatch } from 'redux'
|
||||
import ReactGA from 'react-ga'
|
||||
import { ETHEREUM_NETWORK_IDS, ETHEREUM_NETWORK, getProviderInfo } from '~/logic/wallets/getWeb3'
|
||||
import { getNetwork } from '~/config'
|
||||
import type { ProviderProps } from '~/logic/wallets/store/model/provider'
|
||||
|
@ -47,6 +48,11 @@ const handleProviderNotification = (provider: ProviderProps, dispatch: Function)
|
|||
// you SHOULD pass your own `key` in the options. `key` can be any sequence
|
||||
// of number or characters, but it has to be unique to a given snackbar.
|
||||
|
||||
ReactGA.event({
|
||||
category: 'Wallets',
|
||||
action: 'Connect a wallet',
|
||||
label: provider.name,
|
||||
})
|
||||
dispatch(enqueueSnackbar(enhanceSnackbarForAction(NOTIFICATIONS.WALLET_CONNECTED_MSG)))
|
||||
} else {
|
||||
dispatch(enqueueSnackbar(enhanceSnackbarForAction(NOTIFICATIONS.UNLOCK_WALLET_MSG)))
|
||||
|
|
Loading…
Reference in New Issue