Skip to content

Commit

Permalink
feat: improve onboarding (#3867)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseRFelix authored Oct 7, 2024
1 parent 29437aa commit 0387e17
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 17 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions packages/server/src/queries/coingecko/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
32 changes: 18 additions & 14 deletions packages/web/hooks/use-feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ const defaultFlags: Record<AvailableFlags, boolean> = {
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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0387e17

Please sign in to comment.