From e81538ce25d4544f59c337f1604e73fcfd01b772 Mon Sep 17 00:00:00 2001 From: lendihop Date: Thu, 26 Oct 2023 11:12:00 +0200 Subject: [PATCH 1/2] lyzi added --- src/utils/dapp-list-constants.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/dapp-list-constants.ts b/src/utils/dapp-list-constants.ts index 38d7375..06656c1 100644 --- a/src/utils/dapp-list-constants.ts +++ b/src/utils/dapp-list-constants.ts @@ -144,5 +144,13 @@ export const dappList: DappList[] = [ logo: 'https://pbs.twimg.com/profile_images/1538616711536156672/eRwz1uNE_400x400.jpg', slug: 'kordfi', categories: [DappType.DeFi] + }, + { + name: 'Lyzi', + dappUrl: 'https://dapp.lyzi.fr/', + type: DappType.DeFi, + logo: 'https://assets-global.website-files.com/6475ceee719579d9e88c6c2f/6475d6f27dd17b6b206bf848_Design%20sans%20titre%20(20).png', + slug: 'lyzi', + categories: [DappType.DeFi] } ]; From 7a7048ebf423d80401705cbe4b2a7ade8c4dd4ea Mon Sep 17 00:00:00 2001 From: Inokentii Mazhara Date: Tue, 31 Oct 2023 17:50:44 +0200 Subject: [PATCH 2/2] TW-1159 Update work with tzstats API (now called tzpro) --- .env.dist | 1 + README.md | 2 +- src/config.ts | 3 ++- src/utils/tezos.ts | 5 ++++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.env.dist b/.env.dist index 2b50f2b..32c3803 100644 --- a/.env.dist +++ b/.env.dist @@ -10,3 +10,4 @@ THREE_ROUTE_API_AUTH_TOKEN= REDIS_URL= ADD_NOTIFICATION_USERNAME= ADD_NOTIFICATION_PASSWORD= +TZPRO_API_KEY= diff --git a/README.md b/README.md index 81400aa..2c21d2e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The Express backend which helps Temple Wallet to decrease amount of requests to | Path | Description | | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | /api/dapps | Provides a list of dApps with their TVL, summary TVL and amount of TEZ locked in them. | -| /api/exchange-rates/tez | Returns a single number, which is TEZ to USD exchange rate according to markets tickers from tzstats.com | +| /api/exchange-rates/tez | Returns a single number, which is TEZ to USD exchange rate according to markets tickers from TzPro API.com | | /api/exchange-rates | Returns the exchange rates of tokens to USD based on Quipuswap and Dexter pools (for most of them), stats from TZero (only for Aspencoin) and exchange rates from Coingecko (for WRAP tokens which are still not in pools). | | /api/moonpay-sign | Returns signed MoonPay url | | /api/mobile-check | Returns the minimum allowed versions of Android and IOS applications. Verifies App Check token. | diff --git a/src/config.ts b/src/config.ts index 4cfd913..81ec1d8 100644 --- a/src/config.ts +++ b/src/config.ts @@ -12,7 +12,8 @@ export const EnvVars = { THREE_ROUTE_API_AUTH_TOKEN: getEnv('THREE_ROUTE_API_AUTH_TOKEN'), REDIS_URL: getEnv('REDIS_URL'), ADD_NOTIFICATION_USERNAME: getEnv('ADD_NOTIFICATION_USERNAME'), - ADD_NOTIFICATION_PASSWORD: getEnv('ADD_NOTIFICATION_PASSWORD') + ADD_NOTIFICATION_PASSWORD: getEnv('ADD_NOTIFICATION_PASSWORD'), + TZPRO_API_KEY: getEnv('TZPRO_API_KEY') }; for (const name in EnvVars) { diff --git a/src/utils/tezos.ts b/src/utils/tezos.ts index e279b26..669ee3f 100644 --- a/src/utils/tezos.ts +++ b/src/utils/tezos.ts @@ -3,6 +3,7 @@ import { tzip12 } from '@taquito/tzip12'; import { tzip16 } from '@taquito/tzip16'; import memoizee from 'memoizee'; +import { EnvVars } from '../config'; import { ITicker } from '../interfaces/ticker.interface'; import fetch from './fetch'; import SingleQueryDataProvider from './SingleQueryDataProvider'; @@ -53,7 +54,9 @@ export const getStorage = memoizee( ); const getTezExchangeRate = async () => { - const marketTickers = await fetch>('https://api.tzstats.com/markets/tickers'); + const marketTickers = await fetch>( + `https://api.tzpro.io/markets/tickers?api_key=${EnvVars.TZPRO_API_KEY}` + ); const usdTickers = marketTickers.filter(e => e.quote === 'USD' && e.base === 'XTZ'); // price index: use all USD ticker last prices with equal weight const vol = usdTickers.reduce((s, t) => s + t.volume_base, 0) || null;