From 0387e17f78f490dbdb7702ccaddfeade235a3ae7 Mon Sep 17 00:00:00 2001 From: Jose Felix Date: Mon, 7 Oct 2024 12:08:59 -0400 Subject: [PATCH] feat: improve onboarding (#3867) --- README.md | 8 ++++- .../server/src/queries/coingecko/index.ts | 10 ++++-- packages/web/hooks/use-feature-flags.ts | 32 +++++++++++-------- 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index da67e79a8f..accfad28d6 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,13 @@ npx turbo link ...press y (yes) and choose "OsmoLabs" as the Vercel build scope... ``` -2. Run local server at [`localhost:3000`](localhost:3000) +2. Run an initial build to create packages build artifacts: + +```bash +yarn build +``` + +3. Run local server at [`localhost:3000`](localhost:3000) ```bash yarn dev diff --git a/packages/server/src/queries/coingecko/index.ts b/packages/server/src/queries/coingecko/index.ts index eb408923cf..7c9ad01244 100644 --- a/packages/server/src/queries/coingecko/index.ts +++ b/packages/server/src/queries/coingecko/index.ts @@ -4,8 +4,14 @@ export * from "./market-chart"; export * from "./price"; export * from "./search"; -export const PRICES_API_URL = "https://prices.osmosis.zone"; -export const DETAILS_API_URL = "https://coingecko.osmosis.zone"; +const COINGECKO_API_URL = "https://api.coingecko.com/api/v3"; + +export const PRICES_API_URL = process.env.COINGECKO_API_KEY + ? "https://prices.osmosis.zone" + : COINGECKO_API_URL; +export const DETAILS_API_URL = process.env.COINGECKO_API_KEY + ? "https://coingecko.osmosis.zone" + : COINGECKO_API_URL; /** * Auth headers for local development, it's required from "DETAILS_API_URL", diff --git a/packages/web/hooks/use-feature-flags.ts b/packages/web/hooks/use-feature-flags.ts index 17982c8846..e702b351fa 100644 --- a/packages/web/hooks/use-feature-flags.ts +++ b/packages/web/hooks/use-feature-flags.ts @@ -45,14 +45,14 @@ const defaultFlags: Record = { osmosisUpdatesPopUp: false, aprBreakdown: true, topAnnouncementBanner: true, - tfmProTradingNavbarButton: true, + tfmProTradingNavbarButton: false, positionRoi: true, - swapToolSimulateFee: false, - portfolioPageAndNewAssetsPage: false, + swapToolSimulateFee: true, + portfolioPageAndNewAssetsPage: true, newAssetsPage: true, displayDailyEarn: false, - newDepositWithdrawFlow: false, - oneClickTrading: false, + newDepositWithdrawFlow: true, + oneClickTrading: true, limitOrders: true, advancedChart: false, cypherCard: false, @@ -104,17 +104,21 @@ export function useFeatureFlags() { isMobile || !isInitialized ? false : launchdarklyFlags.portfolioPageAndNewAssetsPage, - oneClickTrading: - !isMobile && - launchdarklyFlags.swapToolSimulateFee && // 1-Click trading is dependent on the swap tool simulate fee flag - launchdarklyFlags.oneClickTrading, + oneClickTrading: isDevModeWithoutClientID + ? defaultFlags.oneClickTrading + : !isMobile && + launchdarklyFlags.swapToolSimulateFee && // 1-Click trading is dependent on the swap tool simulate fee flag + launchdarklyFlags.oneClickTrading, _isInitialized: isDevModeWithoutClientID ? true : isInitialized, _isClientIDPresent: !!process.env.NEXT_PUBLIC_LAUNCH_DARKLY_CLIENT_SIDE_ID, - limitOrders: - isInitialized && - launchdarklyFlags.limitOrders && - (LIMIT_ORDER_COUNTRY_CODES.length === 0 || - LIMIT_ORDER_COUNTRY_CODES.includes(levanaGeoblock?.countryCode ?? "")), + limitOrders: isDevModeWithoutClientID + ? defaultFlags.limitOrders + : isInitialized && + launchdarklyFlags.limitOrders && + (LIMIT_ORDER_COUNTRY_CODES.length === 0 || + LIMIT_ORDER_COUNTRY_CODES.includes( + levanaGeoblock?.countryCode ?? "" + )), // To test chain upgrades easily on Edgenet, uncomment the flags below // limitOrders: true, // oneClickTrading: true,