Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,52 +51,13 @@ export default withMermaid(
['link', { rel: 'icon', href: '/Logo-RLC-Yellow.png' }],
// Open Graph / Social metadata
['meta', { property: 'og:image', content: `${siteUrl}/og-image.png` }],
// Google Tag Manager
[
'script',
{},
`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://metrics.iex.ec/bs7fgjd8lvy4l31.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-P7KSD4T');`,
],
[
'link',
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Mulish:wght@400;600;700;800&family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap',
},
],
[
'script',
{},
`
window.axeptioSettings = {
clientId: "6413111857e4d2a6342cd5c6",
cookiesVersion: "iexec-en",
};

(function(d, s) {
var t = d.getElementsByTagName(s)[0], e = d.createElement(s);
e.async = true; e.src = "//static.axept.io/sdk.js";
t.parentNode.insertBefore(e, t);
})(document, "script");
`,
],
// Mava widget
[
'script',
{
defer: '',
src: 'https://widget.mava.app',
'widget-version': 'v2',
id: 'MavaWebChat',
'enable-sdk': 'false',
'data-token':
'8e4e10aad5750451e8726768e8c639dae54f461beeb176f5ebd687371c9390f2',
},
],
],

themeConfig: {
Expand Down
10 changes: 0 additions & 10 deletions .vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ const { Layout } = DefaultTheme;
</script>

<template>
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe
src="https://metrics.iex.ec/ns.html?id=GTM-P7KSD4T"
height="0"
width="0"
style="display: none; visibility: hidden"
></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<Layout>
<template #nav-bar-title-after>
<span class="custom-site-title">PoCo Documentation</span>
Expand Down
36 changes: 0 additions & 36 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ import { wagmiAdapter } from '@/utils/wagmiConfig';
import ChainSelector from '@/components/ChainSelector.vue';
import './style.css';

declare global {
interface Window {
dataLayer: any[];
axeptioSettings: {
clientId: string;
cookiesVersion: string;
};
}
}

export default {
extends: DefaultTheme,
Layout,
Expand All @@ -38,31 +28,5 @@ export default {
app.use(WagmiPlugin, { config: wagmiAdapter.wagmiConfig });

app.component('ChainSelector', ChainSelector);

if (typeof window !== 'undefined') {
// Ensure dataLayer exists
window.dataLayer = window.dataLayer || [];

// Define a map of event types and their corresponding actions
const eventMap = {
connectWallet: 'hw_connectWallet',
protectData: 'hw_protectData',
grantAccess: 'hw_grantAccess',
};

// Add a global click listener
document.addEventListener('click', (event) => {
if (event.target instanceof Element) {
// Iterate through eventMap to check which event matches
Object.keys(eventMap).forEach((key) => {
if ((event.target as Element).matches(`[data-track="${key}"]`)) {
window.dataLayer.push({
event: eventMap[key],
});
}
});
}
});
}
},
} satisfies Theme;
1 change: 0 additions & 1 deletion src/modules/helloWorld/GrantAccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<Button
:disabled="!isWalletConnected || isLoadingGrant"
@click="grantAccess"
data-track="grantAccess"
>
{{ isLoadingGrant ? 'Processing...' : 'Grant Access' }}
</Button>
Expand Down
1 change: 0 additions & 1 deletion src/modules/helloWorld/ProtectData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<Button
:disabled="!isWalletConnected || isLoadingProtect"
@click="protectData"
data-track="protectData"
>
{{ isLoadingProtect ? 'Processing...' : 'Protect Data' }}
</Button>
Expand Down
7 changes: 1 addition & 6 deletions src/modules/helloWorld/ReownButton.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<template>
<div class="flex items-center">
<Button
v-if="!walletAddress"
@click="login"
:disabled="isConnected"
data-track="connectWallet"
>
<Button v-if="!walletAddress" @click="login" :disabled="isConnected">
{{ isConnected ? 'Wallet Connected' : 'Connect Wallet' }}
</Button>
<div v-else="walletAddress" class="flex items-center gap-2 text-sm">
Expand Down
9 changes: 7 additions & 2 deletions src/utils/wagmiConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createAppKit } from '@reown/appkit/vue';
import { WagmiAdapter } from '@reown/appkit-adapter-wagmi';
import { http, CreateConnectorFn } from '@wagmi/vue';
import { injected } from '@wagmi/vue/connectors';
import { baseAccount, injected } from '@wagmi/vue/connectors';
import wagmiNetworks from '@/utils/wagmiNetworks';
import { InjectedWalletProvider } from '@/utils/injected-wallet-provider/injected-wallet-provider';
import { EIP6963ProviderDetail } from '@/utils/injected-wallet-provider/types';
Expand All @@ -15,7 +15,11 @@ if (!projectId) {
}

// Connectors initialization
const connectors: CreateConnectorFn[] = [];
// Base Account is declared here so that Reown does not add its own instance,
// which loads Coinbase telemetry (cca-lite.coinbase.com) on page load
const connectors: CreateConnectorFn[] = [
baseAccount({ preference: { telemetry: false } }),
];

// Injected wallet provider management
const injectedWalletProvider = new InjectedWalletProvider();
Expand Down Expand Up @@ -90,6 +94,7 @@ createAppKit({
projectId,
featuredWalletIds,
features: {
analytics: false,
socials: false,
email: false,
},
Expand Down
Loading