Skip to content

Commit

Permalink
[wallet-ext] Add beta attributes for growthbook (MystenLabs#7590)
Browse files Browse the repository at this point in the history
This will let us target features by version and for beta.
  • Loading branch information
Jordan-Mysten authored Jan 23, 2023
1 parent b6e55ec commit 9ca8f04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/wallet/src/shared/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useAppSelector } from '_hooks';
import { growthbook } from '_src/ui/app/experimentation/feature-gating';

export const MAIN_UI_URL = Browser.runtime.getURL('ui.html');
const WALLET_VERSION = Browser.runtime.getManifest().version;

export function openInNewTab() {
return Browser.tabs.create({ url: MAIN_UI_URL });
Expand All @@ -28,6 +29,8 @@ export function usePageView() {
setTimeout(() => {
growthbook.setAttributes({
network: activeNetwork,
version: WALLET_VERSION,
beta: process.env.WALLET_BETA || false,
});
}, 0);

Expand Down

0 comments on commit 9ca8f04

Please sign in to comment.