Skip to content

Commit d38b626

Browse files
authored
retire analytics events (#1267)
* retire analytics events * prettier
1 parent 25d1806 commit d38b626

26 files changed

+115
-564
lines changed

dapp/pages/compensation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ function Compensation({ locale, onLocale, showLogin, rpcProvider }) {
6666

6767
return (
6868
<>
69-
<Layout locale={locale} onLocale={onLocale} dapp medium>
70-
<Nav dapp page={'compensation'} locale={locale} onLocale={onLocale} />
69+
<Layout locale={locale} onLocale={onLocale} medium>
70+
<Nav page={'compensation'} locale={locale} onLocale={onLocale} />
7171
<div className="home d-flex flex-column">
7272
<div className="d-flex align-items-center flex-column flex-md-row">
7373
<div className="bold-text mr-md-3">

dapp/pages/dashboard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,8 @@ const Dashboard = ({ locale, onLocale }) => {
674674

675675
return (
676676
<>
677-
<Layout locale={locale} onLocale={onLocale} dapp>
678-
<Nav dapp locale={locale} onLocale={onLocale} />
677+
<Layout locale={locale} onLocale={onLocale}>
678+
<Nav locale={locale} onLocale={onLocale} />
679679
<div className="my-5">
680680
{!account && <h1 className="text-white">No account :(</h1>}
681681
{account && (

dapp/pages/earn.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import CurveStake from 'components/earn/CurveStake'
77

88
const Stake = ({ locale, onLocale }) => {
99
return (
10-
<Layout onLocale={onLocale} locale={locale} dapp shorter isStakePage>
11-
<Nav dapp page={'earn'} locale={locale} onLocale={onLocale} />
10+
<Layout onLocale={onLocale} locale={locale} shorter isStakePage>
11+
<Nav page={'earn'} locale={locale} onLocale={onLocale} />
1212
{process.env.NEXT_PUBLIC_ENABLE_CURVE_STAKING === 'true' && (
1313
<CurveStake />
1414
)}
@@ -31,8 +31,8 @@ export default Stake
3131
// return (
3232
// process.env.NEXT_PUBLIC_ENABLE_LIQUIDITY_MINING === 'true' && (
3333
// <>
34-
// <Layout onLocale={onLocale} locale={locale} dapp>
35-
// <Nav dapp page={'earn'} locale={locale} onLocale={onLocale} />
34+
// <Layout onLocale={onLocale} locale={locale}>
35+
// <Nav page={'earn'} locale={locale} onLocale={onLocale} />
3636
// <div className="home d-flex flex-column">
3737
// <PoolsList
3838
// title={fbt('Featured Pools', 'Featured Pools')}

dapp/pages/history.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export default function History({ locale, onLocale }) {
3939
}}
4040
/>
4141
)}
42-
<Layout locale={locale} onLocale={onLocale} dapp>
43-
<Nav dapp page={'history'} locale={locale} onLocale={onLocale} />
42+
<Layout locale={locale} onLocale={onLocale}>
43+
<Nav page={'history'} locale={locale} onLocale={onLocale} />
4444
<div className="home d-flex flex-column">
4545
<BalanceHeader />
4646
{(overrideAccount || active) && <TransactionHistory />}

dapp/pages/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import PrimarySidePanel from 'components/sidePanel/PrimarySidePanel'
99
export default function DApp({ locale, onLocale }) {
1010
return (
1111
<>
12-
<Layout locale={locale} onLocale={onLocale} dapp>
13-
<Nav dapp page={'swap'} locale={locale} onLocale={onLocale} />
12+
<Layout locale={locale} onLocale={onLocale}>
13+
<Nav page={'swap'} locale={locale} onLocale={onLocale} />
1414
<div className="home d-flex flex-column">
1515
<BalanceHeader />
1616
<div className="d-flex">

dapp/pages/pool/[pool_name]/index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,19 @@ import PoolDetails from 'components/earn/PoolDetails'
55
import { useRouter } from 'next/router'
66
import { fbt } from 'fbt-runtime'
77
import { useStoreState } from 'pullstate'
8-
9-
import ContractStore from 'stores/ContractStore'
108
import PoolStore from 'stores/PoolStore'
119

1210
export default function PoolDetailsPage({ locale, onLocale }) {
1311
const router = useRouter()
1412
const { pool_name } = router.query
15-
const { uniV2OusdUsdt, liquidityOusdUsdt } = useStoreState(
16-
ContractStore,
17-
(s) => s.contracts || {}
18-
)
1913
const pools = useStoreState(PoolStore, (s) => s.pools)
2014
const pool = pools.filter((pool) => pool.name === pool_name)[0]
2115

2216
return (
2317
process.env.NEXT_PUBLIC_ENABLE_LIQUIDITY_MINING === 'true' && (
2418
<>
25-
<Layout onLocale={onLocale} locale={locale} dapp short>
26-
<Nav dapp page={'pool-details'} locale={locale} onLocale={onLocale} />
19+
<Layout onLocale={onLocale} locale={locale} short>
20+
<Nav page={'pool-details'} locale={locale} onLocale={onLocale} />
2721
<div className="home d-flex flex-column">
2822
{pools.length > 0 && <PoolDetails pool={pool} />}
2923
{pools.length === 0 && <h1>{fbt('Loading...', 'Loading...')}</h1>}

dapp/pages/signTransfer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import SignTransferAuth from 'components/SignTransferAuth'
77
export default function DApp({ locale, onLocale }) {
88
return (
99
<>
10-
<Layout locale={locale} onLocale={onLocale} dapp>
11-
<Nav dapp page={'swap'} locale={locale} onLocale={onLocale} />
10+
<Layout locale={locale} onLocale={onLocale}>
11+
<Nav page={'swap'} locale={locale} onLocale={onLocale} />
1212
<div className="home d-flex flex-column">
1313
<div className="d-flex">
1414
<SignTransferAuth />

dapp/pages/wrap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import WrapHomepage from 'components/wrap/WrapHomepage'
99
export default function Wrap({ locale, onLocale }) {
1010
return (
1111
<>
12-
<Layout locale={locale} onLocale={onLocale} dapp>
13-
<Nav dapp page={'wrap'} locale={locale} onLocale={onLocale} />
12+
<Layout locale={locale} onLocale={onLocale}>
13+
<Nav page={'wrap'} locale={locale} onLocale={onLocale} />
1414
<div className="home d-flex flex-column">
1515
<BalanceHeaderWrapped />
1616
<div className="d-flex">

dapp/src/components/AccountStatusDropdown.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
import React, { useState } from 'react'
22
import { useWeb3React } from '@web3-react/core'
3-
43
import Dropdown from 'components/Dropdown'
54
import GetOUSD from 'components/GetOUSD'
65
import { isCorrectNetwork, switchEthereumChain } from 'utils/web3'
7-
86
import withWalletSelectModal from 'hoc/withWalletSelectModal'
9-
import analytics from 'utils/analytics'
10-
117
import Content from './_AccountStatusContent'
128
import AccountStatusIndicator from './_AccountStatusIndicator'
139

14-
const AccountStatusDropdown = ({ className, showLogin, dapp }) => {
10+
const AccountStatusDropdown = ({ className, showLogin }) => {
1511
const { active, account, chainId } = useWeb3React()
1612
const [open, setOpen] = useState(false)
1713
const correctNetwork = isCorrectNetwork(chainId)
@@ -30,25 +26,21 @@ const AccountStatusDropdown = ({ className, showLogin, dapp }) => {
3026
}`}
3127
onClick={async (e) => {
3228
e.preventDefault()
33-
if (dapp && !active) {
29+
if (!active) {
3430
showLogin()
3531
} else if (active && !correctNetwork) {
36-
analytics.track('On Change network', {
37-
category: 'settings',
38-
})
3932
// open the dropdown to allow disconnecting, while also requesting an auto switch to mainnet
4033
await switchEthereumChain()
4134
setOpen(true)
42-
} else if (dapp) {
35+
} else {
4336
setOpen(true)
4437
}
4538
}}
4639
>
4740
{/* The button id is used by StakeBoxBig to trigger connect when no wallet connected */}
48-
{((!active && !account) || (!dapp && active && correctNetwork)) && (
41+
{!active && !account && (
4942
<GetOUSD
5043
id="main-dapp-nav-connect-wallet-button"
51-
connect={dapp}
5244
className="btn-nav"
5345
trackSource="Account dropdown"
5446
/>
@@ -57,7 +49,6 @@ const AccountStatusDropdown = ({ className, showLogin, dapp }) => {
5749
active={active}
5850
correctNetwork={correctNetwork}
5951
account={account}
60-
dapp={dapp}
6152
withAddress
6253
/>
6354
</a>

dapp/src/components/AccountStatusPopover.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Content from './_AccountStatusContent'
77
import { assetRootPath } from 'utils/image'
88
import AccountStatusIndicator from './_AccountStatusIndicator'
99

10-
const AccountStatusPopover = ({ className, dapp }) => {
10+
const AccountStatusPopover = ({ className }) => {
1111
const { active, account, chainId } = useWeb3React()
1212
const correctNetwork = isCorrectNetwork(chainId)
1313

@@ -31,7 +31,6 @@ const AccountStatusPopover = ({ className, dapp }) => {
3131
active={active}
3232
correctNetwork={correctNetwork}
3333
account={account}
34-
dapp={dapp}
3534
/>
3635
</div>
3736
</button>

0 commit comments

Comments
 (0)