From 6c9e61af6648ab8c212a6b3521496a3a982b38b5 Mon Sep 17 00:00:00 2001 From: Jon Ator Date: Fri, 6 Dec 2024 09:40:51 -0500 Subject: [PATCH] Cleanup env (#3996) * clean up env * update durbo deps * update workflows * update KV vars * consolidate NUMIA_BASE_URL * lint fix --- .github/workflows/monitoring-e2e-tests.yml | 2 +- .github/workflows/server-e2e-tests.yml | 4 +- .../e2e/tests/monitoring.limit.wallet.spec.ts | 146 +++++++------- .../tests/monitoring.market.wallet.spec.ts | 154 +++++++-------- packages/e2e/tests/select.spec.ts | 182 +++++++++--------- packages/server/src/env.ts | 13 +- packages/server/src/queries/blockaid/index.ts | 9 - .../src/queries/blockaid/transaction.ts | 77 -------- .../src/queries/complex/pools/incentives.ts | 27 ++- .../queries/data-services/filtered-pools.ts | 4 +- .../data-services/historical-limit-orders.ts | 4 +- .../src/queries/data-services/pool-aprs.ts | 6 +- .../src/queries/data-services/pools-fees.ts | 4 +- .../data-services/portfolio-over-time.ts | 4 +- .../data-services/position-performance.ts | 4 +- .../queries/data-services/price-range-apr.ts | 4 +- .../src/queries/data-services/staking-apr.ts | 4 +- .../src/queries/data-services/token-data.ts | 6 +- .../data-services/token-historical-chart.ts | 4 +- .../token-pair-historical-chart.ts | 4 +- .../src/queries/data-services/transactions.ts | 4 +- packages/server/src/queries/index.ts | 1 - packages/web/.env | 18 +- packages/web/config/env.ts | 3 +- packages/web/stores/root.ts | 9 +- turbo.json | 7 +- 26 files changed, 305 insertions(+), 399 deletions(-) delete mode 100644 packages/server/src/queries/blockaid/index.ts delete mode 100644 packages/server/src/queries/blockaid/transaction.ts diff --git a/.github/workflows/monitoring-e2e-tests.yml b/.github/workflows/monitoring-e2e-tests.yml index 34dba2532d..b6cb12e775 100644 --- a/.github/workflows/monitoring-e2e-tests.yml +++ b/.github/workflows/monitoring-e2e-tests.yml @@ -13,7 +13,7 @@ jobs: steps: - id: set-matrix run: | - echo "matrix={\"include\":[{ \"base-url\":\"https://app.osmosis.zone\", \"server-url\":\"https://sqs.osmosis.zone\", \"env\": \"production\", \"timeseries-url\":\"https://stage-proxy-data-api.osmosis-labs.workers.dev\"}, { \"base-url\":\"https://stage.osmosis.zone\", \"server-url\":\"https://sqs.stage.osmosis.zone\", \"env\": \"staging\", \"timeseries-url\":\"https://stage-proxy-data-api.osmosis-labs.workers.dev\"}]}" >> "$GITHUB_OUTPUT" + echo "matrix={\"include\":[{ \"base-url\":\"https://app.osmosis.zone\", \"server-url\":\"https://sqs.osmosis.zone\", \"env\": \"production\", \"timeseries-url\":\"https://data.app.osmosis.zone\"}, { \"base-url\":\"https://stage.osmosis.zone\", \"server-url\":\"https://sqs.stage.osmosis.zone\", \"env\": \"staging\", \"timeseries-url\":\"https://data.app.osmosis.zone\"}]}" >> "$GITHUB_OUTPUT" server-e2e-tests: name: ${{ matrix.env }}-server-tests diff --git a/.github/workflows/server-e2e-tests.yml b/.github/workflows/server-e2e-tests.yml index ea118d0f2e..c265c7936d 100644 --- a/.github/workflows/server-e2e-tests.yml +++ b/.github/workflows/server-e2e-tests.yml @@ -15,9 +15,9 @@ jobs: MAIN_BRANCH: "refs/heads/master" run: | if [[ "${{ github.ref }}" == "${{ env.MAIN_BRANCH }}" ]]; then - echo "matrix={\"include\":[{ \"server-url\":\"https://sqs.osmosis.zone\", \"env\": \"production\", \"timeseries-url\":\"https://stage-proxy-data-api.osmosis-labs.workers.dev\"}]}" >> "$GITHUB_OUTPUT" + echo "matrix={\"include\":[{ \"server-url\":\"https://sqs.osmosis.zone\", \"env\": \"production\", \"timeseries-url\":\"https://data.app.osmosis.zone\"}]}" >> "$GITHUB_OUTPUT" else - echo "matrix={\"include\":[{ \"server-url\":\"https://sqs.osmosis.zone\", \"env\": \"production\", \"timeseries-url\":\"https://stage-proxy-data-api.osmosis-labs.workers.dev\"}, { \"server-url\":\"https://sqs.stage.osmosis.zone\", \"env\": \"staging\", \"timeseries-url\":\"https://stage-proxy-data-api.osmosis-labs.workers.dev\"}]}" >> "$GITHUB_OUTPUT" + echo "matrix={\"include\":[{ \"server-url\":\"https://sqs.osmosis.zone\", \"env\": \"production\", \"timeseries-url\":\"https://data.app.osmosis.zone\"}, { \"server-url\":\"https://sqs.stage.osmosis.zone\", \"env\": \"staging\", \"timeseries-url\":\"https://data.app.osmosis.zone\"}]}" >> "$GITHUB_OUTPUT" fi test: diff --git a/packages/e2e/tests/monitoring.limit.wallet.spec.ts b/packages/e2e/tests/monitoring.limit.wallet.spec.ts index 2ba0c1c705..09597c65f6 100644 --- a/packages/e2e/tests/monitoring.limit.wallet.spec.ts +++ b/packages/e2e/tests/monitoring.limit.wallet.spec.ts @@ -1,99 +1,97 @@ -import { type BrowserContext, chromium, expect, test } from "@playwright/test"; +import { type BrowserContext, chromium, expect, test } from '@playwright/test' +import { TestConfig } from '../test-config' +import { UnzipExtension } from '../unzip-extension' -import { TransactionsPage } from "../pages/transactions-page"; -import { TestConfig } from "../test-config"; -import { UnzipExtension } from "../unzip-extension"; +import { WalletPage } from '../pages/keplr-page' +import { TradePage } from '../pages/trade-page' -import { WalletPage } from "../pages/keplr-page"; -import { TradePage } from "../pages/trade-page"; - -test.describe("Test Filled Limit Order feature", () => { - let context: BrowserContext; - const privateKey = process.env.PRIVATE_KEY ?? "private_key"; - let tradePage: TradePage; +test.describe('Test Filled Limit Order feature', () => { + let context: BrowserContext + const privateKey = process.env.PRIVATE_KEY ?? 'private_key' + let tradePage: TradePage test.beforeAll(async () => { - const pathToExtension = new UnzipExtension().getPathToExtension(); - console.log("\nSetup Wallet Extension before tests."); + const pathToExtension = new UnzipExtension().getPathToExtension() + console.log('\nSetup Wallet Extension before tests.') // Launch Chrome with a Keplr wallet extension context = await chromium.launchPersistentContext( - "", - new TestConfig().getBrowserExtensionConfig(false, pathToExtension) - ); + '', + new TestConfig().getBrowserExtensionConfig(false, pathToExtension), + ) // Get all new pages (including Extension) in the context and wait - const emptyPage = context.pages()[0]; - await emptyPage.waitForTimeout(2000); - const page = context.pages()[1]; - const walletPage = new WalletPage(page); + const emptyPage = context.pages()[0] + await emptyPage.waitForTimeout(2000) + const page = context.pages()[1] + const walletPage = new WalletPage(page) // Import existing Wallet (could be aggregated in one function). - await walletPage.importWalletWithPrivateKey(privateKey); - await walletPage.setWalletNameAndPassword("Monitoring E2E Tests"); - await walletPage.selectChainsAndSave(); - await walletPage.finish(); + await walletPage.importWalletWithPrivateKey(privateKey) + await walletPage.setWalletNameAndPassword('Monitoring E2E Tests') + await walletPage.selectChainsAndSave() + await walletPage.finish() // Switch to Application - tradePage = new TradePage(context.pages()[0]); - await tradePage.goto(); - await tradePage.connectWallet(); - expect(await tradePage.isError(), "Swap is not available!").toBeFalsy(); - }); + tradePage = new TradePage(context.pages()[0]) + await tradePage.goto() + await tradePage.connectWallet() + expect(await tradePage.isError(), 'Swap is not available!').toBeFalsy() + }) test.afterAll(async () => { - await context.close(); - }); + await context.close() + }) // biome-ignore lint/correctness/noEmptyPattern: test.afterEach(async ({}, testInfo) => { - console.log(`Test [${testInfo.title}] status: ${testInfo.status}`); - if (testInfo.status === "failed") { - const name = testInfo.title; - process.env.GITHUB_STEP_SUMMARY = `Test ${name} failed.`; + console.log(`Test [${testInfo.title}] status: ${testInfo.status}`) + if (testInfo.status === 'failed') { + const name = testInfo.title + process.env.GITHUB_STEP_SUMMARY = `Test ${name} failed.` } - }); + }) - test("User should be able to limit sell OSMO", async () => { - await tradePage.goto(); - await tradePage.openSellTab(); - await tradePage.openLimit(); - await tradePage.selectAsset("OSMO"); - await tradePage.enterAmount("1.08"); - await tradePage.setLimitPriceChange("Market"); + test('User should be able to limit sell OSMO', async () => { + await tradePage.goto() + await tradePage.openSellTab() + await tradePage.openLimit() + await tradePage.selectAsset('OSMO') + await tradePage.enterAmount('1.08') + await tradePage.setLimitPriceChange('Market') const { msgContentAmount } = await tradePage.sellAndGetWalletMsg( context, - true - ); - expect(msgContentAmount, "No msg from the wallet!").toBeTruthy(); + true, + ) + expect(msgContentAmount, 'No msg from the wallet!').toBeTruthy() // now this is converted from USDC - expect(msgContentAmount).toContain("place_limit"); - expect(msgContentAmount).toContain('"order_direction": "ask"'); - await tradePage.isTransactionSuccesful(); - await tradePage.getTransactionUrl(); - }); + expect(msgContentAmount).toContain('place_limit') + expect(msgContentAmount).toContain('"order_direction": "ask"') + await tradePage.isTransactionSuccesful() + await tradePage.getTransactionUrl() + }) - test("User should be able to limit buy OSMO", async () => { - const PRICE_INCREASE_FACTOR = 1.07; // 7% increase for limit price - const ORDER_HISTORY_TIMEOUT = 30; // Seconds to wait for order history - await tradePage.goto(); - await tradePage.openBuyTab(); - await tradePage.openLimit(); - await tradePage.selectAsset("OSMO"); - await tradePage.enterAmount("1.04"); - await tradePage.setLimitPriceChange("Market"); - const limitPrice = Number(await tradePage.getLimitPrice()); - const highLimitPrice = (limitPrice * PRICE_INCREASE_FACTOR).toFixed(4); - await tradePage.setLimitPrice(String(highLimitPrice)); + test('User should be able to limit buy OSMO', async () => { + const PRICE_INCREASE_FACTOR = 1.07 // 7% increase for limit price + const ORDER_HISTORY_TIMEOUT = 30 // Seconds to wait for order history + await tradePage.goto() + await tradePage.openBuyTab() + await tradePage.openLimit() + await tradePage.selectAsset('OSMO') + await tradePage.enterAmount('1.04') + await tradePage.setLimitPriceChange('Market') + const limitPrice = Number(await tradePage.getLimitPrice()) + const highLimitPrice = (limitPrice * PRICE_INCREASE_FACTOR).toFixed(4) + await tradePage.setLimitPrice(String(highLimitPrice)) const { msgContentAmount } = await tradePage.buyAndGetWalletMsg( context, - true - ); - expect(msgContentAmount, "No msg from the wallet!").toBeTruthy(); - expect(msgContentAmount).toContain('"quantity": "1040000"'); - expect(msgContentAmount).toContain("place_limit"); - expect(msgContentAmount).toContain('"order_direction": "bid"'); - await tradePage.isTransactionSuccesful(); - await tradePage.getTransactionUrl(); - await tradePage.gotoOrdersHistory(ORDER_HISTORY_TIMEOUT); + true, + ) + expect(msgContentAmount, 'No msg from the wallet!').toBeTruthy() + expect(msgContentAmount).toContain('"quantity": "1040000"') + expect(msgContentAmount).toContain('place_limit') + expect(msgContentAmount).toContain('"order_direction": "bid"') + await tradePage.isTransactionSuccesful() + await tradePage.getTransactionUrl() + await tradePage.gotoOrdersHistory(ORDER_HISTORY_TIMEOUT) //const p = context.pages()[0] //const trxPage = new TransactionsPage(p) //await trxPage.isFilledByLimitPrice(highLimitPrice) - }); -}); + }) +}) diff --git a/packages/e2e/tests/monitoring.market.wallet.spec.ts b/packages/e2e/tests/monitoring.market.wallet.spec.ts index 87d596c258..85beecff7c 100644 --- a/packages/e2e/tests/monitoring.market.wallet.spec.ts +++ b/packages/e2e/tests/monitoring.market.wallet.spec.ts @@ -1,99 +1,99 @@ -import { type BrowserContext, chromium, expect, test } from "@playwright/test"; +import { type BrowserContext, chromium, expect, test } from '@playwright/test' -import { TestConfig } from "../test-config"; -import { UnzipExtension } from "../unzip-extension"; +import { TestConfig } from '../test-config' +import { UnzipExtension } from '../unzip-extension' -import { WalletPage } from "../pages/keplr-page"; -import { TradePage } from "../pages/trade-page"; +import { WalletPage } from '../pages/keplr-page' +import { TradePage } from '../pages/trade-page' -test.describe("Test Market Buy/Sell Order feature", () => { - let context: BrowserContext; - const privateKey = process.env.PRIVATE_KEY ?? "private_key"; - let tradePage: TradePage; - const TRX_SUCCESS_TIMEOUT = 10000; +test.describe('Test Market Buy/Sell Order feature', () => { + let context: BrowserContext + const privateKey = process.env.PRIVATE_KEY ?? 'private_key' + let tradePage: TradePage + const TRX_SUCCESS_TIMEOUT = 10000 test.beforeAll(async () => { - const pathToExtension = new UnzipExtension().getPathToExtension(); - console.log("\nSetup Wallet Extension before tests."); + const pathToExtension = new UnzipExtension().getPathToExtension() + console.log('\nSetup Wallet Extension before tests.') // Launch Chrome with a Keplr wallet extension context = await chromium.launchPersistentContext( - "", - new TestConfig().getBrowserExtensionConfig(false, pathToExtension) - ); + '', + new TestConfig().getBrowserExtensionConfig(false, pathToExtension), + ) // Get all new pages (including Extension) in the context and wait - const emptyPage = context.pages()[0]; - await emptyPage.waitForTimeout(2000); - const page = context.pages()[1]; - const walletPage = new WalletPage(page); + const emptyPage = context.pages()[0] + await emptyPage.waitForTimeout(2000) + const page = context.pages()[1] + const walletPage = new WalletPage(page) // Import existing Wallet (could be aggregated in one function). - await walletPage.importWalletWithPrivateKey(privateKey); - await walletPage.setWalletNameAndPassword("Monitoring E2E Tests"); - await walletPage.selectChainsAndSave(); - await walletPage.finish(); + await walletPage.importWalletWithPrivateKey(privateKey) + await walletPage.setWalletNameAndPassword('Monitoring E2E Tests') + await walletPage.selectChainsAndSave() + await walletPage.finish() // Switch to Application - tradePage = new TradePage(context.pages()[0]); - await tradePage.goto(); - await tradePage.connectWallet(); - expect(await tradePage.isError(), "Swap is not available!").toBeFalsy(); - }); + tradePage = new TradePage(context.pages()[0]) + await tradePage.goto() + await tradePage.connectWallet() + expect(await tradePage.isError(), 'Swap is not available!').toBeFalsy() + }) test.afterAll(async () => { - await context.close(); - }); + await context.close() + }) // biome-ignore lint/correctness/noEmptyPattern: test.afterEach(async ({}, testInfo) => { - console.log(`Test [${testInfo.title}] status: ${testInfo.status}`); - if (testInfo.status === "failed") { - const name = testInfo.title; - process.env.GITHUB_STEP_SUMMARY = `Test ${name} failed.`; - console.log(`GITHUB_STEP_SUMMARY: ${process.env.GITHUB_STEP_SUMMARY}`); + console.log(`Test [${testInfo.title}] status: ${testInfo.status}`) + if (testInfo.status === 'failed') { + const name = testInfo.title + process.env.GITHUB_STEP_SUMMARY = `Test ${name} failed.` + console.log(`GITHUB_STEP_SUMMARY: ${process.env.GITHUB_STEP_SUMMARY}`) } - }); + }) // biome-ignore lint/complexity/noForEach: - [{ name: "WBTC" }, { name: "OSMO" }].forEach(({ name }) => { + ;[{ name: 'WBTC' }, { name: 'OSMO' }].forEach(({ name }) => { test(`User should be able to Market Buy ${name}`, async () => { - await tradePage.goto(); - await tradePage.openBuyTab(); - await tradePage.selectAsset(name); - await tradePage.enterAmount("1.55"); - await tradePage.isSufficientBalanceForTrade(); - await tradePage.showSwapInfo(); - const { msgContentAmount } = await tradePage.buyAndGetWalletMsg(context); - expect(msgContentAmount).toBeTruthy(); - expect(msgContentAmount).toContain("type: osmosis/poolmanager/"); - await tradePage.isTransactionSuccesful(TRX_SUCCESS_TIMEOUT); - await tradePage.getTransactionUrl(); - }); - }); + await tradePage.goto() + await tradePage.openBuyTab() + await tradePage.selectAsset(name) + await tradePage.enterAmount('1.55') + await tradePage.isSufficientBalanceForTrade() + await tradePage.showSwapInfo() + const { msgContentAmount } = await tradePage.buyAndGetWalletMsg(context) + expect(msgContentAmount).toBeTruthy() + expect(msgContentAmount).toContain('type: osmosis/poolmanager/') + await tradePage.isTransactionSuccesful(TRX_SUCCESS_TIMEOUT) + await tradePage.getTransactionUrl() + }) + }) // unwrapped market sell tests just in case this affects anything. - test("User should be able to Market Sell WBTC", async () => { - await tradePage.goto(); - await tradePage.openSellTab(); - await tradePage.selectAsset("WBTC"); - await tradePage.enterAmount("1.54"); - await tradePage.isSufficientBalanceForTrade(); - await tradePage.showSwapInfo(); - const { msgContentAmount } = await tradePage.sellAndGetWalletMsg(context); - expect(msgContentAmount).toBeTruthy(); - expect(msgContentAmount).toContain("type: osmosis/poolmanager/"); - await tradePage.isTransactionSuccesful(TRX_SUCCESS_TIMEOUT); - await tradePage.getTransactionUrl(); - }); + test('User should be able to Market Sell WBTC', async () => { + await tradePage.goto() + await tradePage.openSellTab() + await tradePage.selectAsset('WBTC') + await tradePage.enterAmount('1.54') + await tradePage.isSufficientBalanceForTrade() + await tradePage.showSwapInfo() + const { msgContentAmount } = await tradePage.sellAndGetWalletMsg(context) + expect(msgContentAmount).toBeTruthy() + expect(msgContentAmount).toContain('type: osmosis/poolmanager/') + await tradePage.isTransactionSuccesful(TRX_SUCCESS_TIMEOUT) + await tradePage.getTransactionUrl() + }) - test("User should be able to Market Sell OSMO", async () => { - await tradePage.goto(); - await tradePage.openSellTab(); - await tradePage.selectAsset("OSMO"); - await tradePage.enterAmount("1.54"); - await tradePage.isSufficientBalanceForTrade(); - await tradePage.showSwapInfo(); - const { msgContentAmount } = await tradePage.sellAndGetWalletMsg(context); - expect(msgContentAmount).toBeTruthy(); - expect(msgContentAmount).toContain("type: osmosis/poolmanager/"); - await tradePage.isTransactionSuccesful(TRX_SUCCESS_TIMEOUT); - await tradePage.getTransactionUrl(); - }); -}); + test('User should be able to Market Sell OSMO', async () => { + await tradePage.goto() + await tradePage.openSellTab() + await tradePage.selectAsset('OSMO') + await tradePage.enterAmount('1.54') + await tradePage.isSufficientBalanceForTrade() + await tradePage.showSwapInfo() + const { msgContentAmount } = await tradePage.sellAndGetWalletMsg(context) + expect(msgContentAmount).toBeTruthy() + expect(msgContentAmount).toContain('type: osmosis/poolmanager/') + await tradePage.isTransactionSuccesful(TRX_SUCCESS_TIMEOUT) + await tradePage.getTransactionUrl() + }) +}) diff --git a/packages/e2e/tests/select.spec.ts b/packages/e2e/tests/select.spec.ts index cfdca8fbaa..e1c55aa042 100644 --- a/packages/e2e/tests/select.spec.ts +++ b/packages/e2e/tests/select.spec.ts @@ -4,105 +4,105 @@ import { type Page, chromium, test, -} from "@playwright/test"; +} from '@playwright/test' -import { TradePage } from "../pages/trade-page"; -import { TestConfig } from "../test-config"; +import { TradePage } from '../pages/trade-page' +import { TestConfig } from '../test-config' // Pairs are selected from top 10 -test.describe("Test Select Swap Pair feature", () => { - let context: BrowserContext; - let swapPage: TradePage; - let page: Page; +test.describe('Test Select Swap Pair feature', () => { + let context: BrowserContext + let swapPage: TradePage + let page: Page test.beforeAll(async () => { context = await chromium.launchPersistentContext( - "", - new TestConfig().getBrowserConfig(true) - ); - page = context.pages()[0]; - swapPage = new TradePage(page); - await swapPage.goto(); - }); + '', + new TestConfig().getBrowserConfig(true), + ) + page = context.pages()[0] + swapPage = new TradePage(page) + await swapPage.goto() + }) test.afterAll(async () => { - await context.close(); - }); + await context.close() + }) // Price Impact-54.768% -> no liquidity - test("User should be able to select nBTC/USDC", async () => { - await swapPage.goto(); - await swapPage.selectPair("nBTC", "USDC"); - await swapPage.enterAmount("0.01"); - await swapPage.showSwapInfo(); - }); - - test("User should be able to select WBTC/USDC", async () => { - await swapPage.goto(); - await swapPage.selectPair("WBTC", "USDC"); - await swapPage.enterAmount("0.1"); - await swapPage.showSwapInfo(); - }); - - test("User should be able to select OSMO/USDC", async () => { - await swapPage.goto(); - await swapPage.selectPair("OSMO", "USDC"); - await swapPage.enterAmount("1"); - await swapPage.showSwapInfo(); - }); - - test("User should be able to select INJ/USDC", async () => { - await swapPage.goto(); - await swapPage.selectPair("INJ", "USDC"); - await swapPage.enterAmount("10"); - await swapPage.showSwapInfo(); - }); - - test("User should be able to select TIA/USDC", async () => { - await swapPage.goto(); - await swapPage.selectPair("TIA", "USDC"); - await swapPage.enterAmount("100"); - await swapPage.showSwapInfo(); - }); - - test("User should be able to select ATOM/USDC", async () => { - await swapPage.selectPair("ATOM", "USDC"); - await swapPage.enterAmount("100"); - }); - - test("User should be able to select USDT/USDC", async () => { - await swapPage.selectPair("USDT", "USDC"); - await swapPage.enterAmount("10000"); - }); - - test("User should be able to select TIA/OSMO", async () => { - await swapPage.selectPair("TIA", "OSMO"); - await swapPage.enterAmount("100"); - }); - - test("User should be able to select AKT/OSMO", async () => { - await swapPage.selectPair("AKT", "OSMO"); - await swapPage.enterAmount("100"); - }); - - test("User should be able to select PICA/OSMO", async () => { - await swapPage.selectPair("PICA", "OSMO"); - await swapPage.enterAmount("100"); - }); - - test("User should be able to select USDT/OSMO", async () => { - await swapPage.selectPair("USDT", "OSMO"); - await swapPage.enterAmount("100"); - }); - - test("User should be able to select TIA/BOOT", async () => { + test('User should be able to select nBTC/USDC', async () => { + await swapPage.goto() + await swapPage.selectPair('nBTC', 'USDC') + await swapPage.enterAmount('0.01') + await swapPage.showSwapInfo() + }) + + test('User should be able to select WBTC/USDC', async () => { + await swapPage.goto() + await swapPage.selectPair('WBTC', 'USDC') + await swapPage.enterAmount('0.1') + await swapPage.showSwapInfo() + }) + + test('User should be able to select OSMO/USDC', async () => { + await swapPage.goto() + await swapPage.selectPair('OSMO', 'USDC') + await swapPage.enterAmount('1') + await swapPage.showSwapInfo() + }) + + test('User should be able to select INJ/USDC', async () => { + await swapPage.goto() + await swapPage.selectPair('INJ', 'USDC') + await swapPage.enterAmount('10') + await swapPage.showSwapInfo() + }) + + test('User should be able to select TIA/USDC', async () => { + await swapPage.goto() + await swapPage.selectPair('TIA', 'USDC') + await swapPage.enterAmount('100') + await swapPage.showSwapInfo() + }) + + test('User should be able to select ATOM/USDC', async () => { + await swapPage.selectPair('ATOM', 'USDC') + await swapPage.enterAmount('100') + }) + + test('User should be able to select USDT/USDC', async () => { + await swapPage.selectPair('USDT', 'USDC') + await swapPage.enterAmount('10000') + }) + + test('User should be able to select TIA/OSMO', async () => { + await swapPage.selectPair('TIA', 'OSMO') + await swapPage.enterAmount('100') + }) + + test('User should be able to select AKT/OSMO', async () => { + await swapPage.selectPair('AKT', 'OSMO') + await swapPage.enterAmount('100') + }) + + test('User should be able to select PICA/OSMO', async () => { + await swapPage.selectPair('PICA', 'OSMO') + await swapPage.enterAmount('100') + }) + + test('User should be able to select USDT/OSMO', async () => { + await swapPage.selectPair('USDT', 'OSMO') + await swapPage.enterAmount('100') + }) + + test('User should be able to select TIA/BOOT', async () => { // Just to verify some odd pair - await swapPage.selectPair("TIA", "BOOT"); - await swapPage.enterAmount("100"); - }); - - test("User should be able to select stATOM/USDC", async () => { - await swapPage.selectPair("stATOM", "USDC"); - await swapPage.enterAmount("100"); - }); -}); + await swapPage.selectPair('TIA', 'BOOT') + await swapPage.enterAmount('100') + }) + + test('User should be able to select stATOM/USDC', async () => { + await swapPage.selectPair('stATOM', 'USDC') + await swapPage.enterAmount('100') + }) +}) diff --git a/packages/server/src/env.ts b/packages/server/src/env.ts index 4e78f71370..571b8171c9 100644 --- a/packages/server/src/env.ts +++ b/packages/server/src/env.ts @@ -16,28 +16,19 @@ export const GITHUB_RAW_DEFAULT_BASEURL = "https://raw.githubusercontent.com"; export const ASSET_LIST_COMMIT_HASH = process.env.ASSET_LIST_COMMIT_HASH; // data services -export const TIMESERIES_DATA_URL = - process.env.NEXT_PUBLIC_TIMESERIES_DATA_URL ?? +export const HISTORICAL_DATA_URL = + process.env.NEXT_PUBLIC_HISTORICAL_DATA_URL ?? "https://data.stage.osmosis.zone"; -export const INDEXER_DATA_URL = - process.env.NEXT_PUBLIC_INDEXER_DATA_URL ?? "https://data.stage.osmosis.zone"; -export const NUMIA_BASE_URL = - process.env.NEXT_PUBLIC_NUMIA_BASE_URL ?? - "https://public-osmosis-api.numia.xyz"; export const NUMIA_API_KEY = process.env.NUMIA_API_KEY; // sqs export const SIDECAR_BASE_URL = process.env.NEXT_PUBLIC_SIDECAR_BASE_URL ?? "https://sqs.osmosis.zone/"; -export const TFM_BASE_URL = process.env.NEXT_PUBLIC_TFM_API_BASE_URL; export const KEYBASE_BASE_URL = "https://keybase.io/"; export const KV_STORE_REST_API_URL = process.env.KV_STORE_REST_API_URL; export const KV_STORE_REST_API_TOKEN = process.env.KV_STORE_REST_API_TOKEN; -export const BLOCKAID_BASE_URL = process.env.BLOCKAID_BASE_URL; -export const BLOCKAID_API_KEY = process.env.BLOCKAID_API_KEY; - // flags export const EXCLUDED_EXTERNAL_BOOSTS_POOL_IDS = process.env.NEXT_PUBLIC_EXCLUDED_EXTERNAL_BOOSTS_POOL_IDS; diff --git a/packages/server/src/queries/blockaid/index.ts b/packages/server/src/queries/blockaid/index.ts deleted file mode 100644 index 58ecb52749..0000000000 --- a/packages/server/src/queries/blockaid/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BLOCKAID_API_KEY } from "../../env"; - -export * from "./transaction"; - -export const blockaidAuthHeaders: HeadersInit | undefined = BLOCKAID_API_KEY - ? { - "x-api-key": BLOCKAID_API_KEY, - } - : undefined; diff --git a/packages/server/src/queries/blockaid/transaction.ts b/packages/server/src/queries/blockaid/transaction.ts deleted file mode 100644 index 3372f16c9d..0000000000 --- a/packages/server/src/queries/blockaid/transaction.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { HTTPMethod } from "@osmosis-labs/utils"; - -import { BLOCKAID_BASE_URL } from "../../env"; -import { blockaidAuthHeaders } from "."; - -export interface TransactionScanRequest { - chain?: string; - /** - * Example: ['simulation'] - */ - options: string[]; - /** - * Tx hex bytes - */ - transaction: string; - account_address: string; - metadata: { [key: string]: string }; -} - -export interface TransactionScanResponse { - simulation: Simulation; -} - -export interface Simulation { - status: string; - error: string; - events: any[]; - gas_info: GasInfo; - msg_responses: any[]; - asset_diff: AssetDiff; - params: Params; -} - -export interface GasInfo { - gas_wanted: string; - gas_used: string; -} - -export interface AssetDiff { - bank_tokens: BankTokens; - usd_diff: UsdDiff; - missing_prices: boolean; -} - -export interface BankTokens { - diff: Diff; -} - -export interface Diff {} - -export interface UsdDiff { - diff: Diff2; -} - -export interface Diff2 {} - -export interface Params { - signer: string; - messages: any[]; - memo: string; - sequence: string; -} - -export async function transactionScan(payload: TransactionScanRequest) { - if (!BLOCKAID_BASE_URL) throw new Error("BLOCKAID_BASE_URL not set"); - - const url = new URL("/v0/cosmos/transaction/scan/", BLOCKAID_BASE_URL); - - return fetch(url.toString(), { - headers: { - ...blockaidAuthHeaders, - "Content-Type": "application/json", - }, - method: HTTPMethod.POST, - body: JSON.stringify(payload), - }); -} diff --git a/packages/server/src/queries/complex/pools/incentives.ts b/packages/server/src/queries/complex/pools/incentives.ts index 287a57cba0..208fc3759c 100644 --- a/packages/server/src/queries/complex/pools/incentives.ts +++ b/packages/server/src/queries/complex/pools/incentives.ts @@ -1,6 +1,6 @@ -import { Chain } from "@osmosis-labs/types"; +import type { Chain } from "@osmosis-labs/types"; import { Dec, RatePretty } from "@osmosis-labs/unit"; -import cachified, { CacheEntry } from "cachified"; +import cachified, { type CacheEntry } from "cachified"; import dayjs from "dayjs"; import duration from "dayjs/plugin/duration"; import relativeTime from "dayjs/plugin/relativeTime"; @@ -11,13 +11,13 @@ import { EXCLUDED_EXTERNAL_BOOSTS_POOL_IDS } from "../../../env"; import { queryPriceRangeApr } from "../../../queries/data-services"; import { DEFAULT_LRU_OPTIONS } from "../../../utils/cache"; import { - PoolDataRange, + type PoolDataRange, queryPoolAprsRange, } from "../../data-services/pool-aprs"; -import { Gauge, queryGauges } from "../../osmosis"; +import { type Gauge, queryGauges } from "../../osmosis"; import { queryIncentivizedPools } from "../../osmosis/incentives/incentivized-pools"; import { getEpochs } from "../osmosis"; -import { Epoch } from "../osmosis/epochs"; +import type { Epoch } from "../osmosis/epochs"; /** * Pools that are excluded from showing external boost incentives APRs. @@ -234,7 +234,9 @@ export function getLockableDurations() { return lockable_durations .map((durationStr: string) => { - return dayjs.duration(parseInt(durationStr.replace("s", "")) * 1000); + return dayjs.duration( + Number.parseInt(durationStr.replace("s", "")) * 1000 + ); }) .sort((v1, v2) => { return v1.asMilliseconds() > v2.asMilliseconds() ? 1 : -1; @@ -255,7 +257,7 @@ export function getIncentivizedPools({ chainList }: { chainList: Chain[] }) { return incentivized_pools.map((pool) => ({ pool_id: pool.pool_id, lockable_duration: dayjs.duration( - parseInt(pool.lockable_duration.replace("s", "")) * 1000 + Number.parseInt(pool.lockable_duration.replace("s", "")) * 1000 ), gauge_id: pool.gauge_id, })); @@ -282,7 +284,11 @@ export function getActiveGauges({ chainList }: { chainList: Chain[] }) { coin.denom.match(/gamm\/pool\/[0-9]+/m) ) && // no gamm share rewards gauge.filled_epochs != gauge.num_epochs_paid_over && // no completed gauges - checkForStaleness(gauge, parseInt(data[data.length - 1].id), epochs) + checkForStaleness( + gauge, + Number.parseInt(data[data.length - 1].id), + epochs + ) ) .map((gauge) => ({ ...gauge, @@ -290,7 +296,8 @@ export function getActiveGauges({ chainList }: { chainList: Chain[] }) { distribute_to: { ...gauge.distribute_to, duration: dayjs.duration( - parseInt(gauge.distribute_to.duration.replace("s", "")) * 1000 + Number.parseInt(gauge.distribute_to.duration.replace("s", "")) * + 1000 ), }, })); @@ -312,6 +319,6 @@ function checkForStaleness(gauge: Gauge, lastGaugeId: number, epochs: Epoch[]) { (parsedGaugeStartTime > NOW - DURATION_1_DAY && parsedGaugeStartTime < CURRENT_EPOCH_START_TIME + DURATION_1_DAY) || (parsedGaugeStartTime < NOW && - parseInt(gauge.id) > lastGaugeId - MAX_NEW_GAUGES_PER_DAY) + Number.parseInt(gauge.id) > lastGaugeId - MAX_NEW_GAUGES_PER_DAY) ); } diff --git a/packages/server/src/queries/data-services/filtered-pools.ts b/packages/server/src/queries/data-services/filtered-pools.ts index 27516ba51b..d6aa94521e 100644 --- a/packages/server/src/queries/data-services/filtered-pools.ts +++ b/packages/server/src/queries/data-services/filtered-pools.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { TIMESERIES_DATA_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; export type PoolToken = { name: string; @@ -81,7 +81,7 @@ export async function queryFilteredPools( pagination?: Partial ): Promise { // collect params - const url = new URL("/stream/pool/v1/all", TIMESERIES_DATA_URL); + const url = new URL("/stream/pool/v1/all", HISTORICAL_DATA_URL); const queryParams = new URLSearchParams(); if (filters) Object.entries(filters).forEach(([key, value]) => { diff --git a/packages/server/src/queries/data-services/historical-limit-orders.ts b/packages/server/src/queries/data-services/historical-limit-orders.ts index 5c75a1b7f5..58eadd899c 100644 --- a/packages/server/src/queries/data-services/historical-limit-orders.ts +++ b/packages/server/src/queries/data-services/historical-limit-orders.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { NUMIA_BASE_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; export interface HistoricalLimitOrder { place_timestamp: string; @@ -22,7 +22,7 @@ export function queryHistoricalOrders( ): Promise { const url = new URL( `/users/limit_orders/history/closed?address=${userOsmoAddress}`, - NUMIA_BASE_URL + HISTORICAL_DATA_URL ); return apiClient(url.toString()); } diff --git a/packages/server/src/queries/data-services/pool-aprs.ts b/packages/server/src/queries/data-services/pool-aprs.ts index ad85e498cf..5265ebb5f6 100644 --- a/packages/server/src/queries/data-services/pool-aprs.ts +++ b/packages/server/src/queries/data-services/pool-aprs.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { NUMIA_BASE_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; type PoolApr = { pool_id: string; @@ -13,7 +13,7 @@ type PoolApr = { /** Queries numia for a breakdown of APRs per pool. */ export function queryPoolAprs(): Promise { - const url = new URL("/pools_apr", NUMIA_BASE_URL); + const url = new URL("/pools_apr", HISTORICAL_DATA_URL); return apiClient(url.toString()); } @@ -24,6 +24,6 @@ export type PoolDataRange = { /** Queries numia for a breakdown of APRs per pool with range. */ export function queryPoolAprsRange(): Promise[]> { - const url = new URL("/pools_apr_range", NUMIA_BASE_URL); + const url = new URL("/pools_apr_range", HISTORICAL_DATA_URL); return apiClient(url.toString()); } diff --git a/packages/server/src/queries/data-services/pools-fees.ts b/packages/server/src/queries/data-services/pools-fees.ts index f706553b49..543073d96b 100644 --- a/packages/server/src/queries/data-services/pools-fees.ts +++ b/packages/server/src/queries/data-services/pools-fees.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { TIMESERIES_DATA_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; export interface PoolFees { last_update_at: number; @@ -15,6 +15,6 @@ export interface PoolFees { } export function queryPoolsFees(): Promise { - const url = new URL("/fees/v1/pools", TIMESERIES_DATA_URL); + const url = new URL("/fees/v1/pools", HISTORICAL_DATA_URL); return apiClient(url.toString()); } diff --git a/packages/server/src/queries/data-services/portfolio-over-time.ts b/packages/server/src/queries/data-services/portfolio-over-time.ts index c4f769ac6a..f9d716a6a7 100644 --- a/packages/server/src/queries/data-services/portfolio-over-time.ts +++ b/packages/server/src/queries/data-services/portfolio-over-time.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { NUMIA_BASE_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; export interface PortfolioOverTimeResponse { timestamp: string; @@ -14,7 +14,7 @@ export async function queryPortfolioOverTime({ address: string; range: string; }): Promise { - const url = new URL("/users/portfolio/over_time", NUMIA_BASE_URL); + const url = new URL("/users/portfolio/over_time", HISTORICAL_DATA_URL); url.searchParams.append("address", address); url.searchParams.append("range", range); diff --git a/packages/server/src/queries/data-services/position-performance.ts b/packages/server/src/queries/data-services/position-performance.ts index 7100f2fce1..30f3528d59 100644 --- a/packages/server/src/queries/data-services/position-performance.ts +++ b/packages/server/src/queries/data-services/position-performance.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { INDEXER_DATA_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; interface Asset { denom: string; @@ -46,7 +46,7 @@ export async function queryPositionPerformance({ }): Promise { const url = new URL( `/cl/v1/position/last/id/${positionId}`, - INDEXER_DATA_URL + HISTORICAL_DATA_URL ); return await apiClient(url.toString()); diff --git a/packages/server/src/queries/data-services/price-range-apr.ts b/packages/server/src/queries/data-services/price-range-apr.ts index b2e6430df0..1e5df4d3e4 100644 --- a/packages/server/src/queries/data-services/price-range-apr.ts +++ b/packages/server/src/queries/data-services/price-range-apr.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { INDEXER_DATA_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; interface PriceRangeAPR { APR: number; @@ -17,7 +17,7 @@ export async function queryPriceRangeApr({ }): Promise { const url = new URL( `/cl/v1/apr/rewards/${poolId}?lower_tick=${lowerTickIndex}&upper_tick=${upperTickIndex}`, - INDEXER_DATA_URL + HISTORICAL_DATA_URL ); return await apiClient(url.toString()); diff --git a/packages/server/src/queries/data-services/staking-apr.ts b/packages/server/src/queries/data-services/staking-apr.ts index b9b31e6016..eb4284a9a2 100644 --- a/packages/server/src/queries/data-services/staking-apr.ts +++ b/packages/server/src/queries/data-services/staking-apr.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { NUMIA_API_KEY, NUMIA_BASE_URL } from "../../env"; +import { HISTORICAL_DATA_URL, NUMIA_API_KEY } from "../../env"; interface StakingAprResponse { labels: string; @@ -14,7 +14,7 @@ export async function queryStakingApr({ startDate: string; endDate: string; }): Promise { - const url = new URL("/apr", NUMIA_BASE_URL); + const url = new URL("/apr", HISTORICAL_DATA_URL); url.searchParams.append("start_date", startDate); url.searchParams.append("end_date", endDate); diff --git a/packages/server/src/queries/data-services/token-data.ts b/packages/server/src/queries/data-services/token-data.ts index 49c31e4ead..5b7741245e 100644 --- a/packages/server/src/queries/data-services/token-data.ts +++ b/packages/server/src/queries/data-services/token-data.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { TIMESERIES_DATA_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; export interface TokenData { price: number | null; @@ -27,7 +27,7 @@ export async function queryTokenData({ coinDenom: string; }): Promise { // collect params - const url = new URL(`/tokens/v2/${coinDenom}`, TIMESERIES_DATA_URL); + const url = new URL(`/tokens/v2/${coinDenom}`, HISTORICAL_DATA_URL); // for some reason it returns in an array format, but let's return the first item return (await apiClient(url.toString()))?.[0]; @@ -35,6 +35,6 @@ export async function queryTokenData({ export async function queryAllTokenData(): Promise { // collect params - const url = new URL("/tokens/v2/all", TIMESERIES_DATA_URL); + const url = new URL("/tokens/v2/all", HISTORICAL_DATA_URL); return await apiClient(url.toString()); } diff --git a/packages/server/src/queries/data-services/token-historical-chart.ts b/packages/server/src/queries/data-services/token-historical-chart.ts index 9d8c860068..f99f175dd5 100644 --- a/packages/server/src/queries/data-services/token-historical-chart.ts +++ b/packages/server/src/queries/data-services/token-historical-chart.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { TIMESERIES_DATA_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; /** * Time frame represents the amount of minutes per bar, basically price every @@ -56,7 +56,7 @@ export async function queryTokenHistoricalChart({ `/tokens/v2/historical/${encodeURIComponent( coinMinimalDenom )}/chart?tf=${timeFrameMinutes}`, - TIMESERIES_DATA_URL + HISTORICAL_DATA_URL ); try { const response = await apiClient< diff --git a/packages/server/src/queries/data-services/token-pair-historical-chart.ts b/packages/server/src/queries/data-services/token-pair-historical-chart.ts index 341e162b25..2a9f6542af 100644 --- a/packages/server/src/queries/data-services/token-pair-historical-chart.ts +++ b/packages/server/src/queries/data-services/token-pair-historical-chart.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { TIMESERIES_DATA_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; export interface TokenPairHistoricalPrice { close: number; @@ -33,7 +33,7 @@ export async function queryTokenPairHistoricalChart( // collect params const url = new URL( `/pairs/v1/historical/${poolId}/chart?asset_in=${quoteCoinMinimalDenom}&asset_out=${baseCoinMinimalDenom}&range=${priceRange}&asset_type=denom`, - TIMESERIES_DATA_URL + HISTORICAL_DATA_URL ); try { const response = await apiClient< diff --git a/packages/server/src/queries/data-services/transactions.ts b/packages/server/src/queries/data-services/transactions.ts index 6deea79409..b104858b2d 100644 --- a/packages/server/src/queries/data-services/transactions.ts +++ b/packages/server/src/queries/data-services/transactions.ts @@ -1,6 +1,6 @@ import { apiClient } from "@osmosis-labs/utils"; -import { NUMIA_BASE_URL } from "../../env"; +import { HISTORICAL_DATA_URL } from "../../env"; interface Route { pools: Pool[]; @@ -88,7 +88,7 @@ export async function queryTransactions({ page: string; pageSize: string; }): Promise { - const url = new URL(`/v2/txs/${address}`, NUMIA_BASE_URL); + const url = new URL(`/v2/txs/${address}`, HISTORICAL_DATA_URL); url.searchParams.append("page", page); url.searchParams.append("pageSize", pageSize); diff --git a/packages/server/src/queries/index.ts b/packages/server/src/queries/index.ts index 6aba59626a..0461887af9 100644 --- a/packages/server/src/queries/index.ts +++ b/packages/server/src/queries/index.ts @@ -1,4 +1,3 @@ -export * from "./blockaid"; export * from "./coingecko"; export * from "./complex"; export * from "./contracts"; diff --git a/packages/web/.env b/packages/web/.env index 595afd1a9b..71442d636a 100644 --- a/packages/web/.env +++ b/packages/web/.env @@ -7,9 +7,15 @@ GITHUB_URL=https://raw.githubusercontent.com/osmosis-labs/ CMS_REPOSITORY_PATH=assetlists/main/osmosis-1/generated/asset_detail -NEXT_PUBLIC_TFM_API_BASE_URL=https://api.tfm.com + +# Bridge providers NEXT_PUBLIC_SQUID_INTEGRATOR_ID=osmosis-api +# SKIP_API_KEY= + +# Data services URLs NEXT_PUBLIC_SIDECAR_BASE_URL=https://sqs.osmosis.zone +NEXT_PUBLIC_HISTORICAL_DATA_URL=https://data.app.osmosis.zone + # Feature Flags # NEXT_PUBLIC_LAUNCH_DARKLY_CLIENT_SIDE_ID="" @@ -23,15 +29,13 @@ NEXT_PUBLIC_SIDECAR_BASE_URL=https://sqs.osmosis.zone # NEXT_PUBLIC_OSMOSIS_CHAIN_NAME_OVERWRITE=Osmosis (Testnet v13.X latest) # NEXT_PUBLIC_WALLETCONNECT_PROJECT_KEY=YOUR_WALLETCONNECT_PROJECT_KEY # NEXT_PUBLIC_WALLETCONNECT_RELAY_URL=wss://relay.walletconnect.com -# NEXT_PUBLIC_TIMESERIES_DATA_URL=https://data.stage.osmosis.zone -# NEXT_PUBLIC_INDEXER_DATA_URL=https://data.stage.osmosis.zone # Twitter api config, it's only used on server TWITTER_API_URL=https://api.twitter.com/ # TWITTER_API_ACCESS_TOKEN= # Twitter KV Store Cache -# TWITTER_KV_STORE_REST_API_URL= -# TWITTER_KV_STORE_REST_API_TOKEN= +# KV_STORE_REST_API_URL= +# KV_STORE_REST_API_TOKEN= # Coingecko API DEV Auth Token (Only for local dev usage) # COINGECKO_API_KEY= @@ -44,10 +48,6 @@ TWITTER_API_URL=https://api.twitter.com/ # Pools that are excluded from showing external boost incentives APRs. # NEXT_PUBLIC_EXCLUDED_EXTERNAL_BOOSTS_POOL_IDS= -# Blockaid API -BLOCKAID_BASE_URL=http://api.blockaid.io:80 -# BLOCKAID_API_KEY= - NEXT_PUBLIC_SPEND_LIMIT_CONTRACT_ADDRESS=osmo10xqv8rlpkflywm92k5wdmplzy7khtasl9c2c08psmvlu543k724sy94k74 # Disable TRPC logs in development diff --git a/packages/web/config/env.ts b/packages/web/config/env.ts index a83210a0e8..c7b58e684f 100644 --- a/packages/web/config/env.ts +++ b/packages/web/config/env.ts @@ -14,8 +14,7 @@ export const WALLETCONNECT_PROJECT_KEY = export const WALLETCONNECT_RELAY_URL = process.env.NEXT_PUBLIC_WALLETCONNECT_RELAY_URL; -export const TIMESERIES_DATA_URL = process.env.NEXT_PUBLIC_TIMESERIES_DATA_URL; -export const INDEXER_DATA_URL = process.env.NEXT_PUBLIC_INDEXER_DATA_URL; +export const HISTORICAL_DATA_URL = process.env.NEXT_PUBLIC_HISTORICAL_DATA_URL; export const TWITTER_PUBLIC_URL = "https://x.com"; export const COINGECKO_PUBLIC_URL = "https://www.coingecko.com"; diff --git a/packages/web/stores/root.ts b/packages/web/stores/root.ts index 1a5c6ffe76..b7c03ed8b4 100644 --- a/packages/web/stores/root.ts +++ b/packages/web/stores/root.ts @@ -20,7 +20,7 @@ import { OsmosisAccount, OsmosisQueries, PoolFallbackPriceStore, - TxEvents, + type TxEvents, UnsafeIbcCurrencyRegistrar, } from "@osmosis-labs/stores"; import type { ChainInfoWithExplorer } from "@osmosis-labs/types"; @@ -32,9 +32,8 @@ import { } from "~/components/alert/tx-event-toast"; import { BlacklistedPoolIds, - INDEXER_DATA_URL, + HISTORICAL_DATA_URL, IS_TESTNET, - TIMESERIES_DATA_URL, TransmuterPoolCodeIds, WALLETCONNECT_PROJECT_KEY, WALLETCONNECT_RELAY_URL, @@ -159,8 +158,8 @@ export class RootStore { this.chainStore.osmosis.chainId ).osmosis!.queryIncentivizedPools, webApiBaseUrl, - TIMESERIES_DATA_URL, - INDEXER_DATA_URL + HISTORICAL_DATA_URL, + HISTORICAL_DATA_URL ); this.accountStore = new AccountStore( diff --git a/turbo.json b/turbo.json index 5889eab2ae..b7b4523d65 100644 --- a/turbo.json +++ b/turbo.json @@ -44,7 +44,6 @@ "NEXT_PUBLIC_SQUID_INTEGRATOR_ID", "NEXT_PUBLIC_SIDECAR_BASE_URL", "TWITTER_API_URL", - "BLOCKAID_BASE_URL", "NEXT_PUBLIC_SPEND_LIMIT_CONTRACT_ADDRESS", "NEXT_PUBLIC_LAUNCH_DARKLY_CLIENT_SIDE_ID", "NEXT_PUBLIC_IS_TESTNET", @@ -55,8 +54,6 @@ "NEXT_PUBLIC_OSMOSIS_CHAIN_NAME_OVERWRITE", "NEXT_PUBLIC_WALLETCONNECT_PROJECT_KEY", "NEXT_PUBLIC_WALLETCONNECT_RELAY_URL", - "NEXT_PUBLIC_TIMESERIES_DATA_URL", - "NEXT_PUBLIC_INDEXER_DATA_URL", "TWITTER_API_ACCESS_TOKEN", "TWITTER_KV_STORE_REST_API_URL", "TWITTER_KV_STORE_REST_API_TOKEN", @@ -65,6 +62,8 @@ "GITHUB_API_TOKEN", "NEXT_PUBLIC_FE_CONTENT_COMMIT_HASH", "NEXT_PUBLIC_EXCLUDED_EXTERNAL_BOOSTS_POOL_IDS", - "BLOCKAID_API_KEY" + "NEXT_PUBLIC_HISTORICAL_DATA_URL", + "NEXT_PUBLIC_TRPC_LOGS", + "SKIP_API_KEY" ] }